I am working with DS 6.0 and its Python bindings. I am running a primary detector on multiple streams. After that I have a
nvstreamdemux element that split the batched data into individual stream’s data.
I want to retrieve the numpy image of each stream frame. I know how to do that using a probe. This works fine but it slows down the pipeline since the probe is blocking.
I was thing to add a
nvstreamdemux and right before the probe that retrieves the numpy frame. It is my understanding that the
queue would create a new thread therefore avoid blocking the pipeline because of the subsequent slow probe.
However, is there any risk to encounter synchronization issue? Does the
queue perform a deep copy of the data or does it just store the pointer to the data? If there’s no deep copy, I am afraid that there could be two concurrent access to the same memory location:
- My probe retrieving the numpy frame
- Nvstreammux (or another component) replacing the frame with a new one
What would happen?