| 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 15 matching lines...) Expand all Loading... |
| 26 virtual ~StreamStatistician(); | 26 virtual ~StreamStatistician(); |
| 27 | 27 |
| 28 virtual bool GetStatistics(RtcpStatistics* statistics, bool reset) = 0; | 28 virtual bool GetStatistics(RtcpStatistics* statistics, bool reset) = 0; |
| 29 virtual void GetDataCounters(size_t* bytes_received, | 29 virtual void GetDataCounters(size_t* bytes_received, |
| 30 uint32_t* packets_received) const = 0; | 30 uint32_t* packets_received) const = 0; |
| 31 | 31 |
| 32 // Gets received stream data counters (includes reset counter values). | 32 // Gets received stream data counters (includes reset counter values). |
| 33 virtual void GetReceiveStreamDataCounters( | 33 virtual void GetReceiveStreamDataCounters( |
| 34 StreamDataCounters* data_counters) const = 0; | 34 StreamDataCounters* data_counters) const = 0; |
| 35 | 35 |
| 36 virtual uint32_t BitrateReceived() const = 0; | 36 virtual uint32_t BitrateReceived() = 0; |
| 37 | 37 |
| 38 // Returns true if the packet with RTP header |header| is likely to be a | 38 // Returns true if the packet with RTP header |header| is likely to be a |
| 39 // retransmitted packet, false otherwise. | 39 // retransmitted packet, false otherwise. |
| 40 virtual bool IsRetransmitOfOldPacket(const RTPHeader& header, | 40 virtual bool IsRetransmitOfOldPacket(const RTPHeader& header, |
| 41 int64_t min_rtt) const = 0; | 41 int64_t min_rtt) const = 0; |
| 42 | 42 |
| 43 // Returns true if |sequence_number| is received in order, false otherwise. | 43 // Returns true if |sequence_number| is received in order, false otherwise. |
| 44 virtual bool IsPacketInOrder(uint16_t sequence_number) const = 0; | 44 virtual bool IsPacketInOrder(uint16_t sequence_number) const = 0; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 typedef std::map<uint32_t, StreamStatistician*> StatisticianMap; | 47 typedef std::map<uint32_t, StreamStatistician*> StatisticianMap; |
| 48 | 48 |
| 49 class ReceiveStatistics : public Module { | 49 class ReceiveStatistics { |
| 50 public: | 50 public: |
| 51 virtual ~ReceiveStatistics() {} | 51 virtual ~ReceiveStatistics() {} |
| 52 | 52 |
| 53 static ReceiveStatistics* Create(Clock* clock); | 53 static ReceiveStatistics* Create(Clock* clock); |
| 54 | 54 |
| 55 // Updates the receive statistics with this packet. | 55 // Updates the receive statistics with this packet. |
| 56 virtual void IncomingPacket(const RTPHeader& rtp_header, | 56 virtual void IncomingPacket(const RTPHeader& rtp_header, |
| 57 size_t packet_length, | 57 size_t packet_length, |
| 58 bool retransmitted) = 0; | 58 bool retransmitted) = 0; |
| 59 | 59 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 82 | 82 |
| 83 class NullReceiveStatistics : public ReceiveStatistics { | 83 class NullReceiveStatistics : public ReceiveStatistics { |
| 84 public: | 84 public: |
| 85 void IncomingPacket(const RTPHeader& rtp_header, | 85 void IncomingPacket(const RTPHeader& rtp_header, |
| 86 size_t packet_length, | 86 size_t packet_length, |
| 87 bool retransmitted) override; | 87 bool retransmitted) override; |
| 88 void FecPacketReceived(const RTPHeader& header, | 88 void FecPacketReceived(const RTPHeader& header, |
| 89 size_t packet_length) override; | 89 size_t packet_length) override; |
| 90 StatisticianMap GetActiveStatisticians() const override; | 90 StatisticianMap GetActiveStatisticians() const override; |
| 91 StreamStatistician* GetStatistician(uint32_t ssrc) const override; | 91 StreamStatistician* GetStatistician(uint32_t ssrc) const override; |
| 92 int64_t TimeUntilNextProcess() override; | |
| 93 void Process() override; | |
| 94 void SetMaxReorderingThreshold(int max_reordering_threshold) override; | 92 void SetMaxReorderingThreshold(int max_reordering_threshold) override; |
| 95 void RegisterRtcpStatisticsCallback( | 93 void RegisterRtcpStatisticsCallback( |
| 96 RtcpStatisticsCallback* callback) override; | 94 RtcpStatisticsCallback* callback) override; |
| 97 void RegisterRtpStatisticsCallback( | 95 void RegisterRtpStatisticsCallback( |
| 98 StreamDataCountersCallback* callback) override; | 96 StreamDataCountersCallback* callback) override; |
| 99 }; | 97 }; |
| 100 | 98 |
| 101 } // namespace webrtc | 99 } // namespace webrtc |
| 102 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_ | 100 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_ |
| OLD | NEW |