2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221_H_
14 #include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h"
16 // forward declaration
17 struct G722_1_16_encinst_t_;
18 struct G722_1_16_decinst_t_;
19 struct G722_1_24_encinst_t_;
20 struct G722_1_24_decinst_t_;
21 struct G722_1_32_encinst_t_;
22 struct G722_1_32_decinst_t_;
23 struct G722_1_Inst_t_;
29 class ACMG722_1 : public ACMGenericCodec {
31 explicit ACMG722_1(int16_t codec_id);
35 ACMGenericCodec* CreateInstance(void);
37 int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte);
39 int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
42 void DestructEncoderSafe();
44 int16_t InternalCreateEncoder();
46 int32_t operational_rate_;
48 G722_1_Inst_t_* encoder_inst_ptr_;
49 G722_1_Inst_t_* encoder_inst_ptr_right_; // Used in stereo mode
51 // Only one set of these pointer is valid at any instance
52 G722_1_16_encinst_t_* encoder_inst16_ptr_;
53 G722_1_16_encinst_t_* encoder_inst16_ptr_right_;
54 G722_1_24_encinst_t_* encoder_inst24_ptr_;
55 G722_1_24_encinst_t_* encoder_inst24_ptr_right_;
56 G722_1_32_encinst_t_* encoder_inst32_ptr_;
57 G722_1_32_encinst_t_* encoder_inst32_ptr_right_;
64 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221_H_