Trait gstreamer::prelude::DeviceExt [−][src]
pub trait DeviceExt: 'static { fn create_element(&self, name: Option<&str>) -> Result<Element, BoolError>; fn caps(&self) -> Option<Caps>; fn device_class(&self) -> GString; fn display_name(&self) -> GString; fn properties(&self) -> Option<Structure>; fn has_classes(&self, classes: &str) -> bool; fn has_classesv(&self, classes: &[&str]) -> bool; fn reconfigure_element<P: IsA<Element>>(
&self,
element: &P
) -> Result<(), BoolError>; fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; }
Required methods
fn create_element(&self, name: Option<&str>) -> Result<Element, BoolError>
[src]
Creates the element with all of the required parameters set to use this device.
name
name of new element, or None
to automatically
create a unique name.
Returns
a new crate::Element
configured to use
this device
fn caps(&self) -> Option<Caps>
[src]
Getter for the crate::Caps
that this device supports.
Returns
The crate::Caps
supported by this device. Unref with
gst_caps_unref()
when done.
fn device_class(&self) -> GString
[src]
Gets the “class” of a device. This is a “/” separated list of
classes that represent this device. They are a subset of the
classes of the crate::DeviceProvider
that produced this device.
Returns
The device class. Free with g_free()
after use.
fn display_name(&self) -> GString
[src]
fn properties(&self) -> Option<Structure>
[src]
Gets the extra properties of a device.
Returns
The extra properties or None
when there are none.
Free with [crate::Structure::free()
] after use.
fn has_classes(&self, classes: &str) -> bool
[src]
Check if self
matches all of the given classes
classes
a “/”-separated list of device classes to match, only match if all classes are matched
Returns
true
if self
matches.
fn has_classesv(&self, classes: &[&str]) -> bool
[src]
Check if factory
matches all of the given classes
classes
a None
terminated array of classes
to match, only match if all classes are matched
Returns
true
if self
matches.
fn reconfigure_element<P: IsA<Element>>(
&self,
element: &P
) -> Result<(), BoolError>
[src]
&self,
element: &P
) -> Result<(), BoolError>
Tries to reconfigure an existing element to use the device. If this
function fails, then one must destroy the element and create a new one
using Self::create_element()
.
Note: This should only be implemented for elements can change their device in the PLAYING state.
element
Returns
true
if the element could be reconfigured to use this device,
false
otherwise.
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Device>> DeviceExt for O
[src]
impl<O: IsA<Device>> DeviceExt for O
[src]fn create_element(&self, name: Option<&str>) -> Result<Element, BoolError>
[src]
fn caps(&self) -> Option<Caps>
[src]
fn device_class(&self) -> GString
[src]
fn display_name(&self) -> GString
[src]
fn properties(&self) -> Option<Structure>
[src]
fn has_classes(&self, classes: &str) -> bool
[src]
fn has_classesv(&self, classes: &[&str]) -> bool
[src]
fn reconfigure_element<P: IsA<Element>>(
&self,
element: &P
) -> Result<(), BoolError>
[src]
&self,
element: &P
) -> Result<(), BoolError>
fn connect_removed<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId