[gst-devel] cutting between two srcs

Erik Blankinship jedierikb at yahoo.com
Fri Mar 2 14:32:52 CET 2007


Hi

I can't set up a pipeline with a tee that lets me switch
srcs back and forth between a filesrc to v4l2src...  any ideas? 

Is the right way to use
a tee?  Is there a different element for connecting multiple srcs (e.g.
"aggregator")?

I tried using videomixer, but that blends the two srcs and I want to make cuts back and forth.

Sample code snippets:
pipeline
= gst.parse_launch("filesrc location=ok.ogg ! oggdemux ! theoradec
name=theoradec  ! tee name=tee ! xvimagesink v4l2src name=v4l2src)
...
#this plays the ogg file down the existing pipeline
pipeline.set_state(gst.STATE_PLAYING)
...
#now we pause and unlink the ogg src
pipeline.set_state(gst.STATE_PAUSED)
pipeline.get_by_name('theoradec').unlink( pipeline.get_by_name('tee') )
#and then hook up live video
pipeline.get_by_name('v4lsrc').link( pipeline.get_by_name('tee') )
#but when we play... nothing shows up.... but no errors either
pipeline.set_state(gst.STATE_PLAYING)

Suggestions?  Thanks.
Erik






More information about the gstreamer-devel mailing list