Nvdsvideotemplate library migration from deepstream 6.0 to 6.2

• Hardware Platform (Jetson)
• DeepStream Version (6.0 and 6.2)
• JetPack Version (L4T32.6.1 and L4T35.3.1)
• TensorRT Version 8.5
• Issue Type( questions )

Hi all, I currently have a custom Deepstream application build with input sources, nvstreammux, gst-nvdsvideotemplate for some simple image overlay and gst-nvinfer. It’s running fine on Deepstream 6.0 on a TX2NX dev kit running L4T32.6.1.

I’m currently looking into supporting the same code with Deepstream 6.2 in L4T35.3.1. Without changing anything gst_buffer_map within gst-nvdsvideotemplate is causing the application to segfault, and I’m not entirely sure what’s causing it. I looked through the changelog and there isn’t any mentioned to breaking changes to the nvdsvideotemplate plugin.

Any idea what could be the issue, any pointers towards migrating nvdsvideotemplate impl from 6.0 to 6.2 would be helpful.

Some additional info, if I insert a dummy lib that just returns BufferResult::Buffer_Ok; without accessing the buffer, its still failing due to caps failing to negotiate.

GStreamer-CRITICAL **: 00:19:43.078: gst_caps_is_fixed: assertion 'GST_IS_CAPS (caps)' failed                                                                                                  
0:00:04.224370970  7737 0xffff3000b460 WARN           basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<primary_gie_template> transform could not transform video/x-raw(memory:NVMM), width=(int)64
0, height=(int)480, framerate=(fraction)8/1, batch-size=(int)2, num-surfaces-per-frame=(int)1, format=(string)RGBA, pixel-aspect-ratio=(fraction)1/1, block-linear=(boolean)false in anything we support

The element before the videotemplate plugin is a capsfilter and nvvideoconvert. The capsfilter is throwing warning about

GST_PADS gstpad.c:4231:gst_pad_peer_query:<primary_gie_rgba_capfilter:src> could not send sticky events

Might be something to do with the GetCompatibleCaps function, it doesn’t seems to be triggered in Deepstream 6.2 with gstreamer 1.16

I found the issue,

I modified the provided nvdscustomlib_base/factory/interface slightly by removing some functions and variables that were not used (e.g. virtual char* QueryProperties ). Replacing it with what was provided and implementing all the virtual functions solves the issue.

Weirdly it works in Deepstream 6.0, but the mystery is solved. Hopefully, this help someone in the future.