change caps for image & imagefreeze

gstream at gstream at
Thu Mar 22 02:29:49 PDT 2012

Hi All,

I have some code that works fine with video streams but when I use a
pngdec as the source I can not change the caps, gives error of

GStreamer-CRITICAL **: gst_pad_set_caps: assertion `caps == NULL ||
gst_caps_is_fixed (caps)' failed
Error: code=3 message=not negotiated

if the caps is set to the png actual input size it passes through with no
error - ie the actual size is 300x169, in the below code the caps of
100x100 triggers the error (pls note this is the java code but I am sure
you get the drift!)

Element source = ElementFactory.make("filesrc", "source");
Element vparse = ElementFactory.make("pngdec", "vparse");
Element frz1 = ElementFactory.make("imagefreeze", "frz1");
Element ffcs1 = ElementFactory.make("ffmpegcolorspace", "ffcs1");
Element vidsc1 = ElementFactory.make("videoscale", "vidsc1");
Element capsfilter1 = ElementFactory.make("capsfilter", "filter1");
capsfilter1.setCaps(Caps.fromString("video/x-raw-yuv, format=(fourcc)AYUV,
width=100, height=100, framerate=30/1,bpp=16, depth=16 "));

I am also adding this source to a videomixer2 overlay hence the cpas ayuv

any thoughts on how I can change the size?


More information about the gstreamer-devel mailing list