Index: gstalsasrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins/ext/alsa/gstalsasrc.c,v
retrieving revision 1.20
diff -u -r1.20 gstalsasrc.c
--- gstalsasrc.c	9 Jul 2004 10:56:48 -0000	1.20
+++ gstalsasrc.c	22 Dec 2004 18:28:37 -0000
@@ -47,6 +47,8 @@
 
 static GstAlsa *src_parent_class = NULL;
 
+static void gst_alsa_src_uri_handler_init (gpointer g_iface, gpointer iface_data);
+
 static GstPadTemplate *
 gst_alsa_src_pad_factory (void)
 {
@@ -80,7 +82,17 @@
     alsa_src_type =
         g_type_register_static (GST_TYPE_ALSA_MIXER, "GstAlsaSrc",
         &alsa_src_info, 0);
+
+    static const GInterfaceInfo urihandler_info = {
+        gst_alsa_src_uri_handler_init,
+        NULL,
+        NULL,
+    };
+
+    g_type_add_interface_static (alsa_src_type, GST_TYPE_URI_HANDLER,
+        &urihandler_info);
   }
+
   return alsa_src_type;
 }
 
@@ -529,3 +541,59 @@
 
   return GST_STATE_SUCCESS;
 }
+
+/*** GSTURIHANDLER INTERFACE *************************************************/
+
+static guint
+gst_alsa_src_uri_get_type (void)
+{
+  return GST_URI_SRC;
+}
+static gchar **
+gst_alsa_src_uri_get_protocols (void)
+{
+  static gchar *protocols[] = { "audio", NULL };
+
+  return protocols;
+}
+static const gchar *
+gst_alsa_src_uri_get_uri (GstURIHandler * handler)
+{
+  GstAlsaSrc *gst_alsa_src = GST_ALSA_SRC (handler);
+
+  return gst_alsa_src->uri;
+}
+
+static gboolean
+gst_alsa_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
+{
+  gchar *protocol, *location;
+  gboolean ret;
+
+  /*GstAlsaSrc *gst_alsa_src = GST_ALSA_SRC (handler);*/
+
+  ret = TRUE;
+
+  protocol = gst_uri_get_protocol (uri);
+  if (strcmp (protocol, "audio") != 0) {
+    g_free (protocol);
+    return FALSE;
+  }
+  g_free (protocol);
+  location = gst_uri_get_location (uri);
+
+  g_free (location);
+
+  return ret;
+}
+
+static void
+gst_alsa_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
+{
+  GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
+
+  iface->get_type = gst_alsa_src_uri_get_type;
+  iface->get_protocols = gst_alsa_src_uri_get_protocols;
+  iface->get_uri = gst_alsa_src_uri_get_uri;
+  iface->set_uri = gst_alsa_src_uri_set_uri;
+}
Index: gstalsasrc.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins/ext/alsa/gstalsasrc.h,v
retrieving revision 1.6
diff -u -r1.6 gstalsasrc.h
--- gstalsasrc.h	17 Jun 2004 14:10:21 -0000	1.6
+++ gstalsasrc.h	22 Dec 2004 18:28:37 -0000
@@ -40,6 +40,7 @@
   GstBuffer     *buf[GST_ALSA_MAX_TRACKS];
   snd_pcm_status_t *status;
   GstClockTime  base_time; /* FIXME: move this up ? already present in element ? */
+  gchar *uri; /* URI caching */
 };
 
 struct _GstAlsaSrcClass {
