gstreamer_base::subclass::prelude

Trait PushSrcImpl

Source
pub trait PushSrcImpl: BaseSrcImpl + ObjectSubclass<Type: IsA<PushSrc>> {
    // Provided methods
    fn fill(&self, buffer: &mut BufferRef) -> Result<FlowSuccess, FlowError> { ... }
    fn alloc(&self) -> Result<Buffer, FlowError> { ... }
    fn create(
        &self,
        buffer: Option<&mut BufferRef>,
    ) -> Result<CreateSuccess, FlowError> { ... }
}

Provided Methods§

Source

fn fill(&self, buffer: &mut BufferRef) -> Result<FlowSuccess, FlowError>

Ask the subclass to fill the buffer with data.

Source

fn alloc(&self) -> Result<Buffer, FlowError>

Allocate memory for a buffer.

§Returns
Source

fn create( &self, buffer: Option<&mut BufferRef>, ) -> Result<CreateSuccess, FlowError>

Ask the subclass to create a buffer, the default implementation will call alloc if no allocated buf is provided and then call fill.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§