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 int* current_delay_ms, | 87 int* current_delay_ms, |
88 int* target_delay_ms, | 88 int* target_delay_ms, |
89 int* jitter_buffer_ms, | 89 int* jitter_buffer_ms, |
90 int* min_playout_delay_ms, | 90 int* min_playout_delay_ms, |
91 int* render_delay_ms) const; | 91 int* render_delay_ms) const; |
92 | 92 |
93 enum { kDefaultRenderDelayMs = 10 }; | 93 enum { kDefaultRenderDelayMs = 10 }; |
94 enum { kDelayMaxChangeMsPerS = 100 }; | 94 enum { kDelayMaxChangeMsPerS = 100 }; |
95 | 95 |
96 protected: | 96 protected: |
97 int32_t MaxDecodeTimeMs(FrameType frame_type = kVideoFrameDelta) const | 97 int64_t RequiredDecodeTimeMs() const |
98 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 98 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
99 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const | 99 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const |
100 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 100 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
101 uint32_t TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 101 uint32_t TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
102 | 102 |
103 private: | 103 private: |
104 void UpdateHistograms() const; | 104 void UpdateHistograms() const; |
105 | 105 |
106 CriticalSectionWrapper* crit_sect_; | 106 CriticalSectionWrapper* crit_sect_; |
107 Clock* const clock_; | 107 Clock* const clock_; |
108 bool master_ GUARDED_BY(crit_sect_); | 108 bool master_ GUARDED_BY(crit_sect_); |
109 TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_); | 109 TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_); |
110 VCMCodecTimer codec_timer_ GUARDED_BY(crit_sect_); | 110 VCMCodecTimer codec_timer_ GUARDED_BY(crit_sect_); |
111 uint32_t render_delay_ms_ GUARDED_BY(crit_sect_); | 111 uint32_t render_delay_ms_ GUARDED_BY(crit_sect_); |
112 uint32_t min_playout_delay_ms_ GUARDED_BY(crit_sect_); | 112 uint32_t min_playout_delay_ms_ GUARDED_BY(crit_sect_); |
113 uint32_t jitter_delay_ms_ GUARDED_BY(crit_sect_); | 113 uint32_t jitter_delay_ms_ GUARDED_BY(crit_sect_); |
114 uint32_t current_delay_ms_ GUARDED_BY(crit_sect_); | 114 uint32_t current_delay_ms_ GUARDED_BY(crit_sect_); |
115 int last_decode_ms_ GUARDED_BY(crit_sect_); | 115 int last_decode_ms_ GUARDED_BY(crit_sect_); |
116 uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_); | 116 uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_); |
117 | 117 |
118 // Statistics. | 118 // Statistics. |
119 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); | 119 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); |
120 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); | 120 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); |
121 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); | 121 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); |
122 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); | 122 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); |
123 }; | 123 }; |
124 } // namespace webrtc | 124 } // namespace webrtc |
125 | 125 |
126 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ | 126 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ |
OLD | NEW |