OLD | NEW |
---|---|
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 | 267 |
268 int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) { | 268 int FrameBuffer::InsertFrame(std::unique_ptr<FrameObject> frame) { |
269 TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame"); | 269 TRACE_EVENT0("webrtc", "FrameBuffer::InsertFrame"); |
270 RTC_DCHECK(frame); | 270 RTC_DCHECK(frame); |
271 if (stats_callback_) | 271 if (stats_callback_) |
272 stats_callback_->OnCompleteFrame(frame->num_references == 0, frame->size()); | 272 stats_callback_->OnCompleteFrame(frame->num_references == 0, frame->size()); |
273 FrameKey key(frame->picture_id, frame->spatial_layer); | 273 FrameKey key(frame->picture_id, frame->spatial_layer); |
274 | 274 |
275 rtc::CritScope lock(&crit_); | 275 rtc::CritScope lock(&crit_); |
276 | 276 |
277 if (frame->delayed_by_retransmission()) | |
278 jitter_estimator_->FrameNacked(); | |
philipel2
2017/07/24 14:17:22
I think we should move this inside the if block on
| |
279 | |
277 int last_continuous_picture_id = | 280 int last_continuous_picture_id = |
278 last_continuous_frame_it_ == frames_.end() | 281 last_continuous_frame_it_ == frames_.end() |
279 ? -1 | 282 ? -1 |
280 : last_continuous_frame_it_->first.picture_id; | 283 : last_continuous_frame_it_->first.picture_id; |
281 | 284 |
282 if (!ValidReferences(*frame)) { | 285 if (!ValidReferences(*frame)) { |
283 LOG(LS_WARNING) << "Frame with (picture_id:spatial_id) (" << key.picture_id | 286 LOG(LS_WARNING) << "Frame with (picture_id:spatial_id) (" << key.picture_id |
284 << ":" << static_cast<int>(key.spatial_layer) | 287 << ":" << static_cast<int>(key.spatial_layer) |
285 << ") has invalid frame references, dropping frame."; | 288 << ") has invalid frame references, dropping frame."; |
286 return last_continuous_picture_id; | 289 return last_continuous_picture_id; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 frames_.clear(); | 550 frames_.clear(); |
548 last_decoded_frame_it_ = frames_.end(); | 551 last_decoded_frame_it_ = frames_.end(); |
549 last_continuous_frame_it_ = frames_.end(); | 552 last_continuous_frame_it_ = frames_.end(); |
550 next_frame_it_ = frames_.end(); | 553 next_frame_it_ = frames_.end(); |
551 num_frames_history_ = 0; | 554 num_frames_history_ = 0; |
552 num_frames_buffered_ = 0; | 555 num_frames_buffered_ = 0; |
553 } | 556 } |
554 | 557 |
555 } // namespace video_coding | 558 } // namespace video_coding |
556 } // namespace webrtc | 559 } // namespace webrtc |
OLD | NEW |