memory: provide a mem_unmap function that takes the flags to unmap
authorMatthew Waters <matthew@centricular.com>
Wed, 3 Jun 2015 08:03:36 +0000 (18:03 +1000)
committerMatthew Waters <matthew@centricular.com>
Wed, 3 Jun 2015 10:41:59 +0000 (20:41 +1000)
commit7130230ddb349d0ca7942abdba26b7558df055d1
treefb529549c70a48d1ab9d42ed99b986ee77b8694d
parente9c15d53212ff424a047e933ca9ab662ae155b56
memory: provide a mem_unmap function that takes the flags to unmap

There are gstmemory's available that operate in two memory domains
and need to ensure consistent access between these domains.

Imagine a scenario where e.g. the GLMemory is mapped twice in both
the GPU and the CPU domain.  On unmap or a subsequent map, it would
like to ensure that the most recent data is available in the memory
domain requested.  Either by flushing the writes and/or initiating a
DMA transfer.  Without knowing which domain is being unmapped, the
memory does not know where the most recent data is to transfer to
the other memory domain.

Note: this still does not allow downgrading a memory map.

https://bugzilla.gnome.org/show_bug.cgi?id=750319
gst/gstallocator.h
gst/gstmemory.c
gst/gstmemory.h