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),
gnomevfssrc->curoffset = 0;
gnomevfssrc->seekable = FALSE;
- gnomevfssrc->icy_caps = NULL;
gnomevfssrc->iradio_mode = FALSE;
gnomevfssrc->http_callbacks_pushed = FALSE;
gnomevfssrc->iradio_name = NULL;
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);
}
/* 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;
}
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;
}
src->curoffset = 0;
- if (src->icy_caps) {
- gst_caps_unref (src->icy_caps);
- src->icy_caps = NULL;
- }
-
return TRUE;
}
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;
}