changeset 1510:3a252050736c

replace tuple_formatter_process_string() with tuple_formatter_make_title_string() except that for streamings.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 21 Aug 2007 17:11:59 +0900
parents 3b3fe8afc42e
children 48fcdaa29159
files src/aac/src/libmp4.c src/alac/plugin.c src/cdaudio-ng/cdaudio-ng.c src/console/Audacious_Driver.cxx src/cue/cuesheet.c src/filewriter/filewriter.c src/flacng/tools.c src/musepack/libmpc.cxx src/sexypsf/plugin.c src/sid/xs_title.c src/timidity/src/xmms-timidity.c src/vtx/vtx.c src/wav/wav.c src/wavpack/libwavpack.cxx src/wma/wma.c
diffstat 15 files changed, 16 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/aac/src/libmp4.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/aac/src/libmp4.c	Tue Aug 21 17:11:59 2007 +0900
@@ -461,7 +461,7 @@
     gchar *title;
     Tuple *tuple = mp4_get_song_tuple(filename);
 
-    title = tuple_formatter_process_string(tuple, get_gentitle_format());
+    title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 
     tuple_free(tuple);
 
--- a/src/alac/plugin.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/alac/plugin.c	Tue Aug 21 17:11:59 2007 +0900
@@ -336,7 +336,7 @@
 
     /* Get the titlestring ready. */
     ti = build_tuple_from_demux(&demux_res, (char *) args);
-    title = tuple_formatter_process_string(ti, get_gentitle_format());
+    title = tuple_formatter_make_title_string(ti, get_gentitle_format());
 
     /* initialise the sound converter */
     demux_res.alac = create_alac(demux_res.sample_size, demux_res.num_channels);
--- a/src/cdaudio-ng/cdaudio-ng.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/cdaudio-ng/cdaudio-ng.c	Tue Aug 21 17:11:59 2007 +0900
@@ -522,7 +522,7 @@
 	is_paused = FALSE;
 
 	tuple = create_tuple_from_trackinfo(pinputplayback->filename);
-	title = tuple_formatter_process_string(tuple, get_gentitle_format());
+	title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 
 	inputplugin.set_info(title, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn), 1411200, 44100, 2);
 	free(title); title = NULL;
