diff -r 2b1824e138b1 -r 4b2192319f56 gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Mon Aug 13 22:29:00 2007 +0100 +++ b/gmyth-stream/server/0.3/plugins/transcoders/gmencoder.py Wed Aug 15 20:52:44 2007 +0100 @@ -34,17 +34,6 @@ self.opts.append ("-d") self._parser_params () - outfile = self.params_first("outfile", "") - - if outfile != "": - path = os.path.join(sys.path[0], ".transcoded", outfile) - self._insert_param("-o", "file://%s" % path) - else: - self._insert_param ("-o", "fd://%d" % outfd.fileno()) - self.opts.append ("-c") - - cmd = " ".join(self.opts) - # __init__() def _insert_param (self, name, value): @@ -66,6 +55,16 @@ # _parse_params def start(self, outfd): + outfile = self.params_first("outfile", "") + + if outfile != "": + path = os.path.join(sys.path[0], ".transcoded", outfile) + self._insert_param("-o", "file://%s" % path) + else: + self._insert_param ("-o", "fd://%d" % outfd.fileno()) + self.opts.append ("-c") + + cmd = " ".join(self.opts) self.log.info(self.tid, "GMencoder: %s" % cmd) try: @@ -88,6 +87,10 @@ return False self.status = 100; + + if outfile: + outfd.write("OK ") + return True # start()