class VmoPoolWrapper

Defined at line 17 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

Wrapper class for fzl::VmoPool. Its functionality and API is equivalent to VmoPool, but

adds syslogs relevant to Camera.

Public Methods

zx_status_t Init (cpp20::span<zx::unowned_vmo> vmos, std::optional<std::string> name)

Initializes the VmoPool with a set of vmos.

Defined at line 12 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.cc

void VmoPoolWrapper ()

Defined at line 19 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

void ~VmoPoolWrapper ()

Defined at line 20 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

std::optional<fzl::VmoPool::Buffer> LockBufferForWrite ()

Finds the next available buffer, locks that buffer for writing, and

returns a Buffer instance to allow access to that buffer.

If no buffers are available, returns an empty std::optional.

Defined at line 25 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.cc

zx_status_t PinVmos (const zx::bti & bti, fzl::VmoPool::RequireContig req_contiguous, fzl::VmoPool::RequireLowMem req_low_memory)

Pin all the vmos to physical memory. This must be called prior to

requesting a physical address from any Buffer instance.

Defined at line 28 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

zx_status_t MapVmos ()

Map the vmos to virtual memory. This must be called prior to

requesting a virtual address from any Buffer instance.

Defined at line 35 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

void Reset ()

Resets the buffer read and write locks.

Defined at line 38 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

zx_status_t ReleaseBuffer (uint32_t buffer_index)

Unlocks the buffer with the specified index and sets it as ready to be

reused.

Defined at line 47 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

size_t total_buffers ()

Returns the total number of buffers in this pool.

Defined at line 50 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

size_t free_buffers ()

Returns the number of free buffers in this pool.

Defined at line 53 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h

size_t buffer_size (uint32_t buffer_index)

Returns the size (in bytes) of the buffer at a given index in this pool.

Defined at line 56 of file ../../src/camera/lib/vmo_pool_wrapper/vmo_pool_wrapper.h