Having trouble understanding gstreamer api to capture the camera data.

Hello, this is more of a gstreamer problem I think, but maybe someone can help me.

I have the Jetson and I’m using NvArgusCameraSrc.
The camera then goes to nvstreammux.

But I can’t figure out how to properly apply camera Caps in this case.
I the docs they say the Caps are applied to Pads, but all they have is the function that works on Elements

gst_element_link_filtered(A, B, Caps)

It seems to me that the correct way is to use the PAd linker

GstPad *SinkPad = gst_element_get_request_pad(Mux, "sink_0");
GstPad *SourcePad = gst_element_get_static_pad(Source, "src");
gst_pad_link(SourcePad, SinkPad);

But then again, they dont have “gst_pad_link_filtered()” function. So I’m kind of stuck with this.

I also tried creating the capsfilter myself and linking it with the camera and Mux, but all I get is
warning like “pad incompatible” in the logs…

I would appreciate any help with this. Thanks!

EDIT: Sorry, I am an Idiot. There is a fucntion called gst_element_link_pads_filtered(). Not sure why I didn’t see that in the docs. Note to self: don’t rush.

The Topic can be closed/removed.

For linking with nvstreammux, you should also need

g_object_set (G_OBJECT (bin->src_elem), "bufapi-version", TRUE, NULL);

Please refer to