[Xfce4-commits] <parole:master> Use taglib when compiled to get the media title and display it in the list instead of waiting for a tag message from gst to change the display name while playing.

Ali Abdallah noreply at xfce.org
Sun Nov 8 15:26:01 CET 2009


Updating branch refs/heads/master
         to 13fb294d4043332815178dbc793a0945a8590677 (commit)
       from 69df5bb79b9f889e4acd0e32bcf4d1077861927a (commit)

commit 13fb294d4043332815178dbc793a0945a8590677
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Sun Nov 8 14:43:37 2009 +0100

    Use taglib when compiled to get the media title and display it in
    the list instead of waiting for a tag message from gst to change
    the display name while playing.

 NEWS                 |    6 +++++-
 TODO                 |    5 ++---
 configure.ac.in      |    6 +++---
 parole/Makefile.am   |    6 ++++--
 parole/parole-file.c |   32 ++++++++++++++++++++++++++++++++
 5 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/NEWS b/NEWS
index 5718b3a..c3bc253 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,10 @@
 1.91
 ====
-Don't runref the vis plugin as playbin will remove it on exit (bug #5830).
+- Don't runref the vis plugin as playbin will remove it on exit (bug #5830).
+- Fix settings dialog displayes in english when locales aren't english (bug #5829).
+- Don't reset XScreenSaver bit when playing audio file, (problem was in the order of calls).
+- Fix some untranslatable strings (bug #5827).
+- Fix desktop file Application Type typo. (Type=Application instead if Type=Application;).
 
 1.90
 ====
diff --git a/TODO b/TODO
index 0b4dcff..c13d24b 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,7 @@
 === Media player ===
-* Complete the shortcut keys.
-* Handle missing gstreamer plugins.
-* Support scale ratio view.
 * Support some playlist title entity.
+* Support scale ratio view.
+* Handle missing gstreamer plugins.
 * ...
 
 === Plugins === 
diff --git a/configure.ac.in b/configure.ac.in
index 5c5f1ee..6b8664f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -3,9 +3,9 @@ m4_define([parole_verinfo],  [0:2:0])
 m4_define([parole_version_api],  [0])
 m4_define([parole_version_major],  [0])
 m4_define([parole_version_minor],  [1])
-m4_define([parole_version_micro],  [90])
-m4_define([parole_version_build],  [])
-m4_define([parole_version_tag], [])
+m4_define([parole_version_micro],  [91])
+m4_define([parole_version_build],  [@REVISION@])
+m4_define([parole_version_tag], [git])
 m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
 
 AC_INIT([parole], [parole_version], [aliov at xfce.org])
diff --git a/parole/Makefile.am b/parole/Makefile.am
index 7e8d5da..f99ace4 100644
--- a/parole/Makefile.am
+++ b/parole/Makefile.am
@@ -15,7 +15,8 @@ INCLUDES =					\
         $(DBUS_GLIB_CFLAGS)                     \
         $(LIBXFCE4GUI_CFLAGS)                   \
 	$(GST_VIDEO_CFLAGS)			\
-	$(GST_INTERFACES_CFLAGS)
+	$(GST_INTERFACES_CFLAGS)		\
+	$(TAGLIBC_CFLAGS)
 
 PAROLE_LDFLAGS =				\
 	-export-dynamic 			\
@@ -28,7 +29,8 @@ PAROLE_LIBS = 					\
         $(DBUS_GLIB_LIBS)                       \
         $(LIBXFCE4GUI_LIBS)                     \
 	$(GST_VIDEO_LIBS)			\
-	$(GST_INTERFACES_LIBS)
+	$(GST_INTERFACES_LIBS)			\
+	$(TAGLIBC_LIBS)
 
 GENERATED_FILES =				\
 	gmarshal.c				\
diff --git a/parole/parole-file.c b/parole/parole-file.c
index 1e2bfe3..23f39b6 100644
--- a/parole/parole-file.c
+++ b/parole/parole-file.c
@@ -29,6 +29,10 @@
 #include <glib.h>
 #include <gio/gio.h>
 
+#ifdef HAVE_TAGLIBC
+#include <taglib/tag_c.h>
+#endif
+
 #include "parole-file.h"
 
 #define PAROLE_FILE_GET_PRIVATE(o) \
@@ -166,6 +170,34 @@ parole_file_constructed (GObject *object)
 	}
 	goto out;
     }
+#ifdef HAVE_TAGLIBC
+    else
+    {
+	TagLib_File *tag_file;
+	TagLib_Tag *tag;
+	gchar *title;
+	gchar *title_s;
+	
+	tag_file = taglib_file_new (priv->filename);
+	
+	tag = taglib_file_tag (tag_file);
+	
+	title = taglib_tag_title (tag);
+	
+	if ( title )
+	{
+	    title_s = g_strstrip (title);
+	    if ( strlen (title_s ) )
+	    {
+		priv->display_name = g_strdup (title_s);
+	    }
+	}
+	    
+	taglib_file_free (tag_file);
+	
+	taglib_tag_free_strings ();
+    }
+#endif
 
     if (!priv->display_name)
 	priv->display_name = g_strdup (g_file_info_get_display_name (info));



More information about the Xfce4-commits mailing list