--- a/src/console/Audacious_Driver.cxx	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/console/Audacious_Driver.cxx	Tue Aug 21 17:11:59 2007 +0900
@@ -240,7 +240,7 @@
 
 static char* format_and_free_ti( Tuple* ti, int* length )
 {
-	char* result = tuple_formatter_process_string(ti, get_gentitle_format());
+	char* result = tuple_formatter_make_title_string(ti, get_gentitle_format());
 	if ( result )
 		*length = tuple_get_int(ti, "length");
 	tuple_free((void *) ti);
--- a/src/cue/cuesheet.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/cue/cuesheet.c	Tue Aug 21 17:11:59 2007 +0900
@@ -325,7 +325,7 @@
 
 	g_return_if_fail(tuple != NULL);
 
-	*title = tuple_formatter_process_string(tuple, get_gentitle_format());
+	*title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 	*length = tuple_get_int(tuple, "length");
 
 	tuple_free(tuple);
--- a/src/filewriter/filewriter.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/filewriter/filewriter.c	Tue Aug 21 17:11:59 2007 +0900
@@ -215,7 +215,7 @@
 
     if (filenamefromtags)
     {
-        gchar *utf8 = tuple_formatter_process_string(tuple, get_gentitle_format());
+        gchar *utf8 = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 
         g_strchomp(utf8); //chop trailing ^J --yaz
 
--- a/src/flacng/tools.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/flacng/tools.c	Tue Aug 21 17:11:59 2007 +0900
@@ -284,7 +284,7 @@
 
     input = get_tuple(filename, info);
 
-    title = tuple_formatter_process_string(input, get_gentitle_format());
+    title = tuple_formatter_make_title_string(input, get_gentitle_format());
 
     tuple_free(input);
 
--- a/src/musepack/libmpc.cxx	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/musepack/libmpc.cxx	Tue Aug 21 17:11:59 2007 +0900
@@ -742,10 +742,7 @@
 {
     Tuple* tuple = mpcGetSongTuple(p_Filename);
 
-    char* title = tuple_formatter_process_string(tuple, get_gentitle_format());
-
-    if (!*title)
-        title = g_strdup(tuple_get_string(tuple, "file-name"));
+    char* title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 
     tuple_free((void *) tuple);
     return title;
--- a/src/sexypsf/plugin.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/sexypsf/plugin.c	Tue Aug 21 17:11:59 2007 +0900
@@ -251,7 +251,7 @@
     Tuple *tuple = get_tuple_psf(fn);
 
     if (tuple != NULL) {
-        title = tuple_formatter_process_string(tuple, get_gentitle_format());
+        title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
         tuple_free(tuple);
     }
     else
--- a/src/sid/xs_title.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/sid/xs_title.c	Tue Aug 21 17:11:59 2007 +0900
@@ -141,7 +141,7 @@
    if (!xs_cfg.titleOverride) {
 		t_xs_tuple *pTuple = xs_get_titletuple(
 			tmpFilename, tmpFilePath, tmpFileExt, p, subTune);
-		pcResult = tuple_formatter_process_string(pTuple, get_gentitle_format());
+		pcResult = tuple_formatter_make_title_string(pTuple, get_gentitle_format());
 		tuple_free(pTuple);
 	} else
 #elif defined(HAVE_XMMSEXTRA)
--- a/src/timidity/src/xmms-timidity.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/timidity/src/xmms-timidity.c	Tue Aug 21 17:11:59 2007 +0900
@@ -310,7 +310,7 @@
 
 	input = tuple_new_from_filename(filename);
 
-	title = tuple_formatter_process_string(input, get_gentitle_format());
+	title = tuple_formatter_make_title_string(input, get_gentitle_format());
 	if (title == NULL || *title == '\0')
 		title = g_strdup(tuple_get_string(input, "file-name"));
 
--- a/src/vtx/vtx.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/vtx/vtx.c	Tue Aug 21 17:11:59 2007 +0900
@@ -234,7 +234,7 @@
       seek_to = -1;
 
       ti = vtx_get_song_tuple_from_vtx(playback->filename, &vtx);
-      buf = tuple_formatter_process_string(ti, get_gentitle_format());
+      buf = tuple_formatter_make_title_string(ti, get_gentitle_format());
 
       vtx_ip.set_info (buf, vtx.hdr.regdata_size / 14 * 1000 / 50,
  	  	       14 * 50 * 8, freq, bits / 8);
--- a/src/wav/wav.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/wav/wav.c	Tue Aug 21 17:11:59 2007 +0900
@@ -215,7 +215,7 @@
     tuple_associate_string(tuple, "codec", "RIFF/WAV Audio (ADPCM)");
     tuple_associate_string(tuple, "quality", "lossless");
 
-    title = tuple_formatter_process_string(tuple, get_gentitle_format());
+    title = tuple_formatter_make_title_string(tuple, get_gentitle_format());
     if (*title == '\0')
     {
         g_free(title);
--- a/src/wavpack/libwavpack.cxx	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/wavpack/libwavpack.cxx	Tue Aug 21 17:11:59 2007 +0900
@@ -419,7 +419,7 @@
 
     ti = tuple_from_WavpackContext(fn, ctx);
 
-    displaytitle = tuple_formatter_process_string(ti, cfg.gentitle_format);
+    displaytitle = tuple_formatter_make_title_string(ti, cfg.gentitle_format);
     if (!displaytitle || *displaytitle == '\0')
         displaytitle = g_strdup(fn);
 
--- a/src/wma/wma.c	Tue Aug 21 15:09:22 2007 +0900
+++ b/src/wma/wma.c	Tue Aug 21 17:11:59 2007 +0900
@@ -303,7 +303,7 @@
     if (in->duration)
         tuple_associate_int(ti, "length", in->duration / 1000);
     
-    ret = tuple_formatter_process_string(ti, get_gentitle_format());
+    ret = tuple_formatter_make_title_string(ti, get_gentitle_format());
 
     return ret;
 }
@@ -324,7 +324,7 @@
         return;
 
     (*len_real) = tuple_get_int(tuple, "length");
-    (*title_real) = tuple_formatter_process_string(tuple, get_gentitle_format());
+    (*title_real) = tuple_formatter_make_title_string(tuple, get_gentitle_format());
 }
 
 static void wma_playbuff(InputPlayback *playback, int out_size)