[svn r484] Added gmyth_util_get_channel_list to the gmyth_util.h; removes static_mutex locking/unlocking from the gmyth_util.
8 config = ConfigParser.ConfigParser()
9 config.read("stream.conf")
11 media_plugin = config.get("Media", "engine")
12 exec("from plugins.media.%s import *" % media_plugin)
16 comm_plugin = config.get("Comm", "engine")
17 exec("from plugins.comm.%s import *" % comm_plugin)
20 server = Server(config)
22 lib.log("Starting GMyth-Stream server")
24 while (server.finish == 0):
25 con, client = server.getRequest()
28 msg = server.getMsg(1024).strip()
32 lib.log("Received %s from: %s" % (msg, client) )
35 setup = server.getMsg(1024).strip().split(" ")
40 server.sendMsg(lib.log("Wrong SETUP command from: %s" % client[0]))
47 options.append(setup[i])
50 ret = media.setup(setup[0], setup[1], setup[2], \
51 setup[3], setup[4], setup[5],
52 setup[6], setup[7], setup[8],
58 server.sendMsg(lib.log(ret))
69 elif (msg == "CLOSE"):
75 lib.log("Closing connection with %s" % client[0])
76 server.disconnect_client(con)
80 lib.log("Server stopped. Closing...")