| 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 |
| 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ |
| 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ |
| 13 | 13 |
| 14 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 14 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 #include <map> | 17 #include <map> |
| 18 #include <vector> |
| 18 | 19 |
| 19 #include "webrtc/rtc_base/criticalsection.h" | 20 #include "webrtc/rtc_base/criticalsection.h" |
| 20 #include "webrtc/rtc_base/rate_statistics.h" | 21 #include "webrtc/rtc_base/rate_statistics.h" |
| 21 #include "webrtc/system_wrappers/include/ntp_time.h" | 22 #include "webrtc/system_wrappers/include/ntp_time.h" |
| 22 | 23 |
| 23 namespace webrtc { | 24 namespace webrtc { |
| 24 | 25 |
| 25 class StreamStatisticianImpl : public StreamStatistician { | 26 class StreamStatisticianImpl : public StreamStatistician { |
| 26 public: | 27 public: |
| 27 StreamStatisticianImpl(Clock* clock, | 28 StreamStatisticianImpl(Clock* clock, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 class ReceiveStatisticsImpl : public ReceiveStatistics, | 93 class ReceiveStatisticsImpl : public ReceiveStatistics, |
| 93 public RtcpStatisticsCallback, | 94 public RtcpStatisticsCallback, |
| 94 public StreamDataCountersCallback { | 95 public StreamDataCountersCallback { |
| 95 public: | 96 public: |
| 96 explicit ReceiveStatisticsImpl(Clock* clock); | 97 explicit ReceiveStatisticsImpl(Clock* clock); |
| 97 | 98 |
| 98 ~ReceiveStatisticsImpl(); | 99 ~ReceiveStatisticsImpl(); |
| 99 | 100 |
| 101 // Implement ReceiveStatisticsProvider. |
| 102 std::vector<rtcp::ReportBlock> RtcpReportBlocks(size_t max_blocks) override; |
| 103 |
| 100 // Implement ReceiveStatistics. | 104 // Implement ReceiveStatistics. |
| 101 void IncomingPacket(const RTPHeader& header, | 105 void IncomingPacket(const RTPHeader& header, |
| 102 size_t packet_length, | 106 size_t packet_length, |
| 103 bool retransmitted) override; | 107 bool retransmitted) override; |
| 104 void FecPacketReceived(const RTPHeader& header, | 108 void FecPacketReceived(const RTPHeader& header, |
| 105 size_t packet_length) override; | 109 size_t packet_length) override; |
| 106 StatisticianMap GetActiveStatisticians() const override; | 110 StatisticianMap GetActiveStatisticians() const override; |
| 107 StreamStatistician* GetStatistician(uint32_t ssrc) const override; | 111 StreamStatistician* GetStatistician(uint32_t ssrc) const override; |
| 108 void SetMaxReorderingThreshold(int max_reordering_threshold) override; | 112 void SetMaxReorderingThreshold(int max_reordering_threshold) override; |
| 109 | 113 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 124 | 128 |
| 125 Clock* const clock_; | 129 Clock* const clock_; |
| 126 rtc::CriticalSection receive_statistics_lock_; | 130 rtc::CriticalSection receive_statistics_lock_; |
| 127 StatisticianImplMap statisticians_; | 131 StatisticianImplMap statisticians_; |
| 128 | 132 |
| 129 RtcpStatisticsCallback* rtcp_stats_callback_; | 133 RtcpStatisticsCallback* rtcp_stats_callback_; |
| 130 StreamDataCountersCallback* rtp_stats_callback_; | 134 StreamDataCountersCallback* rtp_stats_callback_; |
| 131 }; | 135 }; |
| 132 } // namespace webrtc | 136 } // namespace webrtc |
| 133 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ | 137 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RECEIVE_STATISTICS_IMPL_H_ |
| OLD | NEW |