msdk: Allow video and system memory share among buffers
authorSeungha Yang <seungha.yang@navercorp.com>
Wed, 4 Sep 2019 04:18:38 +0000 (13:18 +0900)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 10 Sep 2019 13:29:11 +0000 (13:29 +0000)
commitd4112d3d7b6f2a54cabb50d695b1837c21231011
tree07f7a38c6302e6466f0d1ceec203302f0acb6c74
parent04b77a8c9db39c96e62b229a7c7f42e7d0530cfe
msdk: Allow video and system memory share among buffers

gst_buffer_make_writable() requires exclusive reference to the
GstMemory so the _make_writable() for the msdk buffer will result
to fallback system memory copy, because the msdk memory were initialized
with GST_MEMORY_FLAG_NO_SHARE flag.

Note that, disable sharing GstMemory brings high overhead but actually
the msdk memory objects can be shared over multiple buffers.
If the memory is not shareable, newly added GstAllocator::mem_copy will
create copied msdk memory.
sys/msdk/gstmsdksystemmemory.c
sys/msdk/gstmsdkvideomemory.c