Commit d8dc371c authored by Wim Taymans's avatar Wim Taymans
Browse files

ext/gnomevfs/gstgnomevfssrc.*: Set the ICY caps on the srcpad from where they...

ext/gnomevfs/gstgnomevfssrc.*: Set the ICY caps on the srcpad from where they get picked up by the base class now and...

Original commit message from CVS:
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_init),
(gst_gnome_vfs_src_finalize),
(gst_gnome_vfs_src_received_headers_callback),
(gst_gnome_vfs_src_create), (gst_gnome_vfs_src_stop):
* ext/gnomevfs/gstgnomevfssrc.h:
Set the ICY caps on the srcpad from where they get picked up by the base
class now and set on the outgoing buffers.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_buffer_new):
BaseSrc now sets the caps on outgoing buffers automatically.
parent 95d162fb
2008-05-20 Wim Taymans <wim.taymans@collabora.co.uk>
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_init),
(gst_gnome_vfs_src_finalize),
(gst_gnome_vfs_src_received_headers_callback),
(gst_gnome_vfs_src_create), (gst_gnome_vfs_src_stop):
* ext/gnomevfs/gstgnomevfssrc.h:
Set the ICY caps on the srcpad from where they get picked up by the base
class now and set on the outgoing buffers.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_buffer_new):
BaseSrc now sets the caps on outgoing buffers automatically.
2008-05-20 Wim Taymans <wim.taymans@collabora.co.uk>
 
* gst-libs/gst/audio/gstbaseaudiosink.c:
......@@ -275,7 +275,6 @@ gst_gnome_vfs_src_init (GstGnomeVFSSrc * gnomevfssrc)
gnomevfssrc->curoffset = 0;
gnomevfssrc->seekable = FALSE;
gnomevfssrc->icy_caps = NULL;
gnomevfssrc->iradio_mode = FALSE;
gnomevfssrc->http_callbacks_pushed = FALSE;
gnomevfssrc->iradio_name = NULL;
......@@ -329,11 +328,6 @@ gst_gnome_vfs_src_finalize (GObject * object)
g_free (src->iradio_title);
src->iradio_title = NULL;
if (src->icy_caps) {
gst_caps_unref (src->icy_caps);
src->icy_caps = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......@@ -534,9 +528,14 @@ gst_gnome_vfs_src_received_headers_callback (gconstpointer in,
/* Icecast stuff */
if (strncmp (data, "icy-metaint:", 12) == 0) { /* ugh */
if (sscanf (data + 12, "%d", &icy_metaint) == 1) {
if (icy_metaint > 0)
src->icy_caps = gst_caps_new_simple ("application/x-icy",
if (icy_metaint > 0) {
GstCaps *icy_caps;
icy_caps = gst_caps_new_simple ("application/x-icy",
"metadata-interval", G_TYPE_INT, icy_metaint, NULL);
gst_pad_set_caps (GST_BASE_SRC_PAD (src), icy_caps);
gst_caps_unref (icy_caps);
}
}
continue;
}
......@@ -633,9 +632,6 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
buf = gst_buffer_new_and_alloc (size);
if (src->icy_caps)
gst_buffer_set_caps (buf, src->icy_caps);
data = GST_BUFFER_DATA (buf);
GST_BUFFER_OFFSET (buf) = src->curoffset;
......@@ -866,10 +862,5 @@ gst_gnome_vfs_src_stop (GstBaseSrc * basesrc)
}
src->curoffset = 0;
if (src->icy_caps) {
gst_caps_unref (src->icy_caps);
src->icy_caps = NULL;
}
return TRUE;
}
......@@ -67,8 +67,6 @@ struct _GstGnomeVFSSrc
gboolean iradio_mode;
gboolean http_callbacks_pushed;
GstCaps *icy_caps;
gchar *iradio_name;
gchar *iradio_genre;
gchar *iradio_url;
......
......@@ -808,8 +808,6 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
GST_BUFFER_OFFSET (buf) = sample;
GST_BUFFER_OFFSET_END (buf) = sample + samples;
gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (bsrc)));
*outbuf = buf;
return GST_FLOW_OK;
......
......@@ -732,8 +732,5 @@ gst_v4lsrc_buffer_new (GstV4lSrc * v4lsrc, gint num)
GST_BUFFER_TIMESTAMP (buf) = timestamp;
GST_BUFFER_DURATION (buf) = duration;
/* the negotiate() method already set caps on the source pad */
gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (v4lsrc)));
return buf;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment