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 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;
Required methods
fn can_monitor(&self) -> bool
[src]
fn device_add<P: IsA<Device>>(&self, device: &P)
[src]
Posts a message on the provider’s crate::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 [crate::Object::ref_sink()
]).
device
a crate::Device
that has been added
fn device_changed<P: IsA<Device>, Q: IsA<Device>>(
&self,
device: &P,
changed_device: &Q
)
[src]
&self,
device: &P,
changed_device: &Q
)
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. crate::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]
Posts a message on the provider’s crate::Bus
to inform applications that
a device has been removed.
This is for use by subclasses.
device
a crate::Device
that has been removed
fn bus(&self) -> Bus
[src]
fn devices(&self) -> Vec<Device>
[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 crate::Device
objedcts that have been returned by the crate::MessageType::DeviceAdded
messages.
Returns
a [crate::glib::List
] of
crate::Device
fn factory(&self) -> Option<DeviceProviderFactory>
[src]
Retrieves the factory that was used to create this device provider.
Returns
the crate::DeviceProviderFactory
used for
creating this device provider. no refcounting is needed.
fn hidden_providers(&self) -> Vec<GString>
[src]
Get the provider factory names of the crate::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]
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>
[src]
Starts providering the devices. This will cause crate::MessageType::DeviceAdded
and crate::MessageType::DeviceRemoved
messages to be posted on the provider’s bus
when devices are added or removed from the system.
Since the crate::DeviceProvider
is a singleton,
Self::start()
may already have been called by another
user of the object, Self::stop()
needs to be called the same
number of times.
After this function has been called, [Self::get_devices()
] will
return the same objects that have been received from the
crate::MessageType::DeviceAdded
messages and will no longer probe.
Returns
true
if the device providering could be started
fn stop(&self)
[src]
Decreases the use-count by one. If the use count reaches zero, this
crate::DeviceProvider
will stop providering the devices. This needs to be
called the same number of times that Self::start()
was called.
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
fn connect_provider_hidden<F: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_provider_unhidden<F: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<DeviceProvider>> DeviceProviderExt for O
[src]
impl<O: IsA<DeviceProvider>> DeviceProviderExt for O
[src]fn can_monitor(&self) -> bool
[src]
fn device_add<P: IsA<Device>>(&self, device: &P)
[src]
fn device_changed<P: IsA<Device>, Q: IsA<Device>>(
&self,
device: &P,
changed_device: &Q
)
[src]
fn device_changed<P: IsA<Device>, Q: IsA<Device>>(
&self,
device: &P,
changed_device: &Q
)
[src]v1_16
only.fn device_remove<P: IsA<Device>>(&self, device: &P)
[src]
fn bus(&self) -> Bus
[src]
fn devices(&self) -> Vec<Device>
[src]
fn factory(&self) -> Option<DeviceProviderFactory>
[src]
fn 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: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_provider_unhidden<F: Fn(&Self, &str) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId