GstObject

GstObject provides a root for the object hierarchy tree filed in by the GStreamer library. It is currently a thin wrapper on top of GInitiallyUnowned. It is an abstract class that is not very usable on its own.

GstObject gives us basic refcounting, parenting functionality and locking. Most of the functions are just extended for special GStreamer needs and can be found under the same name in the base class of GstObject which is GObject (e.g. g_object_ref becomes gst_object_ref).

Since GstObject derives from GInitiallyUnowned, it also inherits the floating reference. Be aware that functions such as gst_bin_add and gst_element_add_pad take ownership of the floating reference.

In contrast to GObject instances, GstObject adds a name property. The functions gst_object_set_name and gst_object_get_name are used to set/get the name of the object.

controlled properties

Controlled properties offers a lightweight way to adjust gobject properties over stream-time. It works by using time-stamped value pairs that are queued for element-properties. At run-time the elements continuously pull value changes for the current stream-time.

What needs to be changed in a GstElement? Very little - it is just two steps to make a plugin controllable!

  • mark gobject-properties paramspecs that make sense to be controlled, by GST_PARAM_CONTROLLABLE.

  • when processing data (get, chain, loop function) at the beginning call gst_object_sync_values(element,timestamp). This will make the controller update all GObject properties that are under its control with the current values based on the timestamp.

What needs to be done in applications? Again it's not a lot to change.

  • create a GstControlSource. csource = gst_interpolation_control_source_new (); g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);

  • Attach the GstControlSource on the controller to a property. gst_object_add_control_binding (object, gst_direct_control_binding_new (object, "prop1", csource));

  • Set the control values gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,0 * GST_SECOND, value1); gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,1 * GST_SECOND, value2);

  • start your pipeline

GstObject

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstAllocator
            ╰──GstBufferPool
            ╰──GstBus
            ╰──GstClock
            ╰──GstControlBinding
            ╰──GstControlSource
            ╰──GstDevice
            ╰──GstDeviceMonitor
            ╰──GstDeviceProvider
            ╰──GstElement
            ╰──GstPad
            ╰──GstPadTemplate
            ╰──GstPlugin
            ╰──GstPluginFeature
            ╰──GstRegistry
            ╰──GstStream
            ╰──GstStreamCollection
            ╰──GstTask
            ╰──GstTaskPool
            ╰──GstTracer
            ╰──GstTracerRecord

GStreamer base object class.

Members

object (GInitiallyUnowned) –
No description available
lock (GMutex) –

object LOCK

name (gchar *) –

The name of the object

parent (GstObject *) –

this object's parent, weak ref

flags (guint32) –

flags for this object


Class structure

GstObjectClass

GStreamer base object class.

Fields
parent_class (GInitiallyUnownedClass) –

parent

path_string_separator (const gchar *) –

separator used by gst_object_get_path_string


Gst.ObjectClass

GStreamer base object class.

Attributes
parent_class (GObject.InitiallyUnownedClass) –

parent

path_string_separator (String) –

separator used by Gst.Object.prototype.get_path_string


Gst.ObjectClass

GStreamer base object class.

Attributes
parent_class (GObject.InitiallyUnownedClass) –

parent

path_string_separator (str) –

separator used by Gst.Object.get_path_string


Gst.Object

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Allocator
            ╰──Gst.BufferPool
            ╰──Gst.Bus
            ╰──Gst.Clock
            ╰──Gst.ControlBinding
            ╰──Gst.ControlSource
            ╰──Gst.Device
            ╰──Gst.DeviceMonitor
            ╰──Gst.DeviceProvider
            ╰──Gst.Element
            ╰──Gst.Pad
            ╰──Gst.PadTemplate
            ╰──Gst.Plugin
            ╰──Gst.PluginFeature
            ╰──Gst.Registry
            ╰──Gst.Stream
            ╰──Gst.StreamCollection
            ╰──Gst.Task
            ╰──Gst.TaskPool
            ╰──Gst.Tracer
            ╰──Gst.TracerRecord

GStreamer base object class.

Members

No description available
lock (GLib.Mutex) –

object LOCK

name (String) –

The name of the object

parent (Gst.Object) –

this object's parent, weak ref

flags (Number) –

flags for this object


Gst.Object

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Allocator
            ╰──Gst.BufferPool
            ╰──Gst.Bus
            ╰──Gst.Clock
            ╰──Gst.ControlBinding
            ╰──Gst.ControlSource
            ╰──Gst.Device
            ╰──Gst.DeviceMonitor
            ╰──Gst.DeviceProvider
            ╰──Gst.Element
            ╰──Gst.Pad
            ╰──Gst.PadTemplate
            ╰──Gst.Plugin
            ╰──Gst.PluginFeature
            ╰──Gst.Registry
            ╰──Gst.Stream
            ╰──Gst.StreamCollection
            ╰──Gst.Task
            ╰──Gst.TaskPool
            ╰──Gst.Tracer
            ╰──Gst.TracerRecord

GStreamer base object class.

Members

No description available
lock (GLib.Mutex) –

object LOCK

name (str) –

The name of the object

parent (Gst.Object) –

this object's parent, weak ref

flags (int) –

flags for this object


Methods

gst_object_add_control_binding

gboolean
gst_object_add_control_binding (GstObject * object,
                                GstControlBinding * binding)

Attach the GstControlBinding to the object. If there already was a GstControlBinding 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)

Parameters:

object

the controller object

binding ( [transfer: floating])

the GstControlBinding 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.


Gst.Object.prototype.add_control_binding

function Gst.Object.prototype.add_control_binding(binding: Gst.ControlBinding): {
    // javascript wrapper for 'gst_object_add_control_binding'
}

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 (not introspectable))

Parameters:

object (Gst.Object)

the controller object

binding (Gst.ControlBinding)

the Gst.ControlBinding that should be used

Returns (Number)

false if the given binding has not been setup for this object or has been setup for a non suitable property, true otherwise.


