[vlc-devel] Can't Embed VLC in Qt4/wx on OSX with PyQt4/wx and Python Bindings
tuan at post.harvard.edu
Thu Nov 26 12:31:47 CET 2009
Also, to address Olivier's point ("Maybe their patch should be ported to the
new VLC version?"), I have tried that. The contents of voutgl.m in "macosx"
are nearly identical to voutagl.m in "minimal_macosx", so I tried porting
the patch, but it had no effect.
I also tried applying the patch to "macosx" but that still resulted in VLC
Goldeneye crashing (only when the macosx plugin is forcefully not compiled,
forcing VLC to use minimal_macosx, is it possible to start a video with
python-ctypes bindings without causing a crash in OS X).
On Thu, Nov 26, 2009 at 6:25 AM, Ho Tuan <tuan at post.harvard.edu> wrote:
> After looking through Barry's code with QGLWidget and experimenting with
> PyQt4, I'm still lost as to how to implement this with the python-bindings.
> In the python bindings, you can usually set_agl, set_nsobject, or
> set_xwindow handles, but I assume that would not be relevant here.
> How can I use python to direct VLC to draw into the OpenGL window for Qt?
> If that's not possible, is there a way to create a QGLWidget window with VLC
> as prescribed by Barry, but sandbox that so I can still integrate it into my
> python application? My application is already written and developed in
> python for Linux and Windows, so I definitely want to avoid rewriting the
> whole application just for Mac OS X (also, python is just a beautiful
> Lastly, Olivier Aubert mentioned that if set_nsobject and set_agl don't
> work, they need to be fixed. Well, they don't seem to work for me in OS X,
> so does anyone have any pointers on where to start to fix that, if it's
> Thanks again for all the help!
> On Wed, Nov 25, 2009 at 6:08 PM, Ho Tuan <tuan at post.harvard.edu> wrote:
>> Thank you for the response Barry. This definitely points me in an
>> promising direction, since I'm quite sure that the minimal_macosx is, by
>> default, outputting something using OpenGL.
>> Do you have any ideas for how I would practically implement this for use
>> with PyQt and the python-ctypes VLC bindings, or should I consider modifying
>> the contents of minimal_macosx to allow me to use PyQt somehow?
>> On Wed, Nov 25, 2009 at 5:29 PM, Barry Wardell <barry.wardell at gmail.com>wrote:
>>> On Wed, Nov 25, 2009 at 11:01 PM, Barry Wardell <barry.wardell at gmail.com>
>>> > Have you looked at the "LibVLC SampleCode Qt" tutorial on the wiki
>>> > (http://wiki.videolan.org/LibVLC_SampleCode_Qt)? It doesn't include
>>> > Python but it does give a nice example of embedding VLC into Qt. Last
>>> > time I checked, it also worked fine on OSX.
>>> Now that I actually check the forum thread you linked, I see that you
>>> have already looked at the example in the wiki.
>>> > Alternatively, it is possible to get VLC to draw its video into a
>>> > QGLWidget and that should work fairly well on all platforms, but that
>>> > needs a bit more effort to get things working.
>>> Given that the LibVLC method doesn't seem to be working for you, this
>>> might be a good option. For Google Summer of Code this year, I worked
>>> on a cross-platform Qt GUI for VLC
>>> (http://wiki.videolan.org/SoC_2009/Media_Center_Interface_for_VLC). It
>>> works on Linux and OSX, I never tested it with Windows.
>>> The bit that is most relevant for you is the use of a QGLWidget to
>>> provide an OpenGL context for VLC to draw into. Check
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel