AudioEncoderExtManual

Trait AudioEncoderExtManual 

Source
pub trait AudioEncoderExtManual: IsA<AudioEncoder> + 'static {
    // Provided methods
    fn negotiate(&self) -> Result<(), FlowError> { ... }
    fn set_output_format(&self, caps: &Caps) -> Result<(), FlowError> { ... }
    fn allocator(&self) -> (Option<Allocator>, AllocationParams) { ... }
    fn set_headers(&self, headers: impl IntoIterator<Item = Buffer>) { ... }
    fn sink_pad(&self) -> &Pad { ... }
    fn src_pad(&self) -> &Pad { ... }
    fn input_segment(&self) -> Segment { ... }
    fn output_segment(&self) -> Segment { ... }
}

Provided Methods§

Source

fn negotiate(&self) -> Result<(), FlowError>

Negotiate with downstream elements to currently configured [gst::Caps][crate::gst::Caps]. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails.

§Returns

true if the negotiation succeeded, else false.

Source

fn set_output_format(&self, caps: &Caps) -> Result<(), FlowError>

Configure output caps on the srcpad of self.

§caps

[gst::Caps][crate::gst::Caps]

§Returns

true on success.

Source

fn allocator(&self) -> (Option<Allocator>, AllocationParams)

Lets AudioEncoder sub-classes to know the memory allocator used by the base class and its params.

Unref the allocator after use it.

§Returns
§allocator

the [gst::Allocator][crate::gst::Allocator] used

§params

the [gst::AllocationParams][crate::gst::AllocationParams] of allocator

Source

fn set_headers(&self, headers: impl IntoIterator<Item = Buffer>)

Set the codec headers to be sent downstream whenever requested.

§headers

a list of [gst::Buffer][crate::gst::Buffer] containing the codec header

Source

fn sink_pad(&self) -> &Pad

Source

fn src_pad(&self) -> &Pad

Source

fn input_segment(&self) -> Segment

Source

fn output_segment(&self) -> Segment

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§