Gst.Object.add_control_binding

def Gst.Object.add_control_binding (self, binding):
    #python wrapper for 'gst_object_add_control_binding'

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 (not introspectable))

Parameters:

object (Gst.Object)

the controller object

binding (Gst.ControlBinding)

the Gst.ControlBinding that should be used

Returns (bool)

False if the given binding has not been setup for this object or has been setup for a non suitable property, True otherwise.


gst_object_default_error

gst_object_default_error (GstObject * source,
                          const GError * error,
                          const gchar * debug)

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.

Parameters:

source

the GstObject that initiated the error.

error ( [in])

the GError.

debug ( [in][nullable])

an additional debug information string, or NULL


Gst.Object.prototype.default_error

function Gst.Object.prototype.default_error(error: GError (not introspectable), debug: String): {
    // javascript wrapper for 'gst_object_default_error'
}

A default error function that uses g_printerr (not introspectable) to display the error message and the optional debug string..

The default handler will simply print the error string using g_print.

Parameters:

source (Gst.Object)

the Gst.Object that initiated the error.

the GError.

debug (String)

an additional debug information string, or null


Gst.Object.default_error

def Gst.Object.default_error (self, error, debug):
    #python wrapper for 'gst_object_default_error'

A default error function that uses g_printerr (not introspectable) to display the error message and the optional debug string..

The default handler will simply print the error string using g_print.

Parameters:

source (Gst.Object)

the Gst.Object that initiated the error.

the GError.

debug (str)

an additional debug information string, or None


gst_object_get_control_binding

GstControlBinding *
gst_object_get_control_binding (GstObject * object,
                                const gchar * property_name)

Gets the corresponding GstControlBinding for the property. This should be unreferenced again after use.

Parameters:

object

the object

property_name

name of the property

Returns ( [transfer: full][nullable])

the GstControlBinding for property_name or NULL if the property is not controlled.


Gst.Object.prototype.get_control_binding

function Gst.Object.prototype.get_control_binding(property_name: String): {
    // javascript wrapper for 'gst_object_get_control_binding'
}

Gets the corresponding Gst.ControlBinding for the property. This should be unreferenced again after use.

Parameters:

object (Gst.Object)

the object

property_name (String)

name of the property

Returns (Gst.ControlBinding)

the Gst.ControlBinding for property_name or null if the property is not controlled.


Gst.Object.get_control_binding

def Gst.Object.get_control_binding (self, property_name):
    #python wrapper for 'gst_object_get_control_binding'

Gets the corresponding Gst.ControlBinding for the property. This should be unreferenced again after use.

Parameters:

object (Gst.Object)

the object

property_name (str)

name of the property

Returns (Gst.ControlBinding)

the Gst.ControlBinding for property_name or None if the property is not controlled.


gst_object_get_control_rate

GstClockTime
gst_object_get_control_rate (GstObject * object)

Obtain the control-rate for this object. Audio processing GstElement 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.

Parameters:

object

the object that has controlled properties

Returns

the control rate in nanoseconds


Gst.Object.prototype.get_control_rate

function Gst.Object.prototype.get_control_rate(): {
    // javascript wrapper for 'gst_object_get_control_rate'
}

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.prototype.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.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (Number)

the control rate in nanoseconds


Gst.Object.get_control_rate

def Gst.Object.get_control_rate (self):
    #python wrapper for 'gst_object_get_control_rate'

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.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (int)

the control rate in nanoseconds


gst_object_get_g_value_array

gboolean
gst_object_get_g_value_array (GstObject * object,
                              const gchar * property_name,
                              GstClockTime timestamp,
                              GstClockTime interval,
                              guint n_values,
                              GValue * values)

Gets a number of GValue 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.

Parameters:

object

the object that has controlled properties

property_name

the name of the property to get

timestamp

the time that should be processed

interval

the time spacing between subsequent values

n_values

the number of values

values ( [arraylength=n_values])

array to put control-values in

Returns

TRUE if the given array could be filled, FALSE otherwise


Gst.Object.prototype.get_g_value_array

function Gst.Object.prototype.get_g_value_array(property_name: String, timestamp: Number, interval: Number, n_values: Number, values: [ GObject.Value ]): {
    // javascript wrapper for 'gst_object_get_g_value_array'
}

Gets a number of GObject.Value for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of GObject.Value.

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.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (String)

the name of the property to get

timestamp (Number)

the time that should be processed

interval (Number)

the time spacing between subsequent values

n_values (Number)

the number of values

values ([ GObject.Value ])

array to put control-values in

Returns (Number)

true if the given array could be filled, false otherwise


Gst.Object.get_g_value_array

def Gst.Object.get_g_value_array (self, property_name, timestamp, interval, n_values, values):
    #python wrapper for 'gst_object_get_g_value_array'

Gets a number of GObject.Value for the given controlled property starting at the requested time. The array values need to hold enough space for n_values of GObject.Value.

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.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (str)

the name of the property to get

timestamp (int)

the time that should be processed

interval (int)

the time spacing between subsequent values

n_values (int)

the number of values

values ([ GObject.Value ])

array to put control-values in

Returns (bool)

True if the given array could be filled, False otherwise


gst_object_get_name

gchar *
gst_object_get_name (GstObject * object)

Returns a copy of the name of object. Caller should g_free the return value after usage. For a nameless object, this returns NULL, which you can safely g_free as well.

Free-function: g_free

Parameters:

object

a GstObject

Returns ( [transfer: full][nullable])

the name of object. g_free after usage.

MT safe. This function grabs and releases object's LOCK.


Gst.Object.prototype.get_name

function Gst.Object.prototype.get_name(): {
    // javascript wrapper for 'gst_object_get_name'
}

Returns a copy of the name of object. Caller should GLib.prototype.free the return value after usage. For a nameless object, this returns null, which you can safely GLib.prototype.free as well.

