niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 813e4b0 | 2012-03-01 18:34:25 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
andrew@webrtc.org | 382c0c2 | 2014-05-05 18:22:21 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
| 12 | #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 14 | #include <memory> |
| 15 | |
kjellander | 7324eb9 | 2016-02-25 08:36:42 -0800 | [diff] [blame] | 16 | #include "webrtc/audio/audio_sink.h" |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 17 | #include "webrtc/base/criticalsection.h" |
xians@webrtc.org | 2f84afa | 2013-07-31 16:23:37 +0000 | [diff] [blame] | 18 | #include "webrtc/common_audio/resampler/include/push_resampler.h" |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 19 | #include "webrtc/common_types.h" |
kjellander | 3e6db23 | 2015-11-26 04:44:54 -0800 | [diff] [blame] | 20 | #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 21 | #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h" |
andrew@webrtc.org | 382c0c2 | 2014-05-05 18:22:21 +0000 | [diff] [blame] | 22 | #include "webrtc/modules/audio_processing/rms_level.h" |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 23 | #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
| 24 | #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 25 | #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
| 26 | #include "webrtc/modules/utility/include/file_player.h" |
| 27 | #include "webrtc/modules/utility/include/file_recorder.h" |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 28 | #include "webrtc/voice_engine/dtmf_inband.h" |
| 29 | #include "webrtc/voice_engine/dtmf_inband_queue.h" |
| 30 | #include "webrtc/voice_engine/include/voe_audio_processing.h" |
| 31 | #include "webrtc/voice_engine/include/voe_network.h" |
| 32 | #include "webrtc/voice_engine/level_indicator.h" |
minyue@webrtc.org | 74aaf29 | 2014-07-16 21:28:26 +0000 | [diff] [blame] | 33 | #include "webrtc/voice_engine/network_predictor.h" |
turaj@webrtc.org | 6388c3e | 2013-02-12 21:42:18 +0000 | [diff] [blame] | 34 | #include "webrtc/voice_engine/shared_data.h" |
| 35 | #include "webrtc/voice_engine/voice_engine_defines.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 36 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | #ifdef WEBRTC_DTMF_DETECTION |
pbos@webrtc.org | 956aa7e | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 38 | // TelephoneEventDetectionMethods, TelephoneEventObserver |
| 39 | #include "webrtc/voice_engine/include/voe_dtmf.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 40 | #endif |
| 41 | |
wu@webrtc.org | 94454b7 | 2014-06-05 20:34:08 +0000 | [diff] [blame] | 42 | namespace rtc { |
| 43 | |
| 44 | class TimestampWrapAroundHandler; |
| 45 | } |
| 46 | |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 47 | namespace webrtc { |
| 48 | |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 49 | class AudioDeviceModule; |
minyue@webrtc.org | e509f94 | 2013-09-12 17:03:00 +0000 | [diff] [blame] | 50 | class Config; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 51 | class FileWrapper; |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 52 | class PacketRouter; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 53 | class ProcessThread; |
| 54 | class ReceiveStatistics; |
wu@webrtc.org | 82c4b85 | 2014-05-20 22:55:01 +0000 | [diff] [blame] | 55 | class RemoteNtpTimeEstimator; |
ivoc | b04965c | 2015-09-09 00:09:43 -0700 | [diff] [blame] | 56 | class RtcEventLog; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 57 | class RTPPayloadRegistry; |
| 58 | class RtpReceiver; |
| 59 | class RTPReceiverAudio; |
| 60 | class RtpRtcp; |
| 61 | class TelephoneEventHandler; |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 62 | class VoEMediaProcess; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 63 | class VoERTPObserver; |
| 64 | class VoiceEngineObserver; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 65 | |
| 66 | struct CallStatistics; |
henrika@webrtc.org | 8a2fc88 | 2012-08-22 08:53:55 +0000 | [diff] [blame] | 67 | struct ReportBlock; |
| 68 | struct SenderInfo; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 69 | |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 70 | namespace voe { |
| 71 | |
mflodman@webrtc.org | 0a7d4ee | 2015-02-17 12:57:14 +0000 | [diff] [blame] | 72 | class OutputMixer; |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 73 | class RtpPacketSenderProxy; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 74 | class Statistics; |
sprang@webrtc.org | 54ae4ff | 2013-12-19 13:26:02 +0000 | [diff] [blame] | 75 | class StatisticsProxy; |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 76 | class TransportFeedbackProxy; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 77 | class TransmitMixer; |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 78 | class TransportSequenceNumberProxy; |
mflodman@webrtc.org | 0a7d4ee | 2015-02-17 12:57:14 +0000 | [diff] [blame] | 79 | class VoERtcpObserver; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 80 | |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 81 | // Helper class to simplify locking scheme for members that are accessed from |
| 82 | // multiple threads. |
| 83 | // Example: a member can be set on thread T1 and read by an internal audio |
| 84 | // thread T2. Accessing the member via this class ensures that we are |
| 85 | // safe and also avoid TSan v2 warnings. |
| 86 | class ChannelState { |
| 87 | public: |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 88 | struct State { |
| 89 | State() |
| 90 | : rx_apm_is_enabled(false), |
| 91 | input_external_media(false), |
| 92 | output_file_playing(false), |
| 93 | input_file_playing(false), |
| 94 | playing(false), |
| 95 | sending(false), |
| 96 | receiving(false) {} |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 97 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 98 | bool rx_apm_is_enabled; |
| 99 | bool input_external_media; |
| 100 | bool output_file_playing; |
| 101 | bool input_file_playing; |
| 102 | bool playing; |
| 103 | bool sending; |
| 104 | bool receiving; |
| 105 | }; |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 106 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 107 | ChannelState() {} |
| 108 | virtual ~ChannelState() {} |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 109 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 110 | void Reset() { |
| 111 | rtc::CritScope lock(&lock_); |
| 112 | state_ = State(); |
| 113 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 114 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 115 | State Get() const { |
| 116 | rtc::CritScope lock(&lock_); |
| 117 | return state_; |
| 118 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 119 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 120 | void SetRxApmIsEnabled(bool enable) { |
| 121 | rtc::CritScope lock(&lock_); |
| 122 | state_.rx_apm_is_enabled = enable; |
| 123 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 124 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 125 | void SetInputExternalMedia(bool enable) { |
| 126 | rtc::CritScope lock(&lock_); |
| 127 | state_.input_external_media = enable; |
| 128 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 129 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 130 | void SetOutputFilePlaying(bool enable) { |
| 131 | rtc::CritScope lock(&lock_); |
| 132 | state_.output_file_playing = enable; |
| 133 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 134 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 135 | void SetInputFilePlaying(bool enable) { |
| 136 | rtc::CritScope lock(&lock_); |
| 137 | state_.input_file_playing = enable; |
| 138 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 139 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 140 | void SetPlaying(bool enable) { |
| 141 | rtc::CritScope lock(&lock_); |
| 142 | state_.playing = enable; |
| 143 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 144 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 145 | void SetSending(bool enable) { |
| 146 | rtc::CritScope lock(&lock_); |
| 147 | state_.sending = enable; |
| 148 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 149 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 150 | void SetReceiving(bool enable) { |
| 151 | rtc::CritScope lock(&lock_); |
| 152 | state_.receiving = enable; |
| 153 | } |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 154 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 155 | private: |
pbos | d8de115 | 2016-02-01 09:00:51 -0800 | [diff] [blame] | 156 | rtc::CriticalSection lock_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 157 | State state_; |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 158 | }; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 159 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 160 | class Channel |
| 161 | : public RtpData, |
| 162 | public RtpFeedback, |
| 163 | public FileCallback, // receiving notification from file player & |
| 164 | // recorder |
| 165 | public Transport, |
| 166 | public RtpAudioFeedback, |
| 167 | public AudioPacketizationCallback, // receive encoded packets from the |
| 168 | // ACM |
| 169 | public ACMVADCallback, // receive voice activity from the ACM |
| 170 | public MixerParticipant // supplies output mixer with audio frames |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 171 | { |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 172 | public: |
| 173 | friend class VoERtcpObserver; |
mflodman@webrtc.org | 0a7d4ee | 2015-02-17 12:57:14 +0000 | [diff] [blame] | 174 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 175 | enum { KNumSocketThreads = 1 }; |
| 176 | enum { KNumberOfSocketBuffers = 8 }; |
| 177 | virtual ~Channel(); |
| 178 | static int32_t CreateChannel(Channel*& channel, |
| 179 | int32_t channelId, |
| 180 | uint32_t instanceId, |
| 181 | RtcEventLog* const event_log, |
| 182 | const Config& config); |
| 183 | Channel(int32_t channelId, |
| 184 | uint32_t instanceId, |
| 185 | RtcEventLog* const event_log, |
| 186 | const Config& config); |
| 187 | int32_t Init(); |
| 188 | int32_t SetEngineInformation(Statistics& engineStatistics, |
| 189 | OutputMixer& outputMixer, |
| 190 | TransmitMixer& transmitMixer, |
| 191 | ProcessThread& moduleProcessThread, |
| 192 | AudioDeviceModule& audioDeviceModule, |
| 193 | VoiceEngineObserver* voiceEngineObserver, |
| 194 | rtc::CriticalSection* callbackCritSect); |
| 195 | int32_t UpdateLocalTimeStamp(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 196 | |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 197 | void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
Tommi | f888bb5 | 2015-12-12 01:37:01 +0100 | [diff] [blame] | 198 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 199 | // API methods |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 200 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 201 | // VoEBase |
| 202 | int32_t StartPlayout(); |
| 203 | int32_t StopPlayout(); |
| 204 | int32_t StartSend(); |
| 205 | int32_t StopSend(); |
| 206 | int32_t StartReceiving(); |
| 207 | int32_t StopReceiving(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 208 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 209 | int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); |
| 210 | int32_t DeRegisterVoiceEngineObserver(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 211 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 212 | // VoECodec |
| 213 | int32_t GetSendCodec(CodecInst& codec); |
| 214 | int32_t GetRecCodec(CodecInst& codec); |
| 215 | int32_t SetSendCodec(const CodecInst& codec); |
| 216 | void SetBitRate(int bitrate_bps); |
| 217 | int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); |
| 218 | int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); |
| 219 | int32_t SetRecPayloadType(const CodecInst& codec); |
| 220 | int32_t GetRecPayloadType(CodecInst& codec); |
| 221 | int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); |
| 222 | int SetOpusMaxPlaybackRate(int frequency_hz); |
| 223 | int SetOpusDtx(bool enable_dtx); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 224 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 225 | // VoENetwork |
| 226 | int32_t RegisterExternalTransport(Transport& transport); |
| 227 | int32_t DeRegisterExternalTransport(); |
| 228 | int32_t ReceivedRTPPacket(const int8_t* data, |
| 229 | size_t length, |
| 230 | const PacketTime& packet_time); |
| 231 | int32_t ReceivedRTCPPacket(const int8_t* data, size_t length); |
pwestin@webrtc.org | 684f057 | 2013-03-13 23:20:57 +0000 | [diff] [blame] | 232 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 233 | // VoEFile |
| 234 | int StartPlayingFileLocally(const char* fileName, |
| 235 | bool loop, |
| 236 | FileFormats format, |
| 237 | int startPosition, |
| 238 | float volumeScaling, |
| 239 | int stopPosition, |
| 240 | const CodecInst* codecInst); |
| 241 | int StartPlayingFileLocally(InStream* stream, |
| 242 | FileFormats format, |
| 243 | int startPosition, |
| 244 | float volumeScaling, |
| 245 | int stopPosition, |
| 246 | const CodecInst* codecInst); |
| 247 | int StopPlayingFileLocally(); |
| 248 | int IsPlayingFileLocally() const; |
| 249 | int RegisterFilePlayingToMixer(); |
| 250 | int StartPlayingFileAsMicrophone(const char* fileName, |
| 251 | bool loop, |
| 252 | FileFormats format, |
| 253 | int startPosition, |
| 254 | float volumeScaling, |
| 255 | int stopPosition, |
| 256 | const CodecInst* codecInst); |
| 257 | int StartPlayingFileAsMicrophone(InStream* stream, |
| 258 | FileFormats format, |
| 259 | int startPosition, |
| 260 | float volumeScaling, |
| 261 | int stopPosition, |
| 262 | const CodecInst* codecInst); |
| 263 | int StopPlayingFileAsMicrophone(); |
| 264 | int IsPlayingFileAsMicrophone() const; |
| 265 | int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst); |
| 266 | int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst); |
| 267 | int StopRecordingPlayout(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 268 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 269 | void SetMixWithMicStatus(bool mix); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 270 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 271 | // VoEExternalMediaProcessing |
| 272 | int RegisterExternalMediaProcessing(ProcessingTypes type, |
| 273 | VoEMediaProcess& processObject); |
| 274 | int DeRegisterExternalMediaProcessing(ProcessingTypes type); |
| 275 | int SetExternalMixing(bool enabled); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 276 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 277 | // VoEVolumeControl |
| 278 | int GetSpeechOutputLevel(uint32_t& level) const; |
| 279 | int GetSpeechOutputLevelFullRange(uint32_t& level) const; |
| 280 | int SetMute(bool enable); |
| 281 | bool Mute() const; |
| 282 | int SetOutputVolumePan(float left, float right); |
| 283 | int GetOutputVolumePan(float& left, float& right) const; |
| 284 | int SetChannelOutputVolumeScaling(float scaling); |
| 285 | int GetChannelOutputVolumeScaling(float& scaling) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 286 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 287 | // VoENetEqStats |
| 288 | int GetNetworkStatistics(NetworkStatistics& stats); |
| 289 | void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 290 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 291 | // VoEVideoSync |
| 292 | bool GetDelayEstimate(int* jitter_buffer_delay_ms, |
| 293 | int* playout_buffer_delay_ms) const; |
| 294 | uint32_t GetDelayEstimate() const; |
| 295 | int LeastRequiredDelayMs() const; |
| 296 | int SetMinimumPlayoutDelay(int delayMs); |
| 297 | int GetPlayoutTimestamp(unsigned int& timestamp); |
| 298 | int SetInitTimestamp(unsigned int timestamp); |
| 299 | int SetInitSequenceNumber(short sequenceNumber); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 300 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 301 | // VoEVideoSyncExtended |
| 302 | int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 303 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 304 | // VoEDtmf |
| 305 | int SendTelephoneEventOutband(unsigned char eventCode, |
| 306 | int lengthMs, |
| 307 | int attenuationDb, |
| 308 | bool playDtmfEvent); |
| 309 | int SendTelephoneEventInband(unsigned char eventCode, |
| 310 | int lengthMs, |
| 311 | int attenuationDb, |
| 312 | bool playDtmfEvent); |
| 313 | int SetSendTelephoneEventPayloadType(unsigned char type); |
| 314 | int GetSendTelephoneEventPayloadType(unsigned char& type); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 315 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 316 | // VoEAudioProcessingImpl |
| 317 | int UpdateRxVadDetection(AudioFrame& audioFrame); |
| 318 | int RegisterRxVadObserver(VoERxVadCallback& observer); |
| 319 | int DeRegisterRxVadObserver(); |
| 320 | int VoiceActivityIndicator(int& activity); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 321 | #ifdef WEBRTC_VOICE_ENGINE_AGC |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 322 | int SetRxAgcStatus(bool enable, AgcModes mode); |
| 323 | int GetRxAgcStatus(bool& enabled, AgcModes& mode); |
| 324 | int SetRxAgcConfig(AgcConfig config); |
| 325 | int GetRxAgcConfig(AgcConfig& config); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 326 | #endif |
| 327 | #ifdef WEBRTC_VOICE_ENGINE_NR |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 328 | int SetRxNsStatus(bool enable, NsModes mode); |
| 329 | int GetRxNsStatus(bool& enabled, NsModes& mode); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 330 | #endif |
| 331 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 332 | // VoERTP_RTCP |
| 333 | int SetLocalSSRC(unsigned int ssrc); |
| 334 | int GetLocalSSRC(unsigned int& ssrc); |
| 335 | int GetRemoteSSRC(unsigned int& ssrc); |
| 336 | int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id); |
| 337 | int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id); |
| 338 | int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id); |
| 339 | int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id); |
| 340 | void EnableSendTransportSequenceNumber(int id); |
| 341 | void EnableReceiveTransportSequenceNumber(int id); |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 342 | |
stefan | bba9dec | 2016-02-01 04:39:55 -0800 | [diff] [blame] | 343 | void RegisterSenderCongestionControlObjects( |
| 344 | RtpPacketSender* rtp_packet_sender, |
| 345 | TransportFeedbackObserver* transport_feedback_observer, |
| 346 | PacketRouter* packet_router); |
| 347 | void RegisterReceiverCongestionControlObjects(PacketRouter* packet_router); |
| 348 | void ResetCongestionControlObjects(); |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 349 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 350 | void SetRTCPStatus(bool enable); |
| 351 | int GetRTCPStatus(bool& enabled); |
| 352 | int SetRTCP_CNAME(const char cName[256]); |
| 353 | int GetRemoteRTCP_CNAME(char cName[256]); |
| 354 | int GetRemoteRTCPData(unsigned int& NTPHigh, |
| 355 | unsigned int& NTPLow, |
| 356 | unsigned int& timestamp, |
| 357 | unsigned int& playoutTimestamp, |
| 358 | unsigned int* jitter, |
| 359 | unsigned short* fractionLost); |
| 360 | int SendApplicationDefinedRTCPPacket(unsigned char subType, |
| 361 | unsigned int name, |
| 362 | const char* data, |
| 363 | unsigned short dataLengthInBytes); |
| 364 | int GetRTPStatistics(unsigned int& averageJitterMs, |
| 365 | unsigned int& maxJitterMs, |
| 366 | unsigned int& discardedPackets); |
| 367 | int GetRemoteRTCPReportBlocks(std::vector<ReportBlock>* report_blocks); |
| 368 | int GetRTPStatistics(CallStatistics& stats); |
| 369 | int SetREDStatus(bool enable, int redPayloadtype); |
| 370 | int GetREDStatus(bool& enabled, int& redPayloadtype); |
| 371 | int SetCodecFECStatus(bool enable); |
| 372 | bool GetCodecFECStatus(); |
| 373 | void SetNACKStatus(bool enable, int maxNumberOfPackets); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 374 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 375 | // From AudioPacketizationCallback in the ACM |
| 376 | int32_t SendData(FrameType frameType, |
| 377 | uint8_t payloadType, |
| 378 | uint32_t timeStamp, |
| 379 | const uint8_t* payloadData, |
| 380 | size_t payloadSize, |
| 381 | const RTPFragmentationHeader* fragmentation) override; |
xians@webrtc.org | 3cefbc9 | 2014-10-10 09:42:53 +0000 | [diff] [blame] | 382 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 383 | // From ACMVADCallback in the ACM |
| 384 | int32_t InFrameType(FrameType frame_type) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 385 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 386 | int32_t OnRxVadDetected(int vadDecision); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 387 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 388 | // From RtpData in the RTP/RTCP module |
| 389 | int32_t OnReceivedPayloadData(const uint8_t* payloadData, |
| 390 | size_t payloadSize, |
| 391 | const WebRtcRTPHeader* rtpHeader) override; |
| 392 | bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 393 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 394 | // From RtpFeedback in the RTP/RTCP module |
| 395 | int32_t OnInitializeDecoder(int8_t payloadType, |
| 396 | const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
| 397 | int frequency, |
| 398 | size_t channels, |
| 399 | uint32_t rate) override; |
| 400 | void OnIncomingSSRCChanged(uint32_t ssrc) override; |
| 401 | void OnIncomingCSRCChanged(uint32_t CSRC, bool added) override; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 402 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 403 | // From RtpAudioFeedback in the RTP/RTCP module |
| 404 | void OnPlayTelephoneEvent(uint8_t event, |
| 405 | uint16_t lengthMs, |
| 406 | uint8_t volume) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 407 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 408 | // From Transport (called by the RTP/RTCP module) |
| 409 | bool SendRtp(const uint8_t* data, |
| 410 | size_t len, |
| 411 | const PacketOptions& packet_options) override; |
| 412 | bool SendRtcp(const uint8_t* data, size_t len) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 413 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 414 | // From MixerParticipant |
| 415 | int32_t GetAudioFrame(int32_t id, AudioFrame* audioFrame) override; |
| 416 | int32_t NeededFrequency(int32_t id) const override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 417 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 418 | // From FileCallback |
| 419 | void PlayNotification(int32_t id, uint32_t durationMs) override; |
| 420 | void RecordNotification(int32_t id, uint32_t durationMs) override; |
| 421 | void PlayFileEnded(int32_t id) override; |
| 422 | void RecordFileEnded(int32_t id) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 423 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 424 | uint32_t InstanceId() const { return _instanceId; } |
| 425 | int32_t ChannelId() const { return _channelId; } |
| 426 | bool Playing() const { return channel_state_.Get().playing; } |
| 427 | bool Sending() const { return channel_state_.Get().sending; } |
| 428 | bool Receiving() const { return channel_state_.Get().receiving; } |
| 429 | bool ExternalTransport() const { |
| 430 | rtc::CritScope cs(&_callbackCritSect); |
| 431 | return _externalTransport; |
| 432 | } |
| 433 | bool ExternalMixing() const { return _externalMixing; } |
| 434 | RtpRtcp* RtpRtcpModulePtr() const { return _rtpRtcpModule.get(); } |
| 435 | int8_t OutputEnergyLevel() const { return _outputAudioLevel.Level(); } |
| 436 | uint32_t Demultiplex(const AudioFrame& audioFrame); |
| 437 | // Demultiplex the data to the channel's |_audioFrame|. The difference |
| 438 | // between this method and the overloaded method above is that |audio_data| |
| 439 | // does not go through transmit_mixer and APM. |
| 440 | void Demultiplex(const int16_t* audio_data, |
| 441 | int sample_rate, |
| 442 | size_t number_of_frames, |
| 443 | size_t number_of_channels); |
| 444 | uint32_t PrepareEncodeAndSend(int mixingFrequency); |
| 445 | uint32_t EncodeAndSend(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 446 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 447 | // Associate to a send channel. |
| 448 | // Used for obtaining RTT for a receive-only channel. |
| 449 | void set_associate_send_channel(const ChannelOwner& channel) { |
| 450 | assert(_channelId != channel.channel()->ChannelId()); |
| 451 | rtc::CritScope lock(&assoc_send_channel_lock_); |
| 452 | associate_send_channel_ = channel; |
| 453 | } |
Minyue | 2013aec | 2015-05-13 14:14:42 +0200 | [diff] [blame] | 454 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 455 | // Disassociate a send channel if it was associated. |
| 456 | void DisassociateSendChannel(int channel_id); |
Minyue | 2013aec | 2015-05-13 14:14:42 +0200 | [diff] [blame] | 457 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 458 | protected: |
| 459 | void OnIncomingFractionLoss(int fraction_lost); |
minyue@webrtc.org | c1a40a7 | 2014-05-28 09:52:06 +0000 | [diff] [blame] | 460 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 461 | private: |
| 462 | bool ReceivePacket(const uint8_t* packet, |
| 463 | size_t packet_length, |
| 464 | const RTPHeader& header, |
| 465 | bool in_order); |
| 466 | bool HandleRtxPacket(const uint8_t* packet, |
| 467 | size_t packet_length, |
| 468 | const RTPHeader& header); |
| 469 | bool IsPacketInOrder(const RTPHeader& header) const; |
| 470 | bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; |
| 471 | int ResendPackets(const uint16_t* sequence_numbers, int length); |
| 472 | int InsertInbandDtmfTone(); |
| 473 | int32_t MixOrReplaceAudioWithFile(int mixingFrequency); |
| 474 | int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency); |
| 475 | void UpdatePlayoutTimestamp(bool rtcp); |
| 476 | void UpdatePacketDelay(uint32_t timestamp, uint16_t sequenceNumber); |
| 477 | void RegisterReceiveCodecsToRTPModule(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 478 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 479 | int SetRedPayloadType(int red_payload_type); |
| 480 | int SetSendRtpHeaderExtension(bool enable, |
| 481 | RTPExtensionType type, |
| 482 | unsigned char id); |
andrew@webrtc.org | eb524d9 | 2013-09-23 23:02:24 +0000 | [diff] [blame] | 483 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 484 | int32_t GetPlayoutFrequency(); |
| 485 | int64_t GetRTT(bool allow_associate_channel) const; |
wu@webrtc.org | 94454b7 | 2014-06-05 20:34:08 +0000 | [diff] [blame] | 486 | |
pbos | d8de115 | 2016-02-01 09:00:51 -0800 | [diff] [blame] | 487 | rtc::CriticalSection _fileCritSect; |
| 488 | rtc::CriticalSection _callbackCritSect; |
| 489 | rtc::CriticalSection volume_settings_critsect_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 490 | uint32_t _instanceId; |
| 491 | int32_t _channelId; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 492 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 493 | ChannelState channel_state_; |
henrika@webrtc.org | 944cbeb | 2014-03-18 10:32:33 +0000 | [diff] [blame] | 494 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 495 | RtcEventLog* const event_log_; |
Ivo Creusen | ae856f2 | 2015-09-17 16:30:16 +0200 | [diff] [blame] | 496 | |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 497 | std::unique_ptr<RtpHeaderParser> rtp_header_parser_; |
| 498 | std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
| 499 | std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
| 500 | std::unique_ptr<StatisticsProxy> statistics_proxy_; |
| 501 | std::unique_ptr<RtpReceiver> rtp_receiver_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 502 | TelephoneEventHandler* telephone_event_handler_; |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 503 | std::unique_ptr<RtpRtcp> _rtpRtcpModule; |
| 504 | std::unique_ptr<AudioCodingModule> audio_coding_; |
| 505 | std::unique_ptr<AudioSinkInterface> audio_sink_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 506 | AudioLevel _outputAudioLevel; |
| 507 | bool _externalTransport; |
| 508 | AudioFrame _audioFrame; |
| 509 | // Downsamples to the codec rate if necessary. |
| 510 | PushResampler<int16_t> input_resampler_; |
| 511 | FilePlayer* _inputFilePlayerPtr; |
| 512 | FilePlayer* _outputFilePlayerPtr; |
| 513 | FileRecorder* _outputFileRecorderPtr; |
| 514 | int _inputFilePlayerId; |
| 515 | int _outputFilePlayerId; |
| 516 | int _outputFileRecorderId; |
| 517 | bool _outputFileRecording; |
| 518 | DtmfInbandQueue _inbandDtmfQueue; |
| 519 | DtmfInband _inbandDtmfGenerator; |
| 520 | bool _outputExternalMedia; |
| 521 | VoEMediaProcess* _inputExternalMediaCallbackPtr; |
| 522 | VoEMediaProcess* _outputExternalMediaCallbackPtr; |
| 523 | uint32_t _timeStamp; |
| 524 | uint8_t _sendTelephoneEventPayloadType; |
turaj@webrtc.org | 167b6df | 2013-12-13 21:05:07 +0000 | [diff] [blame] | 525 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 526 | RemoteNtpTimeEstimator ntp_estimator_ GUARDED_BY(ts_stats_lock_); |
wu@webrtc.org | 82c4b85 | 2014-05-20 22:55:01 +0000 | [diff] [blame] | 527 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 528 | // Timestamp of the audio pulled from NetEq. |
| 529 | uint32_t jitter_buffer_playout_timestamp_; |
| 530 | uint32_t playout_timestamp_rtp_ GUARDED_BY(video_sync_lock_); |
| 531 | uint32_t playout_timestamp_rtcp_; |
| 532 | uint32_t playout_delay_ms_ GUARDED_BY(video_sync_lock_); |
| 533 | uint32_t _numberOfDiscardedPackets; |
| 534 | uint16_t send_sequence_number_; |
| 535 | uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes]; |
pwestin@webrtc.org | 1de0135 | 2013-04-11 20:23:35 +0000 | [diff] [blame] | 536 | |
pbos | d8de115 | 2016-02-01 09:00:51 -0800 | [diff] [blame] | 537 | rtc::CriticalSection ts_stats_lock_; |
wu@webrtc.org | cb711f7 | 2014-05-19 17:39:11 +0000 | [diff] [blame] | 538 | |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 539 | std::unique_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 540 | // The rtp timestamp of the first played out audio frame. |
| 541 | int64_t capture_start_rtp_time_stamp_; |
| 542 | // The capture ntp time (in local timebase) of the first played out audio |
| 543 | // frame. |
| 544 | int64_t capture_start_ntp_time_ms_ GUARDED_BY(ts_stats_lock_); |
wu@webrtc.org | cb711f7 | 2014-05-19 17:39:11 +0000 | [diff] [blame] | 545 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 546 | // uses |
| 547 | Statistics* _engineStatisticsPtr; |
| 548 | OutputMixer* _outputMixerPtr; |
| 549 | TransmitMixer* _transmitMixerPtr; |
| 550 | ProcessThread* _moduleProcessThreadPtr; |
| 551 | AudioDeviceModule* _audioDeviceModulePtr; |
| 552 | VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base |
| 553 | rtc::CriticalSection* _callbackCritSectPtr; // owned by base |
| 554 | Transport* _transportPtr; // WebRtc socket or external transport |
| 555 | RMSLevel rms_level_; |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 556 | std::unique_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 557 | VoERxVadCallback* _rxVadObserverPtr; |
| 558 | int32_t _oldVadDecision; |
| 559 | int32_t _sendFrameType; // Send data is voice, 1-voice, 0-otherwise |
| 560 | // VoEBase |
| 561 | bool _externalMixing; |
| 562 | bool _mixFileWithMicrophone; |
| 563 | // VoEVolumeControl |
| 564 | bool _mute; |
| 565 | float _panLeft; |
| 566 | float _panRight; |
| 567 | float _outputGain; |
| 568 | // VoEDtmf |
| 569 | bool _playOutbandDtmfEvent; |
| 570 | bool _playInbandDtmfEvent; |
| 571 | // VoeRTP_RTCP |
| 572 | uint32_t _lastLocalTimeStamp; |
| 573 | int8_t _lastPayloadType; |
| 574 | bool _includeAudioLevelIndication; |
| 575 | // VoENetwork |
| 576 | AudioFrame::SpeechType _outputSpeechType; |
| 577 | // VoEVideoSync |
pbos | d8de115 | 2016-02-01 09:00:51 -0800 | [diff] [blame] | 578 | rtc::CriticalSection video_sync_lock_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 579 | uint32_t _average_jitter_buffer_delay_us GUARDED_BY(video_sync_lock_); |
| 580 | uint32_t _previousTimestamp; |
| 581 | uint16_t _recPacketDelayMs GUARDED_BY(video_sync_lock_); |
| 582 | // VoEAudioProcessing |
| 583 | bool _RxVadDetection; |
| 584 | bool _rxAgcIsEnabled; |
| 585 | bool _rxNsIsEnabled; |
| 586 | bool restored_packet_in_use_; |
| 587 | // RtcpBandwidthObserver |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 588 | std::unique_ptr<VoERtcpObserver> rtcp_observer_; |
| 589 | std::unique_ptr<NetworkPredictor> network_predictor_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 590 | // An associated send channel. |
pbos | d8de115 | 2016-02-01 09:00:51 -0800 | [diff] [blame] | 591 | rtc::CriticalSection assoc_send_channel_lock_; |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 592 | ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); |
Stefan Holmer | b86d4e4 | 2015-12-07 10:26:18 +0100 | [diff] [blame] | 593 | |
kwiberg | 55b97fe | 2016-01-28 05:22:45 -0800 | [diff] [blame] | 594 | bool pacing_enabled_; |
| 595 | PacketRouter* packet_router_ = nullptr; |
kwiberg | b7f89d6 | 2016-02-17 10:04:18 -0800 | [diff] [blame] | 596 | std::unique_ptr<TransportFeedbackProxy> feedback_observer_proxy_; |
| 597 | std::unique_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_; |
| 598 | std::unique_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 599 | }; |
| 600 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 601 | } // namespace voe |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 602 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 603 | |
andrew@webrtc.org | 382c0c2 | 2014-05-05 18:22:21 +0000 | [diff] [blame] | 604 | #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |