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

Wim Taymans wim at fluendo.com
Thu Oct 20 10:38:03 CEST 2005


On Thu, 2005-10-20 at 19:21 +0200, Vincent Torri wrote:
> the test6 program does not work. I reports these errors :
> 
> ERROR (0x80eb1f0 - 0:00:00.217666000)               ffmpeg(15211) (0)::
> get_buffer() failed (-1 0 0 (nil))
> 
> ERROR (0x80eb1f0 - 0:00:00.217890000)               ffmpeg(15211)
> gstffmpegdec.c(883):gst_ffmpegdec_frame:<ffdec_mpeg40> ffdec_mpeg4:
> decoding error (len: -1, have_data: 0)
> 
> (a lot)
> 
Yeah, lousy bug in ffmpeg, it totally ignores a non-fatal error.

> then
> 
> stream src0:
>  caps: video/x-raw-yuv, width=(int)704, height=(int)400,
> framerate=(double)25, format=(fourcc)I420,
> pixel-aspect-ratio=(fraction)1/1
That looks ok.

> 
> (test6:15211): GStreamer-CRITICAL **: gst_query_parse_duration: assertion
> `GST_QUERY_TYPE (query) == GST_QUERY_DURATION' failed
>  duration: 0:00:00.134514854
> 
What type is audio supposed to be?

Wim
> 
> 
> Vincent
> 
> On Thu, 20 Oct 2005, Wim Taymans wrote:
> 
> > On Thu, 2005-10-20 at 19:08 +0200, Vincent Torri wrote:
> > > Hey,
> > >
> > Hi,
> >
> > a little testapp called test6.c is included in
> > gst-plugins-base/gst/playback to
> > demonstrate stream type finding using decodebin. Requires latest CVS
> > version and
> > uses the ASYNC state change of decodebin.
> >
> > Wim
> >
> > > 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
> > > >
> > --
> > Wim Taymans <wim at fluendo.com>
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free content, downloads, discussions,
> > and more. http://solutions.newsforge.com/ibmarch.tmpl
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-- 
Wim Taymans <wim at fluendo.com>





More information about the gstreamer-devel mailing list