Free-function: g_free

Parameters:

object (Gst.Object)

a Gst.Object

Returns (String)

the name of object. GLib.prototype.free after usage.

MT safe. This function grabs and releases object's LOCK.


Gst.Object.get_name

def Gst.Object.get_name (self):
    #python wrapper for 'gst_object_get_name'

Returns a copy of the name of object. Caller should GLib.free the return value after usage. For a nameless object, this returns None, which you can safely GLib.free as well.

Free-function: g_free

Parameters:

object (Gst.Object)

a Gst.Object

Returns (str)

the name of object. GLib.free after usage.

MT safe. This function grabs and releases object's LOCK.


gst_object_get_parent

GstObject *
gst_object_get_parent (GstObject * object)

Returns the parent of object. This function increases the refcount of the parent object so you should gst_object_unref it after usage.

Parameters:

object

a GstObject

Returns ( [transfer: full][nullable])

parent of object, this can be NULL if object has no parent. unref after usage.

MT safe. Grabs and releases object's LOCK.


Gst.Object.prototype.get_parent

function Gst.Object.prototype.get_parent(): {
    // javascript wrapper for 'gst_object_get_parent'
}

Returns the parent of object. This function increases the refcount of the parent object so you should Gst.Object.prototype.unref it after usage.

Parameters:

object (Gst.Object)

a Gst.Object

Returns (Gst.Object)

parent of object, this can be null if object has no parent. unref after usage.

MT safe. Grabs and releases object's LOCK.


Gst.Object.get_parent

def Gst.Object.get_parent (self):
    #python wrapper for 'gst_object_get_parent'

Returns the parent of object. This function increases the refcount of the parent object so you should Gst.Object.unref it after usage.

Parameters:

object (Gst.Object)

a Gst.Object

Returns (Gst.Object)

parent of object, this can be None if object has no parent. unref after usage.

MT safe. Grabs and releases object's LOCK.


gst_object_get_path_string

gchar *
gst_object_get_path_string (GstObject * object)

Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.

Free-function: g_free

Parameters:

object

a GstObject

Returns ( [transfer: full])

a string describing the path of object. You must g_free the string after usage.

MT safe. Grabs and releases the GstObject's LOCK for all objects in the hierarchy.


Gst.Object.prototype.get_path_string

function Gst.Object.prototype.get_path_string(): {
    // javascript wrapper for 'gst_object_get_path_string'
}

Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.

Free-function: g_free

Parameters:

object (Gst.Object)

a Gst.Object

Returns (String)

a string describing the path of object. You must GLib.prototype.free the string after usage.

MT safe. Grabs and releases the Gst.Object's LOCK for all objects in the hierarchy.


Gst.Object.get_path_string

def Gst.Object.get_path_string (self):
    #python wrapper for 'gst_object_get_path_string'

Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging.

Free-function: g_free

Parameters:

object (Gst.Object)

a Gst.Object

Returns (str)

a string describing the path of object. You must GLib.free the string after usage.

MT safe. Grabs and releases the Gst.Object's LOCK for all objects in the hierarchy.


gst_object_get_value

GValue *
gst_object_get_value (GstObject * object,
                      const gchar * property_name,
                      GstClockTime timestamp)

Gets the value for the given controlled property at the requested time.

Parameters:

object

the object that has controlled properties

property_name

the name of the property to get

timestamp

the time the control-change should be read from

Returns ( [transfer: full][nullable])

the GValue of the property at the given time, or NULL if the property isn't controlled.


Gst.Object.prototype.get_value

function Gst.Object.prototype.get_value(property_name: String, timestamp: Number): {
    // javascript wrapper for 'gst_object_get_value'
}

Gets the value for the given controlled property at the requested time.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (String)

the name of the property to get

timestamp (Number)

the time the control-change should be read from

Returns (GObject.Value)

the GValue of the property at the given time, or null if the property isn't controlled.


Gst.Object.get_value

def Gst.Object.get_value (self, property_name, timestamp):
    #python wrapper for 'gst_object_get_value'

Gets the value for the given controlled property at the requested time.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (str)

the name of the property to get

timestamp (int)

the time the control-change should be read from

Returns (GObject.Value)

the GValue of the property at the given time, or None if the property isn't controlled.


gst_object_get_value_array

gboolean
gst_object_get_value_array (GstObject * object,
                            const gchar * property_name,
                            GstClockTime timestamp,
                            GstClockTime interval,
                            guint n_values,
                            gpointer values)

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 GValue and is better suites for bindings.

Parameters:

object

the object that has controlled properties

property_name

the name of the property to get

timestamp

the time that should be processed

interval

the time spacing between subsequent values

n_values

the number of values

values ( [arraylength=n_values])

array to put control-values in

Returns

TRUE if the given array could be filled, FALSE otherwise


gst_object_has_active_control_bindings

gboolean
gst_object_has_active_control_bindings (GstObject * object)

Check if the object has active controlled properties.

Parameters:

object

the object that has controlled properties

Returns

TRUE if the object has active controlled properties


Gst.Object.prototype.has_active_control_bindings

function Gst.Object.prototype.has_active_control_bindings(): {
    // javascript wrapper for 'gst_object_has_active_control_bindings'
}

Check if the object has active controlled properties.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (Number)

true if the object has active controlled properties


Gst.Object.has_active_control_bindings

def Gst.Object.has_active_control_bindings (self):
    #python wrapper for 'gst_object_has_active_control_bindings'

Check if the object has active controlled properties.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (bool)

True if the object has active controlled properties


gst_object_has_ancestor

gboolean
gst_object_has_ancestor (GstObject * object,
                         GstObject * ancestor)

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a GstElement is inside a GstPipeline.

Parameters:

object

a GstObject to check

ancestor

a GstObject to check as ancestor

Returns

TRUE if ancestor is an ancestor of object.

deprecated : Use gst_object_has_as_ancestor() instead. MT safe. Grabs and releases @object's locks.


Gst.Object.prototype.has_ancestor

function Gst.Object.prototype.has_ancestor(ancestor: Gst.Object): {
    // javascript wrapper for 'gst_object_has_ancestor'
}

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst.Element is inside a Gst.Pipeline.

Parameters:

object (Gst.Object)

a Gst.Object to check

ancestor (Gst.Object)

a Gst.Object to check as ancestor

Returns (Number)

true if ancestor is an ancestor of object.

deprecated : Use gst_object_has_as_ancestor() instead. MT safe. Grabs and releases @object's locks.


Gst.Object.has_ancestor

def Gst.Object.has_ancestor (self, ancestor):
    #python wrapper for 'gst_object_has_ancestor'

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst.Element is inside a Gst.Pipeline.

Parameters:

object (Gst.Object)

a Gst.Object to check

ancestor (Gst.Object)

a Gst.Object to check as ancestor

Returns (bool)

True if ancestor is an ancestor of object.

deprecated : Use gst_object_has_as_ancestor() instead. MT safe. Grabs and releases @object's locks.


gst_object_has_as_ancestor

gboolean
gst_object_has_as_ancestor (GstObject * object,
                            GstObject * ancestor)

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a GstElement is inside a GstPipeline.

Parameters:

object

a GstObject to check

ancestor

a GstObject to check as ancestor

Returns

TRUE if ancestor is an ancestor of object.

MT safe. Grabs and releases object's locks.


Gst.Object.prototype.has_as_ancestor

function Gst.Object.prototype.has_as_ancestor(ancestor: Gst.Object): {
    // javascript wrapper for 'gst_object_has_as_ancestor'
}

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst.Element is inside a Gst.Pipeline.

Parameters:

object (Gst.Object)

a Gst.Object to check

ancestor (Gst.Object)

a Gst.Object to check as ancestor

Returns (Number)

true if ancestor is an ancestor of object.

MT safe. Grabs and releases object's locks.


Gst.Object.has_as_ancestor

def Gst.Object.has_as_ancestor (self, ancestor):
    #python wrapper for 'gst_object_has_as_ancestor'

Check if object has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Gst.Element is inside a Gst.Pipeline.

Parameters:

object (Gst.Object)

a Gst.Object to check

ancestor (Gst.Object)

a Gst.Object to check as ancestor

Returns (bool)

True if ancestor is an ancestor of object.

MT safe. Grabs and releases object's locks.


gst_object_has_as_parent

gboolean
gst_object_has_as_parent (GstObject * object,
                          GstObject * parent)

Check if parent is the parent of object. E.g. a GstElement can check if it owns a given GstPad.

Parameters:

object

a GstObject to check

parent

a GstObject to check as parent

Returns

FALSE if either object or parent is NULL. TRUE if parent is the parent of object. Otherwise FALSE.

MT safe. Grabs and releases object's locks.

Since : 1.6


Gst.Object.prototype.has_as_parent

function Gst.Object.prototype.has_as_parent(parent: Gst.Object): {
    // javascript wrapper for 'gst_object_has_as_parent'
}

Check if parent is the parent of object. E.g. a Gst.Element can check if it owns a given Gst.Pad.

Parameters:

object (Gst.Object)

a Gst.Object to check

parent (Gst.Object)

a Gst.Object to check as parent

Returns (Number)

false if either object or parent is null. true if parent is the parent of object. Otherwise false.

MT safe. Grabs and releases object's locks.

Since : 1.6


Gst.Object.has_as_parent

def Gst.Object.has_as_parent (self, parent):
    #python wrapper for 'gst_object_has_as_parent'

Check if parent is the parent of object. E.g. a Gst.Element can check if it owns a given Gst.Pad.

Parameters:

object (Gst.Object)

a Gst.Object to check

parent (Gst.Object)

a Gst.Object to check as parent

Returns (bool)

False if either object or parent is None. True if parent is the parent of object. Otherwise False.

MT safe. Grabs and releases object's locks.

Since : 1.6


gst_object_ref

gpointer
gst_object_ref (gpointer 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);

Parameters:

object ( [typeGst.Object])

a GstObject to reference

Returns ( [transfer: full][typeGst.Object])

A pointer to object


Gst.Object.prototype.ref

function Gst.Object.prototype.ref(): {
    // javascript wrapper for 'gst_object_ref'
}

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);

Parameters:

object (Gst.Object)

a Gst.Object to reference

Returns (Gst.Object)

A pointer to object


Gst.Object.ref

def Gst.Object.ref (self):
    #python wrapper for 'gst_object_ref'

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);

Parameters:

object (Gst.Object)

a Gst.Object to reference

Returns (Gst.Object)

A pointer to object


gst_object_remove_control_binding

gboolean
gst_object_remove_control_binding (GstObject * object,
                                   GstControlBinding * binding)

Removes the corresponding GstControlBinding. If it was the last ref of the binding, it will be disposed.

Parameters:

object

the object

binding

the binding

Returns

TRUE if the binding could be removed.


Gst.Object.prototype.remove_control_binding

function Gst.Object.prototype.remove_control_binding(binding: Gst.ControlBinding): {
    // javascript wrapper for 'gst_object_remove_control_binding'
}

Removes the corresponding Gst.ControlBinding. If it was the last ref of the binding, it will be disposed.

Parameters:

object (Gst.Object)

the object

binding (Gst.ControlBinding)

the binding

Returns (Number)

true if the binding could be removed.


Gst.Object.remove_control_binding

def Gst.Object.remove_control_binding (self, binding):
    #python wrapper for 'gst_object_remove_control_binding'

Removes the corresponding Gst.ControlBinding. If it was the last ref of the binding, it will be disposed.

Parameters:

object (Gst.Object)

the object

binding (Gst.ControlBinding)

the binding

Returns (bool)

True if the binding could be removed.


gst_object_set_control_binding_disabled

