[][src]Function mmal_sys::mmal_port_pool_create

pub unsafe extern "C" fn mmal_port_pool_create(
    port: *mut MMAL_PORT_T,
    headers: c_uint,
    payload_size: u32
) -> *mut MMAL_POOL_T

Create a pool of MMAL_BUFFER_HEADER_T associated with a specific port. This allows a client to allocate memory for the payload buffers based on the preferences of a port. This for instance will allow the port to allocate memory which can be shared between the host processor and videocore. After allocation, all allocated buffer headers will have been added to the queue.

It is valid to create a pool with no buffer headers, or with zero size payload buffers. The mmal_pool_resize() function can be used to increase or decrease the number of buffer headers, or the size of the payload buffers, after creation of the pool.

@param port Port responsible for creating the pool. @param headers Number of buffers which will be allocated with the pool. @param payload_size Size of the payload buffer which will be allocated in each of the buffer headers. @return Pointer to the newly created pool or NULL on failure.