[gst-devel] decodebin caps troubles with rtspsrc source
Nick Haddad
nhaddad at mathworks.com
Fri Apr 18 16:43:21 CEST 2008
Nicolas,
Getting the capabilities of an incoming pad will give you a set of
possible pad templates that you can use when making decisions about
how to do connect the decode bin output pads to other elements.
Instead, I think you want to use the gst_pad_get_negotiated_caps on
the "sink" pad of your fakesink. Do this after you've already linked
the decodebin's pad to your fakesink so that the sink pads caps are
negotiated properly. You should get fixed caps at this point, with
width, height values that don't contain ranges.
-Nick
On Apr 12, 2008, at 5:50 AM, Nicolas Aguirre wrote:
> Hi there,
>
> I try to write a little program in C that handles rtsp streams with
> gst and I have some troubles.
>
> I create a pipeline like this one : rtspsrc ! decodebin ! fakesink
> In documentation rtspsrc have "sometimes" pad and should provide
> data only when in PLAYING state, so I added an callback to "pad-
> added" signal and set state of my pipeline to PLAYING. My "pad-
> added" signal is called, and in this callback I link rtspsrc pad
> with sink pad of decodebin element.
> Decodebin have signals for "new-decoded-pad" so I provide a callback
> for this signal too. Callback is called and I detect caps. But here
> troubles comes. Caps are not always the same. Sometimes I receive
> fixed caps with only one height, width, framerate and fourcc
> values , and sometimes i received ranges for these values. I woul
> like to know how to do to always receive right and fixed values in
> decodebin caps ?
>
> "new-decoded-pad" callback have "last" boolean, in his prototype,
> sould this value is 1 when they are no more pad for decodebin
> element ? In my test this boolean vallue is always FALSE. My stream
> have audio and video.
>
> attached my source code.
>
> If you have ideas ... :)
>
> Best regards,
> Nicolas
>
>
>
>
>
> <
> test
> .c
> >
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list