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 ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel test.c (8K) Download Attachment |
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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Le vendredi 18 avril 2008 à 10:43 -0400, Nick Haddad a écrit :
> 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 and thanks for your answer. I try gst_pad_get_negotiated_caps on the sink of fakesink, just after have linked decodebin src_pad and queue sink, but this caps are always NULL. It's like pad caps were not negociated properly. Link between new_pad and fakesink sink pad is GST_PAD_LINK_WAS_LINKED so i think that linked is done properly. Maybe they are some sigals that I can connect to be notified when caps are negotiated ? attached my test program modifed after your answer. regards, Nicolas ------------------------------------------------------------------------- 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel test.c (5K) Download Attachment |
In reply to this post by Nick Haddad
hi,
has anyone have a suggestion how to cope with the following error: xcb_io.c:285: _XAllocID: Assertion `!(dpy->flags & (1L << 3))' failed thanx daniel Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Wed, Jun 11, 2008 at 11:34 PM, Daniel Shachrur <[hidden email]> wrote:
> hi, > > has anyone have a suggestion how to cope with the following error: > > xcb_io.c:285: _XAllocID: Assertion `!(dpy->flags & (1L << 3))' failed You'd have to give _much_ more context for us to even have any idea what you're doing. Is this related to gstreamer in any way? Do you have a reproducible error? How do you reproduce it? Mike ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |