GetStats() call OnStatsDelivered with an empty RTCStatsReport

443 views
Skip to first unread message

Juan García

unread,
Apr 28, 2017, 8:26:32 AM4/28/17
to discuss-webrtc
I'm using new WebRTC stats API with RTCStatsCollectorCallback object that is called when stats report is generated. I'm invoke GetStats() and then I can see that OnStatsDelivered is called with a RTCStatsReport that contains just one (empty) item in stats_ member. In GetStats() call I pass my own implementation of RTCStatsCollectorCallback that implements webrtc::RTCStatsCollectorCallback interface. My question is, is neccessary some setup or constraints in PeerConnection in order to get RTCStatsReport with the metrics? I mean, to get, for example kStatsValueNameRtt stat, I need to set something in PeerConnection. Note that I'm using C++ native API in branch 55. Is this new stats API full implemented?

Taylor Brandstetter

unread,
Apr 28, 2017, 1:34:47 PM4/28/17
to discuss-webrtc
No additional setup is necessary. I think the issue here is that M55 branched when the new stats implementation was just started; it looks like all it supported back then was RTCCertificateStats and RTCPeerConnectionStats.

With tip-of-tree, many more stats are implemented. The current implementation status is documented in "webrtc/api/stats/rtcstats_objects.h".

On Fri, Apr 28, 2017 at 5:26 AM, Juan García <juang...@gmail.com> wrote:
I'm using new WebRTC stats API with RTCStatsCollectorCallback object that is called when stats report is generated. I'm invoke GetStats() and then I can see that OnStatsDelivered is called with a RTCStatsReport that contains just one (empty) item in stats_ member. In GetStats() call I pass my own implementation of RTCStatsCollectorCallback that implements webrtc::RTCStatsCollectorCallback interface. My question is, is neccessary some setup or constraints in PeerConnection in order to get RTCStatsReport with the metrics? I mean, to get, for example kStatsValueNameRtt stat, I need to set something in PeerConnection. Note that I'm using C++ native API in branch 55. Is this new stats API full implemented?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/84245541-9a74-4910-9e16-feb8014730f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan García

unread,
May 2, 2017, 5:22:29 AM5/2/17
to discuss-webrtc
Thanks for your help Taylor. So, I need to use old API and when I update revision, start to use new API.


On Friday, April 28, 2017 at 7:34:47 PM UTC+2, Taylor Brandstetter wrote:
No additional setup is necessary. I think the issue here is that M55 branched when the new stats implementation was just started; it looks like all it supported back then was RTCCertificateStats and RTCPeerConnectionStats.

With tip-of-tree, many more stats are implemented. The current implementation status is documented in "webrtc/api/stats/rtcstats_objects.h".
On Fri, Apr 28, 2017 at 5:26 AM, Juan García <juang...@gmail.com> wrote:
I'm using new WebRTC stats API with RTCStatsCollectorCallback object that is called when stats report is generated. I'm invoke GetStats() and then I can see that OnStatsDelivered is called with a RTCStatsReport that contains just one (empty) item in stats_ member. In GetStats() call I pass my own implementation of RTCStatsCollectorCallback that implements webrtc::RTCStatsCollectorCallback interface. My question is, is neccessary some setup or constraints in PeerConnection in order to get RTCStatsReport with the metrics? I mean, to get, for example kStatsValueNameRtt stat, I need to set something in PeerConnection. Note that I'm using C++ native API in branch 55. Is this new stats API full implemented?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages