In my application, I get a GstBuffer, from a GstSample, which coantains the raw bytes of single a video frame. I then create a new buffer that contains 4 of these frames (this is an expensive copy operation) in contiguous memory and copy that buffer to the GPU for furthur processing.
Is it possible to avoid the copy by implementing a custom GstAllocator that stores batches of 4 frames in contiguous memory blocks from the start?
Hello @ehab24,
Hope everything is going great!
Sure, you can definitely do that.
In fact, that is called a buffer pool, you can find further information here.
For example, this is a custom buffer pool implementation you can base yours out of.
Please keep us posted on how it goes, your project sounds interesting.
And don’t hesitate to reach out if you have further questions or need support.
best regards,
Andres Campos