commit b36a7ee9d552df11f117f888dc47d3b5927fe0ec
Author: Duncan Palmer <dpalmer@digisoft.tv>
Date:   Fri Jan 30 14:51:30 2015 +1000

    DDTWO-1193 multiqueue: Add support for GST_QUERY_BUFFERING.

diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index c60596b..d8f396b 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -1965,10 +1965,36 @@ gst_multi_queue_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
 static gboolean
 gst_multi_queue_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
 {
-  gboolean res;
+  GstSingleQueue *sq;
+  GstMultiQueue *mq;
+  gboolean res = FALSE;
+
+  sq = (GstSingleQueue *) gst_pad_get_element_private (pad);
+  mq = (GstMultiQueue *) parent;
 
   /* FIXME, Handle position offset depending on queue size */
   switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_BUFFERING:
+    {
+      gboolean use_buffering;
+      GST_MULTI_QUEUE_MUTEX_LOCK (mq);
+
+      use_buffering = mq->use_buffering;
+      if (use_buffering) {
+        GST_DEBUG_OBJECT (mq, "query buffering");
+
+        update_buffering (mq, sq);
+        gst_query_set_buffering_percent (query, mq->buffering, mq->percent);
+        res = TRUE;
+      }
+
+      GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
+
+      /* We're not buffering; forward the query. */
+      if (!use_buffering)
+        res = gst_pad_peer_query (sq->sinkpad, query);
+      break;
+    }
     default:
       /* default handling */
       res = gst_pad_query_default (pad, parent, query);
