[MPlayer-dev-eng] Re: Is it possible to compile mplayer/mencoder as a lib called by other applications?

Bryan Wilkerson bryanwilkerson at yahoo.com
Thu Jun 16 17:08:49 CEST 2005


--- Guillaume POIRIER <poirierg at gmail.com> wrote:
> I
> > have therefore starting working on a patch to
> provide
> > a lib interface.  I have a version that works on
> > Linux, but not Windows (I swore off Windows a few
> > years ago:)).
> 
> Is it available somewhere? How advanced is it?
> 

It's pretty simple right now in terms of the
interface.  Basically you can have a single "instance"
initialized at a time per process, play one file at a
time with play, pause, stop and seek control. 
Callbacks are provided for percent completion and eof.
 No playlist support and EDL is not currently
supported.  The assumption there is that the
application using the lib should and will want to be
responsible for the playlist.  

Attached is the header file.

I have done a bit of testing of it and verified no
crashes or memory leaks (other than the one I posted a
patch for yesterday).  Performance is comparable to
mplayer.exe.

I was going to lurk for a while and get a feel for the
group instead of barging on the scene.  I also wanted
to use it a bit more in the app I'm working on to make
sure all of the corner cases are covered.  

I've also been toying with the idea of multiple
"instances" which would allow apps to play/edit
multiple files simultaneously.  As you can imagine,
that would change the interface, as each call would
require a handle/pointer that mplayer_initialize would
return.  

I'll post the patch for what I have so far this
afternoon.  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmplayer.h
Type: text/x-chdr
Size: 4667 bytes
Desc: 2655891282-libmplayer.h
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050616/6bf2b42f/attachment.h>


More information about the MPlayer-dev-eng mailing list