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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1687333002: Extract send-side ViEReceiver calls. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 encoder_feedback_.GetRtcpIntraFrameObserver(), 161 encoder_feedback_.GetRtcpIntraFrameObserver(),
162 congestion_controller_->GetBitrateController() 162 congestion_controller_->GetBitrateController()
163 ->CreateRtcpBandwidthObserver(), 163 ->CreateRtcpBandwidthObserver(),
164 congestion_controller_->GetTransportFeedbackObserver(), 164 congestion_controller_->GetTransportFeedbackObserver(),
165 nullptr, 165 nullptr,
166 call_stats_->rtcp_rtt_stats(), 166 call_stats_->rtcp_rtt_stats(),
167 congestion_controller_->pacer(), 167 congestion_controller_->pacer(),
168 congestion_controller_->packet_router(), 168 congestion_controller_->packet_router(),
169 config_.rtp.ssrcs.size(), 169 config_.rtp.ssrcs.size(),
170 true), 170 true),
171 vie_receiver_(vie_channel_.vie_receiver()),
171 input_(&vie_encoder_, 172 input_(&vie_encoder_,
172 config_.local_renderer, 173 config_.local_renderer,
173 &stats_proxy_, 174 &stats_proxy_,
174 &overuse_detector_) { 175 &overuse_detector_) {
175 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString(); 176 LOG(LS_INFO) << "VideoSendStream: " << config_.ToString();
176 177
177 RTC_DCHECK(!config_.rtp.ssrcs.empty()); 178 RTC_DCHECK(!config_.rtp.ssrcs.empty());
178 RTC_DCHECK(module_process_thread_); 179 RTC_DCHECK(module_process_thread_);
179 RTC_DCHECK(call_stats_); 180 RTC_DCHECK(call_stats_);
180 RTC_DCHECK(congestion_controller_); 181 RTC_DCHECK(congestion_controller_);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 call_stats_->DeregisterStatsObserver(vie_channel_.GetStatsObserver()); 279 call_stats_->DeregisterStatsObserver(vie_channel_.GetStatsObserver());
279 280
280 RtpRtcp* rtp_module = vie_channel_.rtp_rtcp(); 281 RtpRtcp* rtp_module = vie_channel_.rtp_rtcp();
281 rtp_module->SetREMBStatus(false); 282 rtp_module->SetREMBStatus(false);
282 remb_->RemoveRembSender(rtp_module); 283 remb_->RemoveRembSender(rtp_module);
283 284
284 // Remove the feedback, stop all encoding threads and processing. This must be 285 // Remove the feedback, stop all encoding threads and processing. This must be
285 // done before deleting the channel. 286 // done before deleting the channel.
286 encoder_feedback_.RemoveEncoder(&vie_encoder_); 287 encoder_feedback_.RemoveEncoder(&vie_encoder_);
287 288
288 uint32_t remote_ssrc = vie_channel_.GetRemoteSSRC();
289 congestion_controller_->GetRemoteBitrateEstimator(false)->RemoveStream( 289 congestion_controller_->GetRemoteBitrateEstimator(false)->RemoveStream(
290 remote_ssrc); 290 vie_receiver_->GetRemoteSsrc());
291 } 291 }
292 292
293 VideoCaptureInput* VideoSendStream::Input() { 293 VideoCaptureInput* VideoSendStream::Input() {
294 return &input_; 294 return &input_;
295 } 295 }
296 296
297 void VideoSendStream::Start() { 297 void VideoSendStream::Start() {
298 transport_adapter_.Enable(); 298 transport_adapter_.Enable();
299 vie_encoder_.Pause(); 299 vie_encoder_.Pause();
300 if (vie_channel_.StartSend() == 0) { 300 if (vie_channel_.StartSend() == 0) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 stats_proxy_.SetContentType(config.content_type); 458 stats_proxy_.SetContentType(config.content_type);
459 459
460 RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0); 460 RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0);
461 vie_encoder_.SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000); 461 vie_encoder_.SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000);
462 462
463 encoder_config_ = config; 463 encoder_config_ = config;
464 return true; 464 return true;
465 } 465 }
466 466
467 bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) { 467 bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
468 return vie_channel_.ReceivedRTCPPacket(packet, length) == 0; 468 return vie_receiver_->DeliverRtcp(packet, length);
469 } 469 }
470 470
471 VideoSendStream::Stats VideoSendStream::GetStats() { 471 VideoSendStream::Stats VideoSendStream::GetStats() {
472 return stats_proxy_.GetStats(); 472 return stats_proxy_.GetStats();
473 } 473 }
474 474
475 void VideoSendStream::OveruseDetected() { 475 void VideoSendStream::OveruseDetected() {
476 if (config_.overuse_callback) 476 if (config_.overuse_callback)
477 config_.overuse_callback->OnLoadUpdate(LoadObserver::kOveruse); 477 config_.overuse_callback->OnLoadUpdate(LoadObserver::kOveruse);
478 } 478 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 used_ssrcs.resize(static_cast<size_t>(video_codec.numberOfSimulcastStreams)); 596 used_ssrcs.resize(static_cast<size_t>(video_codec.numberOfSimulcastStreams));
597 vie_encoder_.SetSsrcs(used_ssrcs); 597 vie_encoder_.SetSsrcs(used_ssrcs);
598 598
599 // Restart the media flow 599 // Restart the media flow
600 vie_encoder_.Restart(); 600 vie_encoder_.Restart();
601 601
602 return true; 602 return true;
603 } 603 }
604 } // namespace internal 604 } // namespace internal
605 } // namespace webrtc 605 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698