[deepstream-test5] How to send the metadata of each combined source to the topic separately

GPU : Titan X
Version : docker image-triton deepstream-5.1

Hello, thank you for Nvidia

I want to send different metadata from multiple sources to each topic

Example) source0 → sink0 : type6-topic0 / source1 → sink1 : type6-topic1

By modifying the code, metadata can be transmitted to each topic when there are multiple sources. However, there was a problem in that each metadata was sent to each topic in a merged state.

Example) To topic 0, the metadata of source 0 and source 1 are combined and transmitted, and to topic 1, the metadata of source 0 and source 1 are combined and transmitted.

So, I want to split the aggregated metadata and send it to each topic

Example) source0->topic1 / source1->topic1

Here is my code and config file

<deepstream_app.c>
static gboolean
add_and_link_broker_sink (AppCtx * appCtx)
{
NvDsConfig *config = &appCtx->config;
NvDsPipeline *pipeline = &appCtx->pipeline;

for (guint source_id = 0; source_id < config->num_source_sub_bins; ++source_id)
{
NvDsInstanceBin *instance_bin = &appCtx->pipeline.instance_bins[source_id];
for (guint i = 0; i < config->num_sink_sub_bins; ++i)
{
NvDsSinkSubBinConfig *sink_config = &config->sink_bin_sub_bin_config[i];
if (sink_config->type == NV_DS_SINK_MSG_CONV_BROKER &&
sink_config->source_id == source_id)
{
NvDsSinkBinSubBin *sink_bin_sub_bin = &instance_bin->sink_bin.sub_bins[i];
gchar *conn_str, *topic;
if (!pipeline->common_elements.tee) {
NVGSTDS_ERR_MSG_V ("%s failed; broker added without analytics; check config file\n", func);
return FALSE;
}
g_object_get(G_OBJECT(sink_bin_sub_bin->sink),
“conn-str”, &conn_str, “topic”, &topic, NULL);
NVGSTDS_INFO_MSG_V(“source-id=%u, sink_bin.sub_bins[%u]=%p, conn-str=%s, topic=%s\n”,
source_id, i, sink_bin_sub_bin->bin, conn_str, topic);
if (!gst_bin_add(GST_BIN(pipeline->pipeline), sink_bin_sub_bin->bin))
return FALSE;
if (!link_element_to_tee_src_pad(pipeline->common_elements.tee, sink_bin_sub_bin->bin))
return FALSE;
break;
}
}
}
return TRUE;
}

[sink0] enable=1 #Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker type=6 source-id=0 msg-conv-config=dstest5_msgconv_sample_config.txt #(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload #(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal #(256): PAYLOAD_RESERVED - Reserved type #(257): PAYLOAD_CUSTOM - Custom schema payload msg-conv-payload-type=1 msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_kafka_proto.so #Provide your msg-broker-conn-str here msg-broker-conn-str=192.168.20.12;9092 topic=metadata0 #disable-msgconv = 1 msg-conv-comp-id=0 msg-broker-comp-id=0 #Optional: #msg-broker-config=../../deepstream-test4/cfg_kafka.txt

[sink1]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
type=6
source-id=1
msg-conv-config=dstest5_msgconv_sample_config.txt
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM - Custom schema payload
msg-conv-payload-type=1
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_kafka_proto.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=192.168.20.12;9092
topic=metadata1
#disable-msgconv = 1
msg-conv-comp-id=1
msg-broker-comp-id=0
#Optional:
#msg-broker-config=…/…/deepstream-test4/cfg_kafka.txt

Did Tiler enabled in the configuration file? if enabled, please disable it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.