How to manually attach NvDsBatchMeta (like nvstreammux does)

The best response in this forum so far regarding this “batched” NVMM is maybe this:

Looks like this is how to instantiate a NvBufSurface and wrap it in a GstBuffer via exposing the pointer to NvBufSurface directly to gst_buffer_new_wrapped_full. But I would like some comments from Nvidia first before I try this.