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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 2649973005: Inform jitter buffer about FlexFEC protection. (Closed)
Patch Set: Take 2. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 5e8754b6bf4af0e6791038940c6c4e8ac12f0c55..3945bdf2c807c1cd62817bdfd6a0ef481257d15d 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -188,6 +188,7 @@ namespace internal {
VideoReceiveStream::VideoReceiveStream(
int num_cpu_cores,
+ bool protected_by_flexfec,
CongestionController* congestion_controller,
PacketRouter* packet_router,
VideoReceiveStream::Config config,
@@ -198,6 +199,7 @@ VideoReceiveStream::VideoReceiveStream(
: transport_adapter_(config.rtcp_send_transport),
config_(std::move(config)),
num_cpu_cores_(num_cpu_cores),
+ protected_by_flexfec_(protected_by_flexfec),
process_thread_(process_thread),
clock_(Clock::GetRealTimeClock()),
decode_thread_(DecodeThreadFunction, this, "DecodingThread"),
@@ -206,20 +208,19 @@ VideoReceiveStream::VideoReceiveStream(
timing_(new VCMTiming(clock_)),
video_receiver_(clock_, nullptr, this, timing_.get(), this, this),
stats_proxy_(&config_, clock_),
- rtp_stream_receiver_(
- congestion_controller_->GetRemoteBitrateEstimator(
- UseSendSideBwe(config_)),
- &transport_adapter_,
- call_stats_->rtcp_rtt_stats(),
- packet_router,
- remb,
- &config_,
- &stats_proxy_,
- process_thread_,
- this, // NackSender
- this, // KeyFrameRequestSender
- this, // OnCompleteFrameCallback
- timing_.get()),
+ rtp_stream_receiver_(congestion_controller_->GetRemoteBitrateEstimator(
+ UseSendSideBwe(config_)),
+ &transport_adapter_,
+ call_stats_->rtcp_rtt_stats(),
+ packet_router,
+ remb,
+ &config_,
+ &stats_proxy_,
+ process_thread_,
+ this, // NackSender
+ this, // KeyFrameRequestSender
+ this, // OnCompleteFrameCallback
+ timing_.get()),
rtp_stream_sync_(&video_receiver_, &rtp_stream_receiver_) {
LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
@@ -297,8 +298,10 @@ void VideoReceiveStream::Start() {
frame_buffer_->Start();
call_stats_->RegisterStatsObserver(&rtp_stream_receiver_);
- if (rtp_stream_receiver_.IsRetransmissionsEnabled() &&
- rtp_stream_receiver_.IsUlpfecEnabled()) {
+ bool protected_by_fec =
+ protected_by_flexfec_ || rtp_stream_receiver_.IsUlpfecEnabled();
+
+ if (rtp_stream_receiver_.IsRetransmissionsEnabled() && protected_by_fec) {
frame_buffer_->SetProtectionMode(kProtectionNackFEC);
}
@@ -327,9 +330,8 @@ void VideoReceiveStream::Start() {
video_stream_decoder_.reset(new VideoStreamDecoder(
&video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_,
- rtp_stream_receiver_.IsRetransmissionsEnabled(),
- rtp_stream_receiver_.IsUlpfecEnabled(), &stats_proxy_, renderer,
- config_.pre_render_callback));
+ rtp_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec,
+ &stats_proxy_, renderer, config_.pre_render_callback));
// Register the channel to receive stats updates.
call_stats_->RegisterStatsObserver(video_stream_decoder_.get());
// Start the decode thread
« webrtc/media/engine/webrtcvideoengine2.cc ('K') | « webrtc/video/video_receive_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698