1.1 --- a/gmyth-stream/plugins/media/gstreamer.py Tue Mar 27 00:13:27 2007 +0100
1.2 +++ b/gmyth-stream/plugins/media/gstreamer.py Sun Apr 01 03:11:01 2007 +0100
1.3 @@ -1,30 +1,3 @@
1.4 - '''
1.5 - # GMyth-Stream
1.6 - #
1.7 - # @file main.py
1.8 - #
1.9 - # @brief <p> Plugin for GMyth-Stream
1.10 - #
1.11 - # Copyright (C) 2007 INdT - Instituto Nokia de Tecnologia.
1.12 - # @author Artur Duque de Souza <artur.souza@indt.org.br>
1.13 - #
1.14 - #
1.15 - # This program is free software; you can redistribute it and/or modify
1.16 - # it under the terms of the GNU Lesser General Public License as published by
1.17 - # the Free Software Foundation; either version 2 of the License, or
1.18 - # (at your option) any later version.
1.19 - #
1.20 - # This program is distributed in the hope that it will be useful,
1.21 - # but WITHOUT ANY WARRANTY; without even the implied warranty of
1.22 - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.23 - # GNU General Public License for more details.
1.24 - #
1.25 - # You should have received a copy of the GNU Lesser General Public License
1.26 - # along with this program; if not, write to the Free Software
1.27 - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1.28 - #
1.29 - '''
1.30 -
1.31 import pygst
1.32 pygst.require("0.10")
1.33 import gst
1.34 @@ -38,13 +11,20 @@
1.35 self.config = config
1.36 self.pipe = ""
1.37
1.38 - def setup(self, filename, codec, bitrate, width, height, port):
1.39 +
1.40 + def setup(self, filename, mux, vcodec, vbitrate,\
1.41 + fps, acodec, abitrate, width, height, port):
1.42
1.43 self.filename = filename
1.44 - self.codec = codec
1.45 - self.bitrate = int(bitrate)
1.46 + self.mux = mux
1.47 + self.vcodec = vcodec
1.48 + self.vbitrate = int(vbitrate)
1.49 + self.fps = int(fps)
1.50 + self.acodec = acodec
1.51 + self.abitrate = int(abitrate)
1.52 self.width = int(width)
1.53 self.height = int(height)
1.54 +
1.55 self.port = int(port)
1.56
1.57 ## Pipelines
1.58 @@ -62,7 +42,7 @@
1.59 " me-method=2 ! rtph263ppay ! udpsink host=224.0.0.1 port=%d d. ! "\
1.60 "queue ! audioconvert ! faac ! rtpmp4gpay ! udpsink name=udp_audio "\
1.61 "host=224.0.0.1 port=%d" % (self.filename, self.width, self.height,\
1.62 - self.bitrate, self.port, self.port+2)
1.63 + self.vbitrate, self.port, self.port+2)
1.64
1.65 #self.pipe = "filesrc location=/tmp/mpg/cpm.mpg ! decodebin ! ffmpegcolorspace ! ximagesink"
1.66