[gst-devel] Cannot set caps.

Michael Joachimiak mjoachimiak at gmail.com
Mon Sep 6 18:38:28 CEST 2010


Maybe you are not giving full caps?
What caps have you tried?

2010/9/6 wl2776 <wl2776 at gmail.com>

>
> Hi all.
> I am writing a small function, making screenshots.
> I have studied several examples already, and now I'm trying to copy them to
> my application.
>
> My function gets the last displayed buffer from the videosink, then builds
> the pipeline:
> appsrc -> ffmpegcolorspace -> videoscale -> encoder -> filesink
>
> I have to save the screenshot to one of several formats, so I use one of
> several encoders: jpegenc, ffenc_bmp, pngenc, ffenc_tiff.
> All elements are created and added to the pipeline.
>
> The problem is that my function cannot set caps on the encoder's sink pad.
> Even following simple statements return false:
> caps=gst_caps_from_string("video/x-raw-rgb"
>                            ",bpp=24,depth=24"
>                         );
> pad=gst_element_get_static_pad(enc,"sink");
> rb=gst_pad_set_caps(pad,caps);
>
> rb is always 0 (FALSE)
>
> However, I need this, because my function also has to scale the screenshot,
> if new width and height are given.
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Cannot-set-caps-tp2528411p2528411.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Your Sincerely
Michael Joachimiak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100906/634b1cc7/attachment.htm>


More information about the gstreamer-devel mailing list