Add payload generation library to nvmsgconv

This commit is contained in:
Barzan Hayati 2025-09-07 23:52:43 +00:00
parent e81b19d491
commit 0a4f85859d
4 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,7 @@
},
"msgconv": {
"msgconv_config_file": "../data/nvmsgconv_configs/msgconv_config.txt",
"payload_generation_library": "../data/nvmsgconv_configs/libnvds_msgconv.so",
"msgconv_frame_interval": 30
},
"msgbroker": {

Binary file not shown.

View File

@ -5,10 +5,14 @@ NvMessageConverter::NvMessageConverter() {
msgconv_config_file = config["msgconv"]["msgconv_config_file"];
frame_interval = config["msgconv"]["msgconv_frame_interval"];
payload_generation_library =
config["msgconv"]["payload_generation_library"];
}
bool NvMessageConverter::create_message_converter() {
msgconv = gst_element_factory_make("nvmsgconv", "nvmsg-converter");
g_object_set(G_OBJECT(msgconv), "msg2p-lib", payload_generation_library,
NULL);
g_object_set(G_OBJECT(msgconv), "config", msgconv_config_file, NULL);
g_object_set(G_OBJECT(msgconv), "payload-type", 0,
NULL); // 0 = DeepStream schema, 1 = minimal schema

View File

@ -9,6 +9,7 @@ class NvMessageConverter {
private:
public:
gint frame_interval;
std::string payload_generation_library;
GstElement *msgconv = NULL;
std::string msgconv_config_file;
NvMessageConverter();