hlsdemux: post first variant bandwidth info 79/258079/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 6 May 2021 07:59:40 +0000 (16:59 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 10 May 2021 07:32:26 +0000 (16:32 +0900)
- post bandwidth information if the first variant is selected.
- when the variant is changed, the bandwidth info has been posted.

Change-Id: Ic22cf3e41524bce1b46bd83a2fc0ea54c0e9debd

ext/hls/gsthlsdemux.c
packaging/gst-plugins-bad.spec

index 49d640f..99d5fff 100644 (file)
@@ -765,6 +765,12 @@ gst_hls_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf)
             gst_structure_new ("adaptive-ad-info",
                 "ad-info", G_TYPE_POINTER,
                 variant->m3u8->ad_info, NULL)));
+
+    GST_DEBUG_OBJECT (hlsdemux, "post current bandwidth info : %d", variant->bandwidth);
+    gst_element_post_message (GST_ELEMENT_CAST (hlsdemux),
+        gst_message_new_element (GST_OBJECT_CAST (hlsdemux),
+            gst_structure_new (GST_ADAPTIVE_DEMUX_STATISTICS_MESSAGE_NAME,
+                  "bitrate", G_TYPE_INT, variant->bandwidth, NULL)));
   }
 #endif
 
index a8bad35..50c242f 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:           gst-plugins-bad
 Version:        1.16.2
-Release:        10
+Release:        11
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.0+
 Group:          Multimedia/Framework