Trait gstreamer_audio::subclass::prelude::AudioDecoderImpl
source · pub trait AudioDecoderImpl: AudioDecoderImplExt + ElementImpl {
Show 17 methods
// Provided methods
fn open(&self) -> Result<(), ErrorMessage> { ... }
fn close(&self) -> Result<(), ErrorMessage> { ... }
fn start(&self) -> Result<(), ErrorMessage> { ... }
fn stop(&self) -> Result<(), ErrorMessage> { ... }
fn set_format(&self, caps: &Caps) -> Result<(), LoggableError> { ... }
fn parse(&self, adapter: &Adapter) -> Result<(u32, u32), FlowError> { ... }
fn handle_frame(
&self,
buffer: Option<&Buffer>,
) -> Result<FlowSuccess, FlowError> { ... }
fn pre_push(&self, buffer: Buffer) -> Result<Option<Buffer>, FlowError> { ... }
fn flush(&self, hard: bool) { ... }
fn negotiate(&self) -> Result<(), LoggableError> { ... }
fn caps(&self, filter: Option<&Caps>) -> Caps { ... }
fn sink_event(&self, event: Event) -> bool { ... }
fn sink_query(&self, query: &mut QueryRef) -> bool { ... }
fn src_event(&self, event: Event) -> bool { ... }
fn src_query(&self, query: &mut QueryRef) -> bool { ... }
fn propose_allocation(
&self,
query: &mut Allocation,
) -> Result<(), LoggableError> { ... }
fn decide_allocation(
&self,
query: &mut Allocation,
) -> Result<(), LoggableError> { ... }
}
Provided Methods§
sourcefn open(&self) -> Result<(), ErrorMessage>
fn open(&self) -> Result<(), ErrorMessage>
Optional. Called when the element changes to GST_STATE_READY. Allows opening external resources.
sourcefn close(&self) -> Result<(), ErrorMessage>
fn close(&self) -> Result<(), ErrorMessage>
Optional. Called when the element changes to GST_STATE_NULL. Allows closing external resources.
sourcefn start(&self) -> Result<(), ErrorMessage>
fn start(&self) -> Result<(), ErrorMessage>
Optional. Called when the element starts processing. Allows opening external resources.
sourcefn stop(&self) -> Result<(), ErrorMessage>
fn stop(&self) -> Result<(), ErrorMessage>
Optional. Called when the element stops processing. Allows closing external resources.
sourcefn set_format(&self, caps: &Caps) -> Result<(), LoggableError>
fn set_format(&self, caps: &Caps) -> Result<(), LoggableError>
Notifies subclass of incoming data format (caps).
fn parse(&self, adapter: &Adapter) -> Result<(u32, u32), FlowError>
sourcefn handle_frame(
&self,
buffer: Option<&Buffer>,
) -> Result<FlowSuccess, FlowError>
fn handle_frame( &self, buffer: Option<&Buffer>, ) -> Result<FlowSuccess, FlowError>
Provides input data (or NULL to clear any remaining data)
to subclass. Input data ref management is performed by
base class, subclass should not care or intervene,
and input data is only valid until next call to base class,
most notably a call to AudioDecoderExt::finish_frame()
.
sourcefn pre_push(&self, buffer: Buffer) -> Result<Option<Buffer>, FlowError>
fn pre_push(&self, buffer: Buffer) -> Result<Option<Buffer>, FlowError>
Optional. Called just prior to pushing (encoded data) buffer downstream. Subclass has full discretionary access to buffer, and a not OK flow return will abort downstream pushing.
sourcefn flush(&self, hard: bool)
fn flush(&self, hard: bool)
Optional.
Instructs subclass to clear any codec caches and discard
any pending samples and not yet returned decoded data.
hard
indicates whether a FLUSH is being processed,
or otherwise a DISCONT (or conceptually similar).
sourcefn negotiate(&self) -> Result<(), LoggableError>
fn negotiate(&self) -> Result<(), LoggableError>
fn caps(&self, filter: Option<&Caps>) -> Caps
sourcefn sink_event(&self, event: Event) -> bool
fn sink_event(&self, event: Event) -> bool
Optional. Event handler on the sink pad. Subclasses should chain up to the parent implementation to invoke the default handler.
sourcefn sink_query(&self, query: &mut QueryRef) -> bool
fn sink_query(&self, query: &mut QueryRef) -> bool
Optional. Query handler on the sink pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6
sourcefn src_event(&self, event: Event) -> bool
fn src_event(&self, event: Event) -> bool
Optional. Event handler on the src pad. Subclasses should chain up to the parent implementation to invoke the default handler.
sourcefn src_query(&self, query: &mut QueryRef) -> bool
fn src_query(&self, query: &mut QueryRef) -> bool
Optional. Query handler on the source pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6
sourcefn propose_allocation(
&self,
query: &mut Allocation,
) -> Result<(), LoggableError>
fn propose_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError>
Optional. Propose buffer allocation parameters for upstream elements. Subclasses should chain up to the parent implementation to invoke the default handler.
sourcefn decide_allocation(&self, query: &mut Allocation) -> Result<(), LoggableError>
fn decide_allocation(&self, query: &mut Allocation) -> Result<(), LoggableError>
Optional. Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. Subclasses should chain up to the parent implementation to invoke the default handler.