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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. Returns true if the first frame has been | 95 // Return current timing information. Returns true if the first frame has been |
96 // decoded, false otherwise. | 96 // decoded, false otherwise. |
97 bool GetTimings(int* decode_ms, | 97 virtual bool GetTimings(int* decode_ms, |
98 int* max_decode_ms, | 98 int* max_decode_ms, |
99 int* current_delay_ms, | 99 int* current_delay_ms, |
100 int* target_delay_ms, | 100 int* target_delay_ms, |
101 int* jitter_buffer_ms, | 101 int* jitter_buffer_ms, |
102 int* min_playout_delay_ms, | 102 int* min_playout_delay_ms, |
103 int* render_delay_ms) const; | 103 int* render_delay_ms) const; |
104 | 104 |
105 enum { kDefaultRenderDelayMs = 10 }; | 105 enum { kDefaultRenderDelayMs = 10 }; |
106 enum { kDelayMaxChangeMsPerS = 100 }; | 106 enum { kDelayMaxChangeMsPerS = 100 }; |
107 | 107 |
108 protected: | 108 protected: |
109 int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 109 int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
110 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const | 110 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const |
111 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 111 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
112 int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 112 int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
113 | 113 |
(...skipping 20 matching lines...) Expand all Loading... |
134 | 134 |
135 // Statistics. | 135 // Statistics. |
136 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); | 136 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); |
137 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); | 137 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); |
138 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); | 138 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); |
139 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); | 139 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); |
140 }; | 140 }; |
141 } // namespace webrtc | 141 } // namespace webrtc |
142 | 142 |
143 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ | 143 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ |
OLD | NEW |