GESTimelineElement: GStreamer Editing Services 1.10.4 Reference Manual

## GESTimelineElement GESTimelineElement — Base Class for all elements that will be in a way or another inside a GESTimeline. |

## Functions

gboolean | ges_timeline_element_set_parent ()
GESTimelineElement * | ges_timeline_element_get_parent ()
gboolean | ges_timeline_element_set_timeline ()
GESTimeline * | ges_timeline_element_get_timeline ()
void | ges_timeline_element_set_start ()
void | ges_timeline_element_set_inpoint ()
void | ges_timeline_element_set_duration ()
void | ges_timeline_element_set_max_duration ()
void | ges_timeline_element_set_priority ()
GstClockTime | ges_timeline_element_get_start ()
GstClockTime | ges_timeline_element_get_inpoint ()
GstClockTime | ges_timeline_element_get_duration ()
GstClockTime | ges_timeline_element_get_max_duration ()
guint32 | ges_timeline_element_get_priority ()
gboolean | ges_timeline_element_ripple ()
gboolean | ges_timeline_element_ripple_end ()
gboolean | ges_timeline_element_roll_start ()
gboolean | ges_timeline_element_roll_end ()
gboolean | ges_timeline_element_trim ()
GESTimelineElement * | ges_timeline_element_get_toplevel_parent ()
GESTimelineElement * | ges_timeline_element_copy ()
GESTimelineElement * | ges_timeline_element_paste ()
gchar * | ges_timeline_element_get_name ()
gboolean | ges_timeline_element_set_name ()
GParamSpec ** | ges_timeline_element_list_children_properties ()
gboolean | ges_timeline_element_lookup_child ()
void | ges_timeline_element_get_child_property_by_pspec ()
void | ges_timeline_element_get_child_property_valist ()
void | ges_timeline_element_get_child_properties ()
void | ges_timeline_element_set_child_property_valist ()
void | ges_timeline_element_set_child_property_by_pspec ()
void | ges_timeline_element_set_child_properties ()
gboolean | ges_timeline_element_set_child_property ()
gboolean | ges_timeline_element_get_child_property ()
gboolean | ges_timeline_element_add_child_property ()
gboolean | ges_timeline_element_remove_child_property ()
GESTrackType | ges_timeline_element_get_track_types ()
#define | GES_TIMELINE_ELEMENT_PARENT()
#define | GES_TIMELINE_ELEMENT_TIMELINE()
#define | GES_TIMELINE_ELEMENT_START()
#define | GES_TIMELINE_ELEMENT_END()
#define | GES_TIMELINE_ELEMENT_INPOINT()
#define | GES_TIMELINE_ELEMENT_DURATION()
#define | GES_TIMELINE_ELEMENT_MAX_DURATION()
#define | GES_TIMELINE_ELEMENT_PRIORITY()
#define | GES_TIMELINE_ELEMENT_NAME()

## Types and Values

| GESTimelineElement
| GESTimelineElementClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GESTimelineElement
                ├── GESContainer
                ╰── GESTrackElement

## Implemented Interfaces

GESTimelineElement implements GESExtractable and GESMetaContainer.

## Includes

    #include <ges/ges.h>

## Description

The GESTimelineElement base class implements the notion of timing as well as priority. A GESTimelineElement can have a parent object which will be responsible for controlling its timing properties.

## Functions

### ges_timeline_element_set_parent ()

    gboolean
    ges_timeline_element_set_parent (GESTimelineElement *self,
                                     GESTimelineElement *parent);

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

#### Parameters

self | a GESTimelineElement |
parent | new parent of self |

#### Returns

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

### ges_timeline_element_get_parent ()

    GESTimelineElement *
    ges_timeline_element_get_parent (GESTimelineElement *self);

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

#### Parameters

self | a GESTimelineElement |

#### Returns

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

[transfer full][nullable]

### ges_timeline_element_set_timeline ()

    gboolean
    ges_timeline_element_set_timeline (GESTimelineElement *self,
                                       GESTimeline *timeline);

Sets the timeline of `self` to `timeline` .

#### Parameters

self | a GESTimelineElement |
timeline | The GESTimeline `self` is in |

#### Returns

`TRUE` if `timeline` could be set or `FALSE` when `timeline` already had a timeline.

### ges_timeline_element_get_timeline ()

    GESTimeline *
    ges_timeline_element_get_timeline (GESTimelineElement *self);

Returns the timeline of `self` . This function increases the refcount of the timeline so you should `gst_object_unref()` it after usage.

#### Parameters

self | a GESTimelineElement |

#### Returns

timeline of `self` , this can be `NULL` if `self` has no timeline. unref after usage.

