diff -r ba4a948c4a55 -r 4e623a4274a1 gmyth-stream/server/0.2/plugins/transcoders/mencoder.py --- a/gmyth-stream/server/0.2/plugins/transcoders/mencoder.py Tue May 15 23:25:17 2007 +0100 +++ b/gmyth-stream/server/0.2/plugins/transcoders/mencoder.py Wed May 16 18:46:10 2007 +0100 @@ -36,9 +36,8 @@ self.args["outfile"] = params_first("outfile", "-") # input_opt - uri = params_first("uri", "file:-").split(":", 1) - self.args["type"] = uri[0] - self.args["input"] = uri[1] + self.args["type"] = params_first("type", "file") + self.args["input"] = params_first("uri", "-") # audio_opts self.args["acodec"] = params_first("acodec", "mp2") @@ -117,8 +116,16 @@ self._arg_append(args, "2>%s" % os.devnull) # _setup_args() + def _setup_filename(self): + """This function setups the file to encode parsing the uri. + So, type can be: + * file + * dvd + * myth - def _setup_filename(self): + If the last one is detected we have to parse the uri to find args. + Then we store all the args inside a dictionary: self.args['gmyth-cat'] + """ _type = self.args["type"] if _type == "file": @@ -132,11 +139,7 @@ self.args["input"] = "dvd://".join(self.args["input"]) elif _type == "myth": - # gmyth-cat -h 192.168.1.124 -p 6543 -c 111 - # gmyth-cat -h 192.168.1.124 -p 6543 -f file.nuv - # myth://IP:PORT:type:file - self.args["gmyth-cat"] = self.args["input"].split(":") - self.args["input"] = "-" + self.args["gmyth-cat"] = mythtv._setup_mythfilename(self) # _setup_filename()