OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 SampleCounter e2e_delay_counter; | 119 SampleCounter e2e_delay_counter; |
120 SampleCounter interframe_delay_counter; | 120 SampleCounter interframe_delay_counter; |
121 int64_t flow_duration_ms = 0; | 121 int64_t flow_duration_ms = 0; |
122 int64_t total_media_bytes = 0; | 122 int64_t total_media_bytes = 0; |
123 SampleCounter received_width; | 123 SampleCounter received_width; |
124 SampleCounter received_height; | 124 SampleCounter received_height; |
125 SampleCounter qp_counter; | 125 SampleCounter qp_counter; |
126 FrameCounts frame_counts; | 126 FrameCounts frame_counts; |
127 }; | 127 }; |
128 | 128 |
129 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 129 void UpdateHistograms() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
130 | 130 |
131 void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 131 void QualitySample() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
132 | 132 |
133 // Removes info about old frames and then updates the framerate. | 133 // Removes info about old frames and then updates the framerate. |
134 void UpdateFramerate(int64_t now_ms) const EXCLUSIVE_LOCKS_REQUIRED(crit_); | 134 void UpdateFramerate(int64_t now_ms) const |
| 135 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
135 | 136 |
136 Clock* const clock_; | 137 Clock* const clock_; |
137 // Ownership of this object lies with the owner of the ReceiveStatisticsProxy | 138 // Ownership of this object lies with the owner of the ReceiveStatisticsProxy |
138 // instance. Lifetime is guaranteed to outlive |this|. | 139 // instance. Lifetime is guaranteed to outlive |this|. |
139 // TODO(tommi): In practice the config_ reference is only used for accessing | 140 // TODO(tommi): In practice the config_ reference is only used for accessing |
140 // config_.rtp.ulpfec.ulpfec_payload_type. Instead of holding a pointer back, | 141 // config_.rtp.ulpfec.ulpfec_payload_type. Instead of holding a pointer back, |
141 // we could just store the value of ulpfec_payload_type and change the | 142 // we could just store the value of ulpfec_payload_type and change the |
142 // ReceiveStatisticsProxy() ctor to accept a const& of Config (since we'll | 143 // ReceiveStatisticsProxy() ctor to accept a const& of Config (since we'll |
143 // then no longer store a pointer to the object). | 144 // then no longer store a pointer to the object). |
144 const VideoReceiveStream::Config& config_; | 145 const VideoReceiveStream::Config& config_; |
145 const int64_t start_ms_; | 146 const int64_t start_ms_; |
146 | 147 |
147 rtc::CriticalSection crit_; | 148 rtc::CriticalSection crit_; |
148 int64_t last_sample_time_ GUARDED_BY(crit_); | 149 int64_t last_sample_time_ RTC_GUARDED_BY(crit_); |
149 QualityThreshold fps_threshold_ GUARDED_BY(crit_); | 150 QualityThreshold fps_threshold_ RTC_GUARDED_BY(crit_); |
150 QualityThreshold qp_threshold_ GUARDED_BY(crit_); | 151 QualityThreshold qp_threshold_ RTC_GUARDED_BY(crit_); |
151 QualityThreshold variance_threshold_ GUARDED_BY(crit_); | 152 QualityThreshold variance_threshold_ RTC_GUARDED_BY(crit_); |
152 SampleCounter qp_sample_ GUARDED_BY(crit_); | 153 SampleCounter qp_sample_ RTC_GUARDED_BY(crit_); |
153 int num_bad_states_ GUARDED_BY(crit_); | 154 int num_bad_states_ RTC_GUARDED_BY(crit_); |
154 int num_certain_states_ GUARDED_BY(crit_); | 155 int num_certain_states_ RTC_GUARDED_BY(crit_); |
155 mutable VideoReceiveStream::Stats stats_ GUARDED_BY(crit_); | 156 mutable VideoReceiveStream::Stats stats_ RTC_GUARDED_BY(crit_); |
156 RateStatistics decode_fps_estimator_ GUARDED_BY(crit_); | 157 RateStatistics decode_fps_estimator_ RTC_GUARDED_BY(crit_); |
157 RateStatistics renders_fps_estimator_ GUARDED_BY(crit_); | 158 RateStatistics renders_fps_estimator_ RTC_GUARDED_BY(crit_); |
158 rtc::RateTracker render_fps_tracker_ GUARDED_BY(crit_); | 159 rtc::RateTracker render_fps_tracker_ RTC_GUARDED_BY(crit_); |
159 rtc::RateTracker render_pixel_tracker_ GUARDED_BY(crit_); | 160 rtc::RateTracker render_pixel_tracker_ RTC_GUARDED_BY(crit_); |
160 rtc::RateTracker total_byte_tracker_ GUARDED_BY(crit_); | 161 rtc::RateTracker total_byte_tracker_ RTC_GUARDED_BY(crit_); |
161 SampleCounter sync_offset_counter_ GUARDED_BY(crit_); | 162 SampleCounter sync_offset_counter_ RTC_GUARDED_BY(crit_); |
162 SampleCounter decode_time_counter_ GUARDED_BY(crit_); | 163 SampleCounter decode_time_counter_ RTC_GUARDED_BY(crit_); |
163 SampleCounter jitter_buffer_delay_counter_ GUARDED_BY(crit_); | 164 SampleCounter jitter_buffer_delay_counter_ RTC_GUARDED_BY(crit_); |
164 SampleCounter target_delay_counter_ GUARDED_BY(crit_); | 165 SampleCounter target_delay_counter_ RTC_GUARDED_BY(crit_); |
165 SampleCounter current_delay_counter_ GUARDED_BY(crit_); | 166 SampleCounter current_delay_counter_ RTC_GUARDED_BY(crit_); |
166 SampleCounter delay_counter_ GUARDED_BY(crit_); | 167 SampleCounter delay_counter_ RTC_GUARDED_BY(crit_); |
167 mutable rtc::MovingMaxCounter<int> interframe_delay_max_moving_ | 168 mutable rtc::MovingMaxCounter<int> interframe_delay_max_moving_ |
168 GUARDED_BY(crit_); | 169 RTC_GUARDED_BY(crit_); |
169 std::map<VideoContentType, ContentSpecificStats> content_specific_stats_ | 170 std::map<VideoContentType, ContentSpecificStats> content_specific_stats_ |
170 GUARDED_BY(crit_); | 171 RTC_GUARDED_BY(crit_); |
171 MaxCounter freq_offset_counter_ GUARDED_BY(crit_); | 172 MaxCounter freq_offset_counter_ RTC_GUARDED_BY(crit_); |
172 int64_t first_report_block_time_ms_ GUARDED_BY(crit_); | 173 int64_t first_report_block_time_ms_ RTC_GUARDED_BY(crit_); |
173 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); | 174 ReportBlockStats report_block_stats_ RTC_GUARDED_BY(crit_); |
174 QpCounters qp_counters_; // Only accessed on the decoding thread. | 175 QpCounters qp_counters_; // Only accessed on the decoding thread. |
175 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_); | 176 std::map<uint32_t, StreamDataCounters> rtx_stats_ RTC_GUARDED_BY(crit_); |
176 int64_t avg_rtt_ms_ GUARDED_BY(crit_); | 177 int64_t avg_rtt_ms_ RTC_GUARDED_BY(crit_); |
177 mutable std::map<int64_t, size_t> frame_window_ GUARDED_BY(&crit_); | 178 mutable std::map<int64_t, size_t> frame_window_ RTC_GUARDED_BY(&crit_); |
178 VideoContentType last_content_type_ GUARDED_BY(&crit_); | 179 VideoContentType last_content_type_ RTC_GUARDED_BY(&crit_); |
179 rtc::Optional<int64_t> last_decoded_frame_time_ms_ GUARDED_BY(&crit_); | 180 rtc::Optional<int64_t> last_decoded_frame_time_ms_ RTC_GUARDED_BY(&crit_); |
180 // Mutable because calling Max() on MovingMaxCounter is not const. Yet it is | 181 // Mutable because calling Max() on MovingMaxCounter is not const. Yet it is |
181 // called from const GetStats(). | 182 // called from const GetStats(). |
182 mutable rtc::MovingMaxCounter<TimingFrameInfo> timing_frame_info_counter_ | 183 mutable rtc::MovingMaxCounter<TimingFrameInfo> timing_frame_info_counter_ |
183 GUARDED_BY(&crit_); | 184 RTC_GUARDED_BY(&crit_); |
184 }; | 185 }; |
185 | 186 |
186 } // namespace webrtc | 187 } // namespace webrtc |
187 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ | 188 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ |
OLD | NEW |