glupload: Raw upload could be optimized using a BufferPool
Submitted by Nicolas Dufresne
Currently when doing raw upload, we create a new GstBuffer and set of new texture every time we receives an input. This could be slightly optimized by reusing the textures through a BufferPool.
Note that a mechanism would be needed to properly attach the mapped input buffer so the buffer pool can detach it when the buffer comes back to the pool. What I would saggest is to add a method to attach the user_data/GDestroyNotify pair as qdata to each memory using a well known name. Then the pool reset() method could remove this qdata on each memory. The destroy notify would also be called if the memory is destroyed outside of the buffer.