Okay, then we need to craft a synchronization mechanism, we removed nvinfer for easy replication.
src > queue > nvstreammux > nvconv > queue > p1 > queue > p2 > sink
, where p1, p2 are the two custom plugins.
Case 1 Muxer Configs:
One Source only connected to nvstreammux
nvstreammux Batch Size = 30
Upon inspecting the very first NvDsBatchMeta that enters p1, we find that it contains multiple frames (2 to 5 frames) for the same source. This is not desired as we only need 1 frame per source per batch.
Case 2 Muxer Configs:
One Source only connected to nvstreammux
nvstreammux Batch Size = 1
Upon inspecting the very first NvDsBatchMeta that enters p1, we find that it contains 1 frame per source per batch. This allows p2 to work on it as well and unblock p1 to process the next frame for that source (since it’s blocked because p2 is yet to process the first frame)
So simply put, Is there a way to set a batch size that is higher than current muxer sources and force 1 frame per source in NvDsBatchMeta?