Bug 797671: Import Webrtc.org code from stable branch 3.12 (rev 2820) rs=jesup
[gecko.git] / media / webrtc / trunk / src / modules / audio_coding / main / source / acm_gsmfr.h
blob8991de8885a2c64be31333d98e2cb8a725b9ebe6
1 /*
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.
9 */
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_SOURCE_ACM_GSMFR_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_SOURCE_ACM_GSMFR_H_
14 #include "acm_generic_codec.h"
16 // forward declaration
17 struct GSMFR_encinst_t_;
18 struct GSMFR_decinst_t_;
20 namespace webrtc {
22 class ACMGSMFR : public ACMGenericCodec
24 public:
25 ACMGSMFR(WebRtc_Word16 codecID);
26 ~ACMGSMFR();
27 // for FEC
28 ACMGenericCodec* CreateInstance(void);
30 WebRtc_Word16 InternalEncode(
31 WebRtc_UWord8* bitstream,
32 WebRtc_Word16* bitStreamLenByte);
34 WebRtc_Word16 InternalInitEncoder(
35 WebRtcACMCodecParams *codecParams);
37 WebRtc_Word16 InternalInitDecoder(
38 WebRtcACMCodecParams *codecParams);
40 protected:
41 WebRtc_Word16 DecodeSafe(
42 WebRtc_UWord8* bitStream,
43 WebRtc_Word16 bitStreamLenByte,
44 WebRtc_Word16* audio,
45 WebRtc_Word16* audioSamples,
46 WebRtc_Word8* speechType);
48 WebRtc_Word32 CodecDef(
49 WebRtcNetEQ_CodecDef& codecDef,
50 const CodecInst& codecInst);
52 void DestructEncoderSafe();
54 void DestructDecoderSafe();
56 WebRtc_Word16 InternalCreateEncoder();
58 WebRtc_Word16 InternalCreateDecoder();
60 void InternalDestructEncoderInst(
61 void* ptrInst);
63 WebRtc_Word16 EnableDTX();
65 WebRtc_Word16 DisableDTX();
67 GSMFR_encinst_t_* _encoderInstPtr;
68 GSMFR_decinst_t_* _decoderInstPtr;
71 } // namespace webrtc
73 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_SOURCE_ACM_GSMFR_H_