Incorrect 'size' input to nvds_msg2p_generate() in nvmsgconv when using NVDS_PAYLOAD_CUSTOM?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson Nano)
• DeepStream Version 5.0 GA
• JetPack Version (4.4)
• TensorRT Version 7

We modified the nvmsgconv to generate custom Json data. We tested it with deepstream-app-test5

nvds_msg2p_generate (NvDsMsg2pCtx *ctx, NvDsEvent *events, guint size) was modified to support generation of custom JSON data when ctx->payloadType == NVDS_PAYLOAD_CUSTOM.

The above method receives the ‘size’ parameter as one of the inputs. When the ctx->payloadType == NVDS_PAYLOAD_CUSTOM, size is always 1.

The size parameter is correct (and is equal to number of objects) when the option is NVDS_PAYLOAD_MINIMAL.

Is this the expected behavior? How can be change this?

Check usage for size here,
sources/gst-plugins/gst-nvmsgconv/gstnvmsgconv.c::gst_nvmsgconv_transform_ip
depends on the payloadType used and if multiplePayloads true or not

Hi

Thanks that helped in understanding the interface better. If it is CUSTOM payload, then single event is sent to the converter instead of the whole bunch of events detected for that frame. I am not sure why this distinction has been made. For CUSTOM payloads, sending the whole event list for generating a single payload consisting of all objects detected at that instance/frame would have been ideal (as in the case of MINIMAL)??

Hi,
the code is open sourced, you may change it according to your needs.