[−][src]Trait gstreamer_pbutils::prelude::DeviceProviderExt
Required methods
fn can_monitor(&self) -> bool
fn device_add<P>(&self, device: &P) where
P: IsA<Device>,
P: IsA<Device>,
Posts a message on the provider's Bus
to inform applications that
a new device has been added.
This is for use by subclasses.
device
's reference count will be incremented, and any floating reference
will be removed (see Object::ref_sink
).
device
a Device
that has been added
fn device_changed<P, Q>(&self, device: &P, changed_device: &Q) where
P: IsA<Device>,
Q: IsA<Device>,
P: IsA<Device>,
Q: IsA<Device>,
This function is used when changed_device
was modified into its new form
device
. This will post a DEVICE_CHANGED
message on the bus to let
the application know that the device was modified. Device
is immutable
for MT. safety purposes so this is an "atomic" way of letting the application
know when a device was modified.
Feature: v1_16
device
the new version of changed_device
changed_device
the old version of the device that has been updated
fn device_remove<P>(&self, device: &P) where
P: IsA<Device>,
P: IsA<Device>,
Posts a message on the provider's Bus
to inform applications that
a device has been removed.
This is for use by subclasses.
device
a Device
that has been removed
fn get_bus(&self) -> Bus
fn get_devices(&self) -> Vec<Device>
Gets a list of devices that this provider understands. This may actually probe the hardware if the provider is not currently started.
Returns
a glib::List
of
Device
fn get_factory(&self) -> Option<DeviceProviderFactory>
Retrieves the factory that was used to create this device provider.
Returns
the DeviceProviderFactory
used for
creating this device provider. no refcounting is needed.
fn get_hidden_providers(&self) -> Vec<GString>
Get the provider factory names of the DeviceProvider
instances that
are hidden by self
.
Returns
a list of hidden providers factory names or None
when
nothing is hidden by self
. Free with g_strfreev.
fn hide_provider(&self, name: &str)
Make self
hide the devices from the factory with name
.
This function is used when self
will also provide the devices reported
by provider factory name
. A monitor should stop monitoring the
device provider with name
to avoid duplicate devices.
name
a provider factory name
fn start(&self) -> Result<(), BoolError>
Starts providering the devices. This will cause MessageType::DeviceAdded
and MessageType::DeviceRemoved
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.
Returns
true
if the device providering could be started
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.
fn unhide_provider(&self, name: &str)
Make self
unhide the devices from factory name
.
This function is used when self
will no longer provide the devices
reported by provider factory name
. A monitor should start
monitoring the devices from provider factory name
in order to see
all devices again.
name
a provider factory name
fn connect_provider_hidden<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&Self, &str),
F: 'static + Send + Sync + Fn(&Self, &str),
fn connect_provider_unhidden<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&Self, &str),
F: 'static + Send + Sync + Fn(&Self, &str),
Implementors
impl<O> DeviceProviderExt for O where
O: IsA<DeviceProvider>,
[src]
O: IsA<DeviceProvider>,
fn can_monitor(&self) -> bool
[src]
fn device_add<P>(&self, device: &P) where
P: IsA<Device>,
[src]
P: IsA<Device>,
fn device_changed<P, Q>(&self, device: &P, changed_device: &Q) where
P: IsA<Device>,
Q: IsA<Device>,
[src]
P: IsA<Device>,
Q: IsA<Device>,
fn device_remove<P>(&self, device: &P) where
P: IsA<Device>,
[src]
P: IsA<Device>,
fn get_bus(&self) -> Bus
[src]
fn get_devices(&self) -> Vec<Device>
[src]
fn get_factory(&self) -> Option<DeviceProviderFactory>
[src]
fn get_hidden_providers(&self) -> Vec<GString>
[src]
fn hide_provider(&self, name: &str)
[src]
fn start(&self) -> Result<(), BoolError>
[src]
fn stop(&self)
[src]
fn unhide_provider(&self, name: &str)
[src]
fn connect_provider_hidden<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&O, &str),
[src]
F: 'static + Send + Sync + Fn(&O, &str),
fn connect_provider_unhidden<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&O, &str),
[src]
F: 'static + Send + Sync + Fn(&O, &str),