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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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<uint32_t, QpCounters> qp_counters_; // QP counters mapped by SSRC. |
175 }; | 179 }; |
176 | 180 |
177 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); | 181 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); |
178 }; | 182 }; |
179 | 183 |
180 } // namespace webrtc | 184 } // namespace webrtc |
181 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 185 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
OLD | NEW |