Trait gstreamer_base::prelude::BaseTransformExt[][src]

pub trait BaseTransformExt: 'static {
Show methods fn buffer_pool(&self) -> Option<BufferPool>;
fn is_in_place(&self) -> bool;
fn is_passthrough(&self) -> bool;
fn is_qos_enabled(&self) -> bool;
fn reconfigure(&self) -> bool;
fn reconfigure_sink(&self);
fn reconfigure_src(&self);
fn set_gap_aware(&self, gap_aware: bool);
fn set_in_place(&self, in_place: bool);
fn set_passthrough(&self, passthrough: bool);
fn set_prefer_passthrough(&self, prefer_passthrough: bool);
fn set_qos_enabled(&self, enabled: bool);
fn update_qos(
        &self,
        proportion: f64,
        diff: ClockTimeDiff,
        timestamp: ClockTime
    );
fn update_src_caps(&self, updated_caps: &Caps) -> Result<(), BoolError>;
fn is_qos(&self) -> bool;
fn set_qos(&self, qos: bool);
fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}

Trait containing all BaseTransform methods.

Implementors

crate::BaseTransform

Required methods

fn buffer_pool(&self) -> Option<BufferPool>[src]

Returns

the instance of the crate::gst::BufferPool used by self; free it after use

fn is_in_place(&self) -> bool[src]

See if self is configured as a in_place transform.

Returns

true if the transform is configured in in_place mode.

MT safe.

fn is_passthrough(&self) -> bool[src]

See if self is configured as a passthrough transform.

Returns

true if the transform is configured in passthrough mode.

MT safe.

fn is_qos_enabled(&self) -> bool[src]

Queries if the transform will handle QoS.

Returns

true if QoS is enabled.

MT safe.

fn reconfigure(&self) -> bool[src]

This is supported on crate feature v1_18 only.

Negotiates src pad caps with downstream elements if the source pad is marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if negotiation fails.

Do not call this in the [crate::GstBaseTransformClass.transform()] or [crate::GstBaseTransformClass.transform_ip()] vmethod. Call this in [crate::GstBaseTransformClass.submit_input_buffer()], [crate::GstBaseTransformClass.prepare_output_buffer()] or in [crate::GstBaseTransformClass.generate_output()] before any output buffer is allocated.

It will be default be called when handling an ALLOCATION query or at the very beginning of the default [crate::GstBaseTransformClass.submit_input_buffer()] implementation.

Returns

true if the negotiation succeeded, else false.

fn reconfigure_sink(&self)[src]

Instructs self to request renegotiation upstream. This function is typically called after properties on the transform were set that influence the input format.

fn reconfigure_src(&self)[src]

Instructs self to renegotiate a new downstream transform on the next buffer. This function is typically called after properties on the transform were set that influence the output format.

fn set_gap_aware(&self, gap_aware: bool)[src]

If gap_aware is false (the default), output buffers will have the [crate::gst::BufferFlags::Gap] flag unset.

If set to true, the element must handle output buffers with this flag set correctly, i.e. it can assume that the buffer contains neutral data but must unset the flag if the output is no neutral data.

MT safe.

gap_aware

New state

fn set_in_place(&self, in_place: bool)[src]

Determines whether a non-writable buffer will be copied before passing to the transform_ip function.

  • Always true if no transform function is implemented.
  • Always false if ONLY transform function is implemented.

MT safe.

in_place

Boolean value indicating that we would like to operate on in_place buffers.

fn set_passthrough(&self, passthrough: bool)[src]

Set passthrough mode for this filter by default. This is mostly useful for filters that do not care about negotiation.

Always true for filters which don’t implement either a transform or transform_ip or generate_output method.

MT safe.

passthrough

boolean indicating passthrough mode.

fn set_prefer_passthrough(&self, prefer_passthrough: bool)[src]

If prefer_passthrough is true (the default), self will check and prefer passthrough caps from the list of caps returned by the transform_caps vmethod.

If set to false, the element must order the caps returned from the transform_caps function in such a way that the preferred format is first in the list. This can be interesting for transforms that can do passthrough transforms but prefer to do something else, like a capsfilter.

MT safe.

prefer_passthrough

New state

fn set_qos_enabled(&self, enabled: bool)[src]

Enable or disable QoS handling in the transform.

MT safe.

enabled

new state

fn update_qos(&self, proportion: f64, diff: ClockTimeDiff, timestamp: ClockTime)[src]

Set the QoS parameters in the transform. This function is called internally when a QOS event is received but subclasses can provide custom information when needed.

MT safe.

proportion

the proportion

diff

the diff against the clock

timestamp

the timestamp of the buffer generating the QoS expressed in running_time.

fn update_src_caps(&self, updated_caps: &Caps) -> Result<(), BoolError>[src]

Updates the srcpad caps and sends the caps downstream. This function can be used by subclasses when they have already negotiated their caps but found a change in them (or computed new information). This way, they can notify downstream about that change without losing any buffer.

updated_caps

An updated version of the srcpad caps to be pushed downstream

Returns

true if the caps could be sent downstream false otherwise

fn is_qos(&self) -> bool[src]

fn set_qos(&self, qos: bool)[src]

fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: IsA<BaseTransform>> BaseTransformExt for O[src]

fn buffer_pool(&self) -> Option<BufferPool>[src]

fn is_in_place(&self) -> bool[src]

fn is_passthrough(&self) -> bool[src]

fn is_qos_enabled(&self) -> bool[src]

fn reconfigure(&self) -> bool[src]

This is supported on crate feature v1_18 only.

fn reconfigure_sink(&self)[src]

fn reconfigure_src(&self)[src]

fn set_gap_aware(&self, gap_aware: bool)[src]

fn set_in_place(&self, in_place: bool)[src]

fn set_passthrough(&self, passthrough: bool)[src]

fn set_prefer_passthrough(&self, prefer_passthrough: bool)[src]

fn set_qos_enabled(&self, enabled: bool)[src]

fn update_qos(&self, proportion: f64, diff: ClockTimeDiff, timestamp: ClockTime)[src]

fn update_src_caps(&self, updated_caps: &Caps) -> Result<(), BoolError>[src]

fn is_qos(&self) -> bool[src]

fn set_qos(&self, qos: bool)[src]

fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...