[gst-devel] [decodebin 0.9] getting informations of a stream

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Thu Oct 20 10:19:52 CEST 2005


Hey,

I've seen some decodebin updates in the cvs, and some test programs in the
playback diretory, and I've updated my test program. It is attached.

It seems that the streams are correctly found. But I can't get the
informations of the streams. Once the streams are found, I call the
get_info function. I get the first video sink (named vsink0) and try to
get its size.

when I call str = gst_caps_get_structure (caps, 0); I get:

(main_0_9_new:14489): GStreamer-CRITICAL **: gst_caps_get_structure:
assertion `index < caps->structs->len' failed

(main_0_9_new:14489): GStreamer-CRITICAL **: gst_structure_to_string:
assertion `structure != NULL' failed

any Idea where I am wrong ?

thank you

Vincent


On Mon, 29 Aug 2005, Ronald S. Bultje wrote:

> Hi Vincent,
>
> (our) implementation problem, let me explain:
>
> On Mon, 2005-08-29 at 11:33 +0200, Vincent Torri wrote:
> > With gstreamer 0.9, Ronald told me that setting the pipeline to PAUSED
> > fill all the informations I need (size, framerate, length, etc...)
>
> Ideally, this is the case. However, this is not implemented yet, so
> you'll need a bit more.
>
> > but when I set the pipeline to PAUSED, I only get all the new pads. To get
> > the informations, I have to set the pipeline to PLAYING and I need to look
> > at the "notify::caps" signal, as in gstreamer 0.8. Am I missing something,
> > or is it the only way to get these informations ?
>
> So this is done using something called 'preroll'; preroll works well,
> but only if a sink is in the pipeline. With no sink, preroll "is not
> needed" and thus skipped. This is nice for most purposes, but sucks for
> decodebin.
>
> So, you want decodebin to preroll (which means 'prepare data for the
> sink in the ready->paused state transition'); you do that by attaching a
> fake sink (fakesink :) ). Now, to trigger preroll, you add an unused
> sink to the pipeline you're prerolling; not doing this will make the
> pipeline aware of the sink too late, and thus it will still be skipped.
> So you have this pipeline:
>
> filesrc ! decodebin                 fakesink
>
> For each new pad in decodebin, link a fakesink to it:
>
>                     ! fakesink
> filesrc ! decodebin ! fakesink      fakesink
>                     ! fakesink
>
> And then remove the unused fakesink. Now, after the ready->paused state
> transition, it will be ready to process data, and data types will have
> been set on the pads, just like you wanted.
>
> Cheers,
> Ronald
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_0_9_new.c
Type: text/x-csrc
Size: 5244 bytes
Desc: 
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20051020/17c1b2b1/attachment.c>


More information about the gstreamer-devel mailing list