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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // will be reported separately. | 160 // will be reported separately. |
161 struct UmaSamplesContainer { | 161 struct UmaSamplesContainer { |
162 UmaSamplesContainer(const char* prefix, | 162 UmaSamplesContainer(const char* prefix, |
163 const VideoSendStream::Stats& start_stats, | 163 const VideoSendStream::Stats& start_stats, |
164 Clock* clock); | 164 Clock* clock); |
165 ~UmaSamplesContainer(); | 165 ~UmaSamplesContainer(); |
166 | 166 |
167 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config, | 167 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config, |
168 const VideoSendStream::Stats& current_stats); | 168 const VideoSendStream::Stats& current_stats); |
169 | 169 |
| 170 void InitializeBitrateCounters(const VideoSendStream::Stats& stats); |
| 171 |
170 const std::string uma_prefix_; | 172 const std::string uma_prefix_; |
171 Clock* const clock_; | 173 Clock* const clock_; |
172 int max_sent_width_per_timestamp_; | 174 int max_sent_width_per_timestamp_; |
173 int max_sent_height_per_timestamp_; | 175 int max_sent_height_per_timestamp_; |
174 SampleCounter input_width_counter_; | 176 SampleCounter input_width_counter_; |
175 SampleCounter input_height_counter_; | 177 SampleCounter input_height_counter_; |
176 SampleCounter sent_width_counter_; | 178 SampleCounter sent_width_counter_; |
177 SampleCounter sent_height_counter_; | 179 SampleCounter sent_height_counter_; |
178 SampleCounter encode_time_counter_; | 180 SampleCounter encode_time_counter_; |
179 BoolSampleCounter key_frame_counter_; | 181 BoolSampleCounter key_frame_counter_; |
180 BoolSampleCounter quality_limited_frame_counter_; | 182 BoolSampleCounter quality_limited_frame_counter_; |
181 SampleCounter quality_downscales_counter_; | 183 SampleCounter quality_downscales_counter_; |
182 BoolSampleCounter cpu_limited_frame_counter_; | 184 BoolSampleCounter cpu_limited_frame_counter_; |
183 BoolSampleCounter bw_limited_frame_counter_; | 185 BoolSampleCounter bw_limited_frame_counter_; |
184 SampleCounter bw_resolutions_disabled_counter_; | 186 SampleCounter bw_resolutions_disabled_counter_; |
185 SampleCounter delay_counter_; | 187 SampleCounter delay_counter_; |
186 SampleCounter max_delay_counter_; | 188 SampleCounter max_delay_counter_; |
187 rtc::RateTracker input_frame_rate_tracker_; | 189 rtc::RateTracker input_frame_rate_tracker_; |
188 RateCounter input_fps_counter_; | 190 RateCounter input_fps_counter_; |
189 RateCounter sent_fps_counter_; | 191 RateCounter sent_fps_counter_; |
| 192 RateAccCounter total_byte_counter_; |
| 193 RateAccCounter media_byte_counter_; |
| 194 RateAccCounter rtx_byte_counter_; |
| 195 RateAccCounter padding_byte_counter_; |
| 196 RateAccCounter retransmit_byte_counter_; |
| 197 RateAccCounter fec_byte_counter_; |
190 int64_t first_rtcp_stats_time_ms_; | 198 int64_t first_rtcp_stats_time_ms_; |
191 int64_t first_rtp_stats_time_ms_; | 199 int64_t first_rtp_stats_time_ms_; |
192 ReportBlockStats report_block_stats_; | 200 ReportBlockStats report_block_stats_; |
193 const VideoSendStream::Stats start_stats_; | 201 const VideoSendStream::Stats start_stats_; |
194 std::map<int, QpCounters> | 202 std::map<int, QpCounters> |
195 qp_counters_; // QP counters mapped by spatial idx. | 203 qp_counters_; // QP counters mapped by spatial idx. |
196 }; | 204 }; |
197 | 205 |
198 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); | 206 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); |
199 }; | 207 }; |
200 | 208 |
201 } // namespace webrtc | 209 } // namespace webrtc |
202 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 210 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
OLD | NEW |