[MPlayer-dev-eng] [PATCH] vo_macosx: option to set shared buffer name to allow multiple instances

Adrian Stutz adrian at sttz.ch
Tue Dec 9 14:46:38 CET 2008


Hello,

If vo_macosx is used with shared_buffer, the current implementation uses a
fixed name ("mplayerosx") for the shared memory as well as the NSConnection
used to talk to the GUI frontend.

If two instances of the GUI are opened this way, the two will conflict and
the video will play in the first GUI instance regardless of which instance
the video was opened with.

This patch adds a command-line option to set the name of the shared memory
as well as the NSConnection to allow multiple instances to live alongside
happily.

Since I had to touch the suboption parsing, I also exchanged vo_macosx's
custom parsing with subopt_parse based on how vo_gl implements it. I can
split this in two patches if needed.

examples:
"mplayer -vo macosx:buffer_name=myuniquename"
"mplayer -vo macosx:shared_buffer:buffer_name=myuniquename"
"mplayer -vo macosx:shared_buffer"

Greetings
Adrian



More information about the MPlayer-dev-eng mailing list