DeaDBeeF 0.5.6 + DeaDBeeF-MPRIS-plugin + OSD Lyrics 完美显示歌词 » 荒野无灯weblog

Keep It Simple, Stupid.

荒野无灯weblog

DeaDBeeF 0.5.6 + DeaDBeeF-MPRIS-plugin + OSD Lyrics 完美显示歌词

1. DeaDBeeF-MPRIS-plugin 非线程安全的问题

OSD Lyrics 这个歌词显示程序已经有一段时间没有用上了。 原因是DeaDBeeF-MPRIS-plugin 使用的dbus库(glib-dbus)是非线程安全的,并且,和DeaDBeeF所要使用的gtkui库有冲突。 见: http://code.google.com/p/deadbeef-mpris-plugin/issues/detail?id=11

glib-dbus is not threadsafe, and will crash deadbeef 0.5.5 on startup What steps will reproduce the problem? run deadbeef 0.5.5 with the mpris plugin What is the expected output? What do you see instead? deadbeef looses X server connection on startup, or crashes in glib-dbus calls. What version of the product are you using? On what operating system? deadbeef 0.5.5 with gtkui, any version of mpris.so Please provide any additional information below. glib-dbus is not thread-safe, and conflicts with gtkui, which is now using dbus for session manager interaction (via eggsmclient). this thread has more information: http://comments.gmane.org/gmane.comp.freedesktop.dbus/14013 recommended solution is to use GDBus instead of glib-dbus, or use libdbus directly. that was the main reason why glib was highly not recommended to use in deadbeef plugins (i had the same problems with glib-dbus while developing libnotify plugin, which is why i had to rewrite it using libdbus directly instead of libnotify).

不过ArchLinux用户对此问题无需担心。AUR上已经有人提交patch了: http://kode54.net/deadbeef-MPRIS-plugin-2.1.5-glibfix.patch.gz

还有是DeaDBeeF显示中文的问题,我看到在0.5.6版中作者已经解决了。因此,不用打我之前写的那个patch了。

另外,编译这个插件时,还会碰到一个 g_type_init() is deprecated的问题。 由于 g_type_init is deprecated after 2.36 ,因此,加个宏判断就是了。

#if GLIB_VERSION_CUR_STABLE < GLIB_VERSION_2_36
    /* g_type_init is deprecated after 2.36 */
    g_type_init();
#endif

打好补丁的文件在: http://git.ihacklog.com/repo/DeaDBeeF-MPRIS-plugin.git/ 直接 git clone git://ihacklog.com/DeaDBeeF-MPRIS-plugin.git 吧。

2. DeaDBeeF显示中文的问题

DeaDBeeF的作者给junklib.c 加了一个canbe_chinese的函数来判断中文。 不过默认是没有启用中文检测的,需要修改junklib.c把检测中文开启。然后再编译。

3. osdlyrics 编译时ol_singleton.c:34:1: error: unknown type name ‘int64_t’错误的问题

修改src/ol_singleton.c b/src/ol_singleton.c ,加上

#include 

即可。 adding #include in ol_singleton.c fixes this compilation error. i am not sure if this header file is portable among systems. @see https://code.google.com/p/osd-lyrics/issues/detail?id=301

修改好了的: git clone git://ihacklog.com/osdlyrics.git

Tagged in : Deadbeef,MPRIS,OSD Lyrics

All Comments (0)
Gravatar image
No Comments