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

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

Issue 1457383002: Implement standalone event tracing in AppRTCDemo. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: revert test_main.cc, it shouldn't be on for all tests either way Created 5 years, 1 month 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/jitter_buffer.h" 10 #include "webrtc/modules/video_coding/jitter_buffer.h"
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 bool key_frame_found = false; 1177 bool key_frame_found = false;
1178 int dropped_frames = 0; 1178 int dropped_frames = 0;
1179 dropped_frames += incomplete_frames_.RecycleFramesUntilKeyFrame( 1179 dropped_frames += incomplete_frames_.RecycleFramesUntilKeyFrame(
1180 &key_frame_it, &free_frames_); 1180 &key_frame_it, &free_frames_);
1181 key_frame_found = key_frame_it != incomplete_frames_.end(); 1181 key_frame_found = key_frame_it != incomplete_frames_.end();
1182 if (dropped_frames == 0) { 1182 if (dropped_frames == 0) {
1183 dropped_frames += decodable_frames_.RecycleFramesUntilKeyFrame( 1183 dropped_frames += decodable_frames_.RecycleFramesUntilKeyFrame(
1184 &key_frame_it, &free_frames_); 1184 &key_frame_it, &free_frames_);
1185 key_frame_found = key_frame_it != decodable_frames_.end(); 1185 key_frame_found = key_frame_it != decodable_frames_.end();
1186 } 1186 }
1187 TRACE_EVENT_INSTANT0("webrtc", "JB::RecycleFramesUntilKeyFrame");
1188 if (key_frame_found) { 1187 if (key_frame_found) {
1189 LOG(LS_INFO) << "Found key frame while dropping frames."; 1188 LOG(LS_INFO) << "Found key frame while dropping frames.";
1190 // Reset last decoded state to make sure the next frame decoded is a key 1189 // Reset last decoded state to make sure the next frame decoded is a key
1191 // frame, and start NACKing from here. 1190 // frame, and start NACKing from here.
1192 last_decoded_state_.Reset(); 1191 last_decoded_state_.Reset();
1193 DropPacketsFromNackList(EstimatedLowSequenceNumber(*key_frame_it->second)); 1192 DropPacketsFromNackList(EstimatedLowSequenceNumber(*key_frame_it->second));
1194 } else if (decodable_frames_.empty()) { 1193 } else if (decodable_frames_.empty()) {
1195 // All frames dropped. Reset the decoding state and clear missing sequence 1194 // All frames dropped. Reset the decoding state and clear missing sequence
1196 // numbers as we're starting fresh. 1195 // numbers as we're starting fresh.
1197 last_decoded_state_.Reset(); 1196 last_decoded_state_.Reset();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 } 1312 }
1314 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in 1313 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in
1315 // that case we don't wait for retransmissions. 1314 // that case we don't wait for retransmissions.
1316 if (high_rtt_nack_threshold_ms_ >= 0 && 1315 if (high_rtt_nack_threshold_ms_ >= 0 &&
1317 rtt_ms_ >= high_rtt_nack_threshold_ms_) { 1316 rtt_ms_ >= high_rtt_nack_threshold_ms_) {
1318 return false; 1317 return false;
1319 } 1318 }
1320 return true; 1319 return true;
1321 } 1320 }
1322 } // namespace webrtc 1321 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698