• Hardware Platform (Jetson Nano / GPU) • DeepStream Version 5.1 • JetPack Version (valid for Jetson only) • TensorRT Version 7.1
Hi. I setup all configs(consumer options + source options) for smart record.
# Configure this group to enable cloud message consumer.
[message-consumer0]
enable=1
proto-lib=/opt/nvidia/deepstream/deepstream-5.1/lib/libnvds_kafka_proto.so
conn-str=192.168.1.100;9092
config-file=./configs/cfg_kafka.txt
subscribe-topic-list=capcommand
# Use this option if message has sensor name as id instead of index (0,1,2 etc.).
sensor-list-file=configs/dstest5_msgconv_sample_config.txt
At first thanks for your try.
I solved the problem with using the source number [source-id] instead of sensor id by commenting sensor-list-file=... in the [message-consumer0] section.
in the deepstream_c2d_msg.c inside subscribe_cb function there is an if statement that checks hashmap is available or not:
if (ctx->hashMap) {
gpointer keyVal = g_hash_table_lookup (ctx->hashMap, msgSR->sensorStr);
if (keyVal) {
sensorId = *(int *) keyVal;
} else {
NVGSTDS_WARN_MSG_V ("%s: Sensor id not found", msgSR->sensorStr);
goto error;
}
} else {
sensorId = atoi (msgSR->sensorStr);
}
I printed the sensorId after this. When it uses the hashmap for retrieve sensorId the result is wrong and it assigns 127 !! while by commenting the sensor-list-file in configs and achieve id with sensorId = atoi (msgSR->sensorStr); instead of hashmap, it works correctly !