I’ve discovered that, downstream of nvstreammux, buffers are not 1-per-frame, but rather 1-per-batch. Therefore, it should be expected that there will be one, unique NvDsBatchMeta attached to each GstBuffer (no matter the batch size). Presumably, nvstreamdemux reverts buffers to 1-per-frame, though I haven’t tried it.
Now, what I don’t know is, if I needed to access the video frame data for each frame in the batch, how I’d go about that. The buffer sizes all seem to be 56 bytes, no matter what batch size I use. I assume this is some struct, as the values mostly look like 64-bit pointers. However, for now, I just need to consume NvDsFrameMeta.
In my defense, the reason I assumed the buffers still contained individual frames is that the caps are:
video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1280, height=(int)720, ...
Obviously, I wasn’t paying enough attention to that “(memory:NVMM)”, which is clearly how DeepStream gets away with making these batch-buffers.