gst_object_set_control_binding_disabled (GstObject * object,
                                         const gchar * property_name,
                                         gboolean disabled)

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.

Parameters:

object

the object that has controlled properties

property_name

property to disable

disabled

boolean that specifies whether to disable the controller or not.


Gst.Object.prototype.set_control_binding_disabled

function Gst.Object.prototype.set_control_binding_disabled(property_name: String, disabled: Number): {
    // javascript wrapper for 'gst_object_set_control_binding_disabled'
}

This function is used to disable the control bindings on a property for some time, i.e. Gst.Object.prototype.sync_values will do nothing for the property.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (String)

property to disable

disabled (Number)

boolean that specifies whether to disable the controller or not.


Gst.Object.set_control_binding_disabled

def Gst.Object.set_control_binding_disabled (self, property_name, disabled):
    #python wrapper for 'gst_object_set_control_binding_disabled'

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.

Parameters:

object (Gst.Object)

the object that has controlled properties

property_name (str)

property to disable

disabled (bool)

boolean that specifies whether to disable the controller or not.


gst_object_set_control_bindings_disabled

gst_object_set_control_bindings_disabled (GstObject * object,
                                          gboolean disabled)

This function is used to disable all controlled properties of the object for some time, i.e. gst_object_sync_values will do nothing.

Parameters:

object

the object that has controlled properties

disabled

boolean that specifies whether to disable the controller or not.


Gst.Object.prototype.set_control_bindings_disabled

function Gst.Object.prototype.set_control_bindings_disabled(disabled: Number): {
    // javascript wrapper for 'gst_object_set_control_bindings_disabled'
}

This function is used to disable all controlled properties of the object for some time, i.e. Gst.Object.prototype.sync_values will do nothing.

Parameters:

object (Gst.Object)

the object that has controlled properties

disabled (Number)

boolean that specifies whether to disable the controller or not.


Gst.Object.set_control_bindings_disabled

def Gst.Object.set_control_bindings_disabled (self, disabled):
    #python wrapper for 'gst_object_set_control_bindings_disabled'

This function is used to disable all controlled properties of the object for some time, i.e. Gst.Object.sync_values will do nothing.

Parameters:

object (Gst.Object)

the object that has controlled properties

disabled (bool)

boolean that specifies whether to disable the controller or not.


gst_object_set_control_rate

gst_object_set_control_rate (GstObject * object,
                             GstClockTime control_rate)

Change the control-rate for this object. Audio processing GstElement 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.

Parameters:

object

the object that has controlled properties

control_rate

the new control-rate in nanoseconds.


Gst.Object.prototype.set_control_rate

function Gst.Object.prototype.set_control_rate(control_rate: Number): {
    // javascript wrapper for 'gst_object_set_control_rate'
}

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.prototype.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.

Parameters:

object (Gst.Object)

the object that has controlled properties

control_rate (Number)

the new control-rate in nanoseconds.


Gst.Object.set_control_rate

def Gst.Object.set_control_rate (self, control_rate):
    #python wrapper for 'gst_object_set_control_rate'

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.

Parameters:

object (Gst.Object)

the object that has controlled properties

control_rate (int)

the new control-rate in nanoseconds.


gst_object_set_name

gboolean
gst_object_set_name (GstObject * object,
                     const gchar * name)

Sets the name of object, or gives object a guaranteed unique name (if name is NULL). This function makes a copy of the provided name, so the caller retains ownership of the name it sent.

Parameters:

object

a GstObject

name ( [nullable])

new name of object

Returns

TRUE if the name could be set. Since Objects that have a parent cannot be renamed, this function returns FALSE in those cases.

MT safe. This function grabs and releases object's LOCK.


Gst.Object.prototype.set_name

function Gst.Object.prototype.set_name(name: String): {
    // javascript wrapper for 'gst_object_set_name'
}

Sets the name of object, or gives object a guaranteed unique name (if name is null). This function makes a copy of the provided name, so the caller retains ownership of the name it sent.

Parameters:

object (Gst.Object)

a Gst.Object

name (String)

new name of object

Returns (Number)

true if the name could be set. Since Objects that have a parent cannot be renamed, this function returns false in those cases.

MT safe. This function grabs and releases object's LOCK.


Gst.Object.set_name

def Gst.Object.set_name (self, name):
    #python wrapper for 'gst_object_set_name'

Sets the name of object, or gives object a guaranteed unique name (if name is None). This function makes a copy of the provided name, so the caller retains ownership of the name it sent.

Parameters:

object (Gst.Object)

a Gst.Object

name (str)

new name of object

Returns (bool)

True if the name could be set. Since Objects that have a parent cannot be renamed, this function returns False in those cases.

MT safe. This function grabs and releases object's LOCK.


gst_object_set_parent

gboolean
gst_object_set_parent (GstObject * object,
                       GstObject * parent)

Sets the parent of object to parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink).

Parameters:

object ( [transfer: floating])

a GstObject

parent

new parent of object

Returns

TRUE if parent could be set or FALSE when object already had a parent or object and parent are the same.

MT safe. Grabs and releases object's LOCK.


Gst.Object.prototype.set_parent

function Gst.Object.prototype.set_parent(parent: Gst.Object): {
    // javascript wrapper for 'gst_object_set_parent'
}

Sets the parent of object to parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink (not introspectable)).

Parameters:

object (Gst.Object)

a Gst.Object

parent (Gst.Object)

new parent of object

Returns (Number)

true if parent could be set or false when object already had a parent or object and parent are the same.

MT safe. Grabs and releases object's LOCK.


Gst.Object.set_parent

def Gst.Object.set_parent (self, parent):
    #python wrapper for 'gst_object_set_parent'

Sets the parent of object to parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink (not introspectable)).

Parameters:

object (Gst.Object)

a Gst.Object

parent (Gst.Object)

new parent of object

Returns (bool)

