You should wait for the no-more-pads signal <br><br>see :<br><br><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElement-no-more-pads">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElement-no-more-pads</a><br>
<br><br>Before setting your pipeline to null.. <br><br>Not quite sure if all the demuxers support it tought...<br><br><br>Antoine<br><br><div class="gmail_quote">On Mon, Feb 9, 2009 at 12:47 PM, W. Michael Petullo <span dir="ltr">&lt;<a href="mailto:mike@flyn.org">mike@flyn.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What is the correct way to use decodebin in a synchronous, sequential<br>
manner to review the stream types in many files?<br>
<br>
I have an application that needs to classify files as having an audio or<br>
video component (or both). Right now, I set up a decodebin pipeline,<br>
register a new-decoded-pad callback and set the pipeline&#39;s state to<br>
paused. The new-decoded-pad callback classifies each component. Soon<br>
after, the pipeline&#39;s state is set to NULL and the pipeline is free&#39;d.<br>
<br>
What I am finding is that only the first pad is set up between the paused<br>
and NULL states. For example, if a stream has both audio and video<br>
components, then the audio pad is set up.<br>
<br>
What I can do is enter a glib main loop between the paused and NULL<br>
states. If I let this run for 1/10th of a second, then both pads will be<br>
setup and my callback will be called twice. Of course, this depends on the<br>
timing of events which may not always fit into 1/10th of a second. This<br>
technique does not seem very elegant.<br>
<br>
Is there a better way?<br>
<br>
Mike<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)<br>
software. With Adobe AIR, Ajax developers can use existing skills and code to<br>
build responsive, highly engaging applications that combine the power of local<br>
resources and data with the reach of the web. Download the Adobe AIR SDK and<br>
Ajax docs to start building applications today-<a href="http://p.sf.net/sfu/adobe-com" target="_blank">http://p.sf.net/sfu/adobe-com</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>