changeset 545:f9dc3d58207a trunk

[svn] - display the stream title if it's available, like in mp3 streams
author nenolod
date Thu, 25 Jan 2007 04:43:18 -0800
parents e045af8665c6
children c712bcf64b14
files ChangeLog src/vorbis/vorbis.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 25 01:39:09 2007 -0800
+++ b/ChangeLog	Thu Jan 25 04:43:18 2007 -0800
@@ -1,3 +1,13 @@
+2007-01-25 09:39:09 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1174]
+  - fix a warning
+  - as far as i can tell, fix chained streams too
+  
+  trunk/src/vorbis/fileinfo.c |    2 +-
+  trunk/src/vorbis/vorbis.c   |   12 ++++++------
+  2 files changed, 7 insertions(+), 7 deletions(-)
+
+
 2007-01-24 04:19:01 +0000  Daniel Barkalow <barkalow@iabervon.org>
   revision [1172]
   Support for writing downloaded data to a file (no UI provided yet).
--- a/src/vorbis/vorbis.c	Thu Jan 25 01:39:09 2007 -0800
+++ b/src/vorbis/vorbis.c	Thu Jan 25 04:43:18 2007 -0800
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) Tony Arcieri <bascule@inferno.tusculum.edu>
  * Copyright (C) 2001-2002  Haavard Kvaalen <havardk@xmms.org>
+ * Copyright (C) 2007 William Pitcock <nenolod@sacredspiral.co.uk>
  *
  * ReplayGain processing Copyright (C) 2002 Gian-Carlo Pascutto <gcp@sjeng.org>
  *
@@ -847,6 +848,7 @@
     /* Caller should hold vf_mutex */
     gchar *displaytitle = NULL;
     TitleInput *input;
+    gchar *tmp;
 
     input = get_tuple_for_vorbisfile(vorbisfile, filename, vorbis_is_streaming);
 
@@ -857,6 +859,15 @@
         displaytitle = g_strdup(input->file_name);
     }
 
+    if ((tmp = vfs_get_metadata((VFSFile *) vorbisfile->datasource, "stream-name")) != NULL)
+    {
+        gchar *old = displaytitle;
+        displaytitle = g_strdup_printf("%s (%s)", displaytitle, tmp);
+
+	g_free(old);
+	g_free(tmp);
+    }
+
     bmp_title_input_free(input);
 
     return displaytitle;