Embedding VLC into a wxPython app

This forum is about all development around libVLC.
Stormx
New Cone
New Cone
Posts: 2
Joined: 08 Oct 2009 15:41

Embedding VLC into a wxPython app

Postby Stormx » 08 Oct 2009 16:38

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! :)

Stormx
New Cone
New Cone
Posts: 2
Joined: 08 Oct 2009 15:41

Re: Embedding VLC into a wxPython app

Postby Stormx » 09 Oct 2009 12:50

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*

silpa
New Cone
New Cone
Posts: 1
Joined: 24 May 2010 08:04

Re: Embedding VLC into a wxPython app

Postby silpa » 24 May 2010 08:21

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.

pat_3
New Cone
New Cone
Posts: 3
Joined: 10 Sep 2012 19:44

Re: Embedding VLC into a wxPython app

Postby pat_3 » 10 Sep 2012 20:11

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests