Trait gstreamer::prelude::DeviceMonitorExtManual

source ·
pub trait DeviceMonitorExtManual: Sealed + IsA<DeviceMonitor> + 'static {
    // Provided methods
    fn add_filter(
        &self,
        classes: Option<&str>,
        caps: Option<&Caps>,
    ) -> Option<DeviceMonitorFilterId> { ... }
    fn remove_filter(
        &self,
        filter_id: DeviceMonitorFilterId,
    ) -> Result<(), BoolError> { ... }
    fn devices(&self) -> List<Device> { ... }
}

Provided Methods§

source

fn add_filter( &self, classes: Option<&str>, caps: Option<&Caps>, ) -> Option<DeviceMonitorFilterId>

Adds a filter for which Device will be monitored, any device that matches all these classes and the Caps will be returned.

If this function is called multiple times to add more filters, each will be matched independently. That is, adding more filters will not further restrict what devices are matched.

The Caps supported by the device as returned by DeviceExt::caps() are not intersected with caps filters added using this function.

Filters must be added before the DeviceMonitor is started.

§classes

device classes to use as filter or None for any class

§caps

the Caps to filter or None for ANY

§Returns

The id of the new filter or 0 if no provider matched the filter’s classes.

source

fn remove_filter( &self, filter_id: DeviceMonitorFilterId, ) -> Result<(), BoolError>

Removes a filter from the DeviceMonitor using the id that was returned by add_filter().

§filter_id

the id of the filter

§Returns

true of the filter id was valid, false otherwise

source

fn devices(&self) -> List<Device>

Gets a list of devices from all of the relevant monitors. This may actually probe the hardware if the monitor is not currently started.

§Returns

a GList of Device

Object Safety§

This trait is not object safe.

Implementors§