examples: Port switch.py to input-selector

The switch element hasn't existed for a while now - use the
replacement element input-selector instead.

Partially (and finally) fixes #581737
This commit is contained in:
Jan Schmidt 2009-05-06 23:38:54 +01:00 committed by Edward Hervey
parent 7743f1ad1e
commit 113959d55a

View file

@ -22,7 +22,7 @@ class SwitchTest:
self.playing = False
pipestr = ('videotestsrc pattern=0 ! queue ! s.sink0'
' videotestsrc pattern=1 ! queue ! s.sink1'
' switch name=s ! autovideosink')
' input-selector name=s ! autovideosink')
self.pipeline = gst.parse_launch(pipestr)
self.videowidget = videowidget
@ -86,7 +86,7 @@ class SwitchTest:
gst.warning('switching from %r to %r'
% (switch.get_property('active-pad'), padname))
switch.emit('switch', padname, stop_time, start_time)
switch.emit('switch', newpad, stop_time, start_time)
class VideoWidget(gtk.DrawingArea):
def __init__(self):