[gst-devel] Cannot set caps.

wl2776 wl2776 at gmail.com
Mon Sep 6 15:52:37 CEST 2010


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.




More information about the gstreamer-devel mailing list