pub trait BufferPoolExtManual: Sealed + IsA<BufferPool> + 'static {
    // Provided methods
    fn config(&self) -> BufferPoolConfig { ... }
    fn set_config(&self, config: BufferPoolConfig) -> Result<(), BoolError> { ... }
    fn is_flushing(&self) -> bool { ... }
    fn acquire_buffer(
        &self,
        params: Option<&BufferPoolAcquireParams>
    ) -> Result<Buffer, FlowError> { ... }
}

Provided Methods§

source

fn config(&self) -> BufferPoolConfig

Gets a copy of the current configuration of the pool. This configuration can be modified and used for the set_config() call.

§Returns

a copy of the current configuration of self.

source

fn set_config(&self, config: BufferPoolConfig) -> Result<(), BoolError>

Sets the configuration of the pool. If the pool is already configured, and the configuration hasn’t changed, this function will return true. If the pool is active, this method will return false and active configuration will remain. Buffers allocated from this pool must be returned or else this function will do nothing and return false.

config is a Structure that contains the configuration parameters for the pool. A default and mandatory set of parameters can be configured with gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() and gst_buffer_pool_config_add_option().

If the parameters in config can not be set exactly, this function returns false and will try to update as much state as possible. The new state can then be retrieved and refined with config().

This function takes ownership of config.

§config

a Structure

§Returns

true when the configuration could be set.

source

fn is_flushing(&self) -> bool

source

fn acquire_buffer( &self, params: Option<&BufferPoolAcquireParams> ) -> Result<Buffer, FlowError>

Acquires a buffer from self. buffer should point to a memory location that can hold a pointer to the new buffer. When the pool is empty, this function will by default block until a buffer is released into the pool again or when the pool is set to flushing or deactivated.

params can contain optional parameters to influence the allocation.

§params

parameters.

§Returns

a FlowReturn such as FlowReturn::Flushing when the pool is inactive.

§buffer

a location for a Buffer

Object Safety§

This trait is not object safe.

Implementors§