[gst-devel] switching between subpipelines

Albert Costa costa_albert at yahoo.fr
Wed Nov 12 18:29:35 CET 2008


Hello people,
I am writing/testing to build a small application where I have 2 possible source pipelines for a sink. For example, I would have (if I translate to command line):
gst-launch filesrc location=myfile.avi ! decodebin ! ffmpegcolorspace ! directdrawsink and at some time I want to switch to videotestsrc ! ffmpegcolorspace ! directdrawsink (and vice-versa)
That is, I either get my frames from the (filesrc+decodebin) or the (videotestsrc) elements.
Is there a way to keep 2 such 'subpipelines' created, while only one is currently linked to the sink? 
- If I create and add all the elements to the main pipeline but only link one branch, I get ofcourse a 'nonlinked' error for the other branch. 
- If I create all, but only add the branch I use (with gst_bin_add_many), then remove the branch (with gst_bin_remove_many) and add the new one it works. But if I want to revert again, then the elements that got removed in the first place cannot be added again.
Is there a way to keep a bunch of elements such that I can add/remove them from the pipeline anytime I want (without having to recreate them) ?

Best Regards,
Al


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081112/38944b7f/attachment.htm>


More information about the gstreamer-devel mailing list