Bug 797526 - some assertions in nsDOMClassInfo should be fatal in debug builds -...
[gecko.git] / media / webrtc / trunk / src / voice_engine / main / source / voe_codec_impl.h
blob8fef9fed26f0ff948fc9e48e9d9708dca5307aba
1 /*
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.
9 */
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"
19 namespace webrtc
22 class VoECodecImpl: public VoECodec,
23 public voe::RefCount
25 public:
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,
60 int rateBps,
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,
68 bool enable,
69 VadModes mode = kVadConventional,
70 bool disableDTX = false);
72 virtual int GetVADStatus(int channel,
73 bool& enabled,
74 VadModes& mode,
75 bool& disabledDTX);
77 protected:
78 VoECodecImpl(voe::SharedData* shared);
79 virtual ~VoECodecImpl();
81 private:
82 void ACMToExternalCodecRepresentation(CodecInst& toInst,
83 const CodecInst& fromInst);
85 void ExternalToACMCodecRepresentation(CodecInst& toInst,
86 const CodecInst& fromInst);
88 voe::SharedData* _shared;
91 } // namespace webrtc
93 #endif // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H