Index: plugins/elements/gstfdsink.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfdsink.c,v
retrieving revision 1.53
diff -u -p -a -u -p -r1.53 gstfdsink.c
--- plugins/elements/gstfdsink.c	20 Jun 2008 10:14:52 -0000	1.53
+++ plugins/elements/gstfdsink.c	2 Dec 2008 09:46:49 -0000
@@ -202,6 +202,10 @@ gst_fd_sink_query (GstPad * pad, GstQuer
       gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
       return TRUE;
 
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, fdsink->uri);
+      return TRUE;
+
     default:
       return gst_pad_query_default (pad, query);
   }
Index: plugins/elements/gstfdsrc.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfdsrc.c,v
retrieving revision 1.86
diff -u -p -a -u -p -r1.86 gstfdsrc.c
--- plugins/elements/gstfdsrc.c	23 Oct 2008 12:52:58 -0000	1.86
+++ plugins/elements/gstfdsrc.c	2 Dec 2008 09:46:49 -0000
@@ -130,6 +130,7 @@ static gboolean gst_fd_src_unlock_stop (
 static gboolean gst_fd_src_is_seekable (GstBaseSrc * bsrc);
 static gboolean gst_fd_src_get_size (GstBaseSrc * src, guint64 * size);
 static gboolean gst_fd_src_do_seek (GstBaseSrc * src, GstSegment * segment);
+static gboolean gst_fd_src_query (GstBaseSrc * src, GstQuery * query);
 
 static GstFlowReturn gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf);
 
@@ -188,6 +189,7 @@ gst_fd_src_class_init (GstFdSrcClass * k
   gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_fd_src_is_seekable);
   gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_fd_src_get_size);
   gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_fd_src_do_seek);
+  gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_fd_src_query);
 
   gstpush_src_class->create = GST_DEBUG_FUNCPTR (gst_fd_src_create);
 }
@@ -493,6 +495,28 @@ read_error:
 }
 
 static gboolean
+gst_fd_src_query (GstBaseSrc * basesrc, GstQuery *query)
+{
+  gboolean ret = FALSE;
+  GstFdSrc *src = GST_FD_SRC (basesrc);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, src->uri);
+      ret = TRUE;
+      break;
+    default:
+      ret = FALSE;
+      break;
+  }
+
+  if (!ret)
+    ret = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query);
+
+  return ret;
+}
+
+static gboolean
 gst_fd_src_is_seekable (GstBaseSrc * bsrc)
 {
   GstFdSrc *src = GST_FD_SRC (bsrc);
Index: plugins/elements/gstfilesink.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesink.c,v
retrieving revision 1.98
diff -u -p -a -u -p -r1.98 gstfilesink.c
--- plugins/elements/gstfilesink.c	10 Nov 2008 13:56:51 -0000	1.98
+++ plugins/elements/gstfilesink.c	2 Dec 2008 09:46:49 -0000
@@ -409,6 +409,10 @@ gst_file_sink_query (GstPad * pad, GstQu
       gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
       return TRUE;
 
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, self->uri);
+      return TRUE;
+
     default:
       return gst_pad_query_default (pad, query);
   }
Index: plugins/elements/gstfilesrc.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesrc.c,v
retrieving revision 1.168
diff -u -p -a -u -p -r1.168 gstfilesrc.c
--- plugins/elements/gstfilesrc.c	24 Nov 2008 11:56:44 -0000	1.168
+++ plugins/elements/gstfilesrc.c	2 Dec 2008 09:46:50 -0000
@@ -193,6 +193,7 @@ static gboolean gst_file_src_is_seekable
 static gboolean gst_file_src_get_size (GstBaseSrc * src, guint64 * size);
 static GstFlowReturn gst_file_src_create (GstBaseSrc * src, guint64 offset,
     guint length, GstBuffer ** buffer);
+static gboolean gst_file_src_query (GstBaseSrc * src, GstQuery *query);
 
 static void gst_file_src_uri_handler_init (gpointer g_iface,
     gpointer iface_data);
@@ -293,6 +294,7 @@ gst_file_src_class_init (GstFileSrcClass
   gstbasesrc_class->is_seekable = GST_DEBUG_FUNCPTR (gst_file_src_is_seekable);
   gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_file_src_get_size);
   gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_file_src_create);
+  gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_file_src_query);
 
   if (sizeof (off_t) < 8) {
     GST_LOG ("No large file support, sizeof (off_t) = %" G_GSIZE_FORMAT "!",
@@ -903,6 +905,28 @@ gst_file_src_create (GstBaseSrc * basesr
 }
 
 static gboolean
+gst_file_src_query (GstBaseSrc * basesrc, GstQuery *query)
+{
+  gboolean ret = FALSE;
+  GstFileSrc *src = GST_FILE_SRC (basesrc);
+
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_URI:
+      gst_query_set_uri (query, src->uri);
+      ret = TRUE;
+      break;
+    default:
+      ret = FALSE;
+      break;
+  }
+
+  if (!ret)
+    ret = GST_BASE_SRC_CLASS (parent_class)->query (basesrc, query);
+
+  return ret;
+}
+
+static gboolean
 gst_file_src_is_seekable (GstBaseSrc * basesrc)
 {
   GstFileSrc *src = GST_FILE_SRC (basesrc);
