Hi. If mplayer is compiled with support of the xmms library, it looks for plugins itself. That is done in libmpdemux/demux_xmms.c, function init_plugins. The function explores the directory XMMS_INPUT_PLUGIN_DIR, which will be something like /usr/lib/xmms/Input. The problem is that xmms plugins can live in ~/.xmms/Plugins too. It is especially necessary for people who do not have write privileges in the global plugin directory. The attached patch adds probing of this directory. Regards, -- Nicolas George
On Monday 19 February 2007 16:21, Nicolas George wrote:
Hi.
If mplayer is compiled with support of the xmms library, it looks for plugins itself. That is done in libmpdemux/demux_xmms.c, function init_plugins. The function explores the directory XMMS_INPUT_PLUGIN_DIR, which will be something like /usr/lib/xmms/Input.
The problem is that xmms plugins can live in ~/.xmms/Plugins too. It is especially necessary for people who do not have write privileges in the global plugin directory.
The attached patch adds probing of this directory.
Please send patches to mplayer-dev-eng. They'll get a wider audience and patches are supposed to be posted there.
+static void init_plugins(){ + DIR *dir; + struct dirent *ent;
These are unnecessary.
+ char *home; +
Stray spaces.
+ no_plugins=0; + + init_plugins_from_dir(XMMS_INPUT_PLUGIN_DIR); + home = getenv("HOME"); + if(home != NULL) { + char xmms_home[strlen(home) + 15]; + sprintf(xmms_home, "%s/.xmms/Plugins", home); + init_plugins_from_dir(xmms_home); + } +}
Perhaps ~/.xmms/Plugins should be probed first so users can override (old/buggy) system wide versions of the same plugin? --Ivo
Le primidi 1er ventôse, an CCXV, Ivo a écrit :
Please send patches to mplayer-dev-eng. They'll get a wider audience and patches are supposed to be posted there.
I thought I did; I must have slipped when choosing the address. Sorry. I will re-post an updated version of the patch to the correct list. Thanks for your remarks. You sure have an eye for these details. Regards, -- Nicolas George
participants (2)
-
Ivo -
Nicolas George