I would like to understand how to use the activex interface from wxPython. I know there is a MediaCtrl interface available in 0.9-svn, but I'd rather stick with 0.8.6b since I haven't been able to compile a working version on the development branch.
Here's what I've done (I'm using python25 with wxPython 2.8 ):
1) Tested that the ActiveX plugin for 0.8.6b works in Explorer and Firefox.
2) Created "vlc.py" using the command:
Code: Select all
python genaxmodule.py VideoLAN.VLCPlugin.1 vlc
Code: Select all
import wx
import vlc
class TestPanel(wx.Panel):
def __init__(self, parent, log, frame=None):
self.log = log
wx.Panel.__init__(self, parent, -1, pos=(0,0),
size=wx.Size(200,150), style=0)
self.vlc = vlc.vlcWindow(self, -1)
version = self.vlc._get_VersionInfo()
print "version = ", version
self.vlc.Show(True)
self.vlc._set_MRL("swing.avi")
print "length = ", self.vlc._get_Length()
self.vlc.play()
class MyFrame(wx.Frame):
def __init__(self, parent, ID, title):
wx.Frame.__init__(self, parent, ID, title,
wx.DefaultPosition, wx.Size(200, 150))
panel = TestPanel(self, wx.LogNull())
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, "Hello from wxPython")
frame.Show(True)
self.SetTopWindow(frame)
return True
def main():
app = MyApp(0)
app.MainLoop()
if __name__ == '__main__':
main()
- version (0.8.6b Janus) and length (-20) is emitted on stdout
- a small vlc icon (road hazard cone) shows up in the upper left corner of the window
- no video or audio is generated
I'm a little new to using ActiveX objects, so if anyone could help me get started with this I would greatly appreciate it!