How to get media stats from peer connection

Table of Contents

Take Peerconection_client as example

step 1

class RtcStatsRecorder : public webrtc::RTCStatsCollectorCallback {
public:

  void OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) override;

};

step 2


void RtcStatsRecorder::OnStatsDelivered(const rtc::scoped_refptr<const webrtc::RTCStatsReport>& report) {
RTC_LOG(LS_INFO)  << report.ToJson() << endl;
}

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: Uncategorized