[gst-devel] Sequentially reviewing many files using decodebin

Antoine Tremblay hexa00 at gmail.com
Mon Feb 9 19:07:26 CET 2009


You should wait for the no-more-pads signal

see :

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElement-no-more-pads


Before setting your pipeline to null..

Not quite sure if all the demuxers support it tought...


Antoine

On Mon, Feb 9, 2009 at 12:47 PM, W. Michael Petullo <mike at flyn.org> wrote:

> What is the correct way to use decodebin in a synchronous, sequential
> manner to review the stream types in many files?
>
> I have an application that needs to classify files as having an audio or
> video component (or both). Right now, I set up a decodebin pipeline,
> register a new-decoded-pad callback and set the pipeline's state to
> paused. The new-decoded-pad callback classifies each component. Soon
> after, the pipeline's state is set to NULL and the pipeline is free'd.
>
> What I am finding is that only the first pad is set up between the paused
> and NULL states. For example, if a stream has both audio and video
> components, then the audio pad is set up.
>
> What I can do is enter a glib main loop between the paused and NULL
> states. If I let this run for 1/10th of a second, then both pads will be
> setup and my callback will be called twice. Of course, this depends on the
> timing of events which may not always fit into 1/10th of a second. This
> technique does not seem very elegant.
>
> Is there a better way?
>
> Mike
>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090209/98d6eb57/attachment.htm>


More information about the gstreamer-devel mailing list