[GStreamer] HTTP source element lacks SCHEDULING query support
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Nov 2014 11:05:11 +0000 (11:05 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Nov 2014 11:05:11 +0000 (11:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139064

Reviewed by Carlos Garcia Campos.

No new tests, covered by http/tests/media/hls.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcQueryWithParent): Make the element handle SCHEDULING
queries with the BANDWIDTH_LIMITED flag. This helps uridecodebin
to configure itself for adaptive streaming playback scenarios.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

index 2dd778e..7cb5a19 100644 (file)
@@ -1,3 +1,17 @@
+2014-11-26  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] HTTP source element lacks SCHEDULING query support
+        https://bugs.webkit.org/show_bug.cgi?id=139064
+
+        Reviewed by Carlos Garcia Campos.
+
+        No new tests, covered by http/tests/media/hls.
+
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcQueryWithParent): Make the element handle SCHEDULING
+        queries with the BANDWIDTH_LIMITED flag. This helps uridecodebin
+        to configure itself for adaptive streaming playback scenarios.
+
 2014-11-27  Ryuan Choi  <ryuan.choi@navercorp.com>
 
         [EFL] Remove E_Dbus dependency
index 00e0e3e..15f46dd 100644 (file)
@@ -584,6 +584,15 @@ static gboolean webKitWebSrcQueryWithParent(GstPad* pad, GstObject* parent, GstQ
         result = TRUE;
         break;
     }
+    case GST_QUERY_SCHEDULING: {
+        GstSchedulingFlags flags;
+        int minSize, maxSize, align;
+
+        gst_query_parse_scheduling(query, &flags, &minSize, &maxSize, &align);
+        gst_query_set_scheduling(query, static_cast<GstSchedulingFlags>(flags | GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED), minSize, maxSize, align);
+        result = TRUE;
+        break;
+    }
     default: {
         GRefPtr<GstPad> target = adoptGRef(gst_ghost_pad_get_target(GST_GHOST_PAD_CAST(pad)));