True if parent could be set or False when object already had a parent or object and parent are the same.

MT safe. Grabs and releases object's LOCK.


gst_object_suggest_next_sync

GstClockTime
gst_object_suggest_next_sync (GstObject * object)

Returns a suggestion for timestamps where buffers should be split to get best controller results.

Parameters:

object

the object that has controlled properties

Returns

Returns the suggested timestamp or GST_CLOCK_TIME_NONE if no control-rate was set.


Gst.Object.prototype.suggest_next_sync

function Gst.Object.prototype.suggest_next_sync(): {
    // javascript wrapper for 'gst_object_suggest_next_sync'
}

Returns a suggestion for timestamps where buffers should be split to get best controller results.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (Number)

Returns the suggested timestamp or Gst.CLOCK_TIME_NONE if no control-rate was set.


Gst.Object.suggest_next_sync

def Gst.Object.suggest_next_sync (self):
    #python wrapper for 'gst_object_suggest_next_sync'

Returns a suggestion for timestamps where buffers should be split to get best controller results.

Parameters:

object (Gst.Object)

the object that has controlled properties

Returns (int)

Returns the suggested timestamp or Gst.CLOCK_TIME_NONE if no control-rate was set.


gst_object_sync_values

gboolean
gst_object_sync_values (GstObject * object,
                        GstClockTime timestamp)

Sets the properties of the object, according to the GstControlSource 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.

Parameters:

object

the object that has controlled properties

timestamp

the time that should be processed

Returns

TRUE if the controller values could be applied to the object properties, FALSE otherwise


Gst.Object.prototype.sync_values

function Gst.Object.prototype.sync_values(timestamp: Number): {
    // javascript wrapper for 'gst_object_sync_values'
}

Sets the properties of the object, according to the Gst.ControlSource 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.

Parameters:

object (Gst.Object)

the object that has controlled properties

timestamp (Number)

the time that should be processed

Returns (Number)

true if the controller values could be applied to the object properties, false otherwise


Gst.Object.sync_values

def Gst.Object.sync_values (self, timestamp):
    #python wrapper for 'gst_object_sync_values'

Sets the properties of the object, according to the Gst.ControlSource 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.

Parameters:

object (Gst.Object)

the object that has controlled properties

timestamp (int)

the time that should be processed

Returns (bool)

True if the controller values could be applied to the object properties, False otherwise


gst_object_unparent

gst_object_unparent (GstObject * object)

Clear the parent of object, removing the associated reference. This function decreases the refcount of object.

MT safe. Grabs and releases object's lock.

Parameters:

object

a GstObject to unparent


Gst.Object.prototype.unparent

function Gst.Object.prototype.unparent(): {
    // javascript wrapper for 'gst_object_unparent'
}

Clear the parent of object, removing the associated reference. This function decreases the refcount of object.

MT safe. Grabs and releases object's lock.

Parameters:

object (Gst.Object)

a Gst.Object to unparent


Gst.Object.unparent

def Gst.Object.unparent (self):
    #python wrapper for 'gst_object_unparent'

Clear the parent of object, removing the associated reference. This function decreases the refcount of object.

MT safe. Grabs and releases object's lock.

Parameters:

object (Gst.Object)

a Gst.Object to unparent


gst_object_unref

gst_object_unref (gpointer object)

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.

Parameters:

object ( [typeGst.Object])

a GstObject to unreference


Gst.Object.prototype.unref

function Gst.Object.prototype.unref(): {
    // javascript wrapper for 'gst_object_unref'
}

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.

Parameters:

object (Gst.Object)

a Gst.Object to unreference


Gst.Object.unref

def Gst.Object.unref (self):
    #python wrapper for 'gst_object_unref'

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.

Parameters:

object (Gst.Object)

a Gst.Object to unreference


Functions

gst_object_check_uniqueness

gboolean
gst_object_check_uniqueness (GList * list,
                             const gchar * name)

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 GstObject in the list to compare the name, so be careful when passing a list with a locked object.

Parameters:

list ( [transfer: none][element-typeGst.Object])

a list of GstObject to check through

name

the name to search for

Returns

TRUE if a GstObject named name does not appear in list, FALSE if it does.

MT safe. Grabs and releases the LOCK of each object in the list.


Gst.Object.prototype.check_uniqueness

function Gst.Object.prototype.check_uniqueness(list: [ Gst.Object ], name: String): {
    // javascript wrapper for 'gst_object_check_uniqueness'
}

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.

Parameters:

list ([ Gst.Object ])

a list of Gst.Object to check through

name (String)

the name to search for

Returns (Number)

true if a Gst.Object named name does not appear in list, false if it does.

MT safe. Grabs and releases the LOCK of each object in the list.


Gst.Object.check_uniqueness

def Gst.Object.check_uniqueness (list, name):
    #python wrapper for 'gst_object_check_uniqueness'

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.

Parameters:

list ([ Gst.Object ])

a list of Gst.Object to check through

name (str)

the name to search for

Returns (bool)

True if a Gst.Object named name does not appear in list, False if it does.

MT safe. Grabs and releases the LOCK of each object in the list.


gst_object_default_deep_notify

gst_object_default_deep_notify (GObject * object,
                                GstObject * orig,
                                GParamSpec * pspec,
                                gchar ** excluded_props)

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.

Parameters:

object

the GObject that signalled the notify.

orig

a GstObject that initiated the notify.

pspec

a GParamSpec of the property.

excluded_props

(array zero-terminated=1) (element-type gchar*) (allow-none): a set of user-specified properties to exclude or NULL to show all changes.


Gst.Object.prototype.default_deep_notify

function Gst.Object.prototype.default_deep_notify(object: GObject.Object, orig: Gst.Object, pspec: GObject.ParamSpec, excluded_props: [ String ]): {
    // javascript wrapper for 'gst_object_default_deep_notify'
}

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.

Parameters:

object (GObject.Object)

the GObject.Object that signalled the notify.

