[MPlayer-dev-eng] Having MPlayer and Mencoder in a single binary.

Benjamin Zores ben at tutuxclan.org
Tue Jun 21 22:15:21 CEST 2005


Hi there,

I recently did a patch for the GeeXboX project to have a single binary
for both MPlayer and MEncoder (it was required as we try to keep it looks as an
embedded system and adding 2 binaries that share 95% of common code
wasn't acceptable).

So I was wondering if somebody out there would be interested in such a patch.
Which also makes me wonder what's the use of having 2 binaries for MPlayer and
MEncoder.

On my debian system, having a single binary takes 200k more than just having a
regular standalone MPlayer binary.

The patch I did is for pre7 and probably won't apply to main (mainly due to latest
"patch-friendly" rework of Makefiles) so I'd rather ask for someone's interest before
porting it and sending it to this list.

The patch I did just adds a --enable-standalone option to configure to determine whether
to build programs in a single binary or not.

It then wraps mplayer's and mencoder's main() to a shared main() which determine
which submain to be started according to the argv[0] used to launch the binary.
The big deal is that, as mplayer and mencoder use a lot of global vars that are
defined twice when building a single binary, there's a bunch of #ifdef to
declare half of them as extern to build well.

So please let me know what to do with this patch :
- update for main tree, keeping #ifdef
- not usefull at all for you, so we'll keep it for geexbox anyway and I'll drop it there
- rework the patch to always produce a single binary in any case and so change mplayer's
behaviour one for all.

I bet the latest won't make the unanimity but why not after all ;-)

The only goal afterall is to have both mplayer and mencoder on systems where space matters.

Ben




More information about the MPlayer-dev-eng mailing list