[gst-devel] assertion `GST_IS_CAPS (caps)' failed

bertrand haut bertrand.haut at gmail.com
Mon May 15 15:28:51 CEST 2006

I'm trying to port a working plugin for gstreamer 0.8 to gstreamer
0.10. The caps of this plugin are
  GST_STATIC_CAPS ("video/x-raw-yuv, "
		                  "width=(int)720, "
                                  "height=(int)576, "

At this moment the chain function is simply :

static GstFlowReturn
gst_undiscret_chain (GstPad *pad, GstBuffer *buf)
  Gstundiscret *filter;

	GstBuffer * out_buf;

	out_buf = gst_buffer_new_and_alloc (GST_BUFFER_SIZE(buf));
	gst_buffer_set_caps (out_buf, GST_PAD_CAPS (filter->srcpad));

        memcpy (GST_BUFFER_DATA (out_buf), GST_BUFFER_DATA(buf)
  gst_buffer_unref (buf);
  return gst_pad_push (filter->srcpad, out_buf);

If I launch this plugin with
gst-launch-0.10 v4l2src ! undiscret  ! xvimagesink
I got the following error message :

berti at neptune:~/code/canal1$ gst-launch-0.10 v4l2src ! undiscret  ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-0.10:30194): GStreamer-CRITICAL **:
gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed

(gst-launch-0.10:30194): GStreamer-CRITICAL **: gst_structure_get_int:
assertion `structure != NULL' failed

(gst-launch-0.10:30194): GStreamer-CRITICAL **: gst_caps_intersect:
assertion `GST_IS_CAPS (caps1)' failed

(gst-launch-0.10:30194): GStreamer-CRITICAL **: gst_caps_is_empty:
assertion `GST_IS_CAPS (caps)' failed

(gst-launch-0.10:30194): GStreamer-CRITICAL **: gst_caps_unref:
assertion `caps != NULL' failed
ERROR: from element /pipeline0/xvimagesink0: Could not write to resource.
Additional debug info:
xvimagesink.c(518): gst_xvimagesink_xvimage_new (): /pipeline0/xvimagesink0:
could not get shared memory of 0 bytes
Execution ended after 327741000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...
berti at neptune:~/code/canal1$

Why are there such errors ?

note that if I launch
    gst-launch-0.10 v4l2src ! undiscret  ! fakesink
or if I replace the two last line with
    return gst_pad_push (filter->srcpad, buf);
it works.

I'm simply trying to copy the data from one buffer to a second in
order to insert my code which will be a function working on
  unsigned char * g_out = (unsigned char *) (GST_BUFFER_DATA(out_buf))
I assume this should be simple.

Thanks for any help.

Bertrand Haut
pgp key:B9514013C02E33FA

More information about the gstreamer-devel mailing list