hlsdemux: Add support for URI queries
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Sat, 12 Mar 2011 12:00:06 +0000 (13:00 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 30 Mar 2011 07:19:23 +0000 (09:19 +0200)
gst/hls/gsthlsdemux.c

index 8e58cc8cd95e364d758c1d77707d58544c589168..20900a5a7e1c8cfa103cf47cc50b0981acc75ccf 100644 (file)
@@ -379,6 +379,14 @@ gst_hls_demux_src_query (GstPad * pad, GstQuery * query)
       }
       break;
     }
+    case GST_QUERY_URI:
+      if (hlsdemux->client) {
+        /* FIXME: Do we answer with the variant playlist, with the current
+         * playlist or the the uri of the least downlowaded fragment? */
+        gst_query_set_uri (query, hlsdemux->client->current->uri);
+        ret = TRUE;
+      }
+      break;
     default:
       /* Don't fordward queries upstream because of the special nature of this
        * "demuxer", which relies on the upstream element only to be feed with the