[MPlayer-dev-eng] [PATCH 11/11] MPlayer <-> GeeXboX patches port : Single binary
Oded Shimon
ods15 at ods15.dyndns.org
Fri Feb 24 16:52:27 CET 2006
On Fri, Feb 24, 2006 at 04:33:42PM +0100, Benjamin Zores wrote:
>
> Final patch isn't really a patch (or repost) but a question.
>
> I've sent to this list some times ago (nearly 6 month) a patch for having MPlayer and MEncoder
> sharing a part of their code (mainly global variables) which resulted in having MPlayer and MEncoder being a shared single and unified binary to avoid code duplication.
>
> Is someone still interested in it ?
> >From what I remind, the patch wasn't rejected but we were stuck with the "howto start mencoder from Windows" problem (as mencoder only was a link to mplayer, as gmplayer is).
>
> So if we fix the Windows problem (suggestions welcomed), I might be able to port it to CVS
> and split it to small parts to be appliable pieces by pieces.
my idea is
int main(int argc, char * argv[]) {
if (strlen(argv[0]) > 8 && !strcmp(argv[0] + strlen(argv[0])-8, "mencoder")) {
return mencoder_main(argc, argv);
}
if (argc > 1 && !strcmp(argv[0], "-mencoder")) {
argv++;
argc--;
return mencoder_main(argc, argv);
}
return mplayer_main(argc, argv);
}
mencoder.bat => "mplayer -mencoder"
or whatever is necessary to pass all params.
There are some disadvantages to single binary though.. Increased binary
size, library dependencies. Some things behave and compile differently for
mencoder and for mplayer, tv:// and mp_msg come to mind...
- ods15
More information about the MPlayer-dev-eng
mailing list