| 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) {} | 255 BitrateStatistics() : bitrate_bps(0), packet_rate(0), timestamp_ms(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. |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 // Callback, used to notify an observer whenever new rates have been estimated. | 262 // Callback, used to notify an observer whenever new rates have been estimated. |
| 262 class BitrateStatisticsObserver { | 263 class BitrateStatisticsObserver { |
| 263 public: | 264 public: |
| 264 virtual ~BitrateStatisticsObserver() {} | 265 virtual ~BitrateStatisticsObserver() {} |
| 265 | 266 |
| 266 virtual void Notify(uint32_t total_bitrate_bps, | 267 virtual void Notify(const BitrateStatistics& total_stats, |
| 267 uint32_t retransmit_bitrate_bps, | 268 const BitrateStatistics& retransmit_stats, |
| 268 uint32_t ssrc) = 0; | 269 uint32_t ssrc) = 0; |
| 269 }; | 270 }; |
| 270 | 271 |
| 271 struct FrameCounts { | 272 struct FrameCounts { |
| 272 FrameCounts() : key_frames(0), delta_frames(0) {} | 273 FrameCounts() : key_frames(0), delta_frames(0) {} |
| 273 int key_frames; | 274 int key_frames; |
| 274 int delta_frames; | 275 int delta_frames; |
| 275 }; | 276 }; |
| 276 | 277 |
| 277 // Callback, used to notify an observer whenever frame counts have been updated. | 278 // 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... |
| 909 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 910 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
| 910 | 911 |
| 911 enum NetworkState { | 912 enum NetworkState { |
| 912 kNetworkUp, | 913 kNetworkUp, |
| 913 kNetworkDown, | 914 kNetworkDown, |
| 914 }; | 915 }; |
| 915 | 916 |
| 916 } // namespace webrtc | 917 } // namespace webrtc |
| 917 | 918 |
| 918 #endif // WEBRTC_COMMON_TYPES_H_ | 919 #endif // WEBRTC_COMMON_TYPES_H_ |
| OLD | NEW |