Mercurial > audlegacy-plugins
diff src/vorbis/vorbis.c @ 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 |
line wrap: on
line diff
--- 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;