Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: webrtc/video/send_statistics_proxy.h

Issue 2536613002: Use RateAccCounter for sent bitrate stats. Reports average of periodically computed stats over a ca… (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // will be reported separately. 171 // will be reported separately.
172 struct UmaSamplesContainer { 172 struct UmaSamplesContainer {
173 UmaSamplesContainer(const char* prefix, 173 UmaSamplesContainer(const char* prefix,
174 const VideoSendStream::Stats& start_stats, 174 const VideoSendStream::Stats& start_stats,
175 Clock* clock); 175 Clock* clock);
176 ~UmaSamplesContainer(); 176 ~UmaSamplesContainer();
177 177
178 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config, 178 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config,
179 const VideoSendStream::Stats& current_stats); 179 const VideoSendStream::Stats& current_stats);
180 180
181 void InitializeBitrateCounters(const VideoSendStream::Stats& stats);
182
181 const std::string uma_prefix_; 183 const std::string uma_prefix_;
182 Clock* const clock_; 184 Clock* const clock_;
183 int max_sent_width_per_timestamp_; 185 int max_sent_width_per_timestamp_;
184 int max_sent_height_per_timestamp_; 186 int max_sent_height_per_timestamp_;
185 SampleCounter input_width_counter_; 187 SampleCounter input_width_counter_;
186 SampleCounter input_height_counter_; 188 SampleCounter input_height_counter_;
187 SampleCounter sent_width_counter_; 189 SampleCounter sent_width_counter_;
188 SampleCounter sent_height_counter_; 190 SampleCounter sent_height_counter_;
189 SampleCounter encode_time_counter_; 191 SampleCounter encode_time_counter_;
190 BoolSampleCounter key_frame_counter_; 192 BoolSampleCounter key_frame_counter_;
191 BoolSampleCounter quality_limited_frame_counter_; 193 BoolSampleCounter quality_limited_frame_counter_;
192 SampleCounter quality_downscales_counter_; 194 SampleCounter quality_downscales_counter_;
193 BoolSampleCounter cpu_limited_frame_counter_; 195 BoolSampleCounter cpu_limited_frame_counter_;
194 BoolSampleCounter bw_limited_frame_counter_; 196 BoolSampleCounter bw_limited_frame_counter_;
195 SampleCounter bw_resolutions_disabled_counter_; 197 SampleCounter bw_resolutions_disabled_counter_;
196 SampleCounter delay_counter_; 198 SampleCounter delay_counter_;
197 SampleCounter max_delay_counter_; 199 SampleCounter max_delay_counter_;
198 rtc::RateTracker input_frame_rate_tracker_; 200 rtc::RateTracker input_frame_rate_tracker_;
199 RateCounter input_fps_counter_; 201 RateCounter input_fps_counter_;
200 RateCounter sent_fps_counter_; 202 RateCounter sent_fps_counter_;
203 RateAccCounter total_byte_counter_;
204 RateAccCounter media_byte_counter_;
205 RateAccCounter rtx_byte_counter_;
206 RateAccCounter padding_byte_counter_;
207 RateAccCounter retransmit_byte_counter_;
208 RateAccCounter fec_byte_counter_;
201 int64_t first_rtcp_stats_time_ms_; 209 int64_t first_rtcp_stats_time_ms_;
202 int64_t first_rtp_stats_time_ms_; 210 int64_t first_rtp_stats_time_ms_;
203 BoolSampleCounter paused_time_counter_; 211 BoolSampleCounter paused_time_counter_;
204 TargetRateUpdates target_rate_updates_; 212 TargetRateUpdates target_rate_updates_;
205 ReportBlockStats report_block_stats_; 213 ReportBlockStats report_block_stats_;
206 const VideoSendStream::Stats start_stats_; 214 const VideoSendStream::Stats start_stats_;
207 std::map<int, QpCounters> 215 std::map<int, QpCounters>
208 qp_counters_; // QP counters mapped by spatial idx. 216 qp_counters_; // QP counters mapped by spatial idx.
209 }; 217 };
210 218
211 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); 219 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_);
212 }; 220 };
213 221
214 } // namespace webrtc 222 } // namespace webrtc
215 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ 223 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698