<div dir="ltr"><div><div><div><div>Hi people!<br>I have a camera installed in /dev/video0.<br></div></div><br>The pipeline: <br>gst-launch -v v4l2src ! autovideosink<br><br></div>works perfectly and I can see which caps between v4l2src and autovideosink are used: <br>/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<br><br></div>Now I want to write a small application doing the same:<br><div>  [...]<br>  source = gst_element_factory_make ("v4l2src", "source");<br>  sink = gst_element_factory_make ("autovideosink", "sink");<br>  caps_filter = gst_element_factory_make("capsfilter", "filter");<br>  [...]<br> caps = gst_caps_new_simple("video/x-raw",<br>              "framerate", GST_TYPE_FRACTION, 5, 1,<br></div><div>              "format", G_TYPE_STRING, "YUY2",<br></div><div>              "width", G_TYPE_INT, 1600,<br>              "height", G_TYPE_INT, 1200,<br>              NULL);<br> g_object_set(G_OBJECT(caps_filter), "caps", caps, NULL);<br>  [...]<br><br></div><div>But it is not working, I get: <br>Error received from element source: Internal data flow error.<br>Debugging information: gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:test-pipeline/GstV4l2Src:source:<br>streaming task paused, reason not-negotiated (-4)<br><br></div><div>I suppose the error is because of the caps incompatibility between v4l2src and caps_filter.<br></div><div>Does anyone know why is not working and which caps can I use in my application?<br><br></div><div>Thanks!!<br></div></div>