[MPlayer-dev-eng] new gui

Joey Parrish joey at nicewarrior.org
Fri Dec 23 15:10:57 CET 2005


Timothy Lee wrote:

>>>3. There should be a possibility to output mplayers video to GUI
>>>specified window or view. This is a bit tricky and overlay might not
>>>work on all OSes. This allows GUI to do the necessary mouse and
>>>keyboard event handling instead of mplayer. As long as I know Nicolas
>>>Plourde have done this for Mplayer's binary for OS X in vo_macosx
>>>using shared buffer.
>>>
>>
>>You can use -wid to embed mplayer into a subwindow of your application
>>(for example a GtkSocket, if you use gtk+), but this is X11-specific,
>>and I imagine it doesn't work on Win32. (Just an educated guess.) With
>>your own window, you can handle mouse and keyboard events.
>>
>>
>Actually the -wid feature works quite well on win32.

Yeah, for example, if I want to embed mplayer in my app with window ID
0xdeadbeef at 320x240 at offset 100,150 from the window corner, I say
(IIRC):
mplayer -wid 0xdeadbeef -geometry 320x240+100+150 -colorkey 0xff00ff
And the magenta rectangle in my host window is replaced with mplayer.
Other colorkeys can be used to make the GUI host app less ugly. (If
MPlayer dies, I don't want a big nasty magenta rectangle on the screen.)

--Joey




More information about the MPlayer-dev-eng mailing list