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

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

Issue 1523293002: Add histogram stats for average QP per frame for VP8 (for sent video streams): (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 8 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
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 private: 118 private:
119 int Fraction(int min_required_samples, float multiplier) const; 119 int Fraction(int min_required_samples, float multiplier) const;
120 int sum; 120 int sum;
121 int num_samples; 121 int num_samples;
122 }; 122 };
123 struct StatsUpdateTimes { 123 struct StatsUpdateTimes {
124 StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {} 124 StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {}
125 int64_t resolution_update_ms; 125 int64_t resolution_update_ms;
126 int64_t bitrate_update_ms; 126 int64_t bitrate_update_ms;
127 }; 127 };
128 struct QpCounters {
129 SampleCounter vp8;
130 };
128 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_); 131 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_);
129 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc) 132 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
130 EXCLUSIVE_LOCKS_REQUIRED(crit_); 133 EXCLUSIVE_LOCKS_REQUIRED(crit_);
131 134
132 Clock* const clock_; 135 Clock* const clock_;
133 const VideoSendStream::Config config_; 136 const VideoSendStream::Config config_;
134 rtc::CriticalSection crit_; 137 rtc::CriticalSection crit_;
135 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); 138 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_);
136 VideoSendStream::Stats stats_ GUARDED_BY(crit_); 139 VideoSendStream::Stats stats_ GUARDED_BY(crit_);
137 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); 140 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_);
(...skipping 27 matching lines...) Expand all
165 BoolSampleCounter bw_limited_frame_counter_; 168 BoolSampleCounter bw_limited_frame_counter_;
166 SampleCounter bw_resolutions_disabled_counter_; 169 SampleCounter bw_resolutions_disabled_counter_;
167 SampleCounter delay_counter_; 170 SampleCounter delay_counter_;
168 SampleCounter max_delay_counter_; 171 SampleCounter max_delay_counter_;
169 rtc::RateTracker input_frame_rate_tracker_; 172 rtc::RateTracker input_frame_rate_tracker_;
170 rtc::RateTracker sent_frame_rate_tracker_; 173 rtc::RateTracker sent_frame_rate_tracker_;
171 int64_t first_rtcp_stats_time_ms_; 174 int64_t first_rtcp_stats_time_ms_;
172 int64_t first_rtp_stats_time_ms_; 175 int64_t first_rtp_stats_time_ms_;
173 ReportBlockStats report_block_stats_; 176 ReportBlockStats report_block_stats_;
174 const VideoSendStream::Stats start_stats_; 177 const VideoSendStream::Stats start_stats_;
178 std::map<int, QpCounters>
179 qp_counters_; // QP counters mapped by spatial idx.
175 }; 180 };
176 181
177 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); 182 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_);
178 }; 183 };
179 184
180 } // namespace webrtc 185 } // namespace webrtc
181 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ 186 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698