OLD | NEW |
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 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 "%s: frame too long into the future, timestamp=%u.", | 60 "%s: frame too long into the future, timestamp=%u.", |
61 __FUNCTION__, new_frame.timestamp()); | 61 __FUNCTION__, new_frame.timestamp()); |
62 return -1; | 62 return -1; |
63 } | 63 } |
64 | 64 |
65 if (new_frame.render_time_ms() < last_render_time_ms_) { | 65 if (new_frame.render_time_ms() < last_render_time_ms_) { |
66 WEBRTC_TRACE(kTraceWarning, kTraceVideoRenderer, -1, | 66 WEBRTC_TRACE(kTraceWarning, kTraceVideoRenderer, -1, |
67 "%s: frame scheduled out of order, render_time=%u, latest=%u.", | 67 "%s: frame scheduled out of order, render_time=%u, latest=%u.", |
68 __FUNCTION__, new_frame.render_time_ms(), | 68 __FUNCTION__, new_frame.render_time_ms(), |
69 last_render_time_ms_); | 69 last_render_time_ms_); |
70 // TODO(mflodman): Decide what to do when this happens. | 70 // For more details, see bug: |
71 // See bug: https://bugs.chromium.org/p/webrtc/issues/detail?id=7253 | 71 // https://bugs.chromium.org/p/webrtc/issues/detail?id=7253 |
| 72 return -1; |
72 } | 73 } |
73 | 74 |
74 last_render_time_ms_ = new_frame.render_time_ms(); | 75 last_render_time_ms_ = new_frame.render_time_ms(); |
75 incoming_frames_.emplace_back(std::move(new_frame)); | 76 incoming_frames_.emplace_back(std::move(new_frame)); |
76 | 77 |
77 if (incoming_frames_.size() > kMaxIncomingFramesBeforeLogged) | 78 if (incoming_frames_.size() > kMaxIncomingFramesBeforeLogged) |
78 LOG(LS_WARNING) << "Stored incoming frames: " << incoming_frames_.size(); | 79 LOG(LS_WARNING) << "Stored incoming frames: " << incoming_frames_.size(); |
79 return static_cast<int32_t>(incoming_frames_.size()); | 80 return static_cast<int32_t>(incoming_frames_.size()); |
80 } | 81 } |
81 | 82 |
(...skipping 16 matching lines...) Expand all Loading... |
98 render_delay_ms_ - | 99 render_delay_ms_ - |
99 rtc::TimeMillis(); | 100 rtc::TimeMillis(); |
100 return time_to_release < 0 ? 0u : static_cast<uint32_t>(time_to_release); | 101 return time_to_release < 0 ? 0u : static_cast<uint32_t>(time_to_release); |
101 } | 102 } |
102 | 103 |
103 bool VideoRenderFrames::HasPendingFrames() const { | 104 bool VideoRenderFrames::HasPendingFrames() const { |
104 return !incoming_frames_.empty(); | 105 return !incoming_frames_.empty(); |
105 } | 106 } |
106 | 107 |
107 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |