Trait gstreamer_base::subclass::prelude::BaseSinkImpl

source ·
pub trait BaseSinkImpl: BaseSinkImplExt + ElementImpl {
Show 14 methods // Provided methods fn start(&self) -> Result<(), ErrorMessage> { ... } fn stop(&self) -> Result<(), ErrorMessage> { ... } fn render(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError> { ... } fn prepare(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError> { ... } fn render_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError> { ... } fn prepare_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError> { ... } fn query(&self, query: &mut QueryRef) -> bool { ... } fn event(&self, event: Event) -> bool { ... } fn caps(&self, filter: Option<&Caps>) -> Option<Caps> { ... } fn set_caps(&self, caps: &Caps) -> Result<(), LoggableError> { ... } fn fixate(&self, caps: Caps) -> Caps { ... } fn unlock(&self) -> Result<(), ErrorMessage> { ... } fn unlock_stop(&self) -> Result<(), ErrorMessage> { ... } fn propose_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError> { ... }
}

Provided Methods§

source

fn start(&self) -> Result<(), ErrorMessage>

Start processing. Ideal for opening resources in the subclass

source

fn stop(&self) -> Result<(), ErrorMessage>

Stop processing. Subclasses should use this to close resources.

source

fn render(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError>

Called when a buffer should be presented or output, at the correct moment if the BaseSink has been set to sync to the clock.

source

fn prepare(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError>

Called to prepare the buffer for render and preroll. This function is called before synchronisation is performed.

source

fn render_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError>

Same as render but used with buffer lists instead of buffers.

source

fn prepare_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError>

Called to prepare the buffer list for render_list. This function is called before synchronisation is performed.

source

fn query(&self, query: &mut QueryRef) -> bool

perform a GstQuery on the element.

source

fn event(&self, event: Event) -> bool

Override this to handle events arriving on the sink pad

source

fn caps(&self, filter: Option<&Caps>) -> Option<Caps>

Called to get sink pad caps from the subclass.

source

fn set_caps(&self, caps: &Caps) -> Result<(), LoggableError>

Notify subclass of changed caps

source

fn fixate(&self, caps: Caps) -> Caps

Only useful in pull mode. Implement if you have ideas about what should be the default values for the caps you support.

source

fn unlock(&self) -> Result<(), ErrorMessage>

Unlock any pending access to the resource. Subclasses should unblock any blocked function ASAP and call BaseSinkExt::wait_preroll()

source

fn unlock_stop(&self) -> Result<(), ErrorMessage>

Clear the previous unlock request. Subclasses should clear any state they set during GstBaseSinkClass::unlock, and be ready to continue where they left off after BaseSinkExt::wait_preroll(), BaseSinkExt::wait() or gst_wait_sink_wait_clock() return or GstBaseSinkClass::render is called again.

source

fn propose_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError>

configure the allocation query

Object Safety§

This trait is not object safe.

Implementors§