webrtcstats: Also return the raw rtpsource stats for more information 63/262663/2
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Sat, 10 Oct 2020 22:21:19 +0000 (18:21 -0400)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 18 Aug 2021 06:39:55 +0000 (06:39 +0000)
Change-Id: Ic3d3503bedfb3d47b2ea5fc54c97b209f582d92a
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>

ext/webrtc/gstwebrtcstats.c

index 4505f5b6a79183a83ead3d93e1c2c8fd64ae49e1..6145411a48ad54d5f1ba1f3c30bb59f538b0a550 100644 (file)
@@ -258,6 +258,13 @@ _get_stats_from_rtp_source_stats (GstWebRTCBin * webrtc,
        DOMString            encoderImplementation;
      */
 
+    /* Store the raw stats from GStreamer into the structure for advanced
+     * information.
+     */
+    gst_structure_set (out, "gst-rtpsource-stats", GST_TYPE_STRUCTURE,
+        source_stats, NULL);
+
+
     _gst_structure_take_structure (s, out_id, &out);
     _gst_structure_take_structure (s, r_in_id, &r_in);
 
@@ -492,7 +499,13 @@ _get_stats_from_rtp_source_stats (GstWebRTCBin * webrtc,
        reportsSent
      */
 
-    gst_structure_free (jb_stats);
+    /* Store the raw stats from GStreamer into the structure for advanced
+     * information.
+     */
+    _gst_structure_take_structure (in, "gst-rtpjitterbuffer-stats", &jb_stats);
+
+    gst_structure_set (in, "gst-rtpsource-stats", GST_TYPE_STRUCTURE,
+        source_stats, NULL);
 
     _gst_structure_take_structure (s, in_id, &in);
     _gst_structure_take_structure (s, r_out_id, &r_out);