summaryrefslogtreecommitdiffstats
path: root/ext/taglib
diff options
context:
space:
mode:
authorAlex Lancaster <alexlan@fedoraproject.org>2006-03-11 10:58:08 +0000
committerChristophe Fergeau <teuf@gnome.org>2006-03-11 10:58:08 +0000
commita1b0d326a7f4ef4287d77b6565df7841a6d091b4 (patch)
tree6b08402cc0359dad6a60c83c924b3d70a630f667 /ext/taglib
parentca11b12b62a757a7dd7f068dfa686b9e525e7926 (diff)
downloadgst-plugins-bad-a1b0d326a7f4ef4287d77b6565df7841a6d091b4.tar.gz
gst-plugins-bad-a1b0d326a7f4ef4287d77b6565df7841a6d091b4.tar.bz2
gst-plugins-bad-a1b0d326a7f4ef4287d77b6565df7841a6d091b4.zip
ext/taglib/gsttaglib.cc: and add support for TCOP (copyright)
Original commit message from CVS: 2006-03-11 Christophe Fergeau <teuf@gnome.org> Patch by: Alex Lancaster * ext/taglib/gsttaglib.cc: fix writing of TPOS tags (album number), and add support for TCOP (copyright)
Diffstat (limited to 'ext/taglib')
-rw-r--r--ext/taglib/gsttaglib.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/ext/taglib/gsttaglib.cc b/ext/taglib/gsttaglib.cc
index 2a86c6a7..781c64da 100644
--- a/ext/taglib/gsttaglib.cc
+++ b/ext/taglib/gsttaglib.cc
@@ -246,7 +246,7 @@ add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data)
ID3v2::TextIdentificationFrame * frame;
- frame = new ID3v2::TextIdentificationFrame ("TRCK", String::UTF8);
+ frame = new ID3v2::TextIdentificationFrame ("TPOS", String::UTF8);
result = gst_tag_list_get_uint_index (list, GST_TAG_ALBUM_VOLUME_COUNT,
0, &volume_count);
if (result) {
@@ -258,7 +258,22 @@ add_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data)
id3v2tag->addFrame (frame);
frame->setText (tag_str);
g_free (tag_str);
- GST_DEBUG ("Setting track number to %s", tag_str);
+ GST_DEBUG ("Setting album number to %s", tag_str);
+ }
+ } else if (strcmp (tag, GST_TAG_COPYRIGHT) == 0) {
+ gchar *copyright;
+
+ result = gst_tag_list_get_string_index (list, tag, 0, &copyright);
+
+ if (result != FALSE) {
+ ID3v2::TextIdentificationFrame * frame;
+
+ frame = new ID3v2::TextIdentificationFrame ("TCOP", String::UTF8);
+
+ id3v2tag->addFrame (frame);
+ frame->setText (copyright);
+ g_free (copyright);
+ GST_DEBUG ("Setting copyright to %s", copyright);
}
} else {
GST_WARNING ("Unsupported tag: %s", tag);