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

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

Issue 2060403002: Add task queue to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@move_getpadding
Patch Set: Revert fix for asan, protect instead. Added destruction observer to frames in ViEEncoder tests. Created 4 years, 5 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 }; 130 };
131 struct QpCounters { 131 struct QpCounters {
132 SampleCounter vp8; // QP range: 0-127 132 SampleCounter vp8; // QP range: 0-127
133 SampleCounter vp9; // QP range: 0-255 133 SampleCounter vp9; // QP range: 0-255
134 }; 134 };
135 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_); 135 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_);
136 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc) 136 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
137 EXCLUSIVE_LOCKS_REQUIRED(crit_); 137 EXCLUSIVE_LOCKS_REQUIRED(crit_);
138 138
139 Clock* const clock_; 139 Clock* const clock_;
140 const VideoSendStream::Config config_; 140 const VideoSendStream::Config::Rtp rtp_config_;
141 rtc::CriticalSection crit_; 141 rtc::CriticalSection crit_;
142 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); 142 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_);
143 VideoSendStream::Stats stats_ GUARDED_BY(crit_); 143 VideoSendStream::Stats stats_ GUARDED_BY(crit_);
144 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); 144 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_);
145 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_); 145 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_);
146 rtc::ExpFilter encode_time_ GUARDED_BY(crit_); 146 rtc::ExpFilter encode_time_ GUARDED_BY(crit_);
147 147
148 // Contains stats used for UMA histograms. These stats will be reset if 148 // Contains stats used for UMA histograms. These stats will be reset if
149 // content type changes between real-time video and screenshare, since these 149 // content type changes between real-time video and screenshare, since these
150 // will be reported separately. 150 // will be reported separately.
151 struct UmaSamplesContainer { 151 struct UmaSamplesContainer {
152 UmaSamplesContainer(const char* prefix, 152 UmaSamplesContainer(const char* prefix,
153 const VideoSendStream::Stats& start_stats, 153 const VideoSendStream::Stats& start_stats,
154 Clock* clock); 154 Clock* clock);
155 ~UmaSamplesContainer(); 155 ~UmaSamplesContainer();
156 156
157 void UpdateHistograms(const VideoSendStream::Config& config, 157 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config,
158 const VideoSendStream::Stats& current_stats); 158 const VideoSendStream::Stats& current_stats);
159 159
160 const std::string uma_prefix_; 160 const std::string uma_prefix_;
161 Clock* const clock_; 161 Clock* const clock_;
162 int max_sent_width_per_timestamp_; 162 int max_sent_width_per_timestamp_;
163 int max_sent_height_per_timestamp_; 163 int max_sent_height_per_timestamp_;
164 SampleCounter input_width_counter_; 164 SampleCounter input_width_counter_;
165 SampleCounter input_height_counter_; 165 SampleCounter input_height_counter_;
166 SampleCounter sent_width_counter_; 166 SampleCounter sent_width_counter_;
167 SampleCounter sent_height_counter_; 167 SampleCounter sent_height_counter_;
(...skipping 13 matching lines...) Expand all
181 const VideoSendStream::Stats start_stats_; 181 const VideoSendStream::Stats start_stats_;
182 std::map<int, QpCounters> 182 std::map<int, QpCounters>
183 qp_counters_; // QP counters mapped by spatial idx. 183 qp_counters_; // QP counters mapped by spatial idx.
184 }; 184 };
185 185
186 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); 186 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_);
187 }; 187 };
188 188
189 } // namespace webrtc 189 } // namespace webrtc
190 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ 190 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698