applemedia: implement GstAppleCoreVideoMemory
Submitted by Ilya Konstantinov
Assigned to Ilya Konstantinov
Link to original bug (#747216)
Description
In gst_core_media_buffer_wrap_pixel_buffer we're performing CVPixelBufferLockBaseAddress. Apple documentation says:
"When accessing pixel data with the GPU, locking is not necessary and can impair performance."
In pipelines where the CVPixelBuffer will be passed from one Apple element to another, this might harm performance, as we might be locking the pixel buffer into CPU memory needlessly.
It seems to be possible to solve this with a custom GstAllocator that'll store the CVPixelBuffer and lock only upon mapping.