Which function is loaded to convert the NVDS_EVENT_MSG_META metadata to the schema payload in the file nvmsgconv.cpp?

I want to change the message transformed to nvmsgbroker after classfied nvinfer plugin. I just send several simple values to kafka. I do not know how to deal it. I try to make some changes in the file nvmsgconv.cpp. But I do not know which function is passed, So, I add this line


at the function generate_deepstream_message_minimal, and this line


at the function generate_schema_message.

But there is no any echo, even with any value (0/1) for the parameter --schema (-s).
So, where should I make the change?

ps. there is a compile error,

nvmsgconv.cpp:834:13: error: ‘json_to_string’ was not declared in this scope; did you mean ‘g_icon_to_string’?

  • 834 | message = json_to_string (rootNode, TRUE);*

What wrong with it? How to deal with it?

Message conversion called by msg2p_generate_multiple or msg2p_generate based on flag multiplePayloads in nvmsgconv plugin code sources/gst-plugins/gst-nvmsgconv/gstnvmsgconv.c and these two functions will call into generate_deepstream_message_minimal or generate_schema_message based on payload type is NVDS_PAYLOAD_DEEPSTREAM_MINIMAL or NVDS_PAYLOAD_DEEPSTREAM.

What change did you make?

After conducting the following command, the error is vanished.
sudo apt-get install libjson-glib-1.0-0 libjson-glib-devemphasized text