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