Skip to content

Support --drawable-hwnd on Windows, like -xid on Linux/X11

I briefly discussed this topic on #videolan and as no-one claimed to be sure if this could be done I said I'll come back after testing it out. The open question was whether or not handles (hwnd) are valid across processes.

I found out that handles are unique and do not require special permissions on a normal desktop (win7). This operation is available on Windows 2000 upwards:

Win32 API (user32.dll) defines methods to reparent a window under a new parent, which is almost what --drawable-xid establishes. Reparenting is made through SetParent(HWND,HWND)

The first implementation would allow the same behaviour as does "vlc -I dummy --drawable-xid <the-xid> moviefile.avi".

Later on better integration being able to configure the --drawable-xid or --drawable-hwnd through the -I rc interface while not playing, to avoid starting a process per movie.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information