Problem with caps between v4l2src and autovideosink

Alicia Romero alromor84 at gmail.com
Thu Sep 18 03:39:32 PDT 2014


Hi people!
I have a camera installed in /dev/video0.

The pipeline:
gst-launch -v v4l2src ! autovideosink

works perfectly and I can see which caps between v4l2src and autovideosink
are used:
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink:
caps = video/x-raw-yuv, format=(fourcc)YUY2, width=(int)1600,
height=(int)1200, interlaced=(boolean)false,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)5/1

Now I want to write a small application doing the same:
  [...]
  source = gst_element_factory_make ("v4l2src", "source");
  sink = gst_element_factory_make ("autovideosink", "sink");
  caps_filter = gst_element_factory_make("capsfilter", "filter");
  [...]
 caps = gst_caps_new_simple("video/x-raw",
              "framerate", GST_TYPE_FRACTION, 5, 1,
              "format", G_TYPE_STRING, "YUY2",
              "width", G_TYPE_INT, 1600,
              "height", G_TYPE_INT, 1200,
              NULL);
 g_object_set(G_OBJECT(caps_filter), "caps", caps, NULL);
  [...]

But it is not working, I get:
Error received from element source: Internal data flow error.
Debugging information: gstbasesrc.c(2933): gst_base_src_loop ():
/GstPipeline:test-pipeline/GstV4l2Src:source:
streaming task paused, reason not-negotiated (-4)

I suppose the error is because of the caps incompatibility between v4l2src
and caps_filter.
Does anyone know why is not working and which caps can I use in my
application?

Thanks!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140918/2e8ac528/attachment-0001.html>


More information about the gstreamer-devel mailing list