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

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

Issue 1942683003: Jitter delay now depend on protection mode (FEC/NACK). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment fix Created 4 years, 7 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/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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static const int kMaxNackListSize = 250; 47 static const int kMaxNackListSize = 250;
48 video_receiver_->SetNackSettings(kMaxNackListSize, 48 video_receiver_->SetNackSettings(kMaxNackListSize,
49 kMaxPacketAgeToNack, 0); 49 kMaxPacketAgeToNack, 0);
50 video_receiver_->RegisterReceiveCallback(this); 50 video_receiver_->RegisterReceiveCallback(this);
51 video_receiver_->RegisterFrameTypeCallback(vcm_frame_type_callback); 51 video_receiver_->RegisterFrameTypeCallback(vcm_frame_type_callback);
52 video_receiver_->RegisterReceiveStatisticsCallback(this); 52 video_receiver_->RegisterReceiveStatisticsCallback(this);
53 video_receiver_->RegisterDecoderTimingCallback(this); 53 video_receiver_->RegisterDecoderTimingCallback(this);
54 static const int kDefaultRenderDelayMs = 10; 54 static const int kDefaultRenderDelayMs = 10;
55 video_receiver_->SetRenderDelay(kDefaultRenderDelayMs); 55 video_receiver_->SetRenderDelay(kDefaultRenderDelayMs);
56 56
57 VCMVideoProtection video_protection = enable_nack ? kProtectionNack 57 VCMVideoProtection video_protection = kProtectionNone;
58 : kProtectionNone; 58 if (enable_nack) {
59 if (enable_fec)
60 video_protection = kProtectionNackFEC;
61 else
62 video_protection = kProtectionNack;
63 }
64
59 VCMDecodeErrorMode decode_error_mode = enable_nack ? kNoErrors : kWithErrors; 65 VCMDecodeErrorMode decode_error_mode = enable_nack ? kNoErrors : kWithErrors;
60 video_receiver_->SetVideoProtection(video_protection, true); 66 video_receiver_->SetVideoProtection(video_protection, true);
61 video_receiver_->SetDecodeErrorMode(decode_error_mode); 67 video_receiver_->SetDecodeErrorMode(decode_error_mode);
62 VCMPacketRequestCallback* packet_request_callback = 68 VCMPacketRequestCallback* packet_request_callback =
63 enable_nack ? vcm_packet_request_callback : nullptr; 69 enable_nack ? vcm_packet_request_callback : nullptr;
64 video_receiver_->RegisterPacketRequestCallback(packet_request_callback); 70 video_receiver_->RegisterPacketRequestCallback(packet_request_callback);
65 } 71 }
66 72
67 VideoStreamDecoder::~VideoStreamDecoder() {} 73 VideoStreamDecoder::~VideoStreamDecoder() {}
68 74
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 jitter_buffer_ms, min_playout_delay_ms, render_delay_ms, last_rtt); 130 jitter_buffer_ms, min_playout_delay_ms, render_delay_ms, last_rtt);
125 } 131 }
126 132
127 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { 133 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
128 video_receiver_->SetReceiveChannelParameters(max_rtt_ms); 134 video_receiver_->SetReceiveChannelParameters(max_rtt_ms);
129 135
130 rtc::CritScope lock(&crit_); 136 rtc::CritScope lock(&crit_);
131 last_rtt_ms_ = avg_rtt_ms; 137 last_rtt_ms_ = avg_rtt_ms;
132 } 138 }
133 } // namespace webrtc 139 } // 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