python timers and COM/directshow

Sayanan Sivaraman sayananbig at
Tue Sep 23 20:41:11 CEST 2008

You're right.  Let me be more specific.  Firstly, the reason I
included c++ code is because I'm using Microsoft COM, which is
natively in c++, and in fact, to access them through Python I use the
comtypes module [import comtypes] and then GetModule('quartz.dll') to
access the dll's.

I am using the gtk GUI widgets.  I have a gtk.Hscale scrollbar which I
would like to be a trackbar for the video playback.  To coordinate
this in Python, much like in c++, I would like to have a timer thread
synchronizing the scrollbar update.  ie:

def scrollbar_callback(args):
      media_control.CurrentPosition= scrollbar.get_value()

def timer_callback(args):
      #code to update the scrollbar based on video position, something

>>>*And, I would like to be able to kill, run the timer based on whether the video is playing or paused, ie

def player(args):
     media_control.Run() #plays video

def pauser(args):

Any tips?


More information about the Python-list mailing list