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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void SetTimingFrameInfo(const TimingFrameInfo& info); | 105 void SetTimingFrameInfo(const TimingFrameInfo& info); |
106 rtc::Optional<TimingFrameInfo> GetTimingFrameInfo(); | 106 rtc::Optional<TimingFrameInfo> GetTimingFrameInfo(); |
107 | 107 |
108 enum { kDefaultRenderDelayMs = 10 }; | 108 enum { kDefaultRenderDelayMs = 10 }; |
109 enum { kDelayMaxChangeMsPerS = 100 }; | 109 enum { kDelayMaxChangeMsPerS = 100 }; |
110 | 110 |
111 protected: | 111 protected: |
112 int RequiredDecodeTimeMs() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 112 int RequiredDecodeTimeMs() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
113 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const | 113 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const |
114 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 114 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
115 int TargetDelayInternal() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 115 int TargetDelayInternal() const RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
116 | 116 |
117 private: | 117 private: |
118 void UpdateHistograms() const; | 118 void UpdateHistograms() const; |
119 | 119 |
120 rtc::CriticalSection crit_sect_; | 120 rtc::CriticalSection crit_sect_; |
121 Clock* const clock_; | 121 Clock* const clock_; |
122 bool master_ GUARDED_BY(crit_sect_); | 122 bool master_ RTC_GUARDED_BY(crit_sect_); |
123 TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_); | 123 TimestampExtrapolator* ts_extrapolator_ RTC_GUARDED_BY(crit_sect_); |
124 std::unique_ptr<VCMCodecTimer> codec_timer_ GUARDED_BY(crit_sect_); | 124 std::unique_ptr<VCMCodecTimer> codec_timer_ RTC_GUARDED_BY(crit_sect_); |
125 int render_delay_ms_ GUARDED_BY(crit_sect_); | 125 int render_delay_ms_ RTC_GUARDED_BY(crit_sect_); |
126 // Best-effort playout delay range for frames from capture to render. | 126 // Best-effort playout delay range for frames from capture to render. |
127 // The receiver tries to keep the delay between |min_playout_delay_ms_| | 127 // The receiver tries to keep the delay between |min_playout_delay_ms_| |
128 // and |max_playout_delay_ms_| taking the network jitter into account. | 128 // and |max_playout_delay_ms_| taking the network jitter into account. |
129 // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0, | 129 // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0, |
130 // in which case the receiver tries to play the frames as they arrive. | 130 // in which case the receiver tries to play the frames as they arrive. |
131 int min_playout_delay_ms_ GUARDED_BY(crit_sect_); | 131 int min_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_); |
132 int max_playout_delay_ms_ GUARDED_BY(crit_sect_); | 132 int max_playout_delay_ms_ RTC_GUARDED_BY(crit_sect_); |
133 int jitter_delay_ms_ GUARDED_BY(crit_sect_); | 133 int jitter_delay_ms_ RTC_GUARDED_BY(crit_sect_); |
134 int current_delay_ms_ GUARDED_BY(crit_sect_); | 134 int current_delay_ms_ RTC_GUARDED_BY(crit_sect_); |
135 int last_decode_ms_ GUARDED_BY(crit_sect_); | 135 int last_decode_ms_ RTC_GUARDED_BY(crit_sect_); |
136 uint32_t prev_frame_timestamp_ GUARDED_BY(crit_sect_); | 136 uint32_t prev_frame_timestamp_ RTC_GUARDED_BY(crit_sect_); |
137 rtc::Optional<TimingFrameInfo> timing_frame_info_ GUARDED_BY(crit_sect_); | 137 rtc::Optional<TimingFrameInfo> timing_frame_info_ RTC_GUARDED_BY(crit_sect_); |
138 | 138 |
139 // Statistics. | 139 // Statistics. |
140 size_t num_decoded_frames_ GUARDED_BY(crit_sect_); | 140 size_t num_decoded_frames_ RTC_GUARDED_BY(crit_sect_); |
141 size_t num_delayed_decoded_frames_ GUARDED_BY(crit_sect_); | 141 size_t num_delayed_decoded_frames_ RTC_GUARDED_BY(crit_sect_); |
142 int64_t first_decoded_frame_ms_ GUARDED_BY(crit_sect_); | 142 int64_t first_decoded_frame_ms_ RTC_GUARDED_BY(crit_sect_); |
143 uint64_t sum_missed_render_deadline_ms_ GUARDED_BY(crit_sect_); | 143 uint64_t sum_missed_render_deadline_ms_ RTC_GUARDED_BY(crit_sect_); |
144 }; | 144 }; |
145 } // namespace webrtc | 145 } // namespace webrtc |
146 | 146 |
147 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ | 147 #endif // WEBRTC_MODULES_VIDEO_CODING_TIMING_H_ |
OLD | NEW |