blob: 66b0f54a37eec2c4c7e3134fd75135729b91e9a0 [file] [log] [blame]
turaj@webrtc.org7959e162013-09-12 18:30:261/*
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.org48af6522013-09-13 23:06:5911#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_
12#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_
turaj@webrtc.org7959e162013-09-12 18:30:2613
turaj@webrtc.org48af6522013-09-13 23:06:5914#include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h"
turaj@webrtc.org7959e162013-09-12 18:30:2615
16// forward declaration
17struct G722_1C_24_encinst_t_;
18struct G722_1C_24_decinst_t_;
19struct G722_1C_32_encinst_t_;
20struct G722_1C_32_decinst_t_;
21struct G722_1C_48_encinst_t_;
22struct G722_1C_48_decinst_t_;
23struct G722_1_Inst_t_;
24
25namespace webrtc {
26
turaj@webrtc.org6d5d2482013-10-06 04:47:2827namespace acm2 {
28
turaj@webrtc.org7959e162013-09-12 18:30:2629class 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.org6d5d2482013-10-06 04:47:2862} // namespace acm2
63
turaj@webrtc.org7959e162013-09-12 18:30:2664} // namespace webrtc
65
turaj@webrtc.org48af6522013-09-13 23:06:5966#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_