Class: Gst::Object
- Inherits:
-
GObject::InitiallyUnowned
- Object
- GObject::InitiallyUnowned
- Gst::Object
- Defined in:
- (unknown)
Overview
GStreamer base object class.
Direct Known Subclasses
Allocator, BufferPool, Bus, Clock, ControlBinding, ControlSource, Device, DeviceMonitor, DeviceProvider, Element, Pad, PadTemplate, Plugin, PluginFeature, Registry, Stream, StreamCollection, Task, TaskPool, Tracer, TracerRecord, GstAudio::AudioRingBuffer, GstBase::CollectPads
Class Method Summary collapse
-
.check_uniqueness(list, name) ⇒ Boolean
Checks to see if there is any object named name in list.
-
.default_deep_notify(object, orig, pspec, excluded_props) ⇒ nil
A default deep_notify signal callback for an object.
-
.ref_sink(object) ⇒ GObject
Increase the reference count of object, and possibly remove the floating reference, if object has a floating reference.
-
.replace(oldobj, newobj) ⇒ Boolean
Atomically modifies a pointer to point to a new object.
Instance Method Summary collapse
-
#add_control_binding(binding) ⇒ Boolean
Attach the Gst::ControlBinding to the object.
-
#control_bindings_disabled=(disabled) ⇒ nil
This function is used to disable all controlled properties of the object for some time, i.e.
-
#control_rate ⇒ Gst::ClockTime
Obtain the control-rate for this object.
-
#control_rate=(control_rate) ⇒ nil
Change the control-rate for this object.
-
#default_error(error, debug) ⇒ nil
A default error function that uses g_printerr() to display the error message and the optional debug string..
-
#get_control_binding(property_name) ⇒ Gst::ControlBinding
Gets the corresponding Gst::ControlBinding for the property.
-
#get_g_value_array(property_name, timestamp, interval, n_values, values) ⇒ Boolean
Gets a number of #GValues for the given controlled property starting at the requested time.
-
#get_value(property_name, timestamp) ⇒ GObject::Value
Gets the value for the given controlled property at the requested time.
-
#get_value_array(property_name, timestamp, interval, n_values, values) ⇒ Boolean
Gets a number of values for the given controlled property starting at the requested time.
-
#has_active_control_bindings ⇒ Boolean
Check if the object has active controlled properties.
-
#has_ancestor(ancestor) ⇒ Boolean
Check if object has an ancestor ancestor somewhere up in the hierarchy.
-
#has_as_ancestor(ancestor) ⇒ Boolean
Check if object has an ancestor ancestor somewhere up in the hierarchy.
-
#has_as_parent(parent) ⇒ Boolean
Check if parent is the parent of object.
-
#name ⇒ String
Name.
- #name=(name) ⇒ String
-
#parent ⇒ Gst::Object
The parent of the object.
-
#parent=(parent) ⇒ Gst::Object
The parent of the object.
-
#path_string ⇒ String
Generates a string describing the path of object in the object hierarchy.
-
#ref ⇒ Gst::Object
Increments the reference count on object.
-
#remove_control_binding(binding) ⇒ Boolean
Removes the corresponding Gst::ControlBinding.
-
#set_control_binding_disabled(property_name, disabled) ⇒ nil
This function is used to disable the control bindings on a property for some time, i.e.
-
#suggest_next_sync ⇒ Gst::ClockTime
Returns a suggestion for timestamps where buffers should be split to get best controller results.
-
#sync_values(timestamp) ⇒ Boolean
Sets the properties of the object, according to the Gst::ControlSources that (maybe) handle them and for the given timestamp.
-
#unparent ⇒ nil
Clear the parent of object, removing the associated reference.
-
#unref ⇒ nil
Decrements the reference count on object.
Class Method Details
.check_uniqueness(list, name) ⇒ Boolean
Checks to see if there is any object named name in list. This function does not do any locking of any kind. You might want to protect the provided list with the lock of the owner of the list. This function will lock each Gst::Object in the list to compare the name, so be careful when passing a list with a locked object. false if it does.
MT safe. Grabs and releases the LOCK of each object in the list.
.default_deep_notify(object, orig, pspec, excluded_props) ⇒ nil
A default deep_notify signal callback for an object. The user data should contain a pointer to an array of strings that should be excluded from the notify. The default handler will print the new value of the property using g_print.
MT safe. This function grabs and releases object's LOCK for getting its path string.
.ref_sink(object) ⇒ GObject
Increase the reference count of object, and possibly remove the floating reference, if object has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
For more background on "floating references" please see the #GObject documentation.
.replace(oldobj, newobj) ⇒ Boolean
Atomically modifies a pointer to point to a new object. The reference count of oldobj is decreased and the reference count of newobj is increased.
Either newobj and the value pointed to by oldobj may be nil.
Instance Method Details
#add_control_binding(binding) ⇒ Boolean
Attach the Gst::ControlBinding to the object. If there already was a Gst::ControlBinding for this property it will be replaced.
The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) has been setup for a non suitable property, true otherwise.
#control_bindings_disabled=(disabled) ⇒ nil
This function is used to disable all controlled properties of the object for some time, i.e. gst_object_sync_values() will do nothing. or not.
#control_rate ⇒ Gst::ClockTime
Obtain the control-rate for this object. Audio processing Gst::Element objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds.
If the object 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 %GST_STATE_PAUSED or %GST_STATE_PLAYING.
#control_rate=(control_rate) ⇒ nil
Change the control-rate for this object. Audio processing Gst::Element objects will use this rate to sub-divide their processing loop and call gst_object_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 %GST_STATE_PAUSED or %GST_STATE_PLAYING.
#default_error(error, debug) ⇒ nil
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.
#get_control_binding(property_name) ⇒ Gst::ControlBinding
Gets the corresponding Gst::ControlBinding for the property. This should be unreferenced again after use. property_name or nil if the property is not controlled.
#get_g_value_array(property_name, timestamp, interval, n_values, values) ⇒ Boolean
Gets a number of #GValues for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of #GValue.
This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample.
#get_value(property_name, timestamp) ⇒ GObject::Value
Gets the value for the given controlled property at the requested time. or nil if the property isn't controlled.
#get_value_array(property_name, timestamp, interval, n_values, values) ⇒ Boolean
Gets a number of values for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of the same type as the objects property's type.
This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample.
The values are unboxed and ready to be used. The similar function gst_object_get_g_value_array() returns the array as #GValues and is better suites for bindings.
#has_active_control_bindings ⇒ Boolean
Check if the object has active controlled properties.
#has_ancestor(ancestor) ⇒ Boolean
Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst::Element is inside a #GstPipeline.
#has_as_ancestor(ancestor) ⇒ Boolean
Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst::Element is inside a #GstPipeline. MT safe. Grabs and releases object's locks.
#has_as_parent(parent) ⇒ Boolean
Check if parent is the parent of object. E.g. a Gst::Element can check if it owns a given #GstPad. MT safe. Grabs and releases object's locks.
#name ⇒ String
Returns name.
#name=(name) ⇒ String
#parent ⇒ Gst::Object
The parent of the object. Please note, that when changing the 'parent' property, we don't emit #GObject::notify and Gst::Object::deep-notify signals due to locking issues. In some cases one can use Gst::Bin::element-added or #GstBin::element-removed signals on the parent to achieve a similar effect.
#parent=(parent) ⇒ Gst::Object
The parent of the object. Please note, that when changing the 'parent' property, we don't emit #GObject::notify and Gst::Object::deep-notify signals due to locking issues. In some cases one can use Gst::Bin::element-added or #GstBin::element-removed signals on the parent to achieve a similar effect.
#path_string ⇒ String
Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.
Free-function: g_free MT safe. Grabs and releases the Gst::Object's LOCK for all objects in the hierarchy.
#ref ⇒ Gst::Object
Increments the reference count on object. This function does not take the lock on object because it relies on atomic refcounting.
This object returns the input parameter to ease writing constructs like : result = gst_object_ref (object->parent);
#remove_control_binding(binding) ⇒ Boolean
Removes the corresponding Gst::ControlBinding. If it was the last ref of the binding, it will be disposed.
#set_control_binding_disabled(property_name, disabled) ⇒ nil
This function is used to disable the control bindings on a property for some time, i.e. gst_object_sync_values() will do nothing for the property. or not.
#suggest_next_sync ⇒ Gst::ClockTime
Returns a suggestion for timestamps where buffers should be split to get best controller results. if no control-rate was set.
#sync_values(timestamp) ⇒ Boolean
Sets the properties of the object, according to the Gst::ControlSources 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. properties, false otherwise
#unparent ⇒ nil
Clear the parent of object, removing the associated reference. This function decreases the refcount of object.
MT safe. Grabs and releases object's lock.
#unref ⇒ nil
Decrements the reference count on object. If reference count hits zero, destroy object. This function does not take the lock on object as it relies on atomic refcounting.
The unref method should never be called with the LOCK held since this might deadlock the dispose function.