OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 class RtcpPacketTypeCounterObserver { | 245 class RtcpPacketTypeCounterObserver { |
246 public: | 246 public: |
247 virtual ~RtcpPacketTypeCounterObserver() {} | 247 virtual ~RtcpPacketTypeCounterObserver() {} |
248 virtual void RtcpPacketTypesCounterUpdated( | 248 virtual void RtcpPacketTypesCounterUpdated( |
249 uint32_t ssrc, | 249 uint32_t ssrc, |
250 const RtcpPacketTypeCounter& packet_counter) = 0; | 250 const RtcpPacketTypeCounter& packet_counter) = 0; |
251 }; | 251 }; |
252 | 252 |
253 // Rate statistics for a stream. | 253 // Rate statistics for a stream. |
254 struct BitrateStatistics { | 254 struct BitrateStatistics { |
255 BitrateStatistics() : bitrate_bps(0), packet_rate(0), timestamp_ms(0) {} | 255 BitrateStatistics() : bitrate_bps(0), packet_rate(0) {} |
256 | 256 |
257 uint32_t bitrate_bps; // Bitrate in bits per second. | 257 uint32_t bitrate_bps; // Bitrate in bits per second. |
258 uint32_t packet_rate; // Packet rate in packets per second. | 258 uint32_t packet_rate; // Packet rate in packets per second. |
259 uint64_t timestamp_ms; // Ntp timestamp in ms at time of rate estimation. | |
260 }; | 259 }; |
261 | 260 |
262 // Callback, used to notify an observer whenever new rates have been estimated. | 261 // Callback, used to notify an observer whenever new rates have been estimated. |
263 class BitrateStatisticsObserver { | 262 class BitrateStatisticsObserver { |
264 public: | 263 public: |
265 virtual ~BitrateStatisticsObserver() {} | 264 virtual ~BitrateStatisticsObserver() {} |
266 | 265 |
267 virtual void Notify(const BitrateStatistics& total_stats, | 266 virtual void Notify(uint32_t total_bitrate_bps, |
268 const BitrateStatistics& retransmit_stats, | 267 uint32_t retransmit_bitrate_bps, |
269 uint32_t ssrc) = 0; | 268 uint32_t ssrc) = 0; |
270 }; | 269 }; |
271 | 270 |
272 struct FrameCounts { | 271 struct FrameCounts { |
273 FrameCounts() : key_frames(0), delta_frames(0) {} | 272 FrameCounts() : key_frames(0), delta_frames(0) {} |
274 int key_frames; | 273 int key_frames; |
275 int delta_frames; | 274 int delta_frames; |
276 }; | 275 }; |
277 | 276 |
278 // Callback, used to notify an observer whenever frame counts have been updated. | 277 // Callback, used to notify an observer whenever frame counts have been updated. |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 909 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
911 | 910 |
912 enum NetworkState { | 911 enum NetworkState { |
913 kNetworkUp, | 912 kNetworkUp, |
914 kNetworkDown, | 913 kNetworkDown, |
915 }; | 914 }; |
916 | 915 |
917 } // namespace webrtc | 916 } // namespace webrtc |
918 | 917 |
919 #endif // WEBRTC_COMMON_TYPES_H_ | 918 #endif // WEBRTC_COMMON_TYPES_H_ |
OLD | NEW |