orig (Gst.Object)

a Gst.Object that initiated the notify.

pspec (GObject.ParamSpec)

a GObject.ParamSpec of the property.

excluded_props ([ String ])

(array zero-terminated=1) (element-type gchar*) (allow-none): a set of user-specified properties to exclude or null to show all changes.


Gst.Object.default_deep_notify

def Gst.Object.default_deep_notify (object, orig, pspec, excluded_props):
    #python wrapper for 'gst_object_default_deep_notify'

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.

Parameters:

object (GObject.Object)

the GObject.Object that signalled the notify.

orig (Gst.Object)

a Gst.Object that initiated the notify.

pspec (GObject.ParamSpec)

a GObject.ParamSpec of the property.

excluded_props ([ str ])

(array zero-terminated=1) (element-type gchar*) (allow-none): a set of user-specified properties to exclude or None to show all changes.


gst_object_ref_sink

gpointer
gst_object_ref_sink (gpointer object)

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.

Parameters:

object

a GstObject to sink

Returns
No description available

gst_object_replace

gboolean
gst_object_replace (GstObject ** oldobj,
                    GstObject * newobj)

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 NULL.

Parameters:

oldobj ( [inout][transfer: full][nullable])

pointer to a place of a GstObject to replace

newobj ( [transfer: none][nullable])

a new GstObject

Returns

TRUE if newobj was different from oldobj


Gst.Object.prototype.replace

function Gst.Object.prototype.replace(oldobj: Gst.Object, newobj: Gst.Object): {
    // javascript wrapper for 'gst_object_replace'
}

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 null.

Parameters:

oldobj (Gst.Object)

pointer to a place of a Gst.Object to replace

newobj (Gst.Object)

a new Gst.Object

Returns a tuple made of:

(Number )

true if newobj was different from oldobj

oldobj (Gst.Object )

true if newobj was different from oldobj


Gst.Object.replace

def Gst.Object.replace (oldobj, newobj):
    #python wrapper for 'gst_object_replace'

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 None.

Parameters:

oldobj (Gst.Object)

pointer to a place of a Gst.Object to replace

newobj (Gst.Object)

a new Gst.Object

Returns a tuple made of:

(bool )

True if newobj was different from oldobj

oldobj (Gst.Object )

True if newobj was different from oldobj


Signals

deep-notify

deep_notify_callback (GstObject * self,
                      GstObject * prop_object,
                      GParamSpec * prop,
                      gpointer user_data)

The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.

Parameters:

self
No description available
prop_object

the object that originated the signal

prop

the property that changed

user_data
No description available

Flags: Run First / No Hooks


deep-notify

function deep_notify_callback(self: Gst.Object, prop_object: Gst.Object, prop: GObject.ParamSpec, user_data: Object): {
    // javascript callback for the 'deep-notify' signal
}

The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.

Parameters:

self (Gst.Object)
No description available
prop_object (Gst.Object)

the object that originated the signal

prop (GObject.ParamSpec)

the property that changed

user_data (Object)
No description available

Flags: Run First / No Hooks


deep-notify

def deep_notify_callback (self, prop_object, prop, *user_data):
    #python callback for the 'deep-notify' signal

The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.

Parameters:

self (Gst.Object)
No description available
prop_object (Gst.Object)

the object that originated the signal

prop (GObject.ParamSpec)

the property that changed

user_data (variadic)
No description available

Flags: Run First / No Hooks


Properties

name

“name” gchar *

Flags : Read / Write / Construct


name

“name” String

Flags : Read / Write / Construct


name

“self.props.name” str

Flags : Read / Write / Construct


parent

“parent” GstObject *

The parent of the object. Please note, that when changing the 'parent' property, we don't emit notify and deep-notify signals due to locking issues. In some cases one can use element-added or element-removed signals on the parent to achieve a similar effect.

Flags : Read / Write


parent

“parent” Gst.Object

The parent of the object. Please note, that when changing the 'parent' property, we don't emit notify and deep-notify signals due to locking issues. In some cases one can use element-added or element-removed signals on the parent to achieve a similar effect.

Flags : Read / Write


parent

“self.props.parent” Gst.Object

The parent of the object. Please note, that when changing the 'parent' property, we don't emit notify and deep-notify signals due to locking issues. In some cases one can use element-added or element-removed signals on the parent to achieve a similar effect.

Flags : Read / Write


Virtual Methods

deep_notify

deep_notify (GstObject * object,
             GstObject * orig,
             GParamSpec * pspec)

default signal handler

Parameters:

object
No description available
orig
No description available
pspec
No description available

vfunc_deep_notify

function vfunc_deep_notify(object: Gst.Object, orig: Gst.Object, pspec: GObject.ParamSpec): {
    // javascript implementation of the 'deep_notify' virtual method
}

default signal handler

Parameters:

object (Gst.Object)
No description available
orig (Gst.Object)
No description available
pspec (GObject.ParamSpec)
No description available

do_deep_notify

def do_deep_notify (object, orig, pspec):
    #python implementation of the 'deep_notify' virtual method

default signal handler

Parameters:

object (Gst.Object)
No description available
orig (Gst.Object)
No description available
pspec (GObject.ParamSpec)
No description available

Functions

gst_clear_object

gst_clear_object (GstObject ** object_ptr)

Clears a reference to a GstObject.

object_ptr must not be NULL.

If the reference is NULL then this function does nothing. Otherwise, the reference count of the object is decreased using gst_object_unref and the pointer is set to NULL.

A macro is also included that allows this function to be used without pointer casts.

Parameters:

object_ptr

a pointer to a GstObject reference

Since : 1.16


Function Macros

GST_OBJECT_AUTO_LOCK

#define GST_OBJECT_AUTO_LOCK(obj, var) g_autoptr(GMutexLocker) G_GNUC_UNUSED var = g_mutex_locker_new(GST_OBJECT_GET_LOCK(obj))

