Page 1 of 1

Embedding VLC into a wxPython app

Posted: 08 Oct 2009 16:38
by Stormx
Hi guys. I'm hoping to embed an instance of VLC into a wxPython (wxwidgets) application. Specifically I want video output to be displayed in a right-hand pane of the single window, with controls on the left. Is this possible? I've read a lot about all sorts of conflicting methods - grabbing window IDs, libvlc, libvlc-gtk, etc etc. Can anyone point me in the right direction here? I've exhausted google but maybe I'm searching for the wrong things.

Thanks in advance! :)

Re: Embedding VLC into a wxPython app

Posted: 09 Oct 2009 12:50
by Stormx
Hi all. I'm a little further along after eventually finding this:

http://mailman.videolan.org/pipermail/v ... 66044.html

The sample app almost works, the issue being that the video launches in a new window, despite the code apparently handling this. What should I do?

edit: seems to be a gtk+ error I *think*

Re: Embedding VLC into a wxPython app

Posted: 24 May 2010 08:21
by silpa
Is there any update on this issue? I also want to open a VLC instance in a wxpython window with the control buttons on the top.

Re: Embedding VLC into a wxPython app

Posted: 10 Sep 2012 20:11
by pat_3
Hello silpa.
This is probably a dead issue but here is my experience.
There is a line in wxvlc.py:
self.player.set_xwindow(self.videopanel.GetHandle())

Based on an entry from an 'OS if stmt' from http://code.google.com/p/wxtoutv/source ... ame.py?r=3
if sys.platform.startswith('win'):
self.player.set_hwnd(self.videopanel.GetHandle())
#self.videopanel.GetHandle()
elif sys.platform.startswith('linux'):
self.player.set_xwindow(self.videopanel.GetHandle())
else:
self.player.set_nsobject(self.videopanel.GetHandle())

The above replacement code will put the video in the wxPython panel on windows.
I'm running on windows and I actually prefer to have the VLC player window come up full size so I comment out the line
self.player.set_hwnd(self.videopanel.GetHandle())
so that the player creates a full sized screen (which I control from my version of the wxvlc.py script.