turaj@webrtc.org | 7959e16 | 2013-09-12 18:30:26 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
turaj@webrtc.org | 48af652 | 2013-09-13 23:06:59 | [diff] [blame] | 11 | #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_ |
| 12 | #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_ |
turaj@webrtc.org | 7959e16 | 2013-09-12 18:30:26 | [diff] [blame] | 13 | |
turaj@webrtc.org | 48af652 | 2013-09-13 23:06:59 | [diff] [blame] | 14 | #include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h" |
turaj@webrtc.org | 7959e16 | 2013-09-12 18:30:26 | [diff] [blame] | 15 | |
| 16 | // forward declaration |
| 17 | struct G722_1C_24_encinst_t_; |
| 18 | struct G722_1C_24_decinst_t_; |
| 19 | struct G722_1C_32_encinst_t_; |
| 20 | struct G722_1C_32_decinst_t_; |
| 21 | struct G722_1C_48_encinst_t_; |
| 22 | struct G722_1C_48_decinst_t_; |
| 23 | struct G722_1_Inst_t_; |
| 24 | |
| 25 | namespace webrtc { |
| 26 | |
turaj@webrtc.org | 6d5d248 | 2013-10-06 04:47:28 | [diff] [blame] | 27 | namespace acm2 { |
| 28 | |
turaj@webrtc.org | 7959e16 | 2013-09-12 18:30:26 | [diff] [blame] | 29 | class ACMG722_1C : public ACMGenericCodec { |
| 30 | public: |
| 31 | explicit ACMG722_1C(int16_t codec_id); |
| 32 | ~ACMG722_1C(); |
| 33 | |
| 34 | // for FEC |
| 35 | ACMGenericCodec* CreateInstance(void); |
| 36 | |
| 37 | int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte); |
| 38 | |
| 39 | int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params); |
| 40 | |
| 41 | protected: |
| 42 | void DestructEncoderSafe(); |
| 43 | |
| 44 | int16_t InternalCreateEncoder(); |
| 45 | |
| 46 | void InternalDestructEncoderInst(void* ptr_inst); |
| 47 | |
| 48 | int32_t operational_rate_; |
| 49 | |
| 50 | G722_1_Inst_t_* encoder_inst_ptr_; |
| 51 | G722_1_Inst_t_* encoder_inst_ptr_right_; // Used in stereo mode |
| 52 | |
| 53 | // Only one set of these pointer is valid at any instance |
| 54 | G722_1C_24_encinst_t_* encoder_inst24_ptr_; |
| 55 | G722_1C_24_encinst_t_* encoder_inst24_ptr_right_; |
| 56 | G722_1C_32_encinst_t_* encoder_inst32_ptr_; |
| 57 | G722_1C_32_encinst_t_* encoder_inst32_ptr_right_; |
| 58 | G722_1C_48_encinst_t_* encoder_inst48_ptr_; |
| 59 | G722_1C_48_encinst_t_* encoder_inst48_ptr_right_; |
| 60 | }; |
| 61 | |
turaj@webrtc.org | 6d5d248 | 2013-10-06 04:47:28 | [diff] [blame] | 62 | } // namespace acm2 |
| 63 | |
turaj@webrtc.org | 7959e16 | 2013-09-12 18:30:26 | [diff] [blame] | 64 | } // namespace webrtc |
| 65 | |
turaj@webrtc.org | 48af652 | 2013-09-13 23:06:59 | [diff] [blame] | 66 | #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_ |