def quit(self): if self.PlaybackFlag: try: self.PlaybakcProc.terminate() except Exception as e: logger.exception("Could not kill media player process... {0}".format(e)) warn( "some process might not have exited! Use your task manager to kill the wmplayer.exe process if needed. ") sys.exit(0)
def play(self, path_to_media_file): debug(u"attempting to play file: {0} of type: {1} and repr: {2}".format(path_to_media_file, type(path_to_media_file), repr(path_to_media_file))) encoded_path=path_to_media_file.encode("UTF-8") if not os.path.isfile(path_to_media_file): warn(u"This file: {0} does not exist. Full path: {1}".format(path_to_media_file, os.path.abspath(path_to_media_file))) return try: media = self.instance.media_new(encoded_path) except Exception as e: logger.exception("exception! {0}".format(e)) warn('NameError: %s (LibVLC %s)' % (sys.exc_info()[1],vlc.libvlc_get_version())) self.player.set_media(media) self.player.play()
logger.error("There is a problem with VLC. Either you are using the wrong version of talkshow (32/64 bit), or there is a bug in the code, or you can try and install VLC.") try: import CommandBar from wrappers import * from widget import * import animated_property if sys.platform == 'win32': import _winreg from talkshowConfig import config as configClass from vlcPlayer import vlcPlayer except Exception as e: logger.exception("exception! Details: {0}".format(e)) raise #TODO: make this configurable ORIENTATION = 1 # Constants COLUMNS = 2