Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1309)

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 1479023002: Prepare the AudioSendStream to be hooked up to send-side BWE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_
13 13
14 #include "webrtc/base/criticalsection.h"
14 #include "webrtc/base/scoped_ptr.h" 15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/base/thread_checker.h"
17 #include "webrtc/call/congestion_controller.h"
15 #include "webrtc/common_audio/resampler/include/push_resampler.h" 18 #include "webrtc/common_audio/resampler/include/push_resampler.h"
16 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 20 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
18 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" 21 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h"
19 #include "webrtc/modules/audio_processing/rms_level.h" 22 #include "webrtc/modules/audio_processing/rms_level.h"
20 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 23 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
24 #include "webrtc/modules/pacing/paced_sender.h"
25 #include "webrtc/modules/pacing/packet_router.h"
21 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 26 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
22 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 27 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 28 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
24 #include "webrtc/modules/utility/include/file_player.h" 29 #include "webrtc/modules/utility/include/file_player.h"
25 #include "webrtc/modules/utility/include/file_recorder.h" 30 #include "webrtc/modules/utility/include/file_recorder.h"
26 #include "webrtc/voice_engine/dtmf_inband.h" 31 #include "webrtc/voice_engine/dtmf_inband.h"
27 #include "webrtc/voice_engine/dtmf_inband_queue.h" 32 #include "webrtc/voice_engine/dtmf_inband_queue.h"
28 #include "webrtc/voice_engine/include/voe_audio_processing.h" 33 #include "webrtc/voice_engine/include/voe_audio_processing.h"
29 #include "webrtc/voice_engine/include/voe_network.h" 34 #include "webrtc/voice_engine/include/voe_network.h"
30 #include "webrtc/voice_engine/level_indicator.h" 35 #include "webrtc/voice_engine/level_indicator.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 struct SenderInfo; 71 struct SenderInfo;
67 72
68 namespace voe { 73 namespace voe {
69 74
70 class OutputMixer; 75 class OutputMixer;
71 class Statistics; 76 class Statistics;
72 class StatisticsProxy; 77 class StatisticsProxy;
73 class TransmitMixer; 78 class TransmitMixer;
74 class VoERtcpObserver; 79 class VoERtcpObserver;
75 80
81 namespace {
82 class PacketSenderProxy;
83 } // namespace
84
76 // Helper class to simplify locking scheme for members that are accessed from 85 // Helper class to simplify locking scheme for members that are accessed from
77 // multiple threads. 86 // multiple threads.
78 // Example: a member can be set on thread T1 and read by an internal audio 87 // Example: a member can be set on thread T1 and read by an internal audio
79 // thread T2. Accessing the member via this class ensures that we are 88 // thread T2. Accessing the member via this class ensures that we are
80 // safe and also avoid TSan v2 warnings. 89 // safe and also avoid TSan v2 warnings.
81 class ChannelState { 90 class ChannelState {
82 public: 91 public:
83 struct State { 92 struct State {
84 State() : rx_apm_is_enabled(false), 93 State() : rx_apm_is_enabled(false),
85 input_external_media(false), 94 input_external_media(false),
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #endif 323 #endif
315 324
316 // VoERTP_RTCP 325 // VoERTP_RTCP
317 int SetLocalSSRC(unsigned int ssrc); 326 int SetLocalSSRC(unsigned int ssrc);
318 int GetLocalSSRC(unsigned int& ssrc); 327 int GetLocalSSRC(unsigned int& ssrc);
319 int GetRemoteSSRC(unsigned int& ssrc); 328 int GetRemoteSSRC(unsigned int& ssrc);
320 int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id); 329 int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id);
321 int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id); 330 int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id);
322 int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id); 331 int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id);
323 int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id); 332 int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id);
333 void SetSendTransportSequenceNumber(int id);
334
335 void SetCongestionControlObjects(
336 RtpPacketSender* rtp_packet_sender,
337 TransportFeedbackObserver* transport_feedback_observer,
338 PacketRouter* packet_router);
339
324 void SetRTCPStatus(bool enable); 340 void SetRTCPStatus(bool enable);
325 int GetRTCPStatus(bool& enabled); 341 int GetRTCPStatus(bool& enabled);
326 int SetRTCP_CNAME(const char cName[256]); 342 int SetRTCP_CNAME(const char cName[256]);
327 int GetRemoteRTCP_CNAME(char cName[256]); 343 int GetRemoteRTCP_CNAME(char cName[256]);
328 int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow, 344 int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow,
329 unsigned int& timestamp, 345 unsigned int& timestamp,
330 unsigned int& playoutTimestamp, unsigned int* jitter, 346 unsigned int& playoutTimestamp, unsigned int* jitter,
331 unsigned short* fractionLost); 347 unsigned short* fractionLost);
332 int SendApplicationDefinedRTCPPacket(unsigned char subType, 348 int SendApplicationDefinedRTCPPacket(unsigned char subType,
333 unsigned int name, const char* data, 349 unsigned int name, const char* data,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool _RxVadDetection; 593 bool _RxVadDetection;
578 bool _rxAgcIsEnabled; 594 bool _rxAgcIsEnabled;
579 bool _rxNsIsEnabled; 595 bool _rxNsIsEnabled;
580 bool restored_packet_in_use_; 596 bool restored_packet_in_use_;
581 // RtcpBandwidthObserver 597 // RtcpBandwidthObserver
582 rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_; 598 rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_;
583 rtc::scoped_ptr<NetworkPredictor> network_predictor_; 599 rtc::scoped_ptr<NetworkPredictor> network_predictor_;
584 // An associated send channel. 600 // An associated send channel.
585 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_; 601 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_;
586 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); 602 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
603
604 rtc::scoped_ptr<PacketSenderProxy> packet_sender_proxy_;
605 PacketRouter* packet_router_;
587 }; 606 };
588 607
589 } // namespace voe 608 } // namespace voe
590 } // namespace webrtc 609 } // namespace webrtc
591 610
592 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 611 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698