Trait gstreamer::prelude::DeviceProviderExt [−][src]
pub trait DeviceProviderExt: 'static {}Show methods
fn can_monitor(&self) -> bool; fn device_add<P: IsA<Device>>(&self, device: &P); fn device_changed<P: IsA<Device>, Q: IsA<Device>>(
&self,
device: &P,
changed_device: &Q
); fn device_remove<P: IsA<Device>>(&self, device: &P); fn bus(&self) -> Bus; fn devices(&self) -> Vec<Device>; fn factory(&self) -> Option<DeviceProviderFactory>; fn hidden_providers(&self) -> Vec<GString>; fn hide_provider(&self, name: &str); fn is_started(&self) -> bool; fn start(&self) -> Result<(), BoolError>; fn stop(&self); fn unhide_provider(&self, name: &str); fn connect_provider_hidden<F: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_provider_unhidden<F: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
Expand description
Required methods
fn can_monitor(&self) -> bool
[src]fn device_add<P: IsA<Device>>(&self, device: &P)
[src]
fn device_add<P: IsA<Device>>(&self, device: &P)
[src]v1_16
only.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.
device
the new version of changed_device
changed_device
the old version of the device that has been updated
fn device_remove<P: IsA<Device>>(&self, device: &P)
[src]
fn device_remove<P: IsA<Device>>(&self, device: &P)
[src]Gets a list of devices that this provider understands. This may actually probe the hardware if the provider is not currently started.
If the provider has been started, this will returned the same Device
objedcts that have been returned by the GST_MESSAGE_DEVICE_ADDED
messages.
Returns
a GList
of
Device
fn factory(&self) -> Option<DeviceProviderFactory>
[src]
fn factory(&self) -> Option<DeviceProviderFactory>
[src]Retrieves the factory that was used to create this device provider.
Returns
the DeviceProviderFactory
used for
creating this device provider. no refcounting is needed.
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)
[src]
fn hide_provider(&self, name: &str)
[src]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 is_started(&self) -> bool
[src]
fn is_started(&self) -> bool
[src]v1_20
only.This function can be used to know if the self
was successfully started.
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,
start()
may already have been called by another
user of the object, stop()
needs to be called the same
number of times.
After this function has been called, 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
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 start()
was called.
fn unhide_provider(&self, name: &str)
[src]
fn unhide_provider(&self, name: &str)
[src]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
Implementors
v1_16
only.v1_20
only.