gmyth-stream/server/0.2/plugins/transcoders/mencoder.py
branchtrunk
changeset 672 4e623a4274a1
parent 660 ba4a948c4a55
child 717 24db16480456
     1.1 --- a/gmyth-stream/server/0.2/plugins/transcoders/mencoder.py	Tue May 15 23:25:17 2007 +0100
     1.2 +++ b/gmyth-stream/server/0.2/plugins/transcoders/mencoder.py	Wed May 16 18:46:10 2007 +0100
     1.3 @@ -36,9 +36,8 @@
     1.4          self.args["outfile"]  = params_first("outfile", "-")
     1.5  
     1.6          # input_opt
     1.7 -        uri = params_first("uri", "file:-").split(":", 1)
     1.8 -        self.args["type"]     = uri[0]
     1.9 -        self.args["input"]    = uri[1]
    1.10 +        self.args["type"]     = params_first("type", "file")
    1.11 +        self.args["input"]    = params_first("uri", "-")
    1.12  
    1.13          # audio_opts
    1.14          self.args["acodec"]   = params_first("acodec", "mp2")
    1.15 @@ -117,8 +116,16 @@
    1.16          self._arg_append(args, "2>%s" % os.devnull)
    1.17      # _setup_args()
    1.18  
    1.19 +    def _setup_filename(self):
    1.20 +        """This function setups the file to encode parsing the uri.
    1.21 +        So, type can be:
    1.22 +        * file
    1.23 +        * dvd
    1.24 +        * myth
    1.25  
    1.26 -    def _setup_filename(self):
    1.27 +        If the last one is detected we have to parse the uri to find args.
    1.28 +        Then we store all the args inside a dictionary: self.args['gmyth-cat']
    1.29 +        """
    1.30          _type = self.args["type"]
    1.31  
    1.32          if _type == "file":
    1.33 @@ -132,11 +139,7 @@
    1.34              self.args["input"] = "dvd://".join(self.args["input"])
    1.35  
    1.36          elif _type == "myth":
    1.37 -            # gmyth-cat -h 192.168.1.124 -p 6543 -c 111
    1.38 -            # gmyth-cat -h 192.168.1.124 -p 6543 -f file.nuv
    1.39 -            # myth://IP:PORT:type:file
    1.40 -            self.args["gmyth-cat"] = self.args["input"].split(":")
    1.41 -            self.args["input"] = "-"
    1.42 +            self.args["gmyth-cat"] = mythtv._setup_mythfilename(self)
    1.43      # _setup_filename()
    1.44  
    1.45