Declare a GMutexLocker variable with g_autoptr and lock the object. The mutex will be unlocked automatically when leaving the scope.

{
  GST_OBJECT_AUTO_LOCK (obj, locker);

  obj->stuff_with_lock();
  if (cond) {
    // No need to unlock
    return;
  }

  // Unlock before end of scope
  g_clear_pointer (&locker, g_mutex_locker_free);
  obj->stuff_without_lock();
}

Parameters:

obj

a GstObject to lock

var

a variable name to be declared

Since : 1.24.0


GST_OBJECT_CAST

#define GST_OBJECT_CAST(obj)            ((GstObject*)(obj))

GST_OBJECT_CLASS_CAST

#define GST_OBJECT_CLASS_CAST(klass)    ((GstObjectClass*)(klass))

GST_OBJECT_FLAGS

#define GST_OBJECT_FLAGS(obj)                  (GST_OBJECT_CAST (obj)->flags)

This macro returns the entire set of flags for the object.

Parameters:

obj

a GstObject


GST_OBJECT_FLAG_IS_SET

#define GST_OBJECT_FLAG_IS_SET(obj,flag)       ((GST_OBJECT_FLAGS (obj) & (flag)) == (flag))

This macro checks to see if the given flag is set.

Parameters:

obj

a GstObject

flag

Flag to check for


GST_OBJECT_FLAG_SET

#define GST_OBJECT_FLAG_SET(obj,flag)          (GST_OBJECT_FLAGS (obj) |= (flag))

This macro sets the given bits.

Parameters:

obj

a GstObject

flag

Flag to set


GST_OBJECT_FLAG_UNSET

#define GST_OBJECT_FLAG_UNSET(obj,flag)        (GST_OBJECT_FLAGS (obj) &= ~(flag))

This macro unsets the given bits.

Parameters:

obj

a GstObject

flag

Flag to set


GST_OBJECT_GET_LOCK

#define GST_OBJECT_GET_LOCK(obj)               (&GST_OBJECT_CAST(obj)->lock)

Acquire a reference to the mutex of this object.

Parameters:

obj

a GstObject


GST_OBJECT_LOCK

#define GST_OBJECT_LOCK(obj)                   g_mutex_lock(GST_OBJECT_GET_LOCK(obj))

This macro will obtain a lock on the object, making serialization possible. It blocks until the lock can be obtained.

Parameters:

obj

a GstObject to lock


GST_OBJECT_NAME

#define GST_OBJECT_NAME(obj)            (GST_OBJECT_CAST(obj)->name)

Get the name of this object. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_name instead.

Parameters:

obj

a GstObject


GST_OBJECT_PARENT

#define GST_OBJECT_PARENT(obj)          (GST_OBJECT_CAST(obj)->parent)

Get the parent of this object. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_parent instead.

Parameters:

obj

a GstObject


GST_OBJECT_REFCOUNT

#define GST_OBJECT_REFCOUNT(obj)                (((GObject*)(obj))->ref_count)

Get access to the reference count field of the object.

Parameters:

obj

a GstObject


GST_OBJECT_REFCOUNT_VALUE

#define GST_OBJECT_REFCOUNT_VALUE(obj)          g_atomic_int_get ((gint *) &GST_OBJECT_REFCOUNT(obj))

Get the reference count value of the object.

Parameters:

obj

a GstObject


GST_OBJECT_TRYLOCK

#define GST_OBJECT_TRYLOCK(obj)                g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))

This macro will try to obtain a lock on the object, but will return with FALSE if it can't get it immediately.

Parameters:

obj

a GstObject.


GST_OBJECT_UNLOCK

#define GST_OBJECT_UNLOCK(obj)                 g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))

This macro releases a lock on the object.

Parameters:

obj

a GstObject to unlock.


Enumerations

GstObjectFlags

The standard flags that an gstobject may have.

Members
GST_OBJECT_FLAG_MAY_BE_LEAKED (1) –

the object is expected to stay alive even after gst_deinit has been called and so should be ignored by leak detection tools. (Since: 1.10)

GST_OBJECT_FLAG_CONSTRUCTED (2) –

Flag that's set when the object has been constructed. This can be used by API such as base class setters to differentiate between the case where they're called from a subclass's instance init function (and where the object isn't fully constructed yet, and so one shouldn't do anything but set values in the instance structure), and the case where the object is constructed.

(Since: 1.24)
GST_OBJECT_FLAG_LAST (16) –

subclasses can add additional flags starting from this flag


Gst.ObjectFlags

The standard flags that an gstobject may have.

Members
Gst.ObjectFlags.MAY_BE_LEAKED (1) –

the object is expected to stay alive even after Gst.prototype.deinit has been called and so should be ignored by leak detection tools. (Since: 1.10)

Gst.ObjectFlags.CONSTRUCTED (2) –

Flag that's set when the object has been constructed. This can be used by API such as base class setters to differentiate between the case where they're called from a subclass's instance init function (and where the object isn't fully constructed yet, and so one shouldn't do anything but set values in the instance structure), and the case where the object is constructed.

(Since: 1.24)
Gst.ObjectFlags.LAST (16) –

subclasses can add additional flags starting from this flag


Gst.ObjectFlags

The standard flags that an gstobject may have.

Members
Gst.ObjectFlags.MAY_BE_LEAKED (1) –

the object is expected to stay alive even after Gst.deinit has been called and so should be ignored by leak detection tools. (Since: 1.10)

Gst.ObjectFlags.CONSTRUCTED (2) –

Flag that's set when the object has been constructed. This can be used by API such as base class setters to differentiate between the case where they're called from a subclass's instance init function (and where the object isn't fully constructed yet, and so one shouldn't do anything but set values in the instance structure), and the case where the object is constructed.

(Since: 1.24)
Gst.ObjectFlags.LAST (16) –

subclasses can add additional flags starting from this flag


The results of the search are