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