[gst-devel] Remove unlinked elements from pipeline

Hecate_Eos xflxmin17 at 163.com
Mon Jul 12 12:13:21 CEST 2010


Hi All
I use uridecodebin to decode my file. I can play the file with both video
and audio, but I have the problem when the file just has video. For example,
I play the webcamera.
                               ----------         
---------------------------------------
                        /  -> | tee0 |   ->   |   Video Output to Screen  |
----------------------/        ----------         
---------------------------------------
| uridecodebin |
----------------------
                      \                ---------         
------------------------------------------------
                         \ ---X---> | tee1 |   ->  |     Audio Output to
sound device |
                                      ----------        
------------------------------------------------
First, I have added all the elements to the pipeline.
I link uridecodebin with tee0 and tee1 in it's "pad-added" event. When I
play a file with both audio & video , it can work well.
But, I want also playback the file without audio and the webcamera using the
same pipeline. You know, the webcamera don't have the audio, so in the
"pad-added" event , I don't link uridecodebin to tee1.
So, I want to remove tee1 & audio output elements. I do the remove operation
in the uridecodebin's "no-more-pads" event.
I have searched on the Internet that I can't really remove elements in the
"no-more-pads". So, I just in it post a custom message. I in the bus message
process callback to remove the elements. But, I can't get it work.
Please, tell me how to remove the unlinked elements and make the pipeline
run.
Or, tell me how I can dynamicly add the tee0, video output, tee1, audio
output to the pipeline which just has single element - uridecodebin.

Thanks in advance . Sincerely.

-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Remove-unlinked-elements-from-pipeline-tp2285949p2285949.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list