• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_VOICE_ENGINE_VOE_CODEC_IMPL_H
12 #define WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H
13 
14 #include "webrtc/voice_engine/include/voe_codec.h"
15 
16 #include "webrtc/voice_engine/shared_data.h"
17 
18 namespace webrtc {
19 
20 class VoECodecImpl : public VoECodec {
21  public:
22   int NumOfCodecs() override;
23 
24   int GetCodec(int index, CodecInst& codec) override;
25 
26   int SetSendCodec(int channel, const CodecInst& codec) override;
27 
28   int GetSendCodec(int channel, CodecInst& codec) override;
29 
30   int SetBitRate(int channel, int bitrate_bps) override;
31 
32   int GetRecCodec(int channel, CodecInst& codec) override;
33 
34   int SetSendCNPayloadType(
35       int channel,
36       int type,
37       PayloadFrequencies frequency = kFreq16000Hz) override;
38 
39   int SetRecPayloadType(int channel, const CodecInst& codec) override;
40 
41   int GetRecPayloadType(int channel, CodecInst& codec) override;
42 
43   int SetFECStatus(int channel, bool enable) override;
44 
45   int GetFECStatus(int channel, bool& enabled) override;
46 
47   int SetVADStatus(int channel,
48                    bool enable,
49                    VadModes mode = kVadConventional,
50                    bool disableDTX = false) override;
51 
52   int GetVADStatus(int channel,
53                    bool& enabled,
54                    VadModes& mode,
55                    bool& disabledDTX) override;
56 
57   int SetOpusMaxPlaybackRate(int channel, int frequency_hz) override;
58 
59   int SetOpusDtx(int channel, bool enable_dtx) override;
60 
61   RtcEventLog* GetEventLog() override;
62 
63  protected:
64   VoECodecImpl(voe::SharedData* shared);
65   ~VoECodecImpl() override;
66 
67  private:
68   voe::SharedData* _shared;
69 };
70 
71 }  // namespace webrtc
72 
73 #endif  // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H
74