--- a/gst/tcp/gsttcpserversrc.c
+++ b/gst/tcp/gsttcpserversrc.c
@@ -64,8 +64,12 @@ enum
   PROP_CURRENT_PORT
 };
 
+static void gst_tcp_server_src_uri_handler_init (gpointer g_iface, gpointer iface_data);
+
+#define _do_init \
+  G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_tcp_server_src_uri_handler_init);
 #define gst_tcp_server_src_parent_class parent_class
-G_DEFINE_TYPE (GstTCPServerSrc, gst_tcp_server_src, GST_TYPE_PUSH_SRC);
+G_DEFINE_TYPE_WITH_CODE (GstTCPServerSrc, gst_tcp_server_src, GST_TYPE_PUSH_SRC, _do_init);
 
 static void gst_tcp_server_src_finalize (GObject * gobject);
 
@@ -547,3 +551,73 @@ gst_tcp_server_src_unlock_stop (GstBaseSrc * bsrc)
 
   return TRUE;
 }
+
+/*** GSTURIHANDLER INTERFACE *************************************************/
+
+static GstURIType
+gst_tcp_server_src_uri_get_type (void)
+{
+  return GST_URI_SRC;
+}
+
+static gchar **
+gst_tcp_server_src_uri_get_protocols (void)
+{
+  static gchar *protocols[] = { (char *) "tcp", NULL };
+
+  return protocols;
+}
+
+static gboolean
+gst_tcp_server_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
+{
+  gchar *protocol;
+  GstTCPServerSrc *src = GST_TCP_SERVER_SRC (handler);
+  gchar *p;
+  gchar *host;
+
+  GST_INFO_OBJECT (src, "checking uri %s", uri);
+
+  protocol = gst_uri_get_protocol (uri);
+  if (strcmp (protocol, "tcp") != 0) {
+    g_free (protocol);
+    return FALSE;
+  }
+  g_free (protocol);
+
+  host = gst_uri_get_location (uri);
+  p = strchr (host, '/');
+  if (p != NULL)
+    *p = '\0';
+
+  p = strchr (host, ':');
+  if (p != NULL) {
+    gint port;
+
+    *p++ = '\0';
+    port = atoi(p);
+
+    if (port >= 0)
+      src->server_port = port;
+  }
+
+  if (!*host || !strcmp(host, "@")) {
+    g_free(host);
+    host = NULL;
+  }
+
+  g_free(src->host);
+  src->host = host;
+
+  return TRUE;
+}
+
+static void
+gst_tcp_server_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
+{
+  GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
+
+  iface->get_type = gst_tcp_server_src_uri_get_type;
+  iface->get_protocols = gst_tcp_server_src_uri_get_protocols;
+  iface->set_uri = gst_tcp_server_src_uri_set_uri;
+}
