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

Side by Side Diff: webrtc/modules/video_coding/main/source/jitter_buffer.cc

Issue 1327933003: Enable probing with repeated payload packets by default. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixes a race with padding timestamps, and a flake in the nack test. Created 5 years, 3 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
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 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h" 10 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h"
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } 907 }
908 908
909 std::vector<uint16_t> VCMJitterBuffer::GetNackList(bool* request_key_frame) { 909 std::vector<uint16_t> VCMJitterBuffer::GetNackList(bool* request_key_frame) {
910 CriticalSectionScoped cs(crit_sect_); 910 CriticalSectionScoped cs(crit_sect_);
911 *request_key_frame = false; 911 *request_key_frame = false;
912 if (nack_mode_ == kNoNack) { 912 if (nack_mode_ == kNoNack) {
913 return std::vector<uint16_t>(); 913 return std::vector<uint16_t>();
914 } 914 }
915 if (last_decoded_state_.in_initial_state()) { 915 if (last_decoded_state_.in_initial_state()) {
916 VCMFrameBuffer* next_frame = NextFrame(); 916 VCMFrameBuffer* next_frame = NextFrame();
917 if (!next_frame)
918 return std::vector<uint16_t>();
917 const bool first_frame_is_key = next_frame && 919 const bool first_frame_is_key = next_frame &&
918 next_frame->FrameType() == kVideoFrameKey && 920 next_frame->FrameType() == kVideoFrameKey &&
919 next_frame->HaveFirstPacket(); 921 next_frame->HaveFirstPacket();
920 if (!first_frame_is_key) { 922 if (!first_frame_is_key) {
921 bool have_non_empty_frame = decodable_frames_.end() != find_if( 923 bool have_non_empty_frame = decodable_frames_.end() != find_if(
922 decodable_frames_.begin(), decodable_frames_.end(), 924 decodable_frames_.begin(), decodable_frames_.end(),
923 HasNonEmptyState); 925 HasNonEmptyState);
924 if (!have_non_empty_frame) { 926 if (!have_non_empty_frame) {
925 have_non_empty_frame = incomplete_frames_.end() != find_if( 927 have_non_empty_frame = incomplete_frames_.end() != find_if(
926 incomplete_frames_.begin(), incomplete_frames_.end(), 928 incomplete_frames_.begin(), incomplete_frames_.end(),
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 } 1255 }
1254 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in 1256 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in
1255 // that case we don't wait for retransmissions. 1257 // that case we don't wait for retransmissions.
1256 if (high_rtt_nack_threshold_ms_ >= 0 && 1258 if (high_rtt_nack_threshold_ms_ >= 0 &&
1257 rtt_ms_ >= high_rtt_nack_threshold_ms_) { 1259 rtt_ms_ >= high_rtt_nack_threshold_ms_) {
1258 return false; 1260 return false;
1259 } 1261 }
1260 return true; 1262 return true;
1261 } 1263 }
1262 } // namespace webrtc 1264 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698