Index: gst/gstquark.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstquark.c,v
retrieving revision 1.6
diff -u -p -a -u -p -r1.6 gstquark.c
--- gst/gstquark.c	14 Oct 2008 17:10:43 -0000	1.6
+++ gst/gstquark.c	2 Dec 2008 09:46:10 -0000
@@ -37,7 +37,7 @@ static const gchar *_quark_strings[] = {
   "max-latency", "busy", "type", "owner", "update", "applied-rate",
   "start", "stop", "minsize", "maxsize", "async", "proportion",
   "diff", "timestamp", "flags", "cur-type", "cur", "stop-type",
-  "latency"
+  "latency", "uri"
 };
 
 GQuark _priv_gst_quark_table[GST_QUARK_MAX];
Index: gst/gstquark.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstquark.h,v
retrieving revision 1.5
diff -u -p -a -u -p -r1.5 gstquark.h
--- gst/gstquark.h	13 Oct 2008 17:19:25 -0000	1.5
+++ gst/gstquark.h	2 Dec 2008 09:46:10 -0000
@@ -77,8 +77,9 @@ typedef enum _GstQuarkId
   GST_QUARK_CUR = 48,
   GST_QUARK_STOP_TYPE = 49,
   GST_QUARK_LATENCY = 50,
+  GST_QUARK_URI = 51,
 
-  GST_QUARK_MAX = 51
+  GST_QUARK_MAX = 52
 } GstQuarkId;
 
 extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
Index: gst/gstquery.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstquery.c,v
retrieving revision 1.48
diff -u -p -a -u -p -r1.48 gstquery.c
--- gst/gstquery.c	20 Nov 2008 10:35:50 -0000	1.48
+++ gst/gstquery.c	2 Dec 2008 09:46:10 -0000
@@ -93,6 +93,7 @@ static GstQueryTypeDefinition standard_d
   {GST_QUERY_FORMATS, "formats", "Supported formats for conversion", 0},
   {GST_QUERY_BUFFERING, "buffering", "Buffering status", 0},
   {GST_QUERY_CUSTOM, "custom", "Custom query", 0},
+  {GST_QUERY_URI, "uri", "URI of the source or sink", 0},
   {0, NULL, NULL, 0}
 };
 
@@ -1308,3 +1309,77 @@ gst_query_parse_buffering_range (GstQuer
         g_value_get_int64 (gst_structure_id_get_value (structure,
             GST_QUARK (ESTIMATED_TOTAL)));
 }
+
+/**
+ * gst_query_new_uri:
+ *
+ * Constructs a new query URI query object. Use gst_query_unref()
+ * when done with it. An URI query is used to query the current URI
+ * that is used by the source or sink.
+ *
+ * Returns: A #GstQuery
+ *
+ * Since: 0.10.22
+ */
+GstQuery *
+gst_query_new_uri (void)
+{
+  GstQuery *query;
+  GstStructure *structure;
+
+  structure = gst_structure_empty_new ("GstQueryURI");
+  gst_structure_id_set (structure,
+      GST_QUARK (URI), G_TYPE_STRING, NULL,
+      NULL);
+
+  query = gst_query_new (GST_QUERY_URI, structure);
+
+  return query;
+}
+
+/**
+ * gst_query_set_uri:
+ * @query: a #GstQuery with query type GST_QUERY_URI
+ * @uri: the URI to set
+ *
+ * Answer a URI query by setting the requested URI.
+ *
+ * Since: 0.10.22
+ */
+void
+gst_query_set_uri (GstQuery * query, gchar *uri)
+{
+  GstStructure *structure;
+
+  g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+
+  structure = gst_query_get_structure (query);
+  gst_structure_id_set (structure,
+      GST_QUARK (URI), G_TYPE_STRING, uri,
+      NULL);
+}
+
+/**
+ * gst_query_parse_uri:
+ * @query: a #GstQuery
+ * @uri: the storage for the current URI (may be NULL)
+ *
+ * Parse an URI query, writing the URI into @uri as a newly
+ * allocated string, if the respective parameters are non-NULL.
+ * Free the string with g_free() after usage.
+ *
+ * Since: 0.10.22
+ */
+void
+gst_query_parse_uri (GstQuery *query, gchar **uri)
+{
+  GstStructure *structure;
+
+  g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+
+  structure = gst_query_get_structure (query);
+  if (uri)
+    *uri = g_value_dup_string (gst_structure_id_get_value (structure,
+            GST_QUARK (URI)));
+}
+
Index: gst/gstquery.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/gstquery.h,v
retrieving revision 1.41
diff -u -p -a -u -p -r1.41 gstquery.h
--- gst/gstquery.h	20 Nov 2008 10:35:50 -0000	1.41
+++ gst/gstquery.h	2 Dec 2008 09:46:10 -0000
@@ -50,6 +50,7 @@ G_BEGIN_DECLS
  * 0.10.20.
  * @GST_QUERY_CUSTOM: a custom application or element defined query. Since
  * 0.10.22.
+ * @GST_QUERY_URI: query the URI of the source or sink. Since 0.10.22.
  *
  * Standard predefined Query types
  */
@@ -67,7 +68,8 @@ typedef enum {
   GST_QUERY_CONVERT,
   GST_QUERY_FORMATS,
   GST_QUERY_BUFFERING,
-  GST_QUERY_CUSTOM
+  GST_QUERY_CUSTOM,
+  GST_QUERY_URI
 } GstQueryType;
 
 /**
@@ -285,6 +287,10 @@ void            gst_query_set_buffering_
 void            gst_query_parse_buffering_range   (GstQuery *query, GstFormat *format,
                                                    gint64 *start, gint64 *stop,
 						   gint64 *estimated_total);
+/* URI query */
+GstQuery *      gst_query_new_uri                 (void);
+void            gst_query_parse_uri               (GstQuery *query, gchar **uri);
+void            gst_query_set_uri                 (GstQuery *query, gchar *uri);
 
 G_END_DECLS
 
Index: docs/gst/gstreamer-sections.txt
===================================================================
RCS file: /cvs/gstreamer/gstreamer/docs/gst/gstreamer-sections.txt,v
retrieving revision 1.356
diff -u -p -a -u -p -r1.356 gstreamer-sections.txt
--- docs/gst/gstreamer-sections.txt	18 Nov 2008 09:58:32 -0000	1.356
+++ docs/gst/gstreamer-sections.txt	2 Dec 2008 09:46:11 -0000
@@ -1802,6 +1802,9 @@ gst_query_parse_buffering_stats
 gst_query_set_buffering_range
 gst_query_parse_buffering_range
 
+gst_query_new_uri
+gst_query_parse_uri
+gst_query_set_uri
 <SUBSECTION Standard>
 GstQueryClass
 GST_QUERY
