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

Unified Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2042603002: Movable support for VideoReceiveStream::Config and avoid copies (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add TODO Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/rtp_stream_receiver.h ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_stream_receiver.cc
diff --git a/webrtc/video/rtp_stream_receiver.cc b/webrtc/video/rtp_stream_receiver.cc
index eb6fc8b0e625384e8e9e99ae57fcc0b3e14110a1..c3d43e1d79ca4292a1c2a4da38f78c8fa2224f76 100644
--- a/webrtc/video/rtp_stream_receiver.cc
+++ b/webrtc/video/rtp_stream_receiver.cc
@@ -77,11 +77,11 @@ RtpStreamReceiver::RtpStreamReceiver(
PacedSender* paced_sender,
PacketRouter* packet_router,
VieRemb* remb,
- const VideoReceiveStream::Config& config,
+ const VideoReceiveStream::Config* config,
ReceiveStatisticsProxy* receive_stats_proxy,
ProcessThread* process_thread)
: clock_(Clock::GetRealTimeClock()),
- config_(config),
+ config_(*config),
video_receiver_(video_receiver),
remote_bitrate_estimator_(remote_bitrate_estimator),
packet_router_(packet_router),
@@ -110,7 +110,7 @@ RtpStreamReceiver::RtpStreamReceiver(
rtp_receive_statistics_->RegisterRtpStatisticsCallback(receive_stats_proxy);
rtp_receive_statistics_->RegisterRtcpStatisticsCallback(receive_stats_proxy);
- RTC_DCHECK(config.rtp.rtcp_mode != RtcpMode::kOff)
+ RTC_DCHECK(config_.rtp.rtcp_mode != RtcpMode::kOff)
<< "A stream should not be configured with RTCP disabled. This value is "
"reserved for internal usage.";
RTC_DCHECK(config_.rtp.remote_ssrc != 0);
@@ -118,22 +118,23 @@ RtpStreamReceiver::RtpStreamReceiver(
RTC_DCHECK(config_.rtp.local_ssrc != 0);
RTC_DCHECK(config_.rtp.remote_ssrc != config_.rtp.local_ssrc);
- rtp_rtcp_->SetRTCPStatus(config.rtp.rtcp_mode);
- rtp_rtcp_->SetSSRC(config.rtp.local_ssrc);
+ rtp_rtcp_->SetRTCPStatus(config_.rtp.rtcp_mode);
+ rtp_rtcp_->SetSSRC(config_.rtp.local_ssrc);
rtp_rtcp_->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp);
- if (config.rtp.remb) {
+ if (config_.rtp.remb) {
rtp_rtcp_->SetREMBStatus(true);
remb_->AddReceiveChannel(rtp_rtcp_.get());
}
- for (size_t i = 0; i < config.rtp.extensions.size(); ++i) {
- EnableReceiveRtpHeaderExtension(config.rtp.extensions[i].uri,
- config.rtp.extensions[i].id);
+ for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
+ EnableReceiveRtpHeaderExtension(config_.rtp.extensions[i].uri,
+ config_.rtp.extensions[i].id);
}
static const int kMaxPacketAgeToNack = 450;
- const int max_reordering_threshold = (config.rtp.nack.rtp_history_ms > 0)
- ? kMaxPacketAgeToNack : kDefaultMaxReorderingThreshold;
+ const int max_reordering_threshold = (config_.rtp.nack.rtp_history_ms > 0)
+ ? kMaxPacketAgeToNack
+ : kDefaultMaxReorderingThreshold;
rtp_receive_statistics_->SetMaxReorderingThreshold(max_reordering_threshold);
// TODO(pbos): Support multiple RTX, per video payload.
@@ -178,7 +179,7 @@ RtpStreamReceiver::RtpStreamReceiver(
config_.rtp.fec.ulpfec_payload_type);
}
- if (config.rtp.rtcp_xr.receiver_reference_time_report)
+ if (config_.rtp.rtcp_xr.receiver_reference_time_report)
rtp_rtcp_->SetRtcpXrRrtrStatus(true);
// Stats callback for CNAME changes.
« no previous file with comments | « webrtc/video/rtp_stream_receiver.h ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698