Question about GetStats() API in peer_connection_interface.h

28 views
Skip to first unread message

Muthuraj Ramalinga kumar

unread,
Sep 24, 2021, 7:57:49 PM9/24/21
to discuss-webrtc
Hi,

I have a cpp application that uses libwebrtc to create an SDP answer for an SDP offer coming from a chrome browser.

The cpp application streams video to the browser after establishing a peer to peer WebRTC connection.

I want to collect some metrics on the video quality what the client or the browser receives.
I realize that there is a RTPPeerConnection.getStats promise based JS api that gives that data.

But I want to collect the client/browser video qualify metrics from the cpp application.

I found this interface in libwebrtc/peer_connection_interface.h.
 // The spec-compliant GetStats() API. This correspond to the promise-based
  // version of getStats() in JavaScript. Implementation status is described in
  // api/stats/rtcstats_objects.h. For more details on stats, see spec:
  // TODO(hbos): Takes shared ownership, use rtc::scoped_refptr<> instead. This
  // requires stop overriding the current version in third party or making third
  // party calls explicit to avoid ambiguity during switch. Make the future
  // version abstract as soon as third party projects implement it.
  virtual void GetStats(RTCStatsCollectorCallback* callback) {}

The information provided by this interface is it same as the one provided by the browser RTCPeerConnection.getStats() JS API ?

Thanks
Reply all
Reply to author
Forward
0 new messages