using the activex interface with wxPython

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
gigabyte
New Cone
New Cone
Posts: 1
Joined: 29 May 2007 15:22

using the activex interface with wxPython

Postby gigabyte » 29 May 2007 15:58

Hi,

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
3) Wrote this short test script:

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()
When I run the script, I get the following:

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

wrybread
Blank Cone
Blank Cone
Posts: 17
Joined: 24 Mar 2007 05:44

Re: using the activex interface with wxPython

Postby wrybread » 28 Jan 2008 11:45

Have you made any progress with this? I'd be very interested in getting this working...


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 3 guests