[vlc-devel] Can't Embed VLC in Qt4/wx on OSX with PyQt4/wx and Python Bindings

Ho Tuan tuan at post.harvard.edu
Thu Nov 26 12:25:34 CET 2009


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
language).

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
possible?

Thanks again for all the help!
-Jack

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?
>
> Thanks!
> -Jack
>
> 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>
>> wrote:
>> > 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
>> modules/gui/qtmc/glvideowidget.cpp
>>
>> Barry
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20091126/76c741e9/attachment.html>


More information about the vlc-devel mailing list