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

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

Issue 2548523002: Rename RtpStreamReceiver::IsFecEnabled to RtpStreamReceiver::IsUlpfecEnabled. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | no next file » | 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 void VideoReceiveStream::Start() { 290 void VideoReceiveStream::Start() {
291 if (decode_thread_.IsRunning()) 291 if (decode_thread_.IsRunning())
292 return; 292 return;
293 if (jitter_buffer_experiment_) { 293 if (jitter_buffer_experiment_) {
294 frame_buffer_->Start(); 294 frame_buffer_->Start();
295 call_stats_->RegisterStatsObserver(&rtp_stream_receiver_); 295 call_stats_->RegisterStatsObserver(&rtp_stream_receiver_);
296 296
297 if (rtp_stream_receiver_.IsRetransmissionsEnabled() && 297 if (rtp_stream_receiver_.IsRetransmissionsEnabled() &&
298 rtp_stream_receiver_.IsFecEnabled()) { 298 rtp_stream_receiver_.IsUlpfecEnabled()) {
299 frame_buffer_->SetProtectionMode(kProtectionNackFEC); 299 frame_buffer_->SetProtectionMode(kProtectionNackFEC);
300 } 300 }
301 } 301 }
302 transport_adapter_.Enable(); 302 transport_adapter_.Enable();
303 rtc::VideoSinkInterface<VideoFrame>* renderer = nullptr; 303 rtc::VideoSinkInterface<VideoFrame>* renderer = nullptr;
304 if (config_.renderer) { 304 if (config_.renderer) {
305 if (config_.disable_prerenderer_smoothing) { 305 if (config_.disable_prerenderer_smoothing) {
306 renderer = this; 306 renderer = this;
307 } else { 307 } else {
308 incoming_video_stream_.reset( 308 incoming_video_stream_.reset(
309 new IncomingVideoStream(config_.render_delay_ms, this)); 309 new IncomingVideoStream(config_.render_delay_ms, this));
310 renderer = incoming_video_stream_.get(); 310 renderer = incoming_video_stream_.get();
311 } 311 }
312 } 312 }
313 RTC_DCHECK(renderer != nullptr); 313 RTC_DCHECK(renderer != nullptr);
314 314
315 for (const Decoder& decoder : config_.decoders) { 315 for (const Decoder& decoder : config_.decoders) {
316 video_receiver_.RegisterExternalDecoder(decoder.decoder, 316 video_receiver_.RegisterExternalDecoder(decoder.decoder,
317 decoder.payload_type); 317 decoder.payload_type);
318 318
319 VideoCodec codec = CreateDecoderVideoCodec(decoder); 319 VideoCodec codec = CreateDecoderVideoCodec(decoder);
320 RTC_CHECK(rtp_stream_receiver_.SetReceiveCodec(codec)); 320 RTC_CHECK(rtp_stream_receiver_.SetReceiveCodec(codec));
321 RTC_CHECK_EQ(VCM_OK, video_receiver_.RegisterReceiveCodec( 321 RTC_CHECK_EQ(VCM_OK, video_receiver_.RegisterReceiveCodec(
322 &codec, num_cpu_cores_, false)); 322 &codec, num_cpu_cores_, false));
323 } 323 }
324 324
325 video_stream_decoder_.reset(new VideoStreamDecoder( 325 video_stream_decoder_.reset(new VideoStreamDecoder(
326 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_, 326 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_,
327 rtp_stream_receiver_.IsRetransmissionsEnabled(), 327 rtp_stream_receiver_.IsRetransmissionsEnabled(),
328 rtp_stream_receiver_.IsFecEnabled(), &stats_proxy_, renderer, 328 rtp_stream_receiver_.IsUlpfecEnabled(), &stats_proxy_, renderer,
329 config_.pre_render_callback)); 329 config_.pre_render_callback));
330 // Register the channel to receive stats updates. 330 // Register the channel to receive stats updates.
331 call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); 331 call_stats_->RegisterStatsObserver(video_stream_decoder_.get());
332 // Start the decode thread 332 // Start the decode thread
333 decode_thread_.Start(); 333 decode_thread_.Start();
334 decode_thread_.SetPriority(rtc::kHighestPriority); 334 decode_thread_.SetPriority(rtc::kHighestPriority);
335 rtp_stream_receiver_.StartReceive(); 335 rtp_stream_receiver_.StartReceive();
336 } 336 }
337 337
338 void VideoReceiveStream::Stop() { 338 void VideoReceiveStream::Stop() {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 RequestKeyFrame(); 486 RequestKeyFrame();
487 } 487 }
488 } 488 }
489 489
490 void VideoReceiveStream::RequestKeyFrame() { 490 void VideoReceiveStream::RequestKeyFrame() {
491 rtp_stream_receiver_.RequestKeyFrame(); 491 rtp_stream_receiver_.RequestKeyFrame();
492 } 492 }
493 493
494 } // namespace internal 494 } // namespace internal
495 } // namespace webrtc 495 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698