How to get source's index in deepstream?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
2060 GPU
• DeepStream Version
deepstream 6.0
• JetPack Version (valid for Jetson only)
• TensorRT Version
tensorrt 8.0
• NVIDIA GPU Driver Version (valid for GPU only)
470
• Issue Type( questions, new requirements, bugs)
questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

I want to obtain the index corresponding to the source in the DEEPSTREAM operation to facilitate the switching source. But I found that the source_id taken from the AppCTX-> Config.multi_Source_CONFIG [i] is always 0, and what I want to get is 0 \ 1 \ 2 \ 3. How can I do it?

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

my code like this:

NvDsSourceConfig index_cfg=appCtx->config.multi_source_config[i];

p->ds_index = index_cfg.source_id;//cannot got source index

you might set “source-id” in source setting, the parsing function is opensource, please refer to function parse_source_yaml in opt\nvidia\deepstream\deepstream\sources\apps\apps-common\src\deepstream-yaml\deepstream_source_yaml.cpp

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