summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-05-20 11:13:27 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-05-20 11:13:27 +0000
commitd8dc371c0da3f00a53acf0559f4fe4d060893515 (patch)
tree01e343fc1ea3d89db5b4f318842f03bf7640fbe8
parent95d162fb71a515caa822e5101ddfa96b40288ad5 (diff)
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.
-rw-r--r--ChangeLog15
-rw-r--r--ext/gnomevfs/gstgnomevfssrc.c23
-rw-r--r--ext/gnomevfs/gstgnomevfssrc.h2
-rw-r--r--gst-libs/gst/audio/gstbaseaudiosrc.c2
-rw-r--r--sys/v4l/v4lsrc_calls.c3
5 files changed, 22 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index aa781c7a..e2de9385 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
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:
(gst_base_audio_sink_resample_slaving),
(gst_base_audio_sink_skew_slaving),
diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c
index fb60c374..3242f653 100644
--- a/ext/gnomevfs/gstgnomevfssrc.c
+++ b/ext/gnomevfs/gstgnomevfssrc.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;
}
diff --git a/ext/gnomevfs/gstgnomevfssrc.h b/ext/gnomevfs/gstgnomevfssrc.h
index 8c37fe8d..31c1f65c 100644
--- a/ext/gnomevfs/gstgnomevfssrc.h
+++ b/ext/gnomevfs/gstgnomevfssrc.h
@@ -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;
diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c
index 4b7c55fe..a152739d 100644
--- a/gst-libs/gst/audio/gstbaseaudiosrc.c
+++ b/gst-libs/gst/audio/gstbaseaudiosrc.c
@@ -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;
diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c
index c14ee123..9ba25581 100644
--- a/sys/v4l/v4lsrc_calls.c
+++ b/sys/v4l/v4lsrc_calls.c
@@ -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;
}