changeset 989:84bef123b22e trunk

[svn] - provide full metadata from the file's tuple when performing the transcode
author nenolod
date Mon, 30 Apr 2007 22:03:19 -0700
parents 1d25b3513a17
children 238055a6cb8f
files ChangeLog src/filewriter/vorbis.c
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 30 21:57:35 2007 -0700
+++ b/ChangeLog	Mon Apr 30 22:03:19 2007 -0700
@@ -1,3 +1,12 @@
+2007-05-01 04:57:35 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [2116]
+  - add configure interface
+  - default to -q5 as recommended by Xiph and hydrogenaudio.com
+  
+  trunk/src/filewriter/vorbis.c |   89 +++++++++++++++++++++++++++++++++++++++++-
+  1 file changed, 87 insertions(+), 2 deletions(-)
+
+
 2007-05-01 04:19:47 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [2114]
   - add check for cfg.stopaftersong at the end of cue.
--- a/src/filewriter/vorbis.c	Mon Apr 30 21:57:35 2007 -0700
+++ b/src/filewriter/vorbis.c	Mon Apr 30 22:03:19 2007 -0700
@@ -84,10 +84,28 @@
 
     if (tuple)
     {
+        gchar *scratch;
+
         vorbis_comment_add_tag(&vc, "title", tuple->track_name);
         vorbis_comment_add_tag(&vc, "artist", tuple->performer);
         vorbis_comment_add_tag(&vc, "album", tuple->album_name);
         vorbis_comment_add_tag(&vc, "genre", tuple->genre);
+        vorbis_comment_add_tag(&vc, "date", tuple->date);
+        vorbis_comment_add_tag(&vc, "comment", tuple->comment);
+
+        if (tuple->track_number)
+        {
+            scratch = g_strdup_printf("%d", tuple->track_number);
+            vorbis_comment_add_tag(&vc, "tracknumber", scratch);
+            g_free(scratch);
+        }
+
+        if (tuple->year)
+        {
+            scratch = g_strdup_printf("%d", tuple->year);
+            vorbis_comment_add_tag(&vc, "year", scratch);
+            g_free(scratch);
+        }
     }
 
     if ((result = vorbis_encode_init_vbr(&vi, (long)input.channels, (long)input.frequency, v_base_quality)) != 0)