[MPlayer-users] Is -wid option supported on Mac OS X for any video output?
Stefano Pigozzi
stefano.pigozzi at gmail.com
Mon Dec 8 09:18:32 CET 2014
On Mon, Dec 8, 2014 at 12:14 AM, Anton Sviridenko
<anton at corp.bluecherry.net> wrote:
> but setting "-vo gl" does not help on OS X, video is played in its own
> separate window instead of application window.
> I've built mplayer on os x from latest svn trunk and enabled opengl
> output explicitly, stdout and stderr output from mplayer process shows
> that "gl" driver is used, but there is no any error about unsupported
> "-wid" option or something else.
Hello Anton,
mplayer doesn't support embedding NSView's with slave mode simply
because OS X doesn't allow to share a view with another process.
mplayer embedding on OS X generally uses --vo=corevideo and the
shared_buffer sub option, this will copy image data to some mmapped
memory that you can read from your GUI. You are then completely
responsible to present this data on screen (both MPlayer OSX Extended
and MPlayerX use corevideo for presenting the final image to screen).
It's a bit of a makeshift solution but software that's very popular
uses it and works well enough.
If you need something that would work using the same API on OSX,
X11/Linux and Windows, you could try libmpv (it's a fork/derivate of
mplayer). You link to it like you would any library, and it runs the
mpv core in a separate thread (so --wid is implemented on OS X as
well). Keep in mind that being a GPLv2 library your software must be
compatible with that license if you plan to release it to the public.
More information about the MPlayer-users
mailing list