ext/soup/gstsouphttpsrc.c: Add support for souphttpsrc to act as a live source. This makes it possible to get timesta...

Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* 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.
This commit is contained in:
Sjoerd Simons 2008-10-27 09:00:29 +00:00 committed by Sebastian Dröge
parent a6f4df463d
commit 4158cf510a
2 changed files with 22 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* 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 <ensonic@users.sf.net>
* 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 <sebastian.droege@collabora.co.uk>
Patch by: Peter Kjellerstedt <pkj at axis com>

View file

@ -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;