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

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

Issue 2734453002: Drop VP8 frames in case of duplicates in RtpFrameReferenceFinder. (Closed)
Patch Set: Created 3 years, 9 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // frame then we have to wait for that frame to be completed first. 327 // frame then we have to wait for that frame to be completed first.
328 auto not_received_frame_it = 328 auto not_received_frame_it =
329 not_yet_received_frames_.upper_bound(layer_info_it->second[layer]); 329 not_yet_received_frames_.upper_bound(layer_info_it->second[layer]);
330 if (not_received_frame_it != not_yet_received_frames_.end() && 330 if (not_received_frame_it != not_yet_received_frames_.end() &&
331 AheadOf<uint16_t, kPicIdLength>(frame->picture_id, 331 AheadOf<uint16_t, kPicIdLength>(frame->picture_id,
332 *not_received_frame_it)) { 332 *not_received_frame_it)) {
333 stashed_frames_.push_back(std::move(frame)); 333 stashed_frames_.push_back(std::move(frame));
334 return; 334 return;
335 } 335 }
336 336
337 RTC_DCHECK((AheadOf<uint16_t, kPicIdLength>(frame->picture_id, 337 if (!(AheadOf<uint16_t, kPicIdLength>(frame->picture_id,
338 layer_info_it->second[layer]))); 338 layer_info_it->second[layer]))) {
339 LOG(LS_WARNING) << "Frame with picture id " << frame->picture_id
340 << " and packet range [" << frame->first_seq_num() << ", "
341 << frame->last_seq_num() << "] already received, "
342 << " dropping frame.";
343 return;
344 }
stefan-webrtc 2017/03/06 15:49:26 Seems like we can get a lot of these logs on a net
philipel 2017/03/07 10:47:11 I don't think it will be an issue since we need to
345
339 ++frame->num_references; 346 ++frame->num_references;
340 frame->references[layer] = layer_info_it->second[layer]; 347 frame->references[layer] = layer_info_it->second[layer];
341 } 348 }
342 349
343 CompletedFrameVp8(std::move(frame)); 350 CompletedFrameVp8(std::move(frame));
344 } 351 }
345 352
346 void RtpFrameReferenceFinder::CompletedFrameVp8( 353 void RtpFrameReferenceFinder::CompletedFrameVp8(
347 std::unique_ptr<RtpFrameObject> frame) { 354 std::unique_ptr<RtpFrameObject> frame) {
348 rtc::Optional<RTPVideoTypeHeader> rtp_codec_header = frame->GetCodecHeader(); 355 rtc::Optional<RTPVideoTypeHeader> rtp_codec_header = frame->GetCodecHeader();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 if (!gof_info_.empty() && 748 if (!gof_info_.empty() &&
742 AheadOf<uint8_t>(gof_info_.begin()->first, fixed_tl0)) { 749 AheadOf<uint8_t>(gof_info_.begin()->first, fixed_tl0)) {
743 return true; 750 return true;
744 } 751 }
745 } 752 }
746 return false; 753 return false;
747 } 754 }
748 755
749 } // namespace video_coding 756 } // namespace video_coding
750 } // namespace webrtc 757 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698