def __init__(self, song, songDb, errorNotifyCallback=None, doneCallback=None): """The first parameter, song, may be either a pykdb.SongStruct instance, or it may be a filename. """ pykPlayer.__init__(self, song, songDb, errorNotifyCallback, doneCallback) self.Movie = None manager.setCpuSpeed('mpg') manager.InitPlayer(self) manager.OpenDisplay(depth=DISPLAY_DEPTH) # Close the mixer while using Movie manager.CloseAudio() # Open the Movie module filepath = self.SongDatas[0].GetFilepath() if type(filepath) == unicode: filepath = filepath.encode(sys.getfilesystemencoding()) self.Movie = pygame.movie.Movie(filepath) self.Movie.set_display( manager.display, (0, 0, manager.displaySize[0], manager.displaySize[1]))
def __init__(self, song, songDb, errorNotifyCallback=None, doneCallback=None): """The first parameter, song, may be either a pykdb.SongStruct instance, or it may be a filename. """ pykPlayer.__init__(self, song, songDb, errorNotifyCallback, doneCallback) self.Movie = None manager.setCpuSpeed('mpg') manager.InitPlayer(self) # Close the audio and the display manager.CloseAudio() manager.CloseDisplay() manager.CloseCPUControl() self.procReturnCode = None self.proc = None