diff -r 549c4664701e -r 7da2a5e32fa6 gmyth-stream/server/0.2/plugins/transcoders/gmencoder.py --- a/gmyth-stream/server/0.2/plugins/transcoders/gmencoder.py Mon Apr 23 21:08:07 2007 +0100 +++ b/gmyth-stream/server/0.2/plugins/transcoders/gmencoder.py Thu Apr 26 22:33:00 2007 +0100 @@ -13,7 +13,6 @@ name = "gmencoder" priority = -1 proc = None - args = {} def __init__(self, params): server.Transcoder.__init__(self, params) @@ -28,6 +27,9 @@ def _parser_params (self): self._insert_param("-i", \ "%s://%s" % (self.params_first("uri_prefix", "file"), self.params_first("uri_path", ""))) + + #self._insert_param("-i", self.params_first("uri", "")) + self._insert_param("--video-encode", self.params_first("ve", "")) self._insert_param("--video-opts", "bitrate=200,pass=2,quantizer=5") self._insert_param("--video-fps", self.params_first("fps", "")) @@ -35,8 +37,8 @@ self._insert_param("--video-height", self.params_first("height", "")) self._insert_param("--audio-encode", self.params_first("ae", "")) self._insert_param("--output-element", "fdsink") - # _parse_params - + # _parse_params + def start(self, outfd): self.opts.append (self.gmencoder_path) self._parser_params () @@ -44,17 +46,16 @@ self.opts.append ("fd=%d" % outfd.fileno()) cmd = " ".join(self.opts) - self.log.info ("Gmemconder: %s", cmd) + self.log.info ("GMencoder: %s", cmd) try: self.proc = subprocess.Popen(self.opts, stdin=subprocess.PIPE) except Exception, e: - self.log.error("Error executing gmencoder: %s" % e) + self.log.error("Error executing GMencoder: %s" % e) return False try: self.proc.wait() - except Exception, e: self.log.error("Problems handling data: %s" % e) return False @@ -65,7 +66,7 @@ def stop(self): if self.proc: - self.log.info ("STOP") + self.log.info ("STOPed GMencoder plugin") try: self.proc.stdin.write ("QUIT\n") except Exception, e: