diff --git a/ChangeLog b/ChangeLog index 5e5e11c841..035ae31742 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-10-27 Sebastian Dröge + + Patch by: Sjoerd Simons + + * ext/soup/gstsouphttpsrc.c: (gst_soup_http_src_class_init), + (gst_soup_http_src_set_property), (gst_soup_http_src_get_property): + Add support for souphttpsrc to act as a live source. This makes it + possible to get timestamped buffers in combination with the + "do-timestamp" property. Fixes bug #556019. + 2008-10-27 Stefan Kost * gst/autodetect/Makefile.am: @@ -11,7 +21,6 @@ Implement src plugins. Little code/string cleanup in the sinks. Fixes #523813. - 2008-10-27 Sebastian Dröge Patch by: Peter Kjellerstedt diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 8ecde0d6c7..cd993fe088 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -117,6 +117,7 @@ enum { PROP_0, PROP_LOCATION, + PROP_IS_LIVE, PROP_USER_AGENT, PROP_AUTOMATIC_REDIRECT, PROP_PROXY, @@ -263,6 +264,10 @@ gst_soup_http_src_class_init (GstSoupHTTPSrcClass * klass) g_object_class_install_property (gobject_class, PROP_COOKIES, g_param_spec_boxed ("cookies", "Cookies", "HTTP request cookies", G_TYPE_STRV, G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_IS_LIVE, + g_param_spec_boolean ("is-live", "is-live", + "Act like a live source", FALSE, G_PARAM_READWRITE)); /* icecast stuff */ g_object_class_install_property (gobject_class, @@ -427,6 +432,9 @@ gst_soup_http_src_set_property (GObject * object, guint prop_id, g_strfreev (src->cookies); src->cookies = g_strdupv (g_value_get_boxed (value)); break; + case PROP_IS_LIVE: + gst_base_src_set_live (GST_BASE_SRC (src), g_value_get_boolean (value)); + break; } done: return; @@ -461,6 +469,9 @@ gst_soup_http_src_get_property (GObject * object, guint prop_id, case PROP_COOKIES: g_value_set_boxed (value, g_strdupv (src->cookies)); break; + case PROP_IS_LIVE: + g_value_set_boolean (value, gst_base_src_is_live (GST_BASE_SRC (src))); + break; case PROP_IRADIO_MODE: g_value_set_boolean (value, src->iradio_mode); break; @@ -816,8 +827,7 @@ gst_soup_http_src_got_chunk_cb (SoupMessage * msg, SoupBuffer * chunk, GST_BUFFER_OFFSET (*src->outbuf) = basesrc->segment.last_stop; gst_buffer_set_caps (*src->outbuf, - (src-> - icy_caps) ? src->icy_caps : + (src->icy_caps) ? src->icy_caps : GST_PAD_CAPS (GST_BASE_SRC_PAD (basesrc))); new_position = src->read_position + chunk->length;