[transfer full][nullable]

### ges_timeline_element_set_start ()

    void
    ges_timeline_element_set_start (GESTimelineElement *self,
                                    GstClockTime start);

Set the position of the object in its containing layer

Note that if the timeline snap-distance property of the timeline containing `self` is set, `self` will properly snap to its neighboors.

#### Parameters

self | a GESTimelineElement |
start | the position in GstClockTime |

### ges_timeline_element_set_inpoint ()

    void
    ges_timeline_element_set_inpoint (GESTimelineElement *self,
                                      GstClockTime inpoint);

Set the in-point, that is the moment at which the `self` will start outputting data from its contents.

#### Parameters

self | a GESTimelineElement |
inpoint | the in-point in GstClockTime |

### ges_timeline_element_set_duration ()

    void
    ges_timeline_element_set_duration (GESTimelineElement *self,
                                       GstClockTime duration);

Set the duration of the object

Note that if the timeline snap-distance property of the timeline containing `self` is set, `self` will properly snap to its neighboors.

#### Parameters

self | a GESTimelineElement |
duration | the duration in GstClockTime |

### ges_timeline_element_set_max_duration ()

    void
    ges_timeline_element_set_max_duration (GESTimelineElement *self,
                                           GstClockTime maxduration);

Set the maximun duration of the object

#### Parameters

self | a GESTimelineElement |
maxduration | the maximum duration in GstClockTime |

### ges_timeline_element_set_priority ()

    void
    ges_timeline_element_set_priority (GESTimelineElement *self,
                                       guint32 priority);

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

All priority management is done by GES itself now. To set GESEffect priorities ges_clip_set_top_effect_index should be used.

Sets the priority of the object within the containing layer

#### Parameters

self | a GESTimelineElement |
priority | the priority |

### ges_timeline_element_get_start ()

    GstClockTime
    ges_timeline_element_get_start (GESTimelineElement *self);

#### Parameters

self | a GESTimelineElement |

#### Returns

The `start` of `self`

### ges_timeline_element_get_inpoint ()

    GstClockTime
    ges_timeline_element_get_inpoint (GESTimelineElement *self);

#### Parameters

self | a GESTimelineElement |

#### Returns

The `inpoint` of `self`

### ges_timeline_element_get_duration ()

    GstClockTime
    ges_timeline_element_get_duration (GESTimelineElement *self);

#### Parameters

self | a GESTimelineElement |

#### Returns

The `duration` of `self`

### ges_timeline_element_get_max_duration ()

    GstClockTime
    ges_timeline_element_get_max_duration (GESTimelineElement *self);

#### Parameters

self | a GESTimelineElement |

#### Returns

The `maxduration` of `self`

### ges_timeline_element_get_priority ()

    guint32
    ges_timeline_element_get_priority (GESTimelineElement *self);

#### Parameters

self | a GESTimelineElement |

#### Returns

The `priority` of `self`

### ges_timeline_element_ripple ()

    gboolean
    ges_timeline_element_ripple (GESTimelineElement *self,
                                 GstClockTime start);

Edits `self` in ripple mode. It allows you to modify the start of `self` and move the following neighbours accordingly. This will change the overall timeline duration.

#### Parameters

self | The GESTimelineElement to ripple. |
start | The new start of `self` in ripple mode. |

#### Returns

`TRUE` if the self as been rippled properly, `FALSE` if an error occured

### ges_timeline_element_ripple_end ()

    gboolean
    ges_timeline_element_ripple_end (GESTimelineElement *self,
                                     GstClockTime end);

Edits `self` in ripple mode. It allows you to modify the duration of a `self` and move the following neighbours accordingly. This will change the overall timeline duration.

#### Parameters

self | The GESTimelineElement to ripple. |
end | The new end (start + duration) of `self` in ripple mode. It will basically only change the duration of `self` . |

#### Returns

`TRUE` if the self as been rippled properly, `FALSE` if an error occured

### ges_timeline_element_roll_start ()

    gboolean
    ges_timeline_element_roll_start (GESTimelineElement *self,
                                     GstClockTime start);

Edits `self` in roll mode. It allows you to modify the start and inpoint of a `self` and "resize" (basicly change the duration in this case) of the previous neighbours accordingly. This will not change the overall timeline duration.

#### Parameters

self | The GESTimelineElement to roll |
start | The new start of `self` in roll mode, it will also adapat the in-point of `self` according |

#### Returns

`TRUE` if the self as been roll properly, `FALSE` if an error occured

### ges_timeline_element_roll_end ()

    gboolean
    ges_timeline_element_roll_end (GESTimelineElement *self,
                                   GstClockTime end);

