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_ILBC_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ILBC_H_
14 #include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h"
16 // forward declaration
17 struct iLBC_encinst_t_;
18 struct iLBC_decinst_t_;
24 class ACMILBC : public ACMGenericCodec {
26 explicit ACMILBC(int16_t codec_id);
30 ACMGenericCodec* CreateInstance(void);
32 int16_t InternalEncode(uint8_t* bitstream,
33 int16_t* bitstream_len_byte) OVERRIDE
34 EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
36 int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params);
39 int16_t SetBitRateSafe(const int32_t rate) OVERRIDE
40 EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
42 void DestructEncoderSafe() OVERRIDE
43 EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
45 int16_t InternalCreateEncoder();
47 void InternalDestructEncoderInst(void* ptr_inst);
49 iLBC_encinst_t_* encoder_inst_ptr_;
56 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ILBC_H_