How to check if audio exists from stream while pipeline is building ?

stic at free.fr stic at free.fr
Tue Sep 2 08:27:11 PDT 2014


Hi,
I build a pipeline using uridecodebin element to read a stream.
The stream contains video, and can sometimes have audio with video.
The problem is that if I link elements and run the pipeline, when the stream does not contain audio the pipeline will not play.
I know if there is audio only when the pipeline has been run (in the pad-added callback of uridecodebin), so is there a way to dynamically change pipeline to add/remove audio elements and make it work ?
I tried to link audio only when I find audio pad from pad-added callback, but did not succeed. Could someone give me the big picture of what I could do ?
Or do I have to detect if the streams contains audio before running the pipeline, and build it accordingly to what has been detected ?

Thanks you very much for any answer.
Cheers


More information about the gstreamer-devel mailing list