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

Side by Side Diff: webrtc/audio/audio_receive_stream.cc

Issue 1604563002: Add send-side BWE to WebRtcVoiceEngine under a finch experiment. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove extension filter test which is no longer needed. Created 4 years, 11 months 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 std::stringstream ss; 66 std::stringstream ss;
67 ss << "{rtp: " << rtp.ToString(); 67 ss << "{rtp: " << rtp.ToString();
68 ss << ", receive_transport: " 68 ss << ", receive_transport: "
69 << (receive_transport ? "(Transport)" : "nullptr"); 69 << (receive_transport ? "(Transport)" : "nullptr");
70 ss << ", rtcp_send_transport: " 70 ss << ", rtcp_send_transport: "
71 << (rtcp_send_transport ? "(Transport)" : "nullptr"); 71 << (rtcp_send_transport ? "(Transport)" : "nullptr");
72 ss << ", voe_channel_id: " << voe_channel_id; 72 ss << ", voe_channel_id: " << voe_channel_id;
73 if (!sync_group.empty()) { 73 if (!sync_group.empty()) {
74 ss << ", sync_group: " << sync_group; 74 ss << ", sync_group: " << sync_group;
75 } 75 }
76 ss << ", combined_audio_video_bwe: "
77 << (combined_audio_video_bwe ? "true" : "false");
78 ss << '}'; 76 ss << '}';
79 return ss.str(); 77 return ss.str();
80 } 78 }
81 79
82 namespace internal { 80 namespace internal {
83 AudioReceiveStream::AudioReceiveStream( 81 AudioReceiveStream::AudioReceiveStream(
84 CongestionController* congestion_controller, 82 CongestionController* congestion_controller,
85 const webrtc::AudioReceiveStream::Config& config, 83 const webrtc::AudioReceiveStream::Config& config,
86 const rtc::scoped_refptr<webrtc::AudioState>& audio_state) 84 const rtc::scoped_refptr<webrtc::AudioState>& audio_state)
87 : config_(config), 85 : config_(config),
(...skipping 23 matching lines...) Expand all
111 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension( 109 bool registered = rtp_header_parser_->RegisterRtpHeaderExtension(
112 kRtpExtensionTransportSequenceNumber, extension.id); 110 kRtpExtensionTransportSequenceNumber, extension.id);
113 RTC_DCHECK(registered); 111 RTC_DCHECK(registered);
114 } else { 112 } else {
115 RTC_NOTREACHED() << "Unsupported RTP extension."; 113 RTC_NOTREACHED() << "Unsupported RTP extension.";
116 } 114 }
117 } 115 }
118 // Configure bandwidth estimation. 116 // Configure bandwidth estimation.
119 channel_proxy_->SetCongestionControlObjects( 117 channel_proxy_->SetCongestionControlObjects(
120 nullptr, nullptr, congestion_controller->packet_router()); 118 nullptr, nullptr, congestion_controller->packet_router());
121 if (config.combined_audio_video_bwe) { 119 if (UseSendSideBwe(config)) {
122 if (UseSendSideBwe(config)) { 120 remote_bitrate_estimator_ =
123 remote_bitrate_estimator_ = 121 congestion_controller->GetRemoteBitrateEstimator(true);
124 congestion_controller->GetRemoteBitrateEstimator(true);
125 } else {
126 remote_bitrate_estimator_ =
127 congestion_controller->GetRemoteBitrateEstimator(false);
128 }
129 RTC_DCHECK(remote_bitrate_estimator_);
130 } 122 }
131 } 123 }
132 124
133 AudioReceiveStream::~AudioReceiveStream() { 125 AudioReceiveStream::~AudioReceiveStream() {
134 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 126 RTC_DCHECK(thread_checker_.CalledOnValidThread());
135 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); 127 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
136 channel_proxy_->SetCongestionControlObjects(nullptr, nullptr, nullptr); 128 channel_proxy_->SetCongestionControlObjects(nullptr, nullptr, nullptr);
137 if (remote_bitrate_estimator_) { 129 if (remote_bitrate_estimator_) {
138 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); 130 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc);
139 } 131 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 239
248 VoiceEngine* AudioReceiveStream::voice_engine() const { 240 VoiceEngine* AudioReceiveStream::voice_engine() const {
249 internal::AudioState* audio_state = 241 internal::AudioState* audio_state =
250 static_cast<internal::AudioState*>(audio_state_.get()); 242 static_cast<internal::AudioState*>(audio_state_.get());
251 VoiceEngine* voice_engine = audio_state->voice_engine(); 243 VoiceEngine* voice_engine = audio_state->voice_engine();
252 RTC_DCHECK(voice_engine); 244 RTC_DCHECK(voice_engine);
253 return voice_engine; 245 return voice_engine;
254 } 246 }
255 } // namespace internal 247 } // namespace internal
256 } // namespace webrtc 248 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698