[gst-devel] [decodebin 0.9] getting informations of a stream
Vincent.Torri at iecn.u-nancy.fr
Mon Sep 5 02:43:14 CEST 2005
On Mon, 29 Aug 2005, Ronald S. Bultje wrote:
> 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.
I've tried that, but I have some problems/questions:
1) When may I remove the unused sink ? After or before the PAUSED state ?
If I remove it after the PAUSED state, I have a Gstreamer warning. If I
remove it in the no-more-pad" callback, then there is no warning.
2) So, in the "new-decoded-pad" callback, I link a fakesink. Then, after
the PAUSED state, I try to get the informations (width and height). I get
the sink pad of the video fakesink, get the structure. But this latter is
I cant post a test program, as I have no personal internet connection
right now. But is there a problem with what I do ?
More information about the gstreamer-devel