[][src]Struct gstreamer::BufferPool

pub struct BufferPool(_, _);

A BufferPool is an object that can be used to pre-allocate and recycle buffers of the same size and with the same properties.

A BufferPool is created with BufferPool::new.

Once a pool is created, it needs to be configured. A call to BufferPool::get_config returns the current configuration structure from the pool. With BufferPool::config_set_params and BufferPool::config_set_allocator the bufferpool parameters and allocator can be configured. Other properties can be configured in the pool depending on the pool implementation.

A bufferpool can have extra options that can be enabled with BufferPool::config_add_option. The available options can be retrieved with BufferPoolExt::get_options. Some options allow for additional configuration properties to be set.

After the configuration structure has been configured, BufferPool::set_config updates the configuration in the pool. This can fail when the configuration structure is not accepted.

After the a pool has been configured, it can be activated with BufferPoolExt::set_active. This will preallocate the configured resources in the pool.

When the pool is active, BufferPool::acquire_buffer can be used to retrieve a buffer from the pool.

Buffers allocated from a bufferpool will automatically be returned to the pool with BufferPool::release_buffer when their refcount drops to 0.

The bufferpool can be deactivated again with BufferPoolExt::set_active. All further BufferPool::acquire_buffer calls will return an error. When all buffers are returned to the pool they will be freed.

Use GstObjectExt::unref to release the reference to a bufferpool. If the refcount of the pool reaches 0, the pool will be freed.

Implements

BufferPoolExt, GstObjectExt, glib::object::ObjectExt, BufferPoolExtManual

Implementations

impl BufferPool[src]

pub fn new() -> BufferPool[src]

Creates a new BufferPool instance.

Returns

a new BufferPool instance

Trait Implementations

impl Clone for BufferPool[src]

impl Debug for BufferPool[src]

impl Default for BufferPool[src]

impl Eq for BufferPool[src]

impl Hash for BufferPool[src]

impl IsA<Object> for BufferPool[src]

impl Ord for BufferPool[src]

impl<T: ObjectType> PartialEq<T> for BufferPool[src]

impl<T: ObjectType> PartialOrd<T> for BufferPool[src]

impl Send for BufferPool[src]

impl StaticType for BufferPool[src]

impl Sync for BufferPool[src]

Auto Trait Implementations

impl RefUnwindSafe for BufferPool

impl Unpin for BufferPool

impl UnwindSafe for BufferPool

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.