+2008-06-09 Tim-Philipp Müller <tim.muller at collabora co uk>
+
+ Patch by: Benjamin Kampmann <benjamin at fluendo dot com>
+
+ * ext/cdio/gstcdio.c: (gst_cdio_get_cdtext),
+ (gst_cdio_add_cdtext_album_tags):
+ * ext/cdio/gstcdio.h:
+ * ext/cdio/gstcdiocddasrc.c: (gst_cdio_cdda_src_open):
+ Also extract album title and album genre from CD-TEXT if
+ available (#537021).
+
2008-06-09 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Sjoerd Simons <sjoerd at luon dot net>
return tags;
}
+void
+gst_cdio_add_cdtext_album_tags (GstObject * src, CdIo * cdio, GstTagList * tags)
+{
+ cdtext_t *t;
+
+ t = cdio_get_cdtext (cdio, 0);
+ if (t == NULL) {
+ GST_DEBUG_OBJECT (src, "no CD-TEXT for album %u");
+ return;
+ }
+
+ /* FIXME: map CDTEXT_PERFORMER to GST_TAG_ALBUM_ARTIST once we have that */
+ gst_cdio_add_cdtext_field (src, t, CDTEXT_TITLE, GST_TAG_ALBUM, &tags);
+ gst_cdio_add_cdtext_field (src, t, CDTEXT_GENRE, GST_TAG_GENRE, &tags);
+
+ GST_DEBUG ("CD-TEXT album tags: %" GST_PTR_FORMAT, tags);
+}
+
static void
gst_cdio_log_handler (cdio_log_level_t level, const char *msg)
{
CdIo * cdio,
track_t track);
+void gst_cdio_add_cdtext_album_tags (GstObject * src,
+ CdIo * cdio,
+ GstTagList * tags);
+
#endif /* __GST_CDIO_H__ */
if (src->read_speed != -1)
cdio_set_speed (src->cdio, src->read_speed);
+ gst_cdio_add_cdtext_album_tags (GST_OBJECT_CAST (src), src->cdio,
+ cddabasesrc->tags);
+
GST_LOG_OBJECT (src, "%u tracks, first track: %d", num_tracks, first_track);
for (i = 0; i < num_tracks; ++i) {