Edits `self` in roll mode. It allows you to modify the duration of a `self` and trim (basicly change the start + inpoint in this case) the following neighbours accordingly. This will not change the overall timeline duration.

#### Parameters

self | The GESTimelineElement to roll. |
end | The new end (start + duration) of `self` in roll mode |

#### Returns

`TRUE` if the self as been rolled properly, `FALSE` if an error occured

### ges_timeline_element_trim ()

    gboolean
    ges_timeline_element_trim (GESTimelineElement *self,
                               GstClockTime start);

Edits `self` in trim mode. It allows you to modify the inpoint and start of `self` . This will not change the overall timeline duration.

Note that to trim the end of an self you can just set its duration. The same way as this method, it will take into account the snapping-distance property of the timeline in which `self` is.

#### Parameters

self | The GESTimelineElement to trim. |
start | The new start of `self` in trim mode, will adapt the inpoint of `self` accordingly |

#### Returns

`TRUE` if the self as been trimmed properly, `FALSE` if an error occured

### ges_timeline_element_get_toplevel_parent ()

    GESTimelineElement *
    ges_timeline_element_get_toplevel_parent
                                   (GESTimelineElement *self);

Gets the toplevel GESTimelineElement controlling `self`

#### Parameters

self | The GESTimelineElement to get the toplevel parent from |

#### Returns

The toplevel controlling parent of `self` .

[transfer full]

### ges_timeline_element_copy ()

    GESTimelineElement *
    ges_timeline_element_copy (GESTimelineElement *self,
                               gboolean deep);

Copies `self`

#### Parameters

self | The GESTimelineElement to copy |
deep | whether we want to create the elements `self` contains or not |

#### Returns

The newly create GESTimelineElement, copied from `self` .

[transfer floating]

### ges_timeline_element_paste ()

    GESTimelineElement *
    ges_timeline_element_paste (GESTimelineElement *self,
                                GstClockTime paste_position);

Paste `self` inside the timeline. `self` must have been created using ges_timeline_element_copy with recurse=TRUE set, otherwise it will fail.

#### Parameters

self | The GESTimelineElement to paste |
paste_position | The position in the timeline the element should be copied to, meaning it will become the start of `self` |

#### Returns

Paste `self` copying the element.

[transfer none]

Since: 1.6.0

### ges_timeline_element_get_name ()

    gchar *
    ges_timeline_element_get_name (GESTimelineElement *self);

Returns a copy of the name of `self` . Caller should `g_free()` the return value after usage.

#### Parameters

self | a GESTimelineElement |

#### Returns

The name of `self` .

[transfer full]

### ges_timeline_element_set_name ()

    gboolean
    ges_timeline_element_set_name (GESTimelineElement *self,
                                   const gchar *name);

Sets the name of object, or gives `self` 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

self | a GESTimelineElement |
name | The name `self` should take (if avalaible<). | [allow-none]

### ges_timeline_element_list_children_properties ()

    GParamSpec **
    ges_timeline_element_list_children_properties
                                   (GESTimelineElement *self,
                                    guint *n_properties);

Gets an array of GParamSpec* for all configurable properties of the children of `self` .

#### Parameters

self | The GESTimelineElement to get the list of children properties from |
n_properties | return location for the length of the returned array. | [out]

#### Returns

an array of GParamSpec* which should be freed after use or `NULL` if something went wrong.

[transfer full][array length=n_properties]

### ges_timeline_element_lookup_child ()

    gboolean
    ges_timeline_element_lookup_child (GESTimelineElement *self,
                                       const gchar *prop_name,
                                       GObject **child,
                                       GParamSpec **pspec);

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

self | 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. |
child | 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_timeline_element_get_child_property_by_pspec ()

    void
    ges_timeline_element_get_child_property_by_pspec
                                   (GESTimelineElement *self,
                                    GParamSpec *pspec,
                                    GValue *value);

Gets a property of a child of `self` .

#### Parameters

self | a GESTrackElement |
pspec | The GParamSpec that specifies the property you want to get |
value | return location for the value. | [out]

### ges_timeline_element_get_child_property_valist ()

    void
    ges_timeline_element_get_child_property_valist
                                   (GESTimelineElement *self,
                                    const gchar *first_property_name,
                                    va_list var_args);

Gets a property of a child of `self` . If there are various child elements that have the same property name, you can distinguish them using the following syntax: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

#### Parameters

self | The GESTimelineElement parent object |
first_property_name | The name of the first property to get |
var_args | value for the first property, followed optionally by more name/return location pairs, followed by NULL |

