gstreamer::subclass::prelude

Trait DeviceImpl

Source
pub trait DeviceImpl: GstObjectImpl + ObjectSubclass<Type: IsA<Device>> {
    // Provided methods
    fn create_element(
        &self,
        name: Option<&str>,
    ) -> Result<Element, LoggableError> { ... }
    fn reconfigure_element(
        &self,
        element: &Element,
    ) -> Result<(), LoggableError> { ... }
}

Provided Methods§

Source

fn create_element(&self, name: Option<&str>) -> Result<Element, LoggableError>

Creates the element with all of the required parameters set to use this device.

§name

name of new element, or None to automatically create a unique name.

§Returns

a new Element configured to use this device

Source

fn reconfigure_element(&self, element: &Element) -> Result<(), LoggableError>

Tries to reconfigure an existing element to use the device. If this function fails, then one must destroy the element and create a new one using DeviceExt::create_element().

Note: This should only be implemented for elements can change their device in the PLAYING state.

§element

a Element

§Returns

true if the element could be reconfigured to use this device, false otherwise.

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§