diff -r a806d8ad0ff0 -r 5e1afa4a66e8 gmyth-stream/plugins/media/gstreamer.py --- a/gmyth-stream/plugins/media/gstreamer.py Tue Mar 27 00:13:27 2007 +0100 +++ b/gmyth-stream/plugins/media/gstreamer.py Mon Apr 02 20:05:56 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 pygst pygst.require("0.10") import gst @@ -38,13 +11,20 @@ self.config = config self.pipe = "" - 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) ## Pipelines @@ -62,7 +42,7 @@ " me-method=2 ! rtph263ppay ! udpsink host=224.0.0.1 port=%d d. ! "\ "queue ! audioconvert ! faac ! rtpmp4gpay ! udpsink name=udp_audio "\ "host=224.0.0.1 port=%d" % (self.filename, self.width, self.height,\ - self.bitrate, self.port, self.port+2) + self.vbitrate, self.port, self.port+2) #self.pipe = "filesrc location=/tmp/mpg/cpm.mpg ! decodebin ! ffmpegcolorspace ! ximagesink"