Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 6.4
• JetPack Version (valid for Jetson only): NA
• TensorRT Version: 8.6
• NVIDIA GPU Driver Version (valid for GPU only): 535
• 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): na
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description): na
What operations must absolutely be done inside the the critical section between nvds_acquire_meta_lock
& nvds_acquire_meta_unlock
?
I’ve looked into multiple examples & plugin source code that has attach_metadata
function and I can’t find the common denominator among them to answer the above question.
For example:
osd_sink_pad_buffer_probe()
indeepstream_test1_app.c
has no critical sectionattach_metadata_object()
ingstdsexample_optimized.cpp
putnvds_acquire_classifier_meta_from_pool()
outside the critical sectionattach_metadata_classifier()
ingstnvinfer_meta_utils.cpp
put everything (acquire, modify, attach) inside the critical sectionattachMetadata()
inpost_processor_classify.cpp
put everything (acquire, modify, attach) inside the critical section
I infer from example code the following:
- Acquire metadata: can be outside critical section
- Modify acquired metadata before attachment: can be outside critical section
- Attach metadata: can be outside critical section
- Modify existing metadata: must be inside critical section
I’m not sure if the rules above are correct and complete. So what operations must absolutely be done inside the the critical section between nvds_acquire_meta_lock
& nvds_acquire_meta_unlock
?