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 11#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_AMRWB_H_ 12#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_AMRWB_H_ 13 14#include "webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h" 15 16// forward declaration 17struct AMRWB_encinst_t_; 18struct AMRWB_decinst_t_; 19 20namespace webrtc { 21 22namespace acm2 { 23 24class ACMAMRwb : public ACMGenericCodec { 25 public: 26 explicit ACMAMRwb(int16_t codec_id); 27 ~ACMAMRwb(); 28 29 // for FEC 30 ACMGenericCodec* CreateInstance(void); 31 32 int16_t InternalEncode(uint8_t* bitstream, int16_t* bitstream_len_byte); 33 34 int16_t InternalInitEncoder(WebRtcACMCodecParams* codec_params); 35 36 int16_t SetAMRwbEncoderPackingFormat( 37 const ACMAMRPackingFormat packing_format); 38 39 ACMAMRPackingFormat AMRwbEncoderPackingFormat() const; 40 41 int16_t SetAMRwbDecoderPackingFormat( 42 const ACMAMRPackingFormat packing_format); 43 44 ACMAMRPackingFormat AMRwbDecoderPackingFormat() const; 45 46 protected: 47 void DestructEncoderSafe(); 48 49 int16_t InternalCreateEncoder(); 50 51 int16_t SetBitRateSafe(const int32_t rate); 52 53 int16_t EnableDTX(); 54 55 int16_t DisableDTX(); 56 57 AMRWB_encinst_t_* encoder_inst_ptr_; 58 59 int16_t encoding_mode_; 60 int16_t encoding_rate_; 61 ACMAMRPackingFormat encoder_packing_format_; 62}; 63 64} // namespace acm2 65 66} // namespace webrtc 67 68#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_AMRWB_H_ 69