gst/playback/gstplaybasebin.c: Make http sources send special headers so that we...
authorTim-Philipp Müller <tim@centricular.net>
Thu, 11 May 2006 16:04:28 +0000 (16:04 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 11 May 2006 16:04:28 +0000 (16:04 +0000)
Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (gen_source_element):
Make http sources send special headers so that we receive
icecast metadata if the http stream is an icecast stream
(otherwise the server will just ignore them). This also
means that from now on users will need the 'icydemux'
element from gst-plugins-good installed if they want to
listen to icecast radio streams. (#341432, #333657).

ChangeLog
gst/playback/gstplaybasebin.c

index f1aef1bb390d98ee7c04489b4ad2225e4857d859..f1ff87037b80778910a6a99c7f1bf1bd24509108 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-11  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/playback/gstplaybasebin.c: (gen_source_element):
+         Make http sources send special headers so that we receive
+         icecast metadata if the http stream is an icecast stream
+         (otherwise the server will just ignore them). This also
+         means that from now on users will need the 'icydemux'
+         element from gst-plugins-good installed if they want to
+         listen to icecast radio streams. (#341432, #333657).
+
 2006-05-11  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_remove_client_link),
index f1875242b39d1cd919c9ce710470dd201e717b9a..578a98fc1b16747638e98c053f256e6ed4ceb233 100644 (file)
@@ -1103,6 +1103,14 @@ gen_source_element (GstPlayBaseBin * play_base_bin, GstElement ** subbin)
       !strncmp (play_base_bin->uri, "rtp://", 6) ||
       !strncmp (play_base_bin->uri, "rtsp://", 7);
 
+  /* make HTTP sources send extra headers so we get icecast
+   * metadata in case the stream is an icecast stream */
+  if (!strncmp (play_base_bin->uri, "http://", 7) &&
+      g_object_class_find_property (G_OBJECT_GET_CLASS (source),
+          "iradio-mode")) {
+    g_object_set (source, "iradio-mode", TRUE, NULL);
+  }
+
   return source;
 }