| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Increases or decreases the current delay to get closer to the target delay. | 51 // Increases or decreases the current delay to get closer to the target delay. |
| 52 // Given the actual decode time in ms and the render time in ms for a frame, | 52 // Given the actual decode time in ms and the render time in ms for a frame, |
| 53 // this function calculates how late the frame is and increases the delay | 53 // this function calculates how late the frame is and increases the delay |
| 54 // accordingly. | 54 // accordingly. |
| 55 void UpdateCurrentDelay(int64_t render_time_ms, | 55 void UpdateCurrentDelay(int64_t render_time_ms, |
| 56 int64_t actual_decode_time_ms); | 56 int64_t actual_decode_time_ms); |
| 57 | 57 |
| 58 // Stops the decoder timer, should be called when the decoder returns a frame | 58 // Stops the decoder timer, should be called when the decoder returns a frame |
| 59 // or when the decoded frame callback is called. | 59 // or when the decoded frame callback is called. |
| 60 int32_t StopDecodeTimer(uint32_t time_stamp, | 60 int32_t StopDecodeTimer(uint32_t time_stamp, |
| 61 int64_t start_time_ms, | 61 int32_t decode_time_ms, |
| 62 int64_t now_ms, | 62 int64_t now_ms, |
| 63 int64_t render_time_ms); | 63 int64_t render_time_ms); |
| 64 | 64 |
| 65 // Used to report that a frame is passed to decoding. Updates the timestamp | 65 // Used to report that a frame is passed to decoding. Updates the timestamp |
| 66 // filter which is used to map between timestamps and receiver system time. | 66 // filter which is used to map between timestamps and receiver system time. |
| 67 void IncomingTimestamp(uint32_t time_stamp, int64_t last_packet_time_ms); | 67 void IncomingTimestamp(uint32_t time_stamp, int64_t last_packet_time_ms); |
| 68 // Returns the receiver system time when the frame with timestamp | 68 // Returns the receiver system time when the frame with timestamp |
| 69 // frame_timestamp should be rendered, assuming that the system time currently | 69 // frame_timestamp should be rendered, assuming that the system time currently |
| 70 // is now_ms. | 70 // is now_ms. |
| 71 int64_t RenderTimeMs(uint32_t frame_timestamp, int64_t now_ms) const; | 71 int64_t RenderTimeMs(uint32_t frame_timestamp, int64_t now_ms) const; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 // Statistics. | 119 // Statistics. |
| 120 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); | 120 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); |
| 121 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); | 121 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); |
| 122 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); | 122 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); |
| 123 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); | 123 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); |
| 124 }; | 124 }; |
| 125 } // namespace webrtc | 125 } // namespace webrtc |
| 126 | 126 |
| 127 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TIMING_H_ | 127 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TIMING_H_ |
| OLD | NEW |