GstObject: GStreamer 1.0 Core Reference Manual

## GstObject GstObject |

## Functions

#define | GST_OBJECT_FLAGS()
#define | GST_OBJECT_FLAG_IS_SET()
#define | GST_OBJECT_FLAG_SET()
#define | GST_OBJECT_FLAG_UNSET()
#define | GST_OBJECT_NAME()
#define | GST_OBJECT_PARENT()
#define | GST_OBJECT_REFCOUNT()
#define | GST_OBJECT_REFCOUNT_VALUE()
#define | GST_OBJECT_LOCK()
#define | GST_OBJECT_TRYLOCK()
#define | GST_OBJECT_UNLOCK()
#define | GST_OBJECT_GET_LOCK()
gboolean | gst_object_set_name ()
gchar * | gst_object_get_name ()
gboolean | gst_object_set_parent ()
GstObject * | gst_object_get_parent ()
gboolean | gst_object_has_as_parent ()
void | gst_object_unparent ()
void | gst_object_default_deep_notify ()
void | gst_object_default_error ()
gboolean | gst_object_check_uniqueness ()
gboolean | gst_object_has_as_ancestor ()
gboolean | gst_object_has_ancestor ()
gpointer | gst_object_ref ()
void | gst_object_unref ()
gpointer | gst_object_ref_sink ()
gboolean | gst_object_replace ()
gchar * | gst_object_get_path_string ()
GstClockTime | gst_object_suggest_next_sync ()
gboolean | gst_object_sync_values ()
gboolean | gst_object_has_active_control_bindings ()
void | gst_object_set_control_bindings_disabled ()
void | gst_object_set_control_binding_disabled ()
gboolean | gst_object_add_control_binding ()
GstControlBinding * | gst_object_get_control_binding ()
gboolean | gst_object_remove_control_binding ()
GValue * | gst_object_get_value ()
gboolean | gst_object_get_value_array ()
gboolean | gst_object_get_g_value_array ()
GstClockTime | gst_object_get_control_rate ()
void | gst_object_set_control_rate ()

## Properties

gchar * | name | Read / Write / Construct
GstObject * | parent | Read / Write

## Signals

void | deep-notify | No Hooks

## Types and Values

struct | GstObject
struct | GstObjectClass
enum | GstObjectFlags

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ├── GstAllocator
                ├── GstPad
                ├── GstPadTemplate
                ├── GstPluginFeature
                ├── GstElement
                ├── GstBus
                ├── GstTask
                ├── GstTaskPool
                ├── GstClock
                ├── GstControlBinding
                ├── GstControlSource
                ├── GstPlugin
                ├── GstRegistry
                ├── GstBufferPool
                ├── GstTracer
                ╰── GstTracerRecord

## Includes

    #include <gst/gst.h>

## Description

## Functions

### GST_OBJECT_FLAGS()

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

### GST_OBJECT_FLAG_IS_SET()

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

### GST_OBJECT_FLAG_SET()

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

### GST_OBJECT_FLAG_UNSET()

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

### GST_OBJECT_NAME()

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

### GST_OBJECT_PARENT()

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

### GST_OBJECT_REFCOUNT()

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

### GST_OBJECT_REFCOUNT_VALUE()

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

### GST_OBJECT_LOCK()

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

### GST_OBJECT_TRYLOCK()

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

### GST_OBJECT_UNLOCK()

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

### GST_OBJECT_GET_LOCK()

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

### gst_object_set_name ()

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

### gst_object_get_name ()

    gchar *
    gst_object_get_name (GstObject *object);

### gst_object_set_parent ()

    gboolean
    gst_object_set_parent (GstObject *object,
                           GstObject *parent);

### gst_object_get_parent ()

    GstObject *
    gst_object_get_parent (GstObject *object);

### gst_object_has_as_parent ()

    gboolean
    gst_object_has_as_parent (GstObject *object,
                              GstObject *parent);

### gst_object_unparent ()

    void
    gst_object_unparent (GstObject *object);

### gst_object_default_deep_notify ()

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

### gst_object_default_error ()

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

### gst_object_check_uniqueness ()

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

### gst_object_has_as_ancestor ()

    gboolean
    gst_object_has_as_ancestor (GstObject *object,
                                GstObject *ancestor);

### gst_object_has_ancestor ()

    gboolean
    gst_object_has_ancestor (GstObject *object,
                             GstObject *ancestor);

`gst_object_has_ancestor` is deprecated and should not be used in newly-written code.

### gst_object_ref ()

    gpointer
    gst_object_ref (gpointer object);

### gst_object_unref ()

    void
    gst_object_unref (gpointer object);

### gst_object_ref_sink ()

    gpointer
    gst_object_ref_sink (gpointer object);

### gst_object_replace ()

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

### gst_object_get_path_string ()

    gchar *
    gst_object_get_path_string (GstObject *object);

### gst_object_suggest_next_sync ()

    GstClockTime
    gst_object_suggest_next_sync (GstObject *object);

### gst_object_sync_values ()

    gboolean
    gst_object_sync_values (GstObject *object,
                            GstClockTime timestamp);

### gst_object_has_active_control_bindings ()

    gboolean
    gst_object_has_active_control_bindings
                                   (GstObject *object);

### gst_object_set_control_bindings_disabled ()

    void
    gst_object_set_control_bindings_disabled
                                   (GstObject *object,
                                    gboolean disabled);

### gst_object_set_control_binding_disabled ()

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

### gst_object_add_control_binding ()

    gboolean
    gst_object_add_control_binding (GstObject *object,
                                    GstControlBinding *binding);

### gst_object_get_control_binding ()

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

### gst_object_remove_control_binding ()

    gboolean
    gst_object_remove_control_binding (GstObject *object,
                                       GstControlBinding *binding);

### gst_object_get_value ()

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

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

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

### gst_object_get_control_rate ()

    GstClockTime
    gst_object_get_control_rate (GstObject *object);

### gst_object_set_control_rate ()

    void
    gst_object_set_control_rate (GstObject *object,
                                 GstClockTime control_rate);

## Types and Values

### struct GstObject

    struct GstObject {
      GMutex         lock;        /* object LOCK */
      gchar         *name;        /* object name */
      GstObject     *parent;      /* this object's parent, weak ref */
      guint32        flags;
    };

### struct GstObjectClass

    struct GstObjectClass {
      GInitiallyUnownedClass parent_class;

      const gchar *path_string_separator;

      /* signals */
      void          (*deep_notify)      (GstObject * object, GstObject * orig, GParamSpec * pspec);

      /* virtual methods for subclasses */
    };

### enum GstObjectFlags

#### Members

GST_OBJECT_FLAG_MAY_BE_LEAKED |  |
GST_OBJECT_FLAG_LAST |  |

## Property Details

### The `“name”` property

      “name”                     gchar *

The name of the object.

Flags: Read / Write / Construct

Default value: NULL

### The `“parent”` property

      “parent”                   GstObject *

The parent of the object.

Flags: Read / Write

## Signal Details

### The `“deep-notify”` signal

    void
    user_function (GstObject  *gstobject,
                   GstObject  *arg1,
                   GParamSpec *arg2,
                   gpointer    user_data)

Flags: No Hooks