PeerConnection[Interface]::GetStats(RTCStatsCollectorCallback*) added.
New file structure and targets:
rtc_stats_api
webrtc/api/stats/rtcstats.h
webrtc/api/stats/rtcstats_objects.h
webrtc/api/stats/rtcstatsreport.h
rtc_stats (dep on rtc_stats_api)
webrtc/stats/rtcstats.cc
webrtc/stats/rtcstats_objects.cc
webrtc/stats/rtcstatsreport.cc
libjingle_peerconnection (dep on rtc_stats)
webrtc/api/rtcstatscollector.cc
webrtc/api/rtcstatscollector.h
Placing rtc_stats_api headers in this separate target instead of
libjingle_peerconnection avoids a circular dependency
libjingle_peerconnection -> rtc_stats -> libjingle_peerconnection
Code changes:
PeerConnectionInterface::GetStats(RTCStatsCollectorCallback*) added for
the new stats collection API. Implemented by PeerConnection.
BUG=chromium:627816
Review-Url: https://codereview.webrtc.org/2331373004
Cr-Original-Commit-Position: refs/heads/master@{#14246}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 74e1a4f96a4915c9ad3b0ddeff87cc9797606453
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index f5d8c63..a04e53e 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -60,6 +60,7 @@
#include "webrtc/api/dtmfsenderinterface.h"
#include "webrtc/api/jsep.h"
#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/rtcstatscollector.h"
#include "webrtc/api/rtpreceiverinterface.h"
#include "webrtc/api/rtpsenderinterface.h"
#include "webrtc/api/statstypes.h"
@@ -440,6 +441,12 @@
virtual bool GetStats(StatsObserver* observer,
MediaStreamTrackInterface* track,
StatsOutputLevel level) = 0;
+ // Gets stats using the new stats collection API, see webrtc/api/stats/. These
+ // will replace old stats collection API when the new API has matured enough.
+ // TODO(hbos): Default implementation that does nothing only exists as to not
+ // break third party projects. As soon as they have been updated this should
+ // be changed to "= 0;".
+ virtual void GetStats(RTCStatsCollectorCallback* callback) {}
virtual rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
const std::string& label,