gstreamer_base::subclass::prelude

Trait BaseSinkImpl

Source
pub trait BaseSinkImpl: ElementImpl + ObjectSubclass<Type: IsA<BaseSink>> {
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

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§