GESTrackElement: GStreamer Editing Services 1.14.0 Reference Manual

## GESTrackElement GESTrackElement — Base Class for objects contained in a GESTrack |

## Functions

gboolean | ges_track_element_set_active ()
GESTrack * | ges_track_element_get_track ()
GstElement * | ges_track_element_get_nleobject ()
GstElement * | ges_track_element_get_gnlobject ()
GstElement * | ges_track_element_get_element ()
gboolean | ges_track_element_is_active ()
gboolean | ges_track_element_lookup_child ()
gboolean | ges_track_element_set_child_property ()
void | ges_track_element_set_child_properties ()
gboolean | ges_track_element_get_child_property ()
void | ges_track_element_get_child_properties ()

## Properties

gboolean | active | Read / Write
GESTrack * | track | Read
GESTrackType | track-type | Read / Write / Construct

## Signals

void | control-binding-added | Run First
void | control-binding-removed | Run First

## Types and Values

| GESTrackElement
| GESTrackElementClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GESTimelineElement
                ╰── GESTrackElement
                    ├── GESSource
                    ╰── GESOperation

## Implemented Interfaces

GESTrackElement implements GESExtractable and GESMetaContainer.

## Includes

    #include <ges/ges.h>

## Description

GESTrackElement is the Base Class for any object that can be contained in a GESTrack.

It contains the basic information as to the location of the object within its container, like the start position, the inpoint, the duration and the priority.

## Functions

### ges_track_element_set_active ()

    gboolean
    ges_track_element_set_active (GESTrackElement *object,
                                  gboolean active);

Sets the usage of the `object` . If `active` is `TRUE`, the object will be used for playback and rendering, else it will be ignored.

#### Parameters

object | a GESTrackElement |
active | visibility |

#### Returns

`TRUE` if the property was toggled, else `FALSE`

### ges_track_element_get_track ()

    GESTrack *
    ges_track_element_get_track (GESTrackElement *object);

Get the GESTrack to which this object belongs.

#### Parameters

object | a GESTrackElement |

#### Returns

The GESTrack to which this object belongs. Can be `NULL` if it is not in any track.

[transfer none][nullable]

### ges_track_element_get_nleobject ()

    GstElement *
    ges_track_element_get_nleobject (GESTrackElement *object);

Get the GNonLin object this object is controlling.

#### Parameters

object | a GESTrackElement |

#### Returns

the GNonLin object this object is controlling.

[transfer none]

Since: 1.6

### ges_track_element_get_gnlobject ()

    GstElement *
    ges_track_element_get_gnlobject (GESTrackElement *object);

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

use ges_track_element_get_nleobject instead.

Get the NleObject object this object is controlling.

#### Parameters

object | a GESTrackElement |

#### Returns

the NleObject object this object is controlling.

[transfer none]

### ges_track_element_get_element ()

    GstElement *
    ges_track_element_get_element (GESTrackElement *object);

Get the GstElement this track element is controlling within GNonLin.

#### Parameters

object | a GESTrackElement |

#### Returns

the GstElement this track element is controlling within GNonLin.

[transfer none]

### ges_track_element_is_active ()

    gboolean
    ges_track_element_is_active (GESTrackElement *object);

Lets you know if `object` will be used for playback and rendering, or not.

#### Parameters

object | a GESTrackElement |

#### Returns

`TRUE` if `object` is active, `FALSE` otherwize

### ges_track_element_lookup_child ()

    gboolean
    ges_track_element_lookup_child (GESTrackElement *object,
                                    const gchar *prop_name,
                                    GstElement **element,
                                    GParamSpec **pspec);

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

Use ges_timeline_element_lookup_child

Looks up which `element` and `pspec` would be effected by the given `name` . If various contained elements have this property name you will get the first one, unless you specify the class name in `name` .

#### Parameters

object | object to lookup the property in |
prop_name | name of the property to look up. You can specify the name of the class as such: "ClassName::property-name", to guarantee that you get the proper GParamSpec in case various GstElement-s contain the same property name. If you don't do so, you will get the first element found, having this property and the and the corresponding GParamSpec. |
element | pointer to a GstElement that takes the real object to set property on. | [out][allow-none][transfer full]
pspec | pointer to take the GParamSpec describing the property. | [out][allow-none][transfer full]

