[MEncoder-users] [PATCH] xmms plugins in ~
Ivo
ivop at euronet.nl
Mon Feb 19 17:14:22 CET 2007
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
More information about the MEncoder-users
mailing list