Index: gst/playback/gstplaybasebin.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins/gst/playback/gstplaybasebin.c,v
retrieving revision 1.62.2.13
diff -u -r1.62.2.13 gstplaybasebin.c
--- gst/playback/gstplaybasebin.c	8 Jun 2005 12:35:12 -0000	1.62.2.13
+++ gst/playback/gstplaybasebin.c	12 Jun 2005 10:38:25 -0000
@@ -81,6 +81,8 @@
 
 static void gst_play_base_bin_error (GstElement * element,
     GstElement * source, GError * error, gchar * debug, gpointer data);
+static void gst_play_base_bin_deep_notify (GstElement *element, GstElement *orig,
+    GParamSpec *pspec, gpointer data);
 static void gst_play_base_bin_found_tag (GstElement * element,
     GstElement * source, const GstTagList * taglist, gpointer data);
 
@@ -1102,6 +1104,13 @@
       !strncmp (play_base_bin->uri, "rtp://", 6) ||
       !strncmp (play_base_bin->uri, "rtsp://", 7);
 
+  /* enable iradio mode for HTTP streams to get icecast metadata */
+  if (!strncmp (play_base_bin->uri, "http://", 7) &&
+      g_object_class_find_property (G_OBJECT_GET_CLASS (source), "iradio-mode")) {
+    play_base_bin->maybe_iradio_stream = TRUE;
+    gst_element_set (source, "iradio-mode", TRUE, NULL);
+  }
+  
   return source;
 }
 
@@ -1788,6 +1797,10 @@
         ret = GST_STATE_FAILURE;
       } else if (play_base_bin->is_stream) {
         ret = gst_element_set_state (play_base_bin->thread, GST_STATE_PAUSED);
+	if (play_base_bin->maybe_iradio_stream) {
+          g_signal_connect (play_base_bin->thread, "deep-notify",
+              G_CALLBACK (gst_play_base_bin_deep_notify), play_base_bin);
+        }
       } else if (!prepare_output (play_base_bin)) {
         gst_element_set_state (play_base_bin->thread, GST_STATE_READY);
         ret = GST_STATE_FAILURE;
@@ -1951,6 +1964,33 @@
   gst_object_unref (parent);
 }
 
+static void
+gst_play_base_bin_deep_notify (GstElement *element, GstElement *orig,
+    GParamSpec *pspec, gpointer data)
+{
+  GstObject *parent = GST_OBJECT (data);
+  GstObject *source = GST_OBJECT (orig);
+  char *signame;
+
+  if (!(pspec->flags & G_PARAM_READABLE))
+    return;
+
+  gst_object_ref (source);
+  gst_object_ref (parent);
+  GST_DEBUG ("forwarding deep-notify \"%s\" from %s to %s", pspec->name,
+      GST_ELEMENT_NAME (source), GST_OBJECT_NAME (parent));
+  signame = g_strdup_printf ("deep-notify::%s", pspec->name);
+
+  g_signal_emit_by_name (G_OBJECT (parent), signame, source, pspec);
+
+  GST_DEBUG ("forwarded deep-notify \"%s\" from %s to %s", pspec->name,
+      GST_ELEMENT_NAME (source), GST_OBJECT_NAME (parent));
+  gst_object_unref (source);
+  gst_object_unref (parent);
+  g_free (signame);
+}
+			
+
 /* this code does not do anything usefull as it catches the tags
  * in the preroll and playback stage so that it is very difficult
  * to link them to the actual playback point. 
