design: memory: assorted formatting and markup fixes

This commit is contained in:
Reynaldo H. Verdejo Pinochet 2017-02-03 15:37:27 -08:00
parent 1687511e4e
commit b4e0ffdfd7

View file

@ -12,13 +12,13 @@ multimedia data passed around in the pipeline.
## Memory layout ## Memory layout
`GstMemory` manages a memory region. The accessible part of the managed region is `GstMemory` manages a memory region. The accessible part of the managed region
defined by an offset relative to the start of the region and a size. This is defined by an offset relative to the start of the region and a size. This
means that the managed region can be larger than what is visible to the user of means that the managed region can be larger than what is visible to the user of
`GstMemory` API. `GstMemory` API.
Schematically, `GstMemory` has a pointer to a memory region of _maxsize_. The area Schematically, `GstMemory` has a pointer to a memory region of _maxsize_. The
starting from `offset` and `size` is accessible. area starting from `offset` and `size` is accessible.
``` ```
memory memory
@ -80,8 +80,7 @@ After an allocator is created, new `GstMemory` can be created with
``` c ``` c
GstMemory * gst_allocator_alloc (const GstAllocator * allocator, GstMemory * gst_allocator_alloc (const GstAllocator * allocator,
gsize size, gsize size, GstAllocationParams *params);
GstAllocationParams *params);
``` ```
`GstAllocationParams` contain extra info such as flags, alignment, prefix and `GstAllocationParams` contain extra info such as flags, alignment, prefix and
@ -131,16 +130,16 @@ After the data has been accessed in the object, the `unmap()` call must be
performed, which will unlock the memory again. performed, which will unlock the memory again.
It is allowed to recursively map multiple times with the same or narrower It is allowed to recursively map multiple times with the same or narrower
access modes. For each of the map calls, a corresponding unmap call needs to access modes. For each of the `map()` calls, a corresponding `unmap()` call
be made. WRITE-only memory cannot be mapped in READ mode and READ-only memory needs to be made. WRITE-only memory cannot be mapped in READ mode and
cannot be mapped in WRITE mode. READ-only memory cannot be mapped in WRITE mode.
The memory pointer returned from the map call is guaranteed to remain valid in The memory pointer returned from the `map()` call is guaranteed to remain
the requested mapping mode until the corresponding unmap call is performed on valid in the requested mapping mode until the corresponding `unmap()` call is
the pointer. performed on the pointer.
When multiple map operations are nested and return the same pointer, the pointer When multiple `map()` operations are nested and return the same pointer, the
is valid until the last unmap call is done. pointer is valid until the last `unmap()` call is done.
When the final reference on a memory object is dropped, all outstanding When the final reference on a memory object is dropped, all outstanding
mappings should have been unmapped. mappings should have been unmapped.