The following functions are required to be implemented for all codecs that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions for codecs that don't advertise this capability will result in an error code being returned, usually VPX_CODEC_INCAPABLE
Memory Map Entry.
This structure is used to contain the properties of a memory segment. It is populated by the codec in the request phase, and by the calling application once the requested allocation has been performed.alias for struct vpx_codec_mmap
Iterate over the list of segments to allocate.
Iterates over a list of the segments to allocate. The iterator storage
should be initialized to NULL to start the iteration. Iteration is complete
when this function returns VPX_CODEC_LIST_END. The amount of memory needed to
allocate is dependent upon the size of the encoded stream. In cases where the
stream is not available at allocation time, a fixed size must be requested.
The codec will not be able to operate on streams larger than the size used at
allocation time.
- Parameters
-
[in] | ctx | Pointer to this instance's context. |
[out] | mmap | Pointer to the memory map entry to populate. |
[in,out] | iter | Iterator storage, initialized to NULL |
- Return values
-
Identify allocated segments to codec instance.
Stores a list of allocated segments in the codec. Segments \ref MUST be
passed in the order they are read from vpx_codec_get_mem_map(), but may be
passed in groups of any size. Segments \ref MUST be set only once. The
allocation function \ref MUST ensure that the vpx_codec_mmap_t::base member
is non-NULL. If the segment requires cleanup handling (e.g., calling free()
or close()) then the vpx_codec_mmap_t::dtor member \ref MUST be populated.
- Parameters
-
[in] | ctx | Pointer to this instance's context. |
[in] | mmaps | Pointer to the first memory map entry in the list. |
[in] | num_maps | Number of entries being set at this time |
- Return values
-