[MPlayer-users] Is -wid option supported on Mac OS X for any video output?

Stefano Pigozzi stefano.pigozzi at gmail.com
Mon Dec 8 16:46:43 CET 2014

On Mon, Dec 8, 2014 at 4:20 PM, Anton Sviridenko
<anton at corp.bluecherry.net> wrote:

> Stefano, thanks for useful hints. Is there some more detailed
> documentation (than man 1 mplayer) about shared memory interface with
> corevideo? How should I get frame size, pixel format, etc? From
> mplayer stdout?
> Or some code that can be looked at? Does MPlayer OSX Extended or
> MPlayerX use this way of presenting video?

Both use it and both are open source, so you can take a peek at their
sources to see two client implementations. Image metadata (height,
witdh) and frame "timing" is done through an Objective-C NSConnection
conforming to the protocol MPlayerOSXVOProto (defined in
libvo/vo_corevideo.h). This is like the OS X version of remote
objects... I am not even sure if the latency on NSConnection is low
enough for correct timing (afaik Apple recommends xpc or mach ports
for low latency stuff).

I don't think this stuff is documented anywhere, but vo_corevideo.m is
quite small and the source is not overly complicated. If you go the
sharedbuffer way actually take a look at Don Melton's MPlayerShell for
an example. That's actually a very good mplayer client implementation
(smaller codebase and better organized).

More information about the MPlayer-users mailing list