1.1 --- a/gmyth-stream/server/0.3/lib/request_handler.py Fri Jun 01 11:50:11 2007 +0100
1.2 +++ b/gmyth-stream/server/0.3/lib/request_handler.py Fri Jun 01 13:48:21 2007 +0100
1.3 @@ -317,6 +317,7 @@
1.4 obj = transcoder(self.query)
1.5 except Exception, e:
1.6 self.send_error(500, str(e))
1.7 + print "teste2"
1.8 return
1.9
1.10 self.send_response(200)
2.1 --- a/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py Fri Jun 01 11:50:11 2007 +0100
2.2 +++ b/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py Fri Jun 01 13:48:21 2007 +0100
2.3 @@ -88,8 +88,8 @@
2.4
2.5 if self.args["mux"] == "mpeg":
2.6 video += " -mpegopts format=%s" % self.args["format"]
2.7 +
2.8 video += " -vf scale=%s:%s" % (self.args["width"], self.args["height"])
2.9 -
2.10 return video
2.11 # _setup_video()
2.12
2.13 @@ -149,10 +149,27 @@
2.14 self.args["input"] = "file://%s" % self.args["input"]
2.15
2.16 elif _type == "dvd":
2.17 - self.args["input"] = "dvd://".join(self.args["input"])
2.18 + self.args["input"] = "dvd://%s" % self.args["input"]
2.19
2.20 elif _type == "myth":
2.21 self.args["gmyth-cat"] = mythtv._setup_mythfilename(self)
2.22 +
2.23 + elif _type == "tv":
2.24 + driver = self.params_first("driver", "v4l2")
2.25 + norm = self.params_first("norm", "pal-m")
2.26 + channel = self.params_first("channel", "13")
2.27 + chanlist = self.params_first("chanlist", "us-bcast")
2.28 + outfmt = self.params_first("outfmt", "yuy2")
2.29 + vdev = self.params_first("vdev", "/dev/video0")
2.30 + adev = self.params_first("adev", "/dev/dsp")
2.31 + print "teste1"
2.32 + self.args["input"] = "tv:// -v -tv driver=%s:norm=%s:channel=%s:" \
2.33 + "chanlist=%s:width=%s:height=%s:outfmt=%s:" \
2.34 + "device=%s:adevice=%s" % (driver, norm,
2.35 + channel, chanlist,
2.36 + self.args["width"],
2.37 + self.args["height"],
2.38 + outfmt, vdev, adev)
2.39 # _setup_filename()
2.40
2.41
2.42 @@ -231,6 +248,7 @@
2.43 return True
2.44 # _start_outfile()
2.45
2.46 +
2.47 def _start(self, outfd):
2.48 # Play a file on disk or DVD
2.49 if not self._run_mencoder(output=subprocess.PIPE):
2.50 @@ -263,12 +281,11 @@
2.51 cmd = " ".join(self.mencoder_opts)
2.52 self.log.debug(self.tid, "Plugin's tid: %s" % self.tid)
2.53 self.log.debug(self.tid, "Mencoder: %s" % cmd)
2.54 - #fixme
2.55
2.56 ret = False
2.57
2.58 if self.args["outfile"] == "-" and \
2.59 - self.args["type"] in ["file", "dvd"]:
2.60 + self.args["type"] in ["file", "dvd", "tv"]:
2.61 ret = self._start(outfd)
2.62
2.63 elif self.args["type"] == "myth":