def __init__(self, config): self.c = config self.player = queuefetcher.song_finder() input_filter = config.get("gstreamer", "input_filter") output_filter = config.get("gstreamer", "output_filter") self.pipeline = self.make_pipeline(input_filter, output_filter) bus = self.pipeline.get_bus() bus.add_signal_watch() bus.connect("message", self.on_message) self.playnext()
def __init__(self, host, port, timeout): Log.debug("Initiating listener with values HOST='%s', PORT='%s'." % (host, port)) self.COMMANDS = { 'GETSONG': self.command_getsong, 'GETMETA': self.command_getmeta, 'DIE': self.command_die, 'GETTITLE': self.command_title, 'GETARTIST': self.command_artist, 'MEMDUMP': self.command_memdump, 'GETGAIN': self.command_getgain, 'GETLOOP': self.command_getloop, } self.host = host self.port = port self.player = queuefetcher.song_finder() self.running = True self.timeout = timeout self.listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.listener.bind((self.host, self.port)) self.listener.settimeout(timeout)
def __init__(self, host, port, timeout): Log.debug("Initiating listener with values HOST='%s', PORT='%s'." % (host, port)) self.COMMANDS = { 'GETSONG': self.command_getsong, 'GETMETA': self.command_getmeta, 'DIE': self.command_die, 'GETTITLE': self.command_title, 'GETARTIST': self.command_artist, 'MEMDUMP': self.command_memdump, 'GETGAIN': self.command_getgain, 'GETLOOP': self.command_getloop, 'NEXTSONG': self.command_nextsong, } self.host = host self.port = port self.encode = self.encode_newline self.player = queuefetcher.song_finder() self.running = True self.timeout = timeout self.listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.listener.bind((self.host, self.port)) self.listener.settimeout(timeout)
import queuefetcher player = queuefetcher.song_finder() def ices_init (): return 1 def ices_shutdown (): return 1 def ices_get_next (): return player.get_next_song() def ices_get_metadata (): return player.get_metadata()
import queuefetcher player = queuefetcher.song_finder() def ices_init(): return 1 def ices_shutdown(): return 1 def ices_get_next(): return player.get_next_song() def ices_get_metadata(): return player.get_metadata()