[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] calling Mplayer with pygame



Hello all,

I am planning to play multimedia files with "mplayer" while doing some stuff with pygame. You can find the python function that calls "mplayer" below. It is working with SDL in X environ without any problem(of course in seperate windows).But, I intend to go for fbdev somehow. So, would you suggest to use such a method with fbdev or any other plug&play solution for pygame and fbdev?


Aykut KOCAK

izzetaykutkocak@xxxxxxxxx

def play_(file):
   dbg=Debug('play')
   r=false
   try:
       cmd='/usr/bin/mplayer %s 2>&1 >/dev/null' % str(file)
       ret=Popen4(cmd)
       r=ret.wait()
   except Exception,inst:
       dbg.debug(str(inst))
   try:
       del(ret)
   except:
       pass
   return r