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

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

Issue 2564373002: Properly report number of quality downscales in stats. (Closed)
Patch Set: clarify check for initialized encoder in simulcast adapter Created 4 years 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual ~SendStatisticsProxy(); 51 virtual ~SendStatisticsProxy();
52 52
53 VideoSendStream::Stats GetStats(); 53 VideoSendStream::Stats GetStats();
54 54
55 virtual void OnSendEncodedImage(const EncodedImage& encoded_image, 55 virtual void OnSendEncodedImage(const EncodedImage& encoded_image,
56 const CodecSpecificInfo* codec_info); 56 const CodecSpecificInfo* codec_info);
57 // Used to update incoming frame rate. 57 // Used to update incoming frame rate.
58 void OnIncomingFrame(int width, int height); 58 void OnIncomingFrame(int width, int height);
59 59
60 void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution); 60 void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution);
61 void OnQualityRestrictedResolutionChanged(bool restricted); 61 void OnQualityRestrictedResolutionChanged(int num_quality_downscales);
62 void SetResolutionRestrictionStats(bool bandwidth, bool cpu); 62 void SetResolutionRestrictionStats(bool scaling_enabled,
63 bool cpu_restricted,
64 int num_quality_downscales);
63 65
64 void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate); 66 void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
65 void OnSuspendChange(bool is_suspended); 67 void OnSuspendChange(bool is_suspended);
66 void OnInactiveSsrc(uint32_t ssrc); 68 void OnInactiveSsrc(uint32_t ssrc);
67 69
68 // Used to indicate change in content type, which may require a change in 70 // Used to indicate change in content type, which may require a change in
69 // how stats are collected and set the configured preferred media bitrate. 71 // how stats are collected and set the configured preferred media bitrate.
70 void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config, 72 void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config,
71 uint32_t preferred_bitrate_bps); 73 uint32_t preferred_bitrate_bps);
72 74
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Clock* const clock_; 149 Clock* const clock_;
148 const std::string payload_name_; 150 const std::string payload_name_;
149 const VideoSendStream::Config::Rtp rtp_config_; 151 const VideoSendStream::Config::Rtp rtp_config_;
150 rtc::CriticalSection crit_; 152 rtc::CriticalSection crit_;
151 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); 153 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_);
152 const int64_t start_ms_; 154 const int64_t start_ms_;
153 VideoSendStream::Stats stats_ GUARDED_BY(crit_); 155 VideoSendStream::Stats stats_ GUARDED_BY(crit_);
154 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); 156 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_);
155 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_); 157 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_);
156 rtc::ExpFilter encode_time_ GUARDED_BY(crit_); 158 rtc::ExpFilter encode_time_ GUARDED_BY(crit_);
159 int quality_downscales_ GUARDED_BY(crit_) = 0;
157 160
158 // Contains stats used for UMA histograms. These stats will be reset if 161 // Contains stats used for UMA histograms. These stats will be reset if
159 // content type changes between real-time video and screenshare, since these 162 // content type changes between real-time video and screenshare, since these
160 // will be reported separately. 163 // will be reported separately.
161 struct UmaSamplesContainer { 164 struct UmaSamplesContainer {
162 UmaSamplesContainer(const char* prefix, 165 UmaSamplesContainer(const char* prefix,
163 const VideoSendStream::Stats& start_stats, 166 const VideoSendStream::Stats& start_stats,
164 Clock* clock); 167 Clock* clock);
165 ~UmaSamplesContainer(); 168 ~UmaSamplesContainer();
166 169
(...skipping 26 matching lines...) Expand all
193 const VideoSendStream::Stats start_stats_; 196 const VideoSendStream::Stats start_stats_;
194 std::map<int, QpCounters> 197 std::map<int, QpCounters>
195 qp_counters_; // QP counters mapped by spatial idx. 198 qp_counters_; // QP counters mapped by spatial idx.
196 }; 199 };
197 200
198 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); 201 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_);
199 }; 202 };
200 203
201 } // namespace webrtc 204 } // namespace webrtc
202 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ 205 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698