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

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

Issue 2844643002: Add warning about timestamp non-monotonicity in the frame buffer. (Closed)
Patch Set: philipel comments 1. Created 3 years, 8 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 | « no previous file | 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) 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0; 138 float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0;
139 timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult)); 139 timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult));
140 timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms); 140 timing_->UpdateCurrentDelay(frame->RenderTime(), now_ms);
141 } 141 }
142 142
143 UpdateJitterDelay(); 143 UpdateJitterDelay();
144 144
145 PropagateDecodability(next_frame_it_->second); 145 PropagateDecodability(next_frame_it_->second);
146 AdvanceLastDecodedFrame(next_frame_it_); 146 AdvanceLastDecodedFrame(next_frame_it_);
147 if (last_decoded_frame_it_ != frames_.end() &&
148 AheadOrAt(last_decoded_frame_timestamp_, frame->timestamp)) {
brandtr 2017/04/26 11:26:33 This is correct being >=, right? I don't think we
philipel 2017/04/26 12:27:28 When we use SVC we will send frame with the same t
brandtr 2017/04/26 15:16:21 Right. What about this?
149 int last_decoded_frame_picture_id =
150 last_decoded_frame_it_->first.picture_id;
151 LOG(LS_WARNING) << "Sending frame "
152 << "(timestamp = " << frame->timestamp
153 << ", picture_id = " << frame->picture_id
154 << ") to decoder when last decoded frame was "
155 << "(timestamp = " << last_decoded_frame_timestamp_
156 << ", picture_id = " << last_decoded_frame_picture_id
157 << ").";
158 }
147 last_decoded_frame_timestamp_ = frame->timestamp; 159 last_decoded_frame_timestamp_ = frame->timestamp;
148 *frame_out = std::move(frame); 160 *frame_out = std::move(frame);
149 return kFrameFound; 161 return kFrameFound;
150 } 162 }
151 } 163 }
152 164
153 if (latest_return_time_ms - now_ms > 0) { 165 if (latest_return_time_ms - now_ms > 0) {
154 // If |next_frame_it_ == frames_.end()| and there is still time left, it 166 // If |next_frame_it_ == frames_.end()| and there is still time left, it
155 // means that the frame buffer was cleared as the thread in this function 167 // means that the frame buffer was cleared as the thread in this function
156 // was waiting to acquire |crit_| in order to return. Wait for the 168 // was waiting to acquire |crit_| in order to return. Wait for the
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 frames_.clear(); 452 frames_.clear();
441 last_decoded_frame_it_ = frames_.end(); 453 last_decoded_frame_it_ = frames_.end();
442 last_continuous_frame_it_ = frames_.end(); 454 last_continuous_frame_it_ = frames_.end();
443 next_frame_it_ = frames_.end(); 455 next_frame_it_ = frames_.end();
444 num_frames_history_ = 0; 456 num_frames_history_ = 0;
445 num_frames_buffered_ = 0; 457 num_frames_buffered_ = 0;
446 } 458 }
447 459
448 } // namespace video_coding 460 } // namespace video_coding
449 } // namespace webrtc 461 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698