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 "voe_codec.h"
16 #include "ref_count.h"
17 #include "shared_data.h"
22 class VoECodecImpl
: public VoECodec
,
26 virtual int Release();
28 virtual int NumOfCodecs();
30 virtual int GetCodec(int index
, CodecInst
& codec
);
32 virtual int SetSendCodec(int channel
, const CodecInst
& codec
);
34 virtual int GetSendCodec(int channel
, CodecInst
& codec
);
36 virtual int GetRecCodec(int channel
, CodecInst
& codec
);
38 virtual int SetAMREncFormat(int channel
,
39 AmrMode mode
= kRfc3267BwEfficient
);
41 virtual int SetAMRDecFormat(int channel
,
42 AmrMode mode
= kRfc3267BwEfficient
);
44 virtual int SetAMRWbEncFormat(int channel
,
45 AmrMode mode
= kRfc3267BwEfficient
);
47 virtual int SetAMRWbDecFormat(int channel
,
48 AmrMode mode
= kRfc3267BwEfficient
);
50 virtual int SetSendCNPayloadType(
51 int channel
, int type
,
52 PayloadFrequencies frequency
= kFreq16000Hz
);
54 virtual int SetRecPayloadType(int channel
,
55 const CodecInst
& codec
);
57 virtual int GetRecPayloadType(int channel
, CodecInst
& codec
);
59 virtual int SetISACInitTargetRate(int channel
,
61 bool useFixedFrameSize
= false);
63 virtual int SetISACMaxRate(int channel
, int rateBps
);
65 virtual int SetISACMaxPayloadSize(int channel
, int sizeBytes
);
67 virtual int SetVADStatus(int channel
,
69 VadModes mode
= kVadConventional
,
70 bool disableDTX
= false);
72 virtual int GetVADStatus(int channel
,
78 VoECodecImpl(voe::SharedData
* shared
);
79 virtual ~VoECodecImpl();
82 void ACMToExternalCodecRepresentation(CodecInst
& toInst
,
83 const CodecInst
& fromInst
);
85 void ExternalToACMCodecRepresentation(CodecInst
& toInst
,
86 const CodecInst
& fromInst
);
88 voe::SharedData
* _shared
;
93 #endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H