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

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: Reverted back to using a proxy and fixed an issue related to audio nack. 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"
15 #include "webrtc/common_audio/resampler/include/push_resampler.h" 16 #include "webrtc/common_audio/resampler/include/push_resampler.h"
16 #include "webrtc/common_types.h" 17 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 18 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
18 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" 19 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h"
19 #include "webrtc/modules/audio_processing/rms_level.h" 20 #include "webrtc/modules/audio_processing/rms_level.h"
20 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
21 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" 21 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
22 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 22 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
24 #include "webrtc/modules/utility/include/file_player.h" 24 #include "webrtc/modules/utility/include/file_player.h"
25 #include "webrtc/modules/utility/include/file_recorder.h" 25 #include "webrtc/modules/utility/include/file_recorder.h"
26 #include "webrtc/voice_engine/dtmf_inband.h" 26 #include "webrtc/voice_engine/dtmf_inband.h"
27 #include "webrtc/voice_engine/dtmf_inband_queue.h" 27 #include "webrtc/voice_engine/dtmf_inband_queue.h"
28 #include "webrtc/voice_engine/include/voe_audio_processing.h" 28 #include "webrtc/voice_engine/include/voe_audio_processing.h"
29 #include "webrtc/voice_engine/include/voe_network.h" 29 #include "webrtc/voice_engine/include/voe_network.h"
30 #include "webrtc/voice_engine/level_indicator.h" 30 #include "webrtc/voice_engine/level_indicator.h"
(...skipping 10 matching lines...) Expand all
41 41
42 class TimestampWrapAroundHandler; 42 class TimestampWrapAroundHandler;
43 } 43 }
44 44
45 namespace webrtc { 45 namespace webrtc {
46 46
47 class AudioDeviceModule; 47 class AudioDeviceModule;
48 class Config; 48 class Config;
49 class CriticalSectionWrapper; 49 class CriticalSectionWrapper;
50 class FileWrapper; 50 class FileWrapper;
51 class PacketRouter;
51 class ProcessThread; 52 class ProcessThread;
52 class ReceiveStatistics; 53 class ReceiveStatistics;
53 class RemoteNtpTimeEstimator; 54 class RemoteNtpTimeEstimator;
54 class RtcEventLog; 55 class RtcEventLog;
55 class RTPPayloadRegistry; 56 class RTPPayloadRegistry;
56 class RtpReceiver; 57 class RtpReceiver;
57 class RTPReceiverAudio; 58 class RTPReceiverAudio;
58 class RtpRtcp; 59 class RtpRtcp;
59 class TelephoneEventHandler; 60 class TelephoneEventHandler;
60 class VoEMediaProcess; 61 class VoEMediaProcess;
61 class VoERTPObserver; 62 class VoERTPObserver;
62 class VoiceEngineObserver; 63 class VoiceEngineObserver;
63 64
64 struct CallStatistics; 65 struct CallStatistics;
65 struct ReportBlock; 66 struct ReportBlock;
66 struct SenderInfo; 67 struct SenderInfo;
67 68
68 namespace voe { 69 namespace voe {
69 70
70 class OutputMixer; 71 class OutputMixer;
71 class Statistics; 72 class Statistics;
72 class StatisticsProxy; 73 class StatisticsProxy;
73 class TransmitMixer; 74 class TransmitMixer;
74 class VoERtcpObserver; 75 class VoERtcpObserver;
75 76
77 namespace {
78 class TransportFeedbackProxy;
79 class TransportSequenceNumberProxy;
80 class PacketSenderProxy;
81 } // namespace
82
76 // Helper class to simplify locking scheme for members that are accessed from 83 // Helper class to simplify locking scheme for members that are accessed from
77 // multiple threads. 84 // multiple threads.
78 // Example: a member can be set on thread T1 and read by an internal audio 85 // 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 86 // thread T2. Accessing the member via this class ensures that we are
80 // safe and also avoid TSan v2 warnings. 87 // safe and also avoid TSan v2 warnings.
81 class ChannelState { 88 class ChannelState {
82 public: 89 public:
83 struct State { 90 struct State {
84 State() : rx_apm_is_enabled(false), 91 State() : rx_apm_is_enabled(false),
85 input_external_media(false), 92 input_external_media(false),
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #endif 321 #endif
315 322
316 // VoERTP_RTCP 323 // VoERTP_RTCP
317 int SetLocalSSRC(unsigned int ssrc); 324 int SetLocalSSRC(unsigned int ssrc);
318 int GetLocalSSRC(unsigned int& ssrc); 325 int GetLocalSSRC(unsigned int& ssrc);
319 int GetRemoteSSRC(unsigned int& ssrc); 326 int GetRemoteSSRC(unsigned int& ssrc);
320 int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id); 327 int SetSendAudioLevelIndicationStatus(bool enable, unsigned char id);
321 int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id); 328 int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id);
322 int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id); 329 int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id);
323 int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id); 330 int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id);
331 void EnableSendTransportSequenceNumber(int id);
332
333 void SetCongestionControlObjects(
334 RtpPacketSender* rtp_packet_sender,
335 TransportFeedbackObserver* transport_feedback_observer,
336 PacketRouter* packet_router);
337
324 void SetRTCPStatus(bool enable); 338 void SetRTCPStatus(bool enable);
325 int GetRTCPStatus(bool& enabled); 339 int GetRTCPStatus(bool& enabled);
326 int SetRTCP_CNAME(const char cName[256]); 340 int SetRTCP_CNAME(const char cName[256]);
327 int GetRemoteRTCP_CNAME(char cName[256]); 341 int GetRemoteRTCP_CNAME(char cName[256]);
328 int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow, 342 int GetRemoteRTCPData(unsigned int& NTPHigh, unsigned int& NTPLow,
329 unsigned int& timestamp, 343 unsigned int& timestamp,
330 unsigned int& playoutTimestamp, unsigned int* jitter, 344 unsigned int& playoutTimestamp, unsigned int* jitter,
331 unsigned short* fractionLost); 345 unsigned short* fractionLost);
332 int SendApplicationDefinedRTCPPacket(unsigned char subType, 346 int SendApplicationDefinedRTCPPacket(unsigned char subType,
333 unsigned int name, const char* data, 347 unsigned int name, const char* data,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool _RxVadDetection; 591 bool _RxVadDetection;
578 bool _rxAgcIsEnabled; 592 bool _rxAgcIsEnabled;
579 bool _rxNsIsEnabled; 593 bool _rxNsIsEnabled;
580 bool restored_packet_in_use_; 594 bool restored_packet_in_use_;
581 // RtcpBandwidthObserver 595 // RtcpBandwidthObserver
582 rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_; 596 rtc::scoped_ptr<VoERtcpObserver> rtcp_observer_;
583 rtc::scoped_ptr<NetworkPredictor> network_predictor_; 597 rtc::scoped_ptr<NetworkPredictor> network_predictor_;
584 // An associated send channel. 598 // An associated send channel.
585 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_; 599 rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_;
586 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_); 600 ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
601
602 bool pacing_enabled_;
603 PacketRouter* packet_router_ = nullptr;
604 rtc::scoped_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
605 rtc::scoped_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
606 rtc::scoped_ptr<PacketSenderProxy> packet_sender_proxy_;
587 }; 607 };
588 608
589 } // namespace voe 609 } // namespace voe
590 } // namespace webrtc 610 } // namespace webrtc
591 611
592 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 612 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698