mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
a6f4df463d
commit
4158cf510a
2 changed files with 22 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -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>
|
2008-10-27 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/autodetect/Makefile.am:
|
* gst/autodetect/Makefile.am:
|
||||||
|
@ -11,7 +21,6 @@
|
||||||
Implement src plugins. Little code/string cleanup in the sinks.
|
Implement src plugins. Little code/string cleanup in the sinks.
|
||||||
Fixes #523813.
|
Fixes #523813.
|
||||||
|
|
||||||
|
|
||||||
2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: Peter Kjellerstedt <pkj at axis com>
|
Patch by: Peter Kjellerstedt <pkj at axis com>
|
||||||
|
|
|
@ -117,6 +117,7 @@ enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_LOCATION,
|
PROP_LOCATION,
|
||||||
|
PROP_IS_LIVE,
|
||||||
PROP_USER_AGENT,
|
PROP_USER_AGENT,
|
||||||
PROP_AUTOMATIC_REDIRECT,
|
PROP_AUTOMATIC_REDIRECT,
|
||||||
PROP_PROXY,
|
PROP_PROXY,
|
||||||
|
@ -263,6 +264,10 @@ gst_soup_http_src_class_init (GstSoupHTTPSrcClass * klass)
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_COOKIES, g_param_spec_boxed ("cookies", "Cookies",
|
PROP_COOKIES, g_param_spec_boxed ("cookies", "Cookies",
|
||||||
"HTTP request cookies", G_TYPE_STRV, G_PARAM_READWRITE));
|
"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 */
|
/* icecast stuff */
|
||||||
g_object_class_install_property (gobject_class,
|
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);
|
g_strfreev (src->cookies);
|
||||||
src->cookies = g_strdupv (g_value_get_boxed (value));
|
src->cookies = g_strdupv (g_value_get_boxed (value));
|
||||||
break;
|
break;
|
||||||
|
case PROP_IS_LIVE:
|
||||||
|
gst_base_src_set_live (GST_BASE_SRC (src), g_value_get_boolean (value));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
return;
|
return;
|
||||||
|
@ -461,6 +469,9 @@ gst_soup_http_src_get_property (GObject * object, guint prop_id,
|
||||||
case PROP_COOKIES:
|
case PROP_COOKIES:
|
||||||
g_value_set_boxed (value, g_strdupv (src->cookies));
|
g_value_set_boxed (value, g_strdupv (src->cookies));
|
||||||
break;
|
break;
|
||||||
|
case PROP_IS_LIVE:
|
||||||
|
g_value_set_boolean (value, gst_base_src_is_live (GST_BASE_SRC (src)));
|
||||||
|
break;
|
||||||
case PROP_IRADIO_MODE:
|
case PROP_IRADIO_MODE:
|
||||||
g_value_set_boolean (value, src->iradio_mode);
|
g_value_set_boolean (value, src->iradio_mode);
|
||||||
break;
|
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_OFFSET (*src->outbuf) = basesrc->segment.last_stop;
|
||||||
|
|
||||||
gst_buffer_set_caps (*src->outbuf,
|
gst_buffer_set_caps (*src->outbuf,
|
||||||
(src->
|
(src->icy_caps) ? src->icy_caps :
|
||||||
icy_caps) ? src->icy_caps :
|
|
||||||
GST_PAD_CAPS (GST_BASE_SRC_PAD (basesrc)));
|
GST_PAD_CAPS (GST_BASE_SRC_PAD (basesrc)));
|
||||||
|
|
||||||
new_position = src->read_position + chunk->length;
|
new_position = src->read_position + chunk->length;
|
||||||
|
|
Loading…
Reference in a new issue