PDA

View Full Version : [LINUX] xbmc.Player callbacks not working


analogue
2008-10-30, 08:47
I can't seem to get the callbacks for xbmc.Player working on the latest atlantis release or trunk. Heres a short script to reproduce. Is this a bug or am i missing something?


import xbmcgui
import xbmc
import time

xbmc.log('\n\n\nHello world\n\n\n')

class MyPlayer(xbmc.Player):

def __init__(self):
xbmc.Player.__init__(self)

def onPlayBackStarted(self):
xbmc.log('*** CALLBACK: onPlayBackStarted')

def onPlayBackEnded( self ):
xbmc.log('*** CALLBACK: onPlayBackSEnded')

def onPlayBackStopped( self ):
xbmc.log('*** CALLBACK: onPlayBackStopped')

player = MyPlayer()
player.play('/tmp/movie.mpg')
while True:
xbmc.log('Sleeping...')
time.sleep(1)
xbmc.log('\n\n\nGoodbye world\n\n\n')


tnx!