[gst-devel] [decodebin 0.9] getting informations of a stream
Vincent.Torri at iecn.u-nancy.fr
Thu Oct 20 10:19:52 CEST 2005
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 ?
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
> 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.
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5244 bytes
More information about the gstreamer-devel