Skip to main content

BaseParseExtManual

Trait BaseParseExtManual 

Source
pub trait BaseParseExtManual: IsA<BaseParse> + 'static {
    // Provided methods
    fn sink_pad(&self) -> &Pad { ... }
    fn src_pad(&self) -> &Pad { ... }
    fn segment(&self) -> Segment { ... }
    fn lost_sync(&self) -> bool { ... }
    fn is_draining(&self) -> bool { ... }
    fn set_duration(&self, duration: impl FormattedValue, interval: u32) { ... }
    fn set_frame_rate(&self, fps: Fraction, lead_in: u32, lead_out: u32) { ... }
    fn convert_default<U: SpecificFormattedValueFullRange>(
        &self,
        src_val: impl FormattedValue,
    ) -> Option<U> { ... }
    fn convert_default_generic(
        &self,
        src_val: impl FormattedValue,
        dest_format: Format,
    ) -> Option<GenericFormattedValue> { ... }
    fn finish_frame(
        &self,
        frame: BaseParseFrame<'_>,
        size: u32,
    ) -> Result<FlowSuccess, FlowError> { ... }
}

Provided Methods§

Source

fn sink_pad(&self) -> &Pad

Source

fn src_pad(&self) -> &Pad

Source

fn segment(&self) -> Segment

Source

fn lost_sync(&self) -> bool

Source

fn is_draining(&self) -> bool

Source

fn set_duration(&self, duration: impl FormattedValue, interval: u32)

READY state changes. Subclasses must call this function from GstBaseParseClass::start if they want to set a static value.

§fmt

gst::Format.

§duration

duration value.

§interval

how often to update the duration estimate based on bitrate, or 0.

Source

fn set_frame_rate(&self, fps: Fraction, lead_in: u32, lead_out: u32)

READY state changes. Subclasses must call this function from GstBaseParseClass::start if they want to set a static value.

§fps_num

frames per second (numerator).

§fps_den

frames per second (denominator).

§lead_in

frames needed before a segment for subsequent decode

§lead_out

frames needed after a segment

Source

fn convert_default<U: SpecificFormattedValueFullRange>( &self, src_val: impl FormattedValue, ) -> Option<U>

Default implementation of GstBaseParseClass::convert.

§src_format

gst::Format describing the source format.

§src_value

Source value to be converted.

§dest_format

gst::Format defining the converted format.

§Returns

true if conversion was successful.

§dest_value

Pointer where the conversion result will be put.

Source

fn convert_default_generic( &self, src_val: impl FormattedValue, dest_format: Format, ) -> Option<GenericFormattedValue>

Source

fn finish_frame( &self, frame: BaseParseFrame<'_>, size: u32, ) -> Result<FlowSuccess, FlowError>

Collects parsed data and pushes it downstream. Source pad caps must be set when this is called.

If frame’s out_buffer is set, that will be used as subsequent frame data, and size amount will be flushed from the input data. The output_buffer size can differ from the consumed size indicated by size.

Otherwise, size samples will be taken from the input and used for output, and the output’s metadata (timestamps etc) will be taken as (optionally) set by the subclass on frame’s (input) buffer (which is otherwise ignored for any but the above purpose/information).

Note that the latter buffer is invalidated by this call, whereas the caller retains ownership of frame.

§frame

a BaseParseFrame

§size

consumed input data represented by frame

§Returns

a gst::FlowReturn that should be escalated to caller (of caller)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§