#### Returns

TRUE if `element` and `pspec` could be found. FALSE otherwise. In that case the values for `pspec` and `element` are not modified. Unref `element` after usage.

### ges_track_element_set_child_property ()

    gboolean
    ges_track_element_set_child_property (GESTrackElement *object,
                                          const gchar *property_name,
                                          GValue *value);

### ges_track_element_set_child_properties ()

    void
    ges_track_element_set_child_properties
                                   (GESTrackElement *object,
                                    const gchar *first_property_name,
                                    ...);

### ges_track_element_get_child_property ()

    gboolean
    ges_track_element_get_child_property (GESTrackElement *object,
                                          const gchar *property_name,
                                          GValue *value);

### ges_track_element_get_child_properties ()

    void
    ges_track_element_get_child_properties
                                   (GESTrackElement *object,
                                    const gchar *first_property_name,
                                    ...);

## Types and Values

### GESTrackElement

    typedef struct _GESTrackElement GESTrackElement;

The GESTrackElement base class.

### GESTrackElementClass

    typedef struct {
      /* virtual methods for subclasses */
      const gchar  *nleobject_factorytype;
      GstElement*  (*create_gnl_object)        (GESTrackElement * object);
      GstElement*  (*create_element)           (GESTrackElement * object);

      void (*active_changed)       (GESTrackElement *object, gboolean active);

      /* virtual methods for subclasses */
      GParamSpec** (*list_children_properties) (GESTrackElement * object,
                  guint *n_properties);
      gboolean (*lookup_child)                 (GESTrackElement *object,
                                                const gchar *prop_name,
                                                GstElement **element,
                                                GParamSpec **pspec);
    } GESTrackElementClass;

Subclasses can override the `create_gnl_object` method to override what type of GNonLin object will be created.

#### Members

const gchar *`nleobject_factorytype`; | name of the GNonLin GStElementFactory type to use. |
`create_gnl_object` () | method to create the GNonLin container object. |
`create_element` () | method to return the GstElement to put in the nleobject. |
`active_changed` () | active property of nleobject has changed |
`list_children_properties` () | method to get children properties that user could like to configure. The default implementation will create an object of type `nleobject_factorytype` and call `create_element` . DeprecatedUse: GESTimelineElement.list_children_properties instead |
`lookup_child` () | method letting subclasses look for a child, overriding the simple standard behaviour. This vmethod can be used for example in the case where you want the name of a child property to be 'overriden'. A good example of where it is usefull is the GESTitleSource where we have a videotestsrc which has a 'foreground-color' property that is used in the TitleSource to set the background color of the title, in that case, this method has been overriden so that we tweak the name passed has parametter to rename "background" to "foreground-backend" making our API understandable. Deprecated: use GESTimelineElement.lookup_child instead |

## Property Details

### The `“active”` property

      “active”                   gboolean

Whether the object should be taken into account in the GESTrack output. If FALSE, then its contents will not be used in the resulting track.

Flags: Read / Write

Default value: TRUE

### The `“track”` property

      “track”                    GESTrack *

The track the object is in.

Flags: Read

### The `“track-type”` property

      “track-type”               GESTrackType

The track type of the object.

Flags: Read / Write / Construct

Default value: GES_TRACK_TYPE_UNKNOWN

## Signal Details

### The `“control-binding-added”` signal

    void
    user_function (GESTrackElement   *track_element,
                   GstControlBinding *control_binding,
                   gpointer           user_data)

The control-binding-added signal is emitted each time a control binding is added for a child property of `track_element`

#### Parameters

track_element | a GESTrackElement |
control_binding | the GstControlBinding that has been added |
user_data | user data set when the signal handler was connected. |

Flags: Run First

### The `“control-binding-removed”` signal

    void
    user_function (GESTrackElement   *track_element,
                   GstControlBinding *control_binding,
                   gpointer           user_data)

The control-binding-removed signal is emitted each time a control binding is removed for a child property of `track_element`

#### Parameters

track_element | a GESTrackElement |
control_binding | the GstControlBinding that has been removed |
user_data | user data set when the signal handler was connected. |

Flags: Run First