Uridecodebin does not link nvvidconv to nvv4l2decoder

Hi, I’m working with GStreamer to build a video decoder, and I’m having trouble with auto selection of a hardware decoder. I’m using the uridecodebin element to take a URI and decode it to raw video. However, when uridecodebin selects a hardware decoder (in this case nvv4l2decoder), it does not also add an element to copy the decoded video from GPU memory to main memory (in this case nvvidconv), so I can’t access it via appsink. nvv4l2decoder’s output caps are video/x-raw(memory:NVMM), while I have uridecodebin’s caps set to video/x-raw. I would rather not manually insert nvvidconv, as I want the decoder to be generic and cross-platform, is there a way around this? Thanks in advance.

Did you try using autovideoconvert element ?

You may further tell your pipelines and use case in detail for better advice if not enough.

That worked, thanks!