webrtcbin get-stats don't contain any rtpstats.

Faraz Khan farazrkhan at gmail.com
Wed Oct 7 14:30:49 UTC 2020


Gotcha. This issue made me think otherwise. Seems like these guys
(gstreamer devs) are getting way more stats than me:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/889


On Tue, Oct 6, 2020, 11:29 PM Matthew Waters <ystreet00 at gmail.com> wrote:

> No, you don't 'need' to do anything for rtpbin to expose the stats, they
> just aren't always exposed in the webrtcbin stats as the webrtcbin stats
> are incomplete.
>
> Cheers
> -Matt
>
> On 7/10/20 5:06 pm, Faraz Khan wrote:
>
> Oh interesting. Seemed like rtpinputstats (from the RR reports) were
> already baked in. I'm specifically looking for fraction lost and
> interarrival jitter. Do I have to install a signal for rtcp packets and
> extracts those reports myself?
>
> For some reason I thought rtpbin would do this for me.
>
> Thanks!
>
> On Tue, Oct 6, 2020, 10:41 PM Matthew Waters <ystreet00 at gmail.com> wrote:
>
>> Various information provided by the get-stats signal are incomplete.  You
>> may have to implement some of the information you need inside webrtcbin
>> itself.
>>
>> Cheers
>> -Matt
>>
>> On 7/10/20 3:25 pm, Faraz Khan wrote:
>>
>> Hi everyone,
>> Gstreamer noob here - but have worked on C/C++ audio/video apps for many
>> years now. I have successfully established a webrtc connection with
>> electron as the receiver (and gstreamer as send-only) and am now looking to
>> implement some sort of simplistic bitrate control and also just to
>> understand how gstreamer works.
>>
>> My first attempt was to get webrtc peerconnection stats. I did:
>>
>> GstPromise *p = gst_promise_new_with_change_func(_on_stats, NULL, NULL);
>> g_signal_emit_by_name(peer->webrtcbin, "get-stats", NULL, p);
>>
>> And decode them using:
>>
>> gboolean on_stats_iter(GQuark field, const GValue * value, gpointer pfx) {
>>     gchar *str = gst_value_serialize (value);
>>     g_print ("%15s: %s", g_quark_to_string (field), str);
>>     std::cout << std::endl;
>>     g_free (str);
>>     return TRUE;
>> }
>>
>> static void _on_stats (GstPromise * promise, gpointer user_data) {
>>     const GstStructure *reply = gst_promise_get_reply(promise);
>>     gst_structure_foreach(reply, on_stats_iter, (gpointer)reply);
>> }
>>
>> And this generates:
>> peer-connection-stats: "peer-connection\,\
>> data-channels-opened\=\(uint\)0\,\ data-channels-closed\=\(uint\)0\,\
>> data-channels-requested\=\(uint\)0\,\ data-channels-accepted\=\(uint\)0\,\
>> type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_PEER_CONNECTION\,\
>> timestamp\=\(double\)180230225.79899999\,\
>> id\=\(string\)peer-connection-stats\;"
>> codec-stats-sink_0: "codec\,\
>> type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_CODEC\,\
>> timestamp\=\(double\)180230225.79899999\,\
>> id\=\(string\)codec-stats-sink_0\,\ payload-type\=\(uint\)96\,\
>> clock-rate\=\(uint\)90000\,\ ssrc\=\(uint\)2002222005\;"
>> transport-stats_webrtcdtlstransport0: "transport\,\
>> type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_TRANSPORT\,\
>> timestamp\=\(double\)180230225.79899999\,\
>> id\=\(string\)transport-stats_webrtcdtlstransport0\;"
>> ice-candidate-pair_webrtcnicetransport0: "transport\,\
>> type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_TRANSPORT\,\
>> timestamp\=\(double\)180230225.79899999\,\
>> id\=\(string\)ice-candidate-pair_webrtcnicetransport0\;"
>> codec-stats-sink_1: "codec\,\
>> type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_CODEC\,\
>> timestamp\=\(double\)180230225.79899999\,\
>> id\=\(string\)codec-stats-sink_1\,\ payload-type\=\(uint\)97\,\
>> clock-rate\=\(uint\)48000\,\ ssrc\=\(uint\)1224562656\;"
>>
>>
>> This has the correct SSRC and codec info - but missing RTP information
>> and the data channel stats are incorrect (I do have a open and working data
>> channel).
>>
>> How does one proceed to debug this? What am I missing?
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201007/0c6998a2/attachment.htm>


More information about the gstreamer-devel mailing list