Trait gstreamer::prelude::GstObjectExt [−][src]
pub trait GstObjectExt: 'static {
Show methods
fn add_control_binding<P: IsA<ControlBinding>>(
&self,
binding: &P
) -> Result<(), BoolError>;
fn default_error(&self, error: &Error, debug: Option<&str>);
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>;
fn control_rate(&self) -> ClockTime;
fn name(&self) -> GString;
fn parent(&self) -> Option<Object>;
fn path_string(&self) -> GString;
fn value(&self, property_name: &str, timestamp: ClockTime) -> Option<Value>;
fn has_active_control_bindings(&self) -> bool;
fn has_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool;
fn has_as_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool;
fn has_as_parent<P: IsA<Object>>(&self, parent: &P) -> bool;
fn remove_control_binding<P: IsA<ControlBinding>>(
&self,
binding: &P
) -> bool;
fn set_control_binding_disabled(&self, property_name: &str, disabled: bool);
fn set_control_bindings_disabled(&self, disabled: bool);
fn set_control_rate(&self, control_rate: ClockTime);
fn set_parent<P: IsA<Object>>(&self, parent: &P) -> Result<(), BoolError>;
fn suggest_next_sync(&self) -> ClockTime;
fn sync_values(&self, timestamp: ClockTime) -> Result<(), BoolError>;
fn unparent(&self);
fn connect_parent_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Trait containing all Object methods.
Implementors
crate::Allocator, crate::BufferPool, crate::Bus, crate::Clock, crate::ControlBinding, crate::ControlSource, crate::DeviceMonitor, crate::DeviceProvider, crate::Device, crate::Element, crate::Object, crate::PadTemplate, crate::Pad, crate::PluginFeature, crate::Plugin, crate::Registry, crate::StreamCollection, crate::Stream
Required methods
fn add_control_binding<P: IsA<ControlBinding>>(
&self,
binding: &P
) -> Result<(), BoolError>[src]
&self,
binding: &P
) -> Result<(), BoolError>
Attach the crate::ControlBinding to the object. If there already was a
crate::ControlBinding for this property it will be replaced.
The object’s reference count will be incremented, and any floating
reference will be removed (see [crate::Object::ref_sink()])
binding
the crate::ControlBinding that should be used
Returns
false if the given binding has not been setup for this object or
has been setup for a non suitable property, true otherwise.
fn default_error(&self, error: &Error, debug: Option<&str>)[src]
A default error function that uses g_printerr() to display the error message
and the optional debug string..
The default handler will simply print the error string using g_print.
error
the GError.
debug
an additional debug information string, or None
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>[src]
Gets the corresponding crate::ControlBinding for the property. This should be
unreferenced again after use.
property_name
name of the property
Returns
the crate::ControlBinding for
property_name or None if the property is not controlled.
fn control_rate(&self) -> ClockTime[src]
Obtain the control-rate for this self. Audio processing crate::Element
objects will use this rate to sub-divide their processing loop and call
Self::sync_values() in between. The length of the processing segment
should be up to control-rate nanoseconds.
If the self is not under property control, this will return
GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing.
The control-rate is not expected to change if the element is in
crate::State::Paused or crate::State::Playing.
Returns
the control rate in nanoseconds
fn name(&self) -> GString[src]
Returns a copy of the name of self.
Caller should g_free() the return value after usage.
For a nameless object, this returns None, which you can safely g_free()
as well.
Free-function: g_free
Returns
the name of self. g_free()
after usage.
MT safe. This function grabs and releases self’s LOCK.
fn parent(&self) -> Option<Object>[src]
Returns the parent of self. This function increases the refcount
of the parent object so you should [Self::unref()] it after usage.
Returns
parent of self, this can be
None if self has no parent. unref after usage.
MT safe. Grabs and releases self’s LOCK.
fn path_string(&self) -> GString[src]
Generates a string describing the path of self in
the object hierarchy. Only useful (or used) for debugging.
Free-function: g_free
Returns
a string describing the path of self. You must
g_free() the string after usage.
MT safe. Grabs and releases the crate::Object’s LOCK for all objects
in the hierarchy.
fn value(&self, property_name: &str, timestamp: ClockTime) -> Option<Value>[src]
Gets the value for the given controlled property at the requested time.
property_name
the name of the property to get
timestamp
the time the control-change should be read from
Returns
the GValue of the property at the given time,
or None if the property isn’t controlled.
fn has_active_control_bindings(&self) -> bool[src]
Check if the self has active controlled properties.
Returns
true if the object has active controlled properties
fn has_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool[src]
Check if self has an ancestor ancestor somewhere up in
the hierarchy. One can e.g. check if a crate::Element is inside a crate::Pipeline.
Deprecated
Use Self::has_as_ancestor() instead.
MT safe. Grabs and releases self’s locks.
ancestor
a crate::Object to check as ancestor
Returns
true if ancestor is an ancestor of self.
fn has_as_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool[src]
Check if self has an ancestor ancestor somewhere up in
the hierarchy. One can e.g. check if a crate::Element is inside a crate::Pipeline.
ancestor
a crate::Object to check as ancestor
Returns
true if ancestor is an ancestor of self.
MT safe. Grabs and releases self’s locks.
fn has_as_parent<P: IsA<Object>>(&self, parent: &P) -> bool[src]
Check if parent is the parent of self.
E.g. a crate::Element can check if it owns a given crate::Pad.
parent
a crate::Object to check as parent
Returns
false if either self or parent is None. true if parent is
the parent of self. Otherwise false.
MT safe. Grabs and releases self’s locks.
fn remove_control_binding<P: IsA<ControlBinding>>(&self, binding: &P) -> bool[src]
Removes the corresponding crate::ControlBinding. If it was the
last ref of the binding, it will be disposed.
binding
the binding
Returns
true if the binding could be removed.
fn set_control_binding_disabled(&self, property_name: &str, disabled: bool)[src]
This function is used to disable the control bindings on a property for
some time, i.e. Self::sync_values() will do nothing for the
property.
property_name
property to disable
disabled
boolean that specifies whether to disable the controller or not.
fn set_control_bindings_disabled(&self, disabled: bool)[src]
This function is used to disable all controlled properties of the self for
some time, i.e. Self::sync_values() will do nothing.
disabled
boolean that specifies whether to disable the controller or not.
fn set_control_rate(&self, control_rate: ClockTime)[src]
Change the control-rate for this self. Audio processing crate::Element
objects will use this rate to sub-divide their processing loop and call
Self::sync_values() in between. The length of the processing segment
should be up to control-rate nanoseconds.
The control-rate should not change if the element is in crate::State::Paused or
crate::State::Playing.
control_rate
the new control-rate in nanoseconds.
fn set_parent<P: IsA<Object>>(&self, parent: &P) -> Result<(), BoolError>[src]
Sets the parent of self to parent. The object’s reference count will
be incremented, and any floating reference will be removed (see [crate::Object::ref_sink()]).
parent
new parent of object
Returns
true if parent could be set or false when self
already had a parent or self and parent are the same.
MT safe. Grabs and releases self’s LOCK.
fn suggest_next_sync(&self) -> ClockTime[src]
Returns a suggestion for timestamps where buffers should be split to get best controller results.
Returns
Returns the suggested timestamp or GST_CLOCK_TIME_NONE
if no control-rate was set.
fn sync_values(&self, timestamp: ClockTime) -> Result<(), BoolError>[src]
Sets the properties of the object, according to the GstControlSources that
(maybe) handle them and for the given timestamp.
If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly.
timestamp
the time that should be processed
Returns
true if the controller values could be applied to the object
properties, false otherwise
fn unparent(&self)[src]
Clear the parent of self, removing the associated reference.
This function decreases the refcount of self.
MT safe. Grabs and releases self’s lock.
fn connect_parent_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Object>> GstObjectExt for O[src]
impl<O: IsA<Object>> GstObjectExt for O[src]fn add_control_binding<P: IsA<ControlBinding>>(
&self,
binding: &P
) -> Result<(), BoolError>[src]
&self,
binding: &P
) -> Result<(), BoolError>
fn default_error(&self, error: &Error, debug: Option<&str>)[src]
fn control_binding(&self, property_name: &str) -> Option<ControlBinding>[src]
fn control_rate(&self) -> ClockTime[src]
fn name(&self) -> GString[src]
fn parent(&self) -> Option<Object>[src]
fn path_string(&self) -> GString[src]
fn value(&self, property_name: &str, timestamp: ClockTime) -> Option<Value>[src]
fn has_active_control_bindings(&self) -> bool[src]
fn has_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool[src]
fn has_as_ancestor<P: IsA<Object>>(&self, ancestor: &P) -> bool[src]
fn has_as_parent<P: IsA<Object>>(&self, parent: &P) -> bool[src]
fn remove_control_binding<P: IsA<ControlBinding>>(&self, binding: &P) -> bool[src]
fn set_control_binding_disabled(&self, property_name: &str, disabled: bool)[src]
fn set_control_bindings_disabled(&self, disabled: bool)[src]
fn set_control_rate(&self, control_rate: ClockTime)[src]
fn set_parent<P: IsA<Object>>(&self, parent: &P) -> Result<(), BoolError>[src]
fn suggest_next_sync(&self) -> ClockTime[src]
fn sync_values(&self, timestamp: ClockTime) -> Result<(), BoolError>[src]
fn unparent(&self)[src]
fn connect_parent_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId