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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual uint32_t MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) const; | 85 virtual uint32_t MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) const; |
86 | 86 |
87 // Returns the current target delay which is required delay + decode time + | 87 // Returns the current target delay which is required delay + decode time + |
88 // render delay. | 88 // render delay. |
89 int TargetVideoDelay() const; | 89 int TargetVideoDelay() const; |
90 | 90 |
91 // Calculates whether or not there is enough time to decode a frame given a | 91 // Calculates whether or not there is enough time to decode a frame given a |
92 // certain amount of processing time. | 92 // certain amount of processing time. |
93 bool EnoughTimeToDecode(uint32_t available_processing_time_ms) const; | 93 bool EnoughTimeToDecode(uint32_t available_processing_time_ms) const; |
94 | 94 |
95 // Return current timing information. | 95 // Return current timing information. Returns true if the first frame has been |
96 void GetTimings(int* decode_ms, | 96 // decoded, false otherwise. |
| 97 bool GetTimings(int* decode_ms, |
97 int* max_decode_ms, | 98 int* max_decode_ms, |
98 int* current_delay_ms, | 99 int* current_delay_ms, |
99 int* target_delay_ms, | 100 int* target_delay_ms, |
100 int* jitter_buffer_ms, | 101 int* jitter_buffer_ms, |
101 int* min_playout_delay_ms, | 102 int* min_playout_delay_ms, |
102 int* render_delay_ms) const; | 103 int* render_delay_ms) const; |
103 | 104 |
104 enum { kDefaultRenderDelayMs = 10 }; | 105 enum { kDefaultRenderDelayMs = 10 }; |
105 enum { kDelayMaxChangeMsPerS = 100 }; | 106 enum { kDelayMaxChangeMsPerS = 100 }; |
106 | 107 |
(...skipping 26 matching lines...) Expand all Loading... |
133 | 134 |
134 // Statistics. | 135 // Statistics. |
135 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); | 136 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); |
136 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); | 137 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); |
137 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); | 138 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); |
138 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); | 139 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); |
139 }; | 140 }; |
140 } // namespace webrtc | 141 } // namespace webrtc |
141 | 142 |
142 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ | 143 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ |
OLD | NEW |