Need more specification for getting the webrtc stats in kurento-room

115 views
Skip to first unread message

richar...@gmail.com

unread,
Aug 4, 2016, 7:46:55 AM8/4/16
to kurento
Hi:
I'm using this tutorial(http://doc-kurento.readthedocs.io/en/stable/mastering/webrtc_statistics.html) for getting the stats of each participant in the kurento-room.

What I'm doing is basically this:
participant.getPipeline().setLatencyStats(true);
Map<String, Stats> statsMap = participant.getPublisher().getEndpoint().getStats(MediaType.VIDEO);
System.out.println(statsMap.get("packetsLost"));

Well, the returned statsMap doesn't seem to have any information. I get a null in that System.out.println.

What can I be doing wrong?

Ivan Gracia

unread,
Aug 9, 2016, 4:18:03 AM8/9/16
to Kurento Public
Did you check any of the other values of the map? Maybe there's just no info for that particular key. Print all the keys in a loop.


Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard W

unread,
Aug 9, 2016, 5:27:37 AM8/9/16
to kur...@googlegroups.com
The only key and value I'm receiving in that map is this:

Key: 98bc90dd-3627-4bb4-93cb-eb072a1ba720_kurento.MediaPipeline
Value: 563eb579-ebaf-4c87-b9fe-7b513159e82e_kurento.WebRtcEndpoint/org.kurento.client.EndpointStats@3761286

--
You received this message because you are subscribed to a topic in the Google Groups "kurento" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kurento/S2QijPomixM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kurento+unsubscribe@googlegroups.com.

Ivan Gracia

unread,
Aug 18, 2016, 4:13:34 AM8/18/16
to Kurento Public

Well, inside the EndpointStats you will get the stats for that endpoint.


Ivan Gracia


pilkhwa...@gmail.com

unread,
Aug 18, 2016, 8:39:16 AM8/18/16
to kurento
Hi,

You will have to do something like this

for (Stats stat : stats.values()) {
   
switch(stat.getType()) {
   
case inboundrtp:
       
RTCInboundRTPStreamStats inboundStats = (RTCInboundRTPStreamStats) stat;
       
//do something here
       
break;
   
case outboundrtp:
       
RTCOutboundRTPStreamStats outboundStats = (RTCOutboundRTPStreamStats) stat;
       
//do something here
       
break;
   
default:
       
break;
   
}
}

there other StatsType too which you can get...

Regards,
Sagar Pilkhwal

Reply all
Reply to author
Forward
0 new messages