Trait gstreamer_base::subclass::prelude::BaseParseImpl
source · pub trait BaseParseImpl: BaseParseImplExt + ElementImpl {
// Provided methods
fn start(&self) -> Result<(), ErrorMessage> { ... }
fn stop(&self) -> Result<(), ErrorMessage> { ... }
fn set_sink_caps(&self, caps: &Caps) -> Result<(), LoggableError> { ... }
fn handle_frame(
&self,
frame: BaseParseFrame<'_>,
) -> Result<(FlowSuccess, u32), FlowError> { ... }
fn convert(
&self,
src_val: impl FormattedValue,
dest_format: Format,
) -> Option<GenericFormattedValue> { ... }
}
Provided Methods§
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_sink_caps(&self, caps: &Caps) -> Result<(), LoggableError>
fn set_sink_caps(&self, caps: &Caps) -> Result<(), LoggableError>
Optional. Allows the subclass to be notified of the actual caps set.
sourcefn handle_frame(
&self,
frame: BaseParseFrame<'_>,
) -> Result<(FlowSuccess, u32), FlowError>
fn handle_frame( &self, frame: BaseParseFrame<'_>, ) -> Result<(FlowSuccess, u32), FlowError>
Parses the input data into valid frames as defined by subclass
which should be passed to BaseParseExtManual::finish_frame()
.
The frame’s input buffer is guaranteed writable,
whereas the input frame ownership is held by caller
(so subclass should make a copy if it needs to hang on).
Input buffer (data) is provided by baseclass with as much
metadata set as possible by baseclass according to upstream
information and/or subclass settings,
though subclass may still set buffer timestamp and duration
if desired.
§Returns
sourcefn convert(
&self,
src_val: impl FormattedValue,
dest_format: Format,
) -> Option<GenericFormattedValue>
fn convert( &self, src_val: impl FormattedValue, dest_format: Format, ) -> Option<GenericFormattedValue>
Optional. Convert between formats.