[vlc-devel] [RFC PATCH] drawable-hwnd command line parameter

Joonas Koivunen joonas.koivunen at gmail.com
Mon Apr 11 13:17:52 CEST 2011

Hi everyone,

We'd like to be able to embed vlc under win32 like it's already
possible using --drawable-xid (video_output/xcb/window.c) in
Linux/X11. For this reason I created issue #4655 on trac.videolan.org
and managed to finally get a proof-of-concept patch done.

My patch adds a simple new module that defines the parameter
--drawable-hwnd and with higher priority than drawable.c offers the
non-zero value as capability "vout window hwnd" as requested by
video_output/msw/events.c:515 DirectXCreateWindow (AFAIK used by both
directx.c and direct3d.c).

I'm no C programmer, so getting a quality patch for this is going to
take a indeterminable time. From what I've understood it might be
better to rewrite video_output/drawable.c to support this
functionality? Could this functionality perhaps be added in the
current http://wiki.videolan.org/VoutRework ?

Attached patch is a proof-of-concept against todays vlc/vlc-1.1.git.
I'm concerned that it might break for example qt4 interface as the
used name is the same as drawable.c's. Proof-of-concept as there was
talk at #videolan that hwnd's might not be shareable across processes
(which they are).

Issue: http://trac.videolan.org/vlc/ticket/4655

-- Joonas Koivunen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-issue-4655-proof-of-concept-implementation-of-drawab.patch
Type: text/x-diff
Size: 4437 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110411/4f117984/attachment.patch>

More information about the vlc-devel mailing list