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

elupus elupus at ecce.se
Thu Jun 16 19:29:15 CEST 2005


Well, as I'm the maintainer of that dll (or atleast one of them) maybe I
should pitch in. 

It is as it looks a dll of mplayer, wich technically could work just fine in
any other app (if you remove some of the xbox specific hacks). One problem I
suppose is that there were never any point in trying to make multiple
instances of it work. 

Changes that are made are actually pretty few. 

Main has been splitted into two functions, one that handles initialization
and one the main process loop (called on each loop from xbmc). Needed to be
able to avoid threading issues when software wants to change some setting in
mplayer. 

Most variables in main have been made global (yes huge namespace clutter),
to handle the above separation.

A few functions have been created for switching settings or getting
information from the dll, (all very specific to our needs).

Internal renderers have been disabled, and are replaced by populating a
vo/ao device struct from xbmc instead, so the renderers are inside xbmc. 

Some specific mingw headers are used on compile to get full largefile
support/use proper sizes for types as specifed by our dllloader and xbox
sdk. 

So none of the changes really change much of how mplayer works structually,
and technically there is no huge problem in getting it working as a dll. The
main challenge is really the interface to the player (slave commands are
abit too complicated really when return values are concerned). 

Regards
elupus


-----Original Message-----
From: Robert Ramiega [mailto:jedi at plukwa.net] 
Sent: den 16 juni 2005 18:10
To: mplayer-dev-eng at mplayerhq.hu
Subject: Re: [MPlayer-dev-eng] Re: Is it possible to compile
mplayer/mencoderas a lib called by other applications?

On Thu, Jun 16, 2005 at 11:34:19AM -0400, Rich Felker wrote:
> On Thu, Jun 16, 2005 at 08:08:49AM -0700, Bryan Wilkerson wrote:
> > 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.
> 
> Good luck.. MPlayer is full of global vars and crap that's not 
> reentrant/multiple instance safe. Fixing this is basically a complete 
> rewrite.
 Looks like someone had all the luck.
 I'm Xbox owner and almost only reason i bought it (at least the second one)
is cute app called Xbox Media Center (www.xboxmediacenter.de).
 It's not running windows but it's os is (from what i know) based on W2k and
for sure it uses mplayer turned into dll:
XBMC\system\players\mplayer\mplayer.dll - 5 189KB

 Here is a link to it's CVS repository:
http://cvs.sourceforge.net/viewcvs.py/xbmc/mplayer/

 I might be talking b*sh*t but well it's a DLL and i know next to nothing
about windows or xbox api

-- 
Just a friendly Jedi Knight     | I find your lack of faith
Robert Ramiega jedi at plukwa.net  | disturbing







More information about the MPlayer-dev-eng mailing list