Index: ext/gio/gstgiobasesink.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesink.c,v
retrieving revision 1.4
diff -u -p -a -u -p -r1.4 gstgiobasesink.c
--- ext/gio/gstgiobasesink.c	17 Feb 2008 05:15:45 -0000	1.4
+++ ext/gio/gstgiobasesink.c	2 Dec 2008 10:04:37 -0000
@@ -308,6 +308,15 @@ gst_gio_base_sink_query (GstPad * pad, G
     case GST_QUERY_FORMATS:
       gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
       return TRUE;
+    case GST_QUERY_URI:
+      if (GST_IS_URI_HANDLER (sink)) {
+        const gchar *uri;
+
+        uri = gst_uri_handler_get_uri (GST_URI_HANDLER (sink));
+	gst_query_set_uri (query, uri);
+	return TRUE;
+      }
+      return FALSE;
     default:
       return gst_pad_query_default (pad, query);
   }
Index: ext/gio/gstgiobasesrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.c,v
retrieving revision 1.10
diff -u -p -a -u -p -r1.10 gstgiobasesrc.c
--- ext/gio/gstgiobasesrc.c	24 Nov 2008 12:07:10 -0000	1.10
+++ ext/gio/gstgiobasesrc.c	2 Dec 2008 10:04:37 -0000
@@ -39,21 +39,16 @@ GST_BOILERPLATE (GstGioBaseSrc, gst_gio_
 static void gst_gio_base_src_finalize (GObject * object);
 
 static gboolean gst_gio_base_src_start (GstBaseSrc * base_src);
-
 static gboolean gst_gio_base_src_stop (GstBaseSrc * base_src);
-
 static gboolean gst_gio_base_src_get_size (GstBaseSrc * base_src,
     guint64 * size);
 static gboolean gst_gio_base_src_is_seekable (GstBaseSrc * base_src);
-
 static gboolean gst_gio_base_src_unlock (GstBaseSrc * base_src);
-
 static gboolean gst_gio_base_src_unlock_stop (GstBaseSrc * base_src);
-
 static gboolean gst_gio_base_src_check_get_range (GstBaseSrc * base_src);
-
 static GstFlowReturn gst_gio_base_src_create (GstBaseSrc * base_src,
     guint64 offset, guint size, GstBuffer ** buf);
+static gboolean gst_gio_base_src_query (GstBaseSrc *base_src, GstQuery *query);
 
 static void
 gst_gio_base_src_base_init (gpointer gclass)
@@ -93,6 +88,7 @@ gst_gio_base_src_class_init (GstGioBaseS
   gstbasesrc_class->check_get_range =
       GST_DEBUG_FUNCPTR (gst_gio_base_src_check_get_range);
   gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_gio_base_src_create);
+  gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_gio_base_src_query);
 }
 
 static void
@@ -431,6 +427,31 @@ gst_gio_base_src_create (GstBaseSrc * ba
   return ret;
 }
 
+static gboolean
+gst_gio_base_src_query (GstBaseSrc *base_src, GstQuery *query)
+{
+  gboolean ret = FALSE;
+  GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_URI:
+      if (GST_IS_URI_HANDLER (src)) {
+        const gchar *uri = gst_uri_handler_get_uri (GST_URI_HANDLER (src));
+	gst_query_set_uri (query, uri);
+	ret = TRUE;
+      }
+      break;
+    default:
+      ret = FALSE;
+      break;
+  }
+
+  if (!ret)
+    ret = GST_BASE_SRC_CLASS (parent_class)->query (base_src, query);
+
+  return ret;
+}
+
 void
 gst_gio_base_src_set_stream (GstGioBaseSrc * src, GInputStream * stream)
 {
Index: ext/gnomevfs/gstgnomevfssink.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssink.c,v
retrieving revision 1.48
diff -u -p -a -u -p -r1.48 gstgnomevfssink.c
--- ext/gnomevfs/gstgnomevfssink.c	10 Jul 2008 21:05:57 -0000	1.48
+++ ext/gnomevfs/gstgnomevfssink.c	2 Dec 2008 10:04:37 -0000
@@ -511,6 +511,10 @@ gst_gnome_vfs_sink_query (GstPad * pad, 
       gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
       return TRUE;
 
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, sink->uri_name);
+      return TRUE;
+
     default:
       return gst_pad_query_default (pad, query);
   }
Index: ext/gnomevfs/gstgnomevfssrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.c,v
retrieving revision 1.108
diff -u -p -a -u -p -r1.108 gstgnomevfssrc.c
--- ext/gnomevfs/gstgnomevfssrc.c	24 Nov 2008 12:07:10 -0000	1.108
+++ ext/gnomevfs/gstgnomevfssrc.c	2 Dec 2008 10:04:37 -0000
@@ -141,6 +141,7 @@ static gboolean gst_gnome_vfs_src_check_
 static gboolean gst_gnome_vfs_src_get_size (GstBaseSrc * src, guint64 * size);
 static GstFlowReturn gst_gnome_vfs_src_create (GstBaseSrc * basesrc,
     guint64 offset, guint size, GstBuffer ** buffer);
+static gboolean gst_gnome_vfs_src_query (GstBaseSrc * src, GstQuery *query);
 
 static GstElementClass *parent_class = NULL;
 
@@ -249,6 +250,7 @@ gst_gnome_vfs_src_class_init (GstGnomeVF
   gstbasesrc_class->check_get_range =
       GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_check_get_range);
   gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_create);
+  gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_query);
 }
 
 static void
@@ -691,6 +693,28 @@ eos:
 }
 
 static gboolean
+gst_gnome_vfs_src_query (GstBaseSrc * basesrc, GstQuery *query)
+{
+  gboolean ret = FALSE;
+  GstGnomeVFSSrc *src = GST_GNOME_VFS_SRC (basesrc);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, src->uri_name);
+      ret = TRUE;
+      break;
+    default:
+      ret = FALSE;
+      break;
+  }
+
+  if (!ret)
+    ret = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query);
+
+  return ret;
+}
+
+static gboolean
 gst_gnome_vfs_src_is_seekable (GstBaseSrc * basesrc)
 {
   GstGnomeVFSSrc *src;
