[MPlayer-dev-eng] c++ version of mplayer.c

Jan Volf javol at volny.cz
Tue Feb 15 18:09:09 CET 2005


On 15.2.2005, at 12:25, Martin Drab wrote:
>
> I'm not opposed to this. But how would this interface look like? It 
> would
> be nice if mplayer wouldn't have to be binarily integrated into each of
> its GUIs that would be installed on the system. Pipes are a good way of
> separation. You may have as many different GUIs as you want and just 
> one
> MPlayer for them, which could also be used completely without the GUIs
> (kind of like cdrecord for instance).

IMHO if nothing then the separation of the low level and high level 
code and dividing the main function in to more functions or even in to 
more files would definitely helps better orientation in code and 
further mplayer development. Now If one wants to edit main function 
code, it requires much greater knowledge than is really needed.
With the interface I meant simple interface composed of functions for 
opening, closing and playing opened movie and everything else would be 
handled through parameter accessor functions, to keep inner player 
structure hidden like in OOP. This should be the only interface and 
every UI (even CLI and slave mode) should use it. The slave mode still 
can be used for easy creation of GUI, but if anyone wants more control 
over the player he can just link his code against that interface and 
the work is done. You can think of it like mplayer library.

C++ is not needed for this purpose though. Otherwise I prefer OO 
programing but this can be effectively done in plain C with almost the 
same overhead.

Regards,
Jan Volf
MPlayer OS X developer




More information about the MPlayer-dev-eng mailing list