diff -r a806d8ad0ff0 -r 07c12d2ceddf gmyth-stream/plugins/media/vlc.py --- a/gmyth-stream/plugins/media/vlc.py Tue Mar 27 00:13:27 2007 +0100 +++ b/gmyth-stream/plugins/media/vlc.py Sat Mar 31 00:55:28 2007 +0100 @@ -1,30 +1,3 @@ -''' - # GMyth-Stream - # - # @file main.py - # - # @brief

Plugin for GMyth-Stream - # - # Copyright (C) 2007 INdT - Instituto Nokia de Tecnologia. - # @author Artur Duque de Souza - # - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU Lesser General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU Lesser General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # - ''' - import os import sys import time @@ -52,12 +25,12 @@ self.path += " -I telnet -d 1> /dev/null 2> /dev/null &" os.system(self.path) sys.exit(0) - - print "ESTOU EM PARENT 1" - time.sleep(3) - print "ESTOU EM PARENT 2" - self.sock.connect( (self.host, self.port) ) - self.sock.send("%s\n" % self.pwd) + else: + print "ESTOU EM PARENT 1" + time.sleep(3) + print "ESTOU EM PARENT 2" + self.sock.connect( (self.host, self.port) ) + self.sock.send("%s\n" % self.pwd) def insert_file(self, filename): @@ -65,20 +38,28 @@ self.sock.send("setup output0 input %s\n" % filename) - def setup(self, filename, codec, bitrate, width, height, port): + + def setup(self, filename, mux, vcodec, vbitrate,\ + fps, acodec, abitrate, width, height, port): self.filename = filename - self.codec = codec - self.bitrate = int(bitrate) + self.mux = mux + self.vcodec = vcodec + self.vbitrate = int(vbitrate) + self.fps = int(fps) + self.acodec = acodec + self.abitrate = int(abitrate) self.width = int(width) self.height = int(height) + self.port = int(port) + self.pipe = "#transcode{vcodec=%s,vb=%d,"\ "fps=25.0,scale=1,acodec=mpga,"\ "ab=64,channels=1,width=%d,height=%d}"\ ":duplicate{dst=std{access=http,"\ - "mux=mpeg1,dst=:%d}}" % (self.codec, self.bitrate,\ + "mux=mpeg1,dst=:%d}}" % (self.vcodec, self.vbitrate,\ self.widht, self.height,\ self.port)