Trait gstreamer::subclass::prelude::DeviceProviderImpl

source ·
pub trait DeviceProviderImpl: DeviceProviderImplExt + GstObjectImpl + Send + Sync {
    // Provided methods
    fn metadata() -> Option<&'static DeviceProviderMetadata> { ... }
    fn probe(&self) -> Vec<Device> { ... }
    fn start(&self) -> Result<(), LoggableError> { ... }
    fn stop(&self) { ... }
}

Provided Methods§

source

fn metadata() -> Option<&'static DeviceProviderMetadata>

source

fn probe(&self) -> Vec<Device>

Returns a list of devices that are currently available. This should never block. The devices should not have a parent and should be floating.

source

fn start(&self) -> Result<(), LoggableError>

Starts providering the devices. This will cause GST_MESSAGE_DEVICE_ADDED and GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider’s bus when devices are added or removed from the system.

Since the DeviceProvider is a singleton, DeviceProviderExt::start() may already have been called by another user of the object, DeviceProviderExt::stop() needs to be called the same number of times.

After this function has been called, DeviceProviderExtManual::devices() will return the same objects that have been received from the GST_MESSAGE_DEVICE_ADDED messages and will no longer probe.

§Returns

true if the device providering could be started

source

fn stop(&self)

Decreases the use-count by one. If the use count reaches zero, this DeviceProvider will stop providering the devices. This needs to be called the same number of times that DeviceProviderExt::start() was called.

Object Safety§

This trait is not object safe.

Implementors§