aboutsummaryrefslogtreecommitdiff
path: root/webrtc/voice_engine/voe_codec_impl.h
blob: 5095f6e23296bafa5b1671bd50fa1441e6da8987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
 *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H
#define WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H

#include "webrtc/voice_engine/include/voe_codec.h"

#include "webrtc/voice_engine/shared_data.h"

namespace webrtc {

class VoECodecImpl : public VoECodec {
 public:
  int NumOfCodecs() override;

  int GetCodec(int index, CodecInst& codec) override;

  int SetSendCodec(int channel, const CodecInst& codec) override;

  int GetSendCodec(int channel, CodecInst& codec) override;

  int SetBitRate(int channel, int bitrate_bps) override;

  int GetRecCodec(int channel, CodecInst& codec) override;

  int SetSendCNPayloadType(
      int channel,
      int type,
      PayloadFrequencies frequency = kFreq16000Hz) override;

  int SetRecPayloadType(int channel, const CodecInst& codec) override;

  int GetRecPayloadType(int channel, CodecInst& codec) override;

  int SetFECStatus(int channel, bool enable) override;

  int GetFECStatus(int channel, bool& enabled) override;

  int SetVADStatus(int channel,
                   bool enable,
                   VadModes mode = kVadConventional,
                   bool disableDTX = false) override;

  int GetVADStatus(int channel,
                   bool& enabled,
                   VadModes& mode,
                   bool& disabledDTX) override;

  int SetOpusMaxPlaybackRate(int channel, int frequency_hz) override;

  int SetOpusDtx(int channel, bool enable_dtx) override;

  RtcEventLog* GetEventLog() override;

 protected:
  VoECodecImpl(voe::SharedData* shared);
  ~VoECodecImpl() override;

 private:
  voe::SharedData* _shared;
};

}  // namespace webrtc

#endif  // WEBRTC_VOICE_ENGINE_VOE_CODEC_IMPL_H