<div dir="auto">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? <div dir="auto"><br></div><div dir="auto">For some reason I thought rtpbin would do this for me.</div><div dir="auto"><br></div><div dir="auto">Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020, 10:41 PM Matthew Waters <<a href="mailto:ystreet00@gmail.com" target="_blank" rel="noreferrer">ystreet00@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <div>Various information provided by the
      get-stats signal are incomplete.  You may have to implement some
      of the information you need inside webrtcbin itself.<br>
      <br>
      Cheers<br>
      -Matt<br>
      <br>
      On 7/10/20 3:25 pm, Faraz Khan wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi everyone,
        <div>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.</div>
        <div><br>
        </div>
        <div>My first attempt was to get webrtc peerconnection stats. I
          did:</div>
        <div><br>
        </div>
        <div>GstPromise *p = gst_promise_new_with_change_func(_on_stats,
          NULL, NULL);<br>
          g_signal_emit_by_name(peer->webrtcbin, "get-stats", NULL,
          p);<br>
        </div>
        <div><br>
        </div>
        <div>And decode them using:</div>
        <div><br>
        </div>
        <div>gboolean on_stats_iter(GQuark field, const GValue * value,
          gpointer pfx) {<br>
              gchar *str = gst_value_serialize (value);<br>
              g_print ("%15s: %s", g_quark_to_string (field), str);<br>
              std::cout << std::endl;<br>
              g_free (str);<br>
              return TRUE;<br>
          }<br>
          <br>
          static void _on_stats (GstPromise * promise, gpointer
          user_data) {<br>
              const GstStructure *reply =
          gst_promise_get_reply(promise);<br>
              gst_structure_foreach(reply, on_stats_iter,
          (gpointer)reply);<br>
          }<br>
        </div>
        <div><br>
        </div>
        <div>And this generates: </div>
        <div>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\;"<br>
          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\;"<br>
          transport-stats_webrtcdtlstransport0: "transport\,\
          type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_TRANSPORT\,\
          timestamp\=\(double\)180230225.79899999\,\
          id\=\(string\)transport-stats_webrtcdtlstransport0\;"<br>
          ice-candidate-pair_webrtcnicetransport0: "transport\,\
          type\=\(GstWebRTCStatsType\)GST_WEBRTC_STATS_TRANSPORT\,\
          timestamp\=\(double\)180230225.79899999\,\
          id\=\(string\)ice-candidate-pair_webrtcnicetransport0\;"<br>
          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\;"<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>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).</div>
        <div><br>
        </div>
        <div>How does one proceed to debug this? What am I missing?</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div>