Hi all,<div><br></div><div>I&#39;m trying to link v4l2src and appsink in order to fill the buffer with captured frames from a camera.</div><div>However, I got a &quot;gst_eleemnt_link_error&quot; when gst_elemnt_link_filtered() was executed.</div>
<div>Could you give me any comments on the code snippet below?</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>GstElement *myPipeline = gst_pipeline_new(&quot;myPipeline&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>GstElement *myBin = gst_bin_new(&quot;myBin&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>GstElement *cameraSrc = gst_element_factory_make(&quot;v4l2src&quot;, &quot;cameraSrc&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>GstElement *testSink = gst_element_factory_make(&quot;appsink&quot;, &quot;testsink&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>GstCaps *caps = gst_caps_new_simple(&quot;video/x-raw-yuv&quot;, &quot;format&quot;, GST_TYPE_FOURCC, GST_MAKE_FOURCC(&#39;I&#39;, &#39;4&#39;, &#39;2&#39;, &#39;2&#39;), &quot;width&quot;, G_TYPE_INT, 320, &quot;height&quot;, G_TYPE_INT, 240, &quot;framerate&quot;, GST_TYPE_FRACTION, 30, 1, NULL);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!caps) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>printf(&quot;error in caps\n&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>exit(1);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_app_sink_set_caps((GstAppSink*)testSink, caps);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_bin_add_many(GST_BIN(myBin), cameraSrc, testSink, NULL);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>gst_bin_add(GST_BIN(myPipeline), myBin);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!gst_element_link_filtered(cameraSrc, testSink, caps)) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>printf(&quot;gst_element_link_ error\n&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>exit(1);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
</div><div><br></div><div>Regards,</div><div>Won</div><div><br></div>