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 #include "webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.h" 12 13 #ifdef WEBRTC_CODEC_AVT 14 #include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h" 15 #include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h" 16 #include "webrtc/system_wrappers/interface/trace.h" 17 #endif 18 19 namespace webrtc { 20 21 namespace acm2 { 22 23 #ifndef WEBRTC_CODEC_AVT 24 ACMDTMFPlayout(int16_t)25ACMDTMFPlayout::ACMDTMFPlayout(int16_t /* codec_id */) { return; } 26 ~ACMDTMFPlayout()27ACMDTMFPlayout::~ACMDTMFPlayout() { return; } 28 InternalEncode(uint8_t *,int16_t *)29int16_t ACMDTMFPlayout::InternalEncode(uint8_t* /* bitstream */, 30 int16_t* /* bitstream_len_byte */) { 31 return -1; 32 } 33 InternalInitEncoder(WebRtcACMCodecParams *)34int16_t ACMDTMFPlayout::InternalInitEncoder( 35 WebRtcACMCodecParams* /* codec_params */) { 36 return -1; 37 } 38 CreateInstance(void)39ACMGenericCodec* ACMDTMFPlayout::CreateInstance(void) { return NULL; } 40 InternalCreateEncoder()41int16_t ACMDTMFPlayout::InternalCreateEncoder() { return -1; } 42 InternalDestructEncoderInst(void *)43void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) { 44 return; 45 } 46 DestructEncoderSafe()47void ACMDTMFPlayout::DestructEncoderSafe() { 48 return; 49 } 50 51 #else //===================== Actual Implementation ======================= 52 53 ACMDTMFPlayout::ACMDTMFPlayout(int16_t codec_id) { codec_id_ = codec_id; } 54 55 ACMDTMFPlayout::~ACMDTMFPlayout() { return; } 56 57 int16_t ACMDTMFPlayout::InternalEncode(uint8_t* /* bitstream */, 58 int16_t* /* bitstream_len_byte */) { 59 return 0; 60 } 61 62 int16_t ACMDTMFPlayout::InternalInitEncoder( 63 WebRtcACMCodecParams* /* codec_params */) { 64 // This codec does not need initialization, 65 // DTMFPlayout has no instance 66 return 0; 67 } 68 69 ACMGenericCodec* ACMDTMFPlayout::CreateInstance(void) { return NULL; } 70 71 int16_t ACMDTMFPlayout::InternalCreateEncoder() { 72 // DTMFPlayout has no instance 73 return 0; 74 } 75 76 void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) { 77 // DTMFPlayout has no instance 78 return; 79 } 80 81 void ACMDTMFPlayout::DestructEncoderSafe() { 82 // DTMFPlayout has no instance 83 return; 84 } 85 86 #endif 87 88 } // namespace acm2 89 90 } // namespace webrtc 91