### ges_timeline_element_get_child_properties ()

    void
    ges_timeline_element_get_child_properties
                                   (GESTimelineElement *self,
                                    const gchar *first_property_name,
                                    ...);

Gets properties of a child of `self` .

#### Parameters

self | The origin GESTimelineElement |
first_property_name | The name of the first property to get |
... | return location for the first property, followed optionally by more name/return location pairs, followed by NULL |

### ges_timeline_element_set_child_property_valist ()

    void
    ges_timeline_element_set_child_property_valist
                                   (GESTimelineElement *self,
                                    const gchar *first_property_name,
                                    va_list var_args);

Sets a property of a child of `self` . If there are various child elements that have the same property name, you can distinguish them using the following syntax: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

#### Parameters

self | The GESTimelineElement parent object |
first_property_name | The name of the first property to set |
var_args | value for the first property, followed optionally by more name/return location pairs, followed by NULL |

### ges_timeline_element_set_child_property_by_pspec ()

    void
    ges_timeline_element_set_child_property_by_pspec
                                   (GESTimelineElement *self,
                                    GParamSpec *pspec,
                                    GValue *value);

Sets a property of a child of `self` .

#### Parameters

self | a GESTimelineElement |
pspec | The GParamSpec that specifies the property you want to set |
value | the value |

### ges_timeline_element_set_child_properties ()

    void
    ges_timeline_element_set_child_properties
                                   (GESTimelineElement *self,
                                    const gchar *first_property_name,
                                    ...);

Sets a property of a child of `self` . If there are various child elements that have the same property name, you can distinguish them using the following syntax: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

#### Parameters

self | The GESTimelineElement parent object |
first_property_name | The name of the first property to set |
... | value for the first property, followed optionally by more name/return location pairs, followed by NULL |

### ges_timeline_element_set_child_property ()

    gboolean
    ges_timeline_element_set_child_property
                                   (GESTimelineElement *self,
                                    const gchar *property_name,
                                    GValue *value);

Sets a property of a child of `self`

Note that ges_timeline_element_set_child_property is really intended for language bindings, ges_timeline_element_set_child_properties is much more convenient for C programming.

#### Parameters

self | The origin GESTimelineElement |
property_name | The name of the property |
value | the value |

#### Returns

`TRUE` if the property was set, `FALSE` otherwize

### ges_timeline_element_get_child_property ()

    gboolean
    ges_timeline_element_get_child_property
                                   (GESTimelineElement *self,
                                    const gchar *property_name,
                                    GValue *value);

In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling `g_value_unset()`.

Gets a property of a GstElement contained in `object` .

Note that ges_timeline_element_get_child_property is really intended for language bindings, ges_timeline_element_get_child_properties is much more convenient for C programming.

#### Parameters

self | The origin GESTimelineElement |
property_name | The name of the property |
value | return location for the property value, it will be initialized if it is initialized with 0. | [out]

#### Returns

`TRUE` if the property was found, `FALSE` otherwize

### ges_timeline_element_add_child_property ()

    gboolean
    ges_timeline_element_add_child_property
                                   (GESTimelineElement *self,
                                    GParamSpec *pspec,
                                    GObject *child);

### ges_timeline_element_remove_child_property ()

    gboolean
    ges_timeline_element_remove_child_property
                                   (GESTimelineElement *self,
                                    GParamSpec *pspec);

### ges_timeline_element_get_track_types ()

    GESTrackType
    ges_timeline_element_get_track_types (GESTimelineElement *self);

Gets all the TrackTypes `self` will interact with

#### Parameters

self | A GESTimelineElement |

Since: 1.6.0

### GES_TIMELINE_ELEMENT_PARENT()

    #define GES_TIMELINE_ELEMENT_PARENT(obj) (((GESTimelineElement*)obj)->parent)

The parent of the object.

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_TIMELINE()

    #define GES_TIMELINE_ELEMENT_TIMELINE(obj) (((GESTimelineElement*)obj)->timeline)

The timeline in which the object is.

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_START()

    #define GES_TIMELINE_ELEMENT_START(obj) (((GESTimelineElement*)obj)->start)

The start position of the object (in nanoseconds).

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_END()

    #define GES_TIMELINE_ELEMENT_END(obj) ((((GESTimelineElement*)obj)->start) + (((GESTimelineElement*)obj)->duration))

The end position of the object (in nanoseconds).

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_INPOINT()

    #define GES_TIMELINE_ELEMENT_INPOINT(obj) (((GESTimelineElement*)obj)->inpoint)

The in-point of the object (in nanoseconds).

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_DURATION()

    #define GES_TIMELINE_ELEMENT_DURATION(obj) (((GESTimelineElement*)obj)->duration)

The duration of the object (in nanoseconds).

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_MAX_DURATION()

    #define GES_TIMELINE_ELEMENT_MAX_DURATION(obj) (((GESTimelineElement*)obj)->maxduration)

The maximun duration of the object (in nanoseconds).

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_PRIORITY()

    #define GES_TIMELINE_ELEMENT_PRIORITY(obj) (((GESTimelineElement*)obj)->priority)

The priority of the object.

#### Parameters

obj | a GESTimelineElement |

### GES_TIMELINE_ELEMENT_NAME()

    #define GES_TIMELINE_ELEMENT_NAME(obj) (((GESTimelineElement*)obj)->name)

The name of the object.

#### Parameters

obj | a GESTimelineElement |

## Types and Values

### GESTimelineElement

    typedef struct {
      /*< read only >*/
      GESTimelineElement *parent;
      GESAsset *asset;
      GstClockTime start;
      GstClockTime inpoint;
      GstClockTime duration;
      GstClockTime maxduration;
      guint32 priority;
      GESTimeline *timeline;
      gchar *name;
    } GESTimelineElement;

Those filed can be accessed from outside but in no case should be changed from there. Subclasses can write them but should make sure to properly call g_object_notify.

#### Members

GESTimelineElement *`parent`; | The GESTimelineElement that controls the object |
GESAsset *`asset`; | The GESAsset from which the object has been extracted |
GstClockTime `start`; | position (in time) of the object |
GstClockTime `inpoint`; | Position in the media from which the object should be used |
GstClockTime `duration`; | duration of the object to be used |
GstClockTime `maxduration`; | The maximum duration the object can have |
guint32 `priority`; | priority of the object in the layer (0:top priority) |
GESTimeline *`timeline`; |  |
gchar *`name`; |  |

### GESTimelineElementClass

    typedef struct {
      GInitiallyUnownedClass parent_class;

      gboolean (*set_parent)       (GESTimelineElement * self, GESTimelineElement *parent);
      gboolean (*set_start)        (GESTimelineElement * self, GstClockTime start);
      gboolean (*set_inpoint)      (GESTimelineElement * self, GstClockTime inpoint);
      gboolean (*set_duration)     (GESTimelineElement * self, GstClockTime duration);
      gboolean (*set_max_duration) (GESTimelineElement * self, GstClockTime maxduration);
      gboolean (*set_priority)     (GESTimelineElement * self, guint32 priority); /* set_priority is now protected */

      gboolean (*ripple)           (GESTimelineElement *self, guint64  start);
      gboolean (*ripple_end)       (GESTimelineElement *self, guint64  end);
      gboolean (*roll_start)       (GESTimelineElement *self, guint64  start);
      gboolean (*roll_end)         (GESTimelineElement *self, guint64  end);
      gboolean (*trim)             (GESTimelineElement *self, guint64  start);
      void     (*deep_copy)        (GESTimelineElement *self, GESTimelineElement *copy);

      GESTimelineElement * (*paste) (GESTimelineElement *self,
                                       GESTimelineElement *ref_element,
                                       GstClockTime paste_position);

      GParamSpec** (*list_children_properties) (GESTimelineElement * self, guint *n_properties);
      gboolean (*lookup_child)                 (GESTimelineElement *self, const gchar *prop_name,
                                                GObject **child, GParamSpec **pspec);
      GESTrackType (*get_track_types)          (GESTimelineElement * self);
    } GESTimelineElementClass;

The GESTimelineElement base class. Subclasses should override at least `set_start` `set_inpoint` `set_duration` `ripple` `ripple_end` `roll_start` `roll_end` and `trim` .

Vmethods in subclasses should apply all the operation they need to but the real method implementation is in charge of setting the proper field, and emit the notify signal.

#### Members

`set_parent` () | method to set the parent of a GESTimelineElement. |
`set_start` () | method to set the start of a GESTimelineElement |
`set_inpoint` () | method to set the inpoint of a GESTimelineElement |
`set_duration` () | method to set the duration of a GESTimelineElement |
`set_max_duration` () | method to set the maximun duration of a GESTimelineElement |
`set_priority` () | method to set the priority of a GESTimelineElement |
`ripple` () | method to ripple an object |
`ripple_end` () | method to ripple an object on its GES_EDGE_END edge |
`roll_start` () | method to roll an object on its GES_EDGE_START edge |
`roll_end` () | method to roll an object on its GES_EDGE_END edge |
`trim` () | method to trim an object |
`deep_copy` () | Copy the children properties of `self` into `copy` |
`paste` () |  |
`list_children_properties` () |  |
`lookup_child` () |  |
`get_track_types` () |  |