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§
sourcefn start(&self) -> Result<(), ErrorMessage>
fn start(&self) -> Result<(), ErrorMessage>
Start processing. Ideal for opening resources in the subclass
sourcefn stop(&self) -> Result<(), ErrorMessage>
fn stop(&self) -> Result<(), ErrorMessage>
Stop processing. Subclasses should use this to close resources.
sourcefn render(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError>
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.
sourcefn prepare(&self, buffer: &Buffer) -> Result<FlowSuccess, FlowError>
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.
sourcefn render_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError>
fn render_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError>
Same as render
but used with buffer lists instead of
buffers.
sourcefn prepare_list(&self, list: &BufferList) -> Result<FlowSuccess, FlowError>
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.
sourcefn caps(&self, filter: Option<&Caps>) -> Option<Caps>
fn caps(&self, filter: Option<&Caps>) -> Option<Caps>
Called to get sink pad caps from the subclass.
sourcefn fixate(&self, caps: Caps) -> Caps
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.
sourcefn unlock(&self) -> Result<(), ErrorMessage>
fn unlock(&self) -> Result<(), ErrorMessage>
Unlock any pending access to the resource. Subclasses should
unblock any blocked function ASAP and call BaseSinkExt::wait_preroll()
sourcefn unlock_stop(&self) -> Result<(), ErrorMessage>
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.
sourcefn propose_allocation(
&self,
query: &mut Allocation,
) -> Result<(), LoggableError>
fn propose_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError>
configure the allocation query