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_VOICE_ENGINE_VOE_CODEC_IMPL_H
12 #define WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H
14 #include "webrtc/voice_engine/include/voe_codec.h"
16 #include "webrtc/voice_engine/shared_data.h"
21 class VoECodecImpl: public VoECodec
24 virtual int NumOfCodecs();
26 virtual int GetCodec(int index, CodecInst& codec);
28 virtual int SetSendCodec(int channel, const CodecInst& codec);
30 virtual int GetSendCodec(int channel, CodecInst& codec);
32 virtual int GetRecCodec(int channel, CodecInst& codec);
34 virtual int SetSendCNPayloadType(
35 int channel, int type,
36 PayloadFrequencies frequency = kFreq16000Hz);
38 virtual int SetRecPayloadType(int channel,
39 const CodecInst& codec);
41 virtual int GetRecPayloadType(int channel, CodecInst& codec);
43 virtual int SetVADStatus(int channel,
45 VadModes mode = kVadConventional,
46 bool disableDTX = false);
48 virtual int GetVADStatus(int channel,
54 virtual int SetSecondarySendCodec(int channel, const CodecInst& codec,
55 int red_payload_type);
57 virtual int RemoveSecondarySendCodec(int channel);
59 virtual int GetSecondarySendCodec(int channel, CodecInst& codec);
62 VoECodecImpl(voe::SharedData* shared);
63 virtual ~VoECodecImpl();
66 void ACMToExternalCodecRepresentation(CodecInst& toInst,
67 const CodecInst& fromInst);
69 void ExternalToACMCodecRepresentation(CodecInst& toInst,
70 const CodecInst& fromInst);
72 voe::SharedData* _shared;
77 #endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H