# HG changeset patch # User renatofilho # Date 1187271922 -3600 # Node ID d35b50f4d77e0482b7e3661d9e5e14ef5ce26ff7 # Parent a87c760e0dfa3bcd8827794e3890cc5874b8a0a1 [svn r812] fixed request to no valid channel diff -r a87c760e0dfa -r d35b50f4d77e gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Wed Aug 15 23:06:55 2007 +0100 +++ b/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Thu Aug 16 14:45:22 2007 +0100 @@ -13,6 +13,7 @@ import time import select +import fcntl import lib.utils as utils import lib.server as server @@ -76,12 +77,27 @@ return False try: + #p = select.poll() + #print outfd.fileno() + #p.register (connection, select.POLLNVAL | select.POLLERR | select.POLLHUP) while (self.proc and self.proc.poll() == None): - r, w, x = select.select([self.proc.stdout], [], [], 0) + r, w, x = select.select([self.proc.stdout], [], [], 1) if self.proc.stdout in r: progress = self.proc.stdout.readline() if (progress.find ("PROGRESS") >= 0): self.status = progress.split (":")[1] + elif (progress.find ("Erro") >= 0): + return False + """ + try: + print connection.getpeername() + print connection.getsockname() + except Esception, e: + print "Lost Connection" + self.stop () + return False + """ + except Exception, e: self.log.error(self.tid, "Problems handling data: %s" % e) return False