queue2: Forward the schedule query upstream
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 26 Jul 2013 13:08:13 +0000 (15:08 +0200)
committerSjoerd Simons <sjoerd@luon.net>
Mon, 29 Jul 2013 13:07:44 +0000 (15:07 +0200)
When asked about the scheduling flags first check with upstream and
simply add the _SEEKABLE flag when using a temporary file as storage.

This enables the forwarding of _SEQUENTIAL and _BANDWIDTH_LIMITED from
sources if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=704927

plugins/elements/gstqueue2.c

index 59d8b63..0af6fc1 100644 (file)
@@ -2941,6 +2941,11 @@ gst_queue2_handle_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
       gboolean pull_mode;
       GstSchedulingFlags flags = 0;
 
+      if (!gst_pad_peer_query (queue->sinkpad, query))
+        goto peer_failed;
+
+      gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL);
+
       /* we can operate in pull mode when we are using a tempfile */
       pull_mode = !QUEUE_IS_USING_QUEUE (queue);