Commit 660d9586 authored by Benjamin Kampmann's avatar Benjamin Kampmann Committed by Tim-Philipp Müller

ext/cdio/: Also extract album title and album genre from CD-TEXT if available (#537021).

Original commit message from CVS:
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).
parent 0f2d2752
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>
......
......@@ -74,6 +74,24 @@ gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track)
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)
{
......
......@@ -38,5 +38,9 @@ GstTagList * gst_cdio_get_cdtext (GstObject * src,
CdIo * cdio,
track_t track);
void gst_cdio_add_cdtext_album_tags (GstObject * src,
CdIo * cdio,
GstTagList * tags);
#endif /* __GST_CDIO_H__ */
......@@ -248,6 +248,9 @@ gst_cdio_cdda_src_open (GstCddaBaseSrc * cddabasesrc, const gchar * device)
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) {
......
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