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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 void FrameBuffer::Stop() { | 243 void FrameBuffer::Stop() { |
244 TRACE_EVENT0("webrtc", "FrameBuffer::Stop"); | 244 TRACE_EVENT0("webrtc", "FrameBuffer::Stop"); |
245 rtc::CritScope lock(&crit_); | 245 rtc::CritScope lock(&crit_); |
246 stopped_ = true; | 246 stopped_ = true; |
247 new_continuous_frame_event_.Set(); | 247 new_continuous_frame_event_.Set(); |
248 } | 248 } |
249 | 249 |
250 bool FrameBuffer::ValidReferences(const FrameObject& frame) const { | 250 bool FrameBuffer::ValidReferences(const FrameObject& frame) const { |
251 for (size_t i = 0; i < frame.num_references; ++i) { | 251 for (size_t i = 0; i < frame.num_references; ++i) { |
252 if (AheadOrAt(frame.references[i], frame.picture_id)) | 252 if (AheadOrAt<uint16_t>(frame.references[i], frame.picture_id)) |
253 return false; | 253 return false; |
254 for (size_t j = i + 1; j < frame.num_references; ++j) { | 254 for (size_t j = i + 1; j < frame.num_references; ++j) { |
255 if (frame.references[i] == frame.references[j]) | 255 if (frame.references[i] == frame.references[j]) |
256 return false; | 256 return false; |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 if (frame.inter_layer_predicted && frame.spatial_layer == 0) | 260 if (frame.inter_layer_predicted && frame.spatial_layer == 0) |
261 return false; | 261 return false; |
262 | 262 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 frames_.clear(); | 560 frames_.clear(); |
561 last_decoded_frame_it_ = frames_.end(); | 561 last_decoded_frame_it_ = frames_.end(); |
562 last_continuous_frame_it_ = frames_.end(); | 562 last_continuous_frame_it_ = frames_.end(); |
563 next_frame_it_ = frames_.end(); | 563 next_frame_it_ = frames_.end(); |
564 num_frames_history_ = 0; | 564 num_frames_history_ = 0; |
565 num_frames_buffered_ = 0; | 565 num_frames_buffered_ = 0; |
566 } | 566 } |
567 | 567 |
568 } // namespace video_coding | 568 } // namespace video_coding |
569 } // namespace webrtc | 569 } // namespace webrtc |
OLD | NEW |