some fixes, not all

Original commit message from CVS:
some fixes, not all
This commit is contained in:
Thomas Vander Stichele 2004-08-12 15:00:17 +00:00
parent 3412a9bd20
commit b447845b29
4 changed files with 37 additions and 4 deletions

View file

@ -3,7 +3,6 @@ EXTRA_DIST = \
cp.py \
dvdplay.py \
f2f.py \
identity.py \
ilat.py \
lat.py \
rot13.py \

View file

@ -1,3 +1,26 @@
#!/usr/bin/env python
#
# GStreamer python bindings
# Copyright (C) 2002 David I. Lehn <dlehn@users.sourceforge.net>
# 2004 Johan Dahlin <johan@gnome.org>
#
# filesrc.py: implements a file source element completely in python
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import sys
import gobject
import gst
@ -26,6 +49,10 @@ class FileSource(gst.Element):
gobject.type_register(FileSource)
def main(args):
print 'This example is not finished yet.'
return
if len(args) != 3:
print 'Usage: %s input output' % (args[0])
return -1
@ -34,6 +61,7 @@ def main(args):
filesrc = FileSource('filesource')
#filesrc = gst.Element('filesrc', 'src')
assert filesrc
filesrc.set_property('location', args[1])
filesink = gst.Element('filesink', 'sink')

View file

@ -77,6 +77,8 @@ def filter(element):
def main(args):
"A GStreamer Python subclassing example of an identity filter"
print "This example is not finished."
sys.exit(1)
identity = Identity()
identity.set_name('identity')

View file

@ -111,20 +111,24 @@ def main():
filesrc = Element ('filesrc', 'disk_source')
filesrc.set_property('location', sys.argv[1])
# now get the demuxer
demuxer = Element ('oggdemux', 'demuxer')
demuxer.connect('notify', decoder_notified)
# now get the decoder
decoder = Element ('vorbisfile', 'parse')
decoder = Element ('vorbisdec', 'decoder')
decoder.connect('notify', decoder_notified)
# and an audio sink
osssink = Element ('osssink', 'play_audio')
# add objects to the main pipeline
for e in (filesrc, decoder, osssink):
for e in (filesrc, demuxer, decoder, osssink):
bin.add(e)
# link the elements
previous = None
for e in (filesrc, decoder, osssink):
for e in (filesrc, demuxer, decoder, osssink):
if previous:
previous.link(e)
previous = e