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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 }; | 127 }; |
128 struct QpCounters { | 128 struct QpCounters { |
129 SampleCounter vp8; // QP range: 0-127 | 129 SampleCounter vp8; // QP range: 0-127 |
130 SampleCounter vp9; // QP range: 0-255 | 130 SampleCounter vp9; // QP range: 0-255 |
131 }; | 131 }; |
132 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 132 void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
133 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc) | 133 VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc) |
134 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 134 EXCLUSIVE_LOCKS_REQUIRED(crit_); |
135 | 135 |
136 Clock* const clock_; | 136 Clock* const clock_; |
137 const VideoSendStream::Config config_; | 137 const std::string payload_name_; |
| 138 const VideoSendStream::Config::Rtp rtp_config_; |
138 rtc::CriticalSection crit_; | 139 rtc::CriticalSection crit_; |
139 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); | 140 VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_); |
140 const int64_t start_ms_; | 141 const int64_t start_ms_; |
141 VideoSendStream::Stats stats_ GUARDED_BY(crit_); | 142 VideoSendStream::Stats stats_ GUARDED_BY(crit_); |
142 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); | 143 uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_); |
143 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_); | 144 std::map<uint32_t, StatsUpdateTimes> update_times_ GUARDED_BY(crit_); |
144 rtc::ExpFilter encode_time_ GUARDED_BY(crit_); | 145 rtc::ExpFilter encode_time_ GUARDED_BY(crit_); |
145 | 146 |
146 // Contains stats used for UMA histograms. These stats will be reset if | 147 // Contains stats used for UMA histograms. These stats will be reset if |
147 // content type changes between real-time video and screenshare, since these | 148 // content type changes between real-time video and screenshare, since these |
148 // will be reported separately. | 149 // will be reported separately. |
149 struct UmaSamplesContainer { | 150 struct UmaSamplesContainer { |
150 UmaSamplesContainer(const char* prefix, | 151 UmaSamplesContainer(const char* prefix, |
151 const VideoSendStream::Stats& start_stats, | 152 const VideoSendStream::Stats& start_stats, |
152 Clock* clock); | 153 Clock* clock); |
153 ~UmaSamplesContainer(); | 154 ~UmaSamplesContainer(); |
154 | 155 |
155 void UpdateHistograms(const VideoSendStream::Config& config, | 156 void UpdateHistograms(const VideoSendStream::Config::Rtp& rtp_config, |
156 const VideoSendStream::Stats& current_stats); | 157 const VideoSendStream::Stats& current_stats); |
157 | 158 |
158 const std::string uma_prefix_; | 159 const std::string uma_prefix_; |
159 Clock* const clock_; | 160 Clock* const clock_; |
160 int max_sent_width_per_timestamp_; | 161 int max_sent_width_per_timestamp_; |
161 int max_sent_height_per_timestamp_; | 162 int max_sent_height_per_timestamp_; |
162 SampleCounter input_width_counter_; | 163 SampleCounter input_width_counter_; |
163 SampleCounter input_height_counter_; | 164 SampleCounter input_height_counter_; |
164 SampleCounter sent_width_counter_; | 165 SampleCounter sent_width_counter_; |
165 SampleCounter sent_height_counter_; | 166 SampleCounter sent_height_counter_; |
(...skipping 13 matching lines...) Expand all Loading... |
179 const VideoSendStream::Stats start_stats_; | 180 const VideoSendStream::Stats start_stats_; |
180 std::map<int, QpCounters> | 181 std::map<int, QpCounters> |
181 qp_counters_; // QP counters mapped by spatial idx. | 182 qp_counters_; // QP counters mapped by spatial idx. |
182 }; | 183 }; |
183 | 184 |
184 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); | 185 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); |
185 }; | 186 }; |
186 | 187 |
187 } // namespace webrtc | 188 } // namespace webrtc |
188 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 189 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
OLD | NEW |