Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: webrtc/modules/rtp_rtcp/include/receive_statistics.h

Issue 2981163003: Refactor rtcp statistics: Rtcp module take narrow interface (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/include/receive_statistics.h
diff --git a/webrtc/modules/rtp_rtcp/include/receive_statistics.h b/webrtc/modules/rtp_rtcp/include/receive_statistics.h
index 90a848ad6335bd7584a67e013b2d7e7c7a7d820f..e77e7a9f23a93975c6e4e8a427d8cb3aa0233606 100644
--- a/webrtc/modules/rtp_rtcp/include/receive_statistics.h
+++ b/webrtc/modules/rtp_rtcp/include/receive_statistics.h
@@ -12,15 +12,27 @@
#define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RECEIVE_STATISTICS_H_
#include <map>
+#include <vector>
#include "webrtc/modules/include/module.h"
#include "webrtc/modules/include/module_common_types.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h"
#include "webrtc/typedefs.h"
namespace webrtc {
class Clock;
+class ReceiveStatisticsReporter {
+ public:
+ // Fill in statistic fields of the rtcp report blocks for the active ssrcs.
+ // (i.e. everything except last_sr/delay_since_last_sr fields)
+ virtual std::vector<rtcp::ReportBlock> GetActiveStatistics() = 0;
+
+ protected:
+ ~ReceiveStatisticsReporter() = default;
+};
+
class StreamStatistician {
public:
virtual ~StreamStatistician();
@@ -46,7 +58,7 @@ class StreamStatistician {
typedef std::map<uint32_t, StreamStatistician*> StatisticianMap;
-class ReceiveStatistics {
+class ReceiveStatistics : public ReceiveStatisticsReporter {
public:
virtual ~ReceiveStatistics() {}
@@ -78,6 +90,9 @@ class ReceiveStatistics {
// Called on new RTP stats creation.
virtual void RegisterRtpStatisticsCallback(
StreamDataCountersCallback* callback) = 0;
+
+ // TODO(danilchap): Remove other accessors and make this one pure virtual.
+ std::vector<rtcp::ReportBlock> GetActiveStatistics() override;
};
class NullReceiveStatistics : public ReceiveStatistics {
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698