# HG changeset patch # User morphbr # Date 1180702101 -3600 # Node ID 1bc4c47e4ad80081487461cfd204ce0f0cd356e0 # Parent 15a191556cd6caf5b95781711f57e29b63b7105f [svn r742] * GMyth-Streamer - mencoder's tv test ;-) diff -r 15a191556cd6 -r 1bc4c47e4ad8 gmyth-stream/server/0.3/lib/request_handler.py --- a/gmyth-stream/server/0.3/lib/request_handler.py Fri Jun 01 11:50:11 2007 +0100 +++ b/gmyth-stream/server/0.3/lib/request_handler.py Fri Jun 01 13:48:21 2007 +0100 @@ -317,6 +317,7 @@ obj = transcoder(self.query) except Exception, e: self.send_error(500, str(e)) + print "teste2" return self.send_response(200) diff -r 15a191556cd6 -r 1bc4c47e4ad8 gmyth-stream/server/0.3/plugins/transcoders/mencoder.py --- a/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py Fri Jun 01 11:50:11 2007 +0100 +++ b/gmyth-stream/server/0.3/plugins/transcoders/mencoder.py Fri Jun 01 13:48:21 2007 +0100 @@ -88,8 +88,8 @@ if self.args["mux"] == "mpeg": video += " -mpegopts format=%s" % self.args["format"] + video += " -vf scale=%s:%s" % (self.args["width"], self.args["height"]) - return video # _setup_video() @@ -149,10 +149,27 @@ self.args["input"] = "file://%s" % self.args["input"] elif _type == "dvd": - self.args["input"] = "dvd://".join(self.args["input"]) + self.args["input"] = "dvd://%s" % self.args["input"] elif _type == "myth": self.args["gmyth-cat"] = mythtv._setup_mythfilename(self) + + elif _type == "tv": + driver = self.params_first("driver", "v4l2") + norm = self.params_first("norm", "pal-m") + channel = self.params_first("channel", "13") + chanlist = self.params_first("chanlist", "us-bcast") + outfmt = self.params_first("outfmt", "yuy2") + vdev = self.params_first("vdev", "/dev/video0") + adev = self.params_first("adev", "/dev/dsp") + print "teste1" + self.args["input"] = "tv:// -v -tv driver=%s:norm=%s:channel=%s:" \ + "chanlist=%s:width=%s:height=%s:outfmt=%s:" \ + "device=%s:adevice=%s" % (driver, norm, + channel, chanlist, + self.args["width"], + self.args["height"], + outfmt, vdev, adev) # _setup_filename() @@ -231,6 +248,7 @@ return True # _start_outfile() + def _start(self, outfd): # Play a file on disk or DVD if not self._run_mencoder(output=subprocess.PIPE): @@ -263,12 +281,11 @@ cmd = " ".join(self.mencoder_opts) self.log.debug(self.tid, "Plugin's tid: %s" % self.tid) self.log.debug(self.tid, "Mencoder: %s" % cmd) - #fixme ret = False if self.args["outfile"] == "-" and \ - self.args["type"] in ["file", "dvd"]: + self.args["type"] in ["file", "dvd", "tv"]: ret = self._start(outfd) elif self.args["type"] == "myth":