# GESClip

GESClip-s are the core objects of a GESLayer. Each clip may exist in a single layer but may control several GESTrackElement-s that span several GESTrack-s. A clip will ensure that all its children share the same start and duration in their tracks, which will match the start and duration of the clip itself. Therefore, changing the timing of the clip will change the timing of the children, and a change in the timing of a child will change the timing of the clip and subsequently all its siblings. As such, a clip can be treated as a singular object in its layer.

For most uses of a GESTimeline, it is often sufficient to only interact with GESClip-s directly, which will take care of creating and organising the elements of the timeline's tracks.

## Core Children

In more detail, clips will usually have some *core* GESTrackElement children, which are created by the clip when it is added to a layer in a timeline. The type and form of these core children will depend on the clip's subclass. You can use ges_track_element_is_core to determine whether a track element is considered such a core track element. Note, if a core track element is part of a clip, it will always be treated as a core child of the clip. You can connect to the child-added signal to be notified of their creation.

When a child is added to a clip, the timeline will select its tracks using select-tracks-for-object. Note that it may be the case that the child will still have no set track after this process. For example, if the timeline does not have a track of the corresponding track-type. A clip can safely contain such children, which may have their track set later, although they will play no functioning role in the timeline in the meantime.

If a clip may create track elements with various track-type(s), such as a GESUriClip, but you only want it to create a subset of these types, you should set the supported-formats of the clip to the subset of types. This should be done before adding the clip to a layer.

If a clip will produce several core elements of the same track-type, you should connect to the timeline's select-tracks-for-object signal to coordinate which tracks each element should land in. Note, no two core children within a clip can share the same GESTrack, so you should not select the same track for two separate core children. Provided you stick to this rule, it is still safe to select several tracks for the same core child, the core child will be copied into the additional tracks. You can manually add the child to more tracks later using ges_clip_add_child_to_track. If you do not wish to use a core child, you can always select no track.

The in-point of the clip will control the in-point of its core children to be the same value if their has-internal-source is set to TRUE.

The max-duration of the clip is the minimum max-duration of its core children. If you set its value to anything other than its current value, this will also set the max-duration of all its core children to the same value if their has-internal-source is set to TRUE. As a special case, whilst a clip does not yet have any core children, its max-duration may be set to indicate what its value will be once they are created.

## Effects

Some subclasses (#GESSourceClip and GESBaseEffectClip) may also allow their objects to have additional non-core GESBaseEffect-s elements as children. These are additional effects that are applied to the output data of the core elements. They can be added to the clip using ges_clip_add_top_effect, which will take care of adding the effect to the timeline's tracks. The new effect will be placed between the clip's core track elements and its other effects. As such, the newly added effect will be applied to any source data **before** the other existing effects. You can change the ordering of effects using ges_clip_set_top_effect_index.

Tracks are selected for top effects in the same way as core children. If you add a top effect to a clip before it is part of a timeline, and later add the clip to a timeline, the track selection for the top effects will occur just after the track selection for the core children. If you add a top effect to a clip that is already part of a timeline, the track selection will occur immediately. Since a top effect must be applied on top of a core child, if you use select-tracks-for-object, you should ensure that the added effects are destined for a GESTrack that already contains a core child.

In addition, if the core child in the track is not active, then neither can any of its effects be active. Therefore, if a core child is made in-active, all of the additional effects in the same track will also become in-active. Similarly, if an effect is set to be active, then the core child will also become active, but other effects will be left alone. Finally, if an active effect is added to the track of an in-active core child, it will become in-active as well. Note, in contrast, setting a core child to be active, or an effect to be in-active will not change the other children in the same track.

### Time Effects

Some effects also change the timing of their data (see GESBaseEffect for what counts as a time effect). Note that a GESBaseEffectClip will refuse time effects, but a GESSource will allow them.

When added to a clip, time effects may adjust the timing of other children in the same track. Similarly, when changing the order of effects, making them (in)-active, setting their time property values or removing time effects. These can cause the duration-limit to change in value. However, if such an operation would ever cause the duration to shrink such that a clip's GESSource is totally overlapped in the timeline, the operation would be prevented. Note that the same can happen when adding non-time effects with a finite max-duration.

Therefore, when working with time effects, you should -- more so than usual -- not assume that setting the properties of the clip's children will succeed. In particular, you should use ges_timeline_element_set_child_property_full when setting the time properties.

If you wish to preserve the internal duration of a source in a clip during these time effect operations, you can do something like the following.

    void
    do_time_effect_change (GESClip * clip)
    {
      GList *tmp, *children;
      GESTrackElement *source;
      GstClockTime source_outpoint;
      GstClockTime new_end;
      GError *error = NULL;

      // choose some active source in a track to preserve the internal
      // duration of
      source = ges_clip_get_track_element (clip, NULL, GES_TYPE_SOURCE);

      // note its current internal end time
      source_outpoint = ges_clip_get_internal_time_from_timeline_time (
            clip, source, GES_TIMELINE_ELEMENT_END (clip), NULL);

      // handle invalid out-point

      // stop the children's control sources from clamping when their
      // out-point changes with a change in the time effects
      children = ges_container_get_children (GES_CONTAINER (clip), FALSE);

      for (tmp = children; tmp; tmp = tmp->next)
        ges_track_element_set_auto_clamp_control_sources (tmp->data, FALSE);

      // add time effect, or set their children properties, or move them around
      ...
      // user can make sure that if a time effect changes one source, we should
      // also change the time effect for another source. E.g. if
      // "GstVideorate::rate" is set to 2.0, we also set "GstPitch::rate" to
      // 2.0

      // Note the duration of the clip may have already changed if the
      // duration-limit of the clip dropped below its current value

      new_end = ges_clip_get_timeline_time_from_internal_time (
            clip, source, source_outpoint, &error);
      // handle error

      if (!ges_timeline_elemnet_edit_full (GES_TIMELINE_ELEMENT (clip),
            -1, GES_EDIT_MODE_TRIM, GES_EDGE_END, new_end, &error))
        // handle error

      for (tmp = children; tmp; tmp = tmp->next)
        ges_track_element_set_auto_clamp_control_sources (tmp->data, TRUE);

      g_list_free_full (children, gst_object_unref);
      gst_object_unref (source);
    }

## GESClip

    GObject
        ╰──GInitiallyUnowned
            ╰──GESTimelineElement
                ╰──GESContainer
                    ╰──GESClip
                        ╰──GESOperationClip
                        ╰──GESSourceClip

### Members

`parent` (GESContainer) –
No description available

### Class structure

#### GESClipClass

##### Fields

`create_track_element` (GESCreateTrackElementFunc) –

Method to create the core GESTrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as NULL, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

`create_track_elements` (GESCreateTrackElementsFunc) –

Method to create the (multiple) core GESTrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

`ABI._ges_reserved` (gpointer *) –
No description available
`ABI.abi.can_add_effects` (gboolean) –

Whether the user can add additional non-core GESBaseEffect-s to clips from this class, to be applied to the output data of the core elements.

### GES.ClipClass

##### Attributes

`vfunc_create_track_element` (GES.CreateTrackElementFunc) –

Method to create the core GES.TrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as null, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

`vfunc_create_track_elements` (GES.CreateTrackElementsFunc) –

Method to create the (multiple) core GES.TrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

### GES.ClipClass

##### Attributes

`do_create_track_element` (GES.CreateTrackElementFunc) –

Method to create the core GES.TrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as None, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

`do_create_track_elements` (GES.CreateTrackElementsFunc) –

Method to create the (multiple) core GES.TrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

## GES.Clip

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──GES.TimelineElement
                ╰──GES.Container
                    ╰──GES.Clip
                        ╰──GES.OperationClip
                        ╰──GES.SourceClip

### Members

`parent` (GES.Container) –
No description available

## GES.Clip

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──GES.TimelineElement
                ╰──GES.Container
                    ╰──GES.Clip
                        ╰──GES.OperationClip
                        ╰──GES.SourceClip

### Members

`parent` (GES.Container) –
No description available

### Methods

#### ges_clip_add_asset

    GESTrackElement *
    ges_clip_add_asset (GESClip * clip,
                        GESAsset * asset)

Extracts a GESTrackElement from an asset and adds it to the clip. This can be used to add effects that derive from the asset to the clip, but this method is not intended to be used to create the core elements of the clip.

Parameters:

`clip` –

A GESClip

`asset` –

An asset with GES_TYPE_TRACK_ELEMENT as its extractable-type

Returns ( [transfer: none][nullable]) –

The newly created element, or NULL if an error occurred.

#### GES.Clip.prototype.add_asset

    function GES.Clip.prototype.add_asset(asset: GES.Asset): {
        // javascript wrapper for 'ges_clip_add_asset'
    }

Extracts a GES.TrackElement from an asset and adds it to the clip. This can be used to add effects that derive from the asset to the clip, but this method is not intended to be used to create the core elements of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`asset` (GES.Asset) –

An asset with GES_TYPE_TRACK_ELEMENT (not introspectable) as its extractable-type

Returns (GES.TrackElement) –

The newly created element, or null if an error occurred.

#### GES.Clip.add_asset

    def GES.Clip.add_asset (self, asset):
        #python wrapper for 'ges_clip_add_asset'

Extracts a GES.TrackElement from an asset and adds it to the clip. This can be used to add effects that derive from the asset to the clip, but this method is not intended to be used to create the core elements of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`asset` (GES.Asset) –

An asset with GES_TYPE_TRACK_ELEMENT (not introspectable) as its extractable_type

Returns (GES.TrackElement) –

The newly created element, or None if an error occurred.

#### ges_clip_add_child_to_track

    GESTrackElement *
    ges_clip_add_child_to_track (GESClip * clip,
                                 GESTrackElement * child,
                                 GESTrack * track,
                                 GError ** error)

Adds the track element child of the clip to a specific track.

If the given child is already in another track, this will create a copy of the child, add it to the clip, and add this copy to the track.

You should only call this whilst a clip is part of a GESTimeline, and for tracks that are in the same timeline.

This method is an alternative to using the select-tracks-for-object signal, but can be used to complement it when, say, you wish to copy a clip's children from one track into a new one.

When the child is a core child, it must be added to a track that does not already contain another core child of the same clip. If it is not a core child (an additional effect), then it must be added to a track that already contains one of the core children of the same clip.

This method can also fail if the adding the track element to the track would break a configuration rule of the corresponding GESTimeline, such as causing three sources to overlap at a single time, or causing a source to completely overlap another in the same track.

Parameters:

`clip` –

A GESClip

`child` –

A child of clip

`track` –

The track to add child to

`error` –

Return location for an error

Returns ( [transfer: none]) –

The element that was added to track, either child or a copy of child, or NULL if the element could not be added.

Since : 1.18

#### GES.Clip.prototype.add_child_to_track

    function GES.Clip.prototype.add_child_to_track(child: GES.TrackElement, track: GES.Track): {
        // javascript wrapper for 'ges_clip_add_child_to_track'
    }

Adds the track element child of the clip to a specific track.

If the given child is already in another track, this will create a copy of the child, add it to the clip, and add this copy to the track.

You should only call this whilst a clip is part of a GES.Timeline, and for tracks that are in the same timeline.

This method is an alternative to using the select-tracks-for-object signal, but can be used to complement it when, say, you wish to copy a clip's children from one track into a new one.

When the child is a core child, it must be added to a track that does not already contain another core child of the same clip. If it is not a core child (an additional effect), then it must be added to a track that already contains one of the core children of the same clip.

This method can also fail if the adding the track element to the track would break a configuration rule of the corresponding GES.Timeline, such as causing three sources to overlap at a single time, or causing a source to completely overlap another in the same track.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

A child of clip

`track` (GES.Track) –

The track to add child to

Returns (GES.TrackElement) –

The element that was added to track, either child or a copy of child, or null if the element could not be added.

Since : 1.18

#### GES.Clip.add_child_to_track

    @raises(GLib.GError)
    def GES.Clip.add_child_to_track (self, child, track):
        #python wrapper for 'ges_clip_add_child_to_track'

Adds the track element child of the clip to a specific track.

If the given child is already in another track, this will create a copy of the child, add it to the clip, and add this copy to the track.

You should only call this whilst a clip is part of a GES.Timeline, and for tracks that are in the same timeline.

This method is an alternative to using the select-tracks-for-object signal, but can be used to complement it when, say, you wish to copy a clip's children from one track into a new one.

When the child is a core child, it must be added to a track that does not already contain another core child of the same clip. If it is not a core child (an additional effect), then it must be added to a track that already contains one of the core children of the same clip.

This method can also fail if the adding the track element to the track would break a configuration rule of the corresponding GES.Timeline, such as causing three sources to overlap at a single time, or causing a source to completely overlap another in the same track.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

A child of clip

`track` (GES.Track) –

The track to add child to

Returns (GES.TrackElement) –

The element that was added to track, either child or a copy of child, or None if the element could not be added.

Since : 1.18

#### ges_clip_add_top_effect

    gboolean
    ges_clip_add_top_effect (GESClip * clip,
                             GESBaseEffect * effect,
                             gint index,
                             GError ** error)

Add a top effect to a clip at the given index.

Unlike using ges_container_add, this allows you to set the index in advance. It will also check that no error occurred during the track selection for the effect.

Note, only subclasses of GESClipClass that have GES_CLIP_CLASS_CAN_ADD_EFFECTS set to TRUE (such as GESSourceClip and GESBaseEffectClip) can have additional top effects added.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is added.

Parameters:

`clip` –

A GESClip

`effect` –

A top effect to add

`index` –

The index to add effect at, or -1 to add at the highest, see ges_clip_get_top_effect_index for more information

`error` ( [nullable]) –

Return location for an error

Returns –

TRUE if effect was successfully added to clip at index.

Since : 1.18

#### GES.Clip.prototype.add_top_effect

    function GES.Clip.prototype.add_top_effect(effect: GES.BaseEffect, index: Number): {
        // javascript wrapper for 'ges_clip_add_top_effect'
    }

Add a top effect to a clip at the given index.

Unlike using GES.Container.prototype.add, this allows you to set the index in advance. It will also check that no error occurred during the track selection for the effect.

Note, only subclasses of GES.ClipClass that have GES_CLIP_CLASS_CAN_ADD_EFFECTS (not introspectable) set to true (such as GES.SourceClip and GES.BaseEffectClip) can have additional top effects added.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is added.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

A top effect to add

`index` (Number) –

The index to add effect at, or -1 to add at the highest, see GES.Clip.prototype.get_top_effect_index for more information

Returns (Number) –

true if effect was successfully added to clip at index.

Since : 1.18

#### GES.Clip.add_top_effect

    @raises(GLib.GError)
    def GES.Clip.add_top_effect (self, effect, index):
        #python wrapper for 'ges_clip_add_top_effect'

Add a top effect to a clip at the given index.

Unlike using GES.Container.add, this allows you to set the index in advance. It will also check that no error occurred during the track selection for the effect.

Note, only subclasses of GES.ClipClass that have GES_CLIP_CLASS_CAN_ADD_EFFECTS (not introspectable) set to True (such as GES.SourceClip and GES.BaseEffectClip) can have additional top effects added.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is added.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

A top effect to add

`index` (int) –

The index to add effect at, or -1 to add at the highest, see GES.Clip.get_top_effect_index for more information

Returns (bool) –

True if effect was successfully added to clip at index.

Since : 1.18

#### ges_clip_find_track_element

    GESTrackElement *
    ges_clip_find_track_element (GESClip * clip,
                                 GESTrack * track,
                                 GType type)

Finds an element controlled by the clip. If track is given, then only the track elements in track are searched for. If type is given, then this function searches for a track element of the given type.

Note, if multiple track elements in the clip match the given criteria, this will return the element amongst them with the highest priority (numerically, the smallest). See ges_clip_find_track_elements if you wish to find all such elements.

Parameters:

`clip` –

A GESClip

`track` ( [allow-none]) –

The track to search in, or NULL to search in all tracks

`type` –

The type of track element to search for, or `G_TYPE_NONE` to match any type

Returns ( [transfer: full][nullable]) –

The element controlled by clip, in track, and of the given type, or NULL if no such element could be found.

#### GES.Clip.prototype.find_track_element

    function GES.Clip.prototype.find_track_element(track: GES.Track, type: GObject.Type): {
        // javascript wrapper for 'ges_clip_find_track_element'
    }

Finds an element controlled by the clip. If track is given, then only the track elements in track are searched for. If type is given, then this function searches for a track element of the given type.

Note, if multiple track elements in the clip match the given criteria, this will return the element amongst them with the highest priority (numerically, the smallest). See GES.Clip.prototype.find_track_elements if you wish to find all such elements.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`track` (GES.Track) –

The track to search in, or null to search in all tracks

`type` (GObject.Type) –

The type of track element to search for, or `G_TYPE_NONE` to match any type

Returns (GES.TrackElement) –

The element controlled by clip, in track, and of the given type, or null if no such element could be found.

#### GES.Clip.find_track_element

    def GES.Clip.find_track_element (self, track, type):
        #python wrapper for 'ges_clip_find_track_element'

Finds an element controlled by the clip. If track is given, then only the track elements in track are searched for. If type is given, then this function searches for a track element of the given type.

Note, if multiple track elements in the clip match the given criteria, this will return the element amongst them with the highest priority (numerically, the smallest). See GES.Clip.find_track_elements if you wish to find all such elements.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`track` (GES.Track) –

The track to search in, or None to search in all tracks

`type` (GObject.Type) –

The type of track element to search for, or `G_TYPE_NONE` to match any type

Returns (GES.TrackElement) –

The element controlled by clip, in track, and of the given type, or None if no such element could be found.

#### ges_clip_find_track_elements

    GList *
    ges_clip_find_track_elements (GESClip * clip,
                                  GESTrack * track,
                                  GESTrackType track_type,
                                  GType type)

Finds the GESTrackElement-s controlled by the clip that match the given criteria. If track is given as NULL and track_type is given as GES_TRACK_TYPE_UNKNOWN, then the search will match all elements in any track, including those with no track, and of any track-type. Otherwise, if track is not NULL, but track_type is GES_TRACK_TYPE_UNKNOWN, then only the track elements in track are searched for. Otherwise, if track_type is not GES_TRACK_TYPE_UNKNOWN, but track is NULL, then only the track elements whose track-type matches track_type are searched for. Otherwise, when both are given, the track elements that match either criteria are searched for. Therefore, if you wish to only find elements in a specific track, you should give the track as track, but you should not give the track's track-type as track_type because this would also select elements from other tracks of the same type.

You may also give type to further restrict the search to track elements of the given type.

Parameters:

`clip` –

A GESClip

`track` ( [allow-none]) –

The track to search in, or NULL to search in all tracks

`track_type` –

The track-type of the track element to search for, or GES_TRACK_TYPE_UNKNOWN to match any track type

`type` –

The type of track element to search for, or G_TYPE_NONE to match any type

Returns ( [transfer: full][element-type GESTrackElement]) –

A list of all the GESTrackElement-s controlled by clip, in track or of the given track_type, and of the given type.

#### GES.Clip.prototype.find_track_elements

    function GES.Clip.prototype.find_track_elements(track: GES.Track, track_type: GES.TrackType, type: GObject.Type): {
        // javascript wrapper for 'ges_clip_find_track_elements'
    }

Finds the GES.TrackElement-s controlled by the clip that match the given criteria. If track is given as null and track_type is given as GES.TrackType.UNKNOWN, then the search will match all elements in any track, including those with no track, and of any track-type. Otherwise, if track is not null, but track_type is GES.TrackType.UNKNOWN, then only the track elements in track are searched for. Otherwise, if track_type is not GES.TrackType.UNKNOWN, but track is null, then only the track elements whose track-type matches track_type are searched for. Otherwise, when both are given, the track elements that match either criteria are searched for. Therefore, if you wish to only find elements in a specific track, you should give the track as track, but you should not give the track's track-type as track_type because this would also select elements from other tracks of the same type.

You may also give type to further restrict the search to track elements of the given type.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`track` (GES.Track) –

The track to search in, or null to search in all tracks

`track_type` (GES.TrackType) –

The track-type of the track element to search for, or GES.TrackType.UNKNOWN to match any track type

`type` (GObject.Type) –

The type of track element to search for, or G_TYPE_NONE (not introspectable) to match any type

Returns ([ GES.TrackElement ]) –

A list of all the GES.TrackElement-s controlled by clip, in track or of the given track_type, and of the given type.

#### GES.Clip.find_track_elements

    def GES.Clip.find_track_elements (self, track, track_type, type):
        #python wrapper for 'ges_clip_find_track_elements'

Finds the GES.TrackElement-s controlled by the clip that match the given criteria. If track is given as None and track_type is given as GES.TrackType.UNKNOWN, then the search will match all elements in any track, including those with no track, and of any track_type. Otherwise, if track is not None, but track_type is GES.TrackType.UNKNOWN, then only the track elements in track are searched for. Otherwise, if track_type is not GES.TrackType.UNKNOWN, but track is None, then only the track elements whose track_type matches track_type are searched for. Otherwise, when both are given, the track elements that match either criteria are searched for. Therefore, if you wish to only find elements in a specific track, you should give the track as track, but you should not give the track's track_type as track_type because this would also select elements from other tracks of the same type.

You may also give type to further restrict the search to track elements of the given type.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`track` (GES.Track) –

The track to search in, or None to search in all tracks

`track_type` (GES.TrackType) –

The track-type of the track element to search for, or GES.TrackType.UNKNOWN to match any track type

`type` (GObject.Type) –

The type of track element to search for, or G_TYPE_NONE (not introspectable) to match any type

Returns ([ GES.TrackElement ]) –

A list of all the GES.TrackElement-s controlled by clip, in track or of the given track_type, and of the given type.

#### ges_clip_get_duration_limit

    GstClockTime
    ges_clip_get_duration_limit (GESClip * clip)

Gets the duration-limit of the clip.

Parameters:

`clip` –

A GESClip

Returns –

The duration-limit of clip.

Since : 1.18

#### GES.Clip.prototype.get_duration_limit

    function GES.Clip.prototype.get_duration_limit(): {
        // javascript wrapper for 'ges_clip_get_duration_limit'
    }

Gets the duration-limit of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (Number) –

The duration-limit of clip.

Since : 1.18

#### GES.Clip.get_duration_limit

    def GES.Clip.get_duration_limit (self):
        #python wrapper for 'ges_clip_get_duration_limit'

Gets the duration_limit of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (int) –

The duration-limit of clip.

Since : 1.18

#### ges_clip_get_internal_time_from_timeline_time

    GstClockTime
    ges_clip_get_internal_time_from_timeline_time (GESClip * clip,
                                                   GESTrackElement * child,
                                                   GstClockTime timeline_time,
                                                   GError ** error)

Convert the timeline time to an internal source time of the child. This will take any time effects placed on the clip into account (see GESBaseEffect for what time effects are supported, and how to declare them in GES).

When timeline_time is above the start of clip, this will return the internal time at which the content that appears at timeline_time in the output of the timeline is created in child. For example, if timeline_time corresponds to the current seek position, this would let you know which part of a media file is being read.

This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its max-duration.

If, instead, timeline_time is below the current start of clip, this will return what you would need to set the in-point of child to if you set the start of clip to timeline_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what in-point would result from a GES_EDIT_MODE_TRIM to timeline_time.

Note that whilst a clip has no time effects, this second return is equivalent to finding the internal time at which the content that appears at timeline_time in the timeline can be found in child if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use for the in-point or max-duration of the child.

See ges_clip_get_timeline_time_from_internal_time, which performs the reverse.

Parameters:

`clip` –

A GESClip

`child` –

An active child of clip with a track

`timeline_time` –

A time in the timeline time coordinates

`error` ( [nullable]) –

Return location for an error

Returns –

The time in the internal coordinates of child corresponding to timeline_time, or GST_CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.prototype.get_internal_time_from_timeline_time

    function GES.Clip.prototype.get_internal_time_from_timeline_time(child: GES.TrackElement, timeline_time: Number): {
        // javascript wrapper for 'ges_clip_get_internal_time_from_timeline_time'
    }

Convert the timeline time to an internal source time of the child. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).

When timeline_time is above the start of clip, this will return the internal time at which the content that appears at timeline_time in the output of the timeline is created in child. For example, if timeline_time corresponds to the current seek position, this would let you know which part of a media file is being read.

This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its max-duration.

If, instead, timeline_time is below the current start of clip, this will return what you would need to set the in-point of child to if you set the start of clip to timeline_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what in-point would result from a GES.EditMode.EDIT_TRIM to timeline_time.

Note that whilst a clip has no time effects, this second return is equivalent to finding the internal time at which the content that appears at timeline_time in the timeline can be found in child if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use for the in-point or max-duration of the child.

See GES.Clip.prototype.get_timeline_time_from_internal_time, which performs the reverse.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

An active child of clip with a track

`timeline_time` (Number) –

A time in the timeline time coordinates

Returns (Number) –

The time in the internal coordinates of child corresponding to timeline_time, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.get_internal_time_from_timeline_time

    @raises(GLib.GError)
    def GES.Clip.get_internal_time_from_timeline_time (self, child, timeline_time):
        #python wrapper for 'ges_clip_get_internal_time_from_timeline_time'

Convert the timeline time to an internal source time of the child. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).

When timeline_time is above the start of clip, this will return the internal time at which the content that appears at timeline_time in the output of the timeline is created in child. For example, if timeline_time corresponds to the current seek position, this would let you know which part of a media file is being read.

This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its max_duration.

If, instead, timeline_time is below the current start of clip, this will return what you would need to set the in_point of child to if you set the start of clip to timeline_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what in_point would result from a GES.EditMode.EDIT_TRIM to timeline_time.

Note that whilst a clip has no time effects, this second return is equivalent to finding the internal time at which the content that appears at timeline_time in the timeline can be found in child if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use for the in_point or max_duration of the child.

See GES.Clip.get_timeline_time_from_internal_time, which performs the reverse.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

An active child of clip with a track

`timeline_time` (int) –

A time in the timeline time coordinates

Returns (int) –

The time in the internal coordinates of child corresponding to timeline_time, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### ges_clip_get_layer

    GESLayer *
    ges_clip_get_layer (GESClip * clip)

Gets the layer of the clip.

Parameters:

`clip` –

A GESClip

Returns ( [transfer: full][nullable]) –

The layer clip is in, or NULL if clip is not in any layer.

#### GES.Clip.prototype.get_layer

    function GES.Clip.prototype.get_layer(): {
        // javascript wrapper for 'ges_clip_get_layer'
    }

Gets the layer of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (GES.Layer) –

The layer clip is in, or null if clip is not in any layer.

#### GES.Clip.get_layer

    def GES.Clip.get_layer (self):
        #python wrapper for 'ges_clip_get_layer'

Gets the layer of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (GES.Layer) –

The layer clip is in, or None if clip is not in any layer.

#### ges_clip_get_supported_formats

    GESTrackType
    ges_clip_get_supported_formats (GESClip * clip)

Gets the supported-formats of the clip.

Parameters:

`clip` –

A GESClip

Returns –

The GESTrackType-s supported by clip.

#### GES.Clip.prototype.get_supported_formats

    function GES.Clip.prototype.get_supported_formats(): {
        // javascript wrapper for 'ges_clip_get_supported_formats'
    }

Gets the supported-formats of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (GES.TrackType) –

The GES.TrackType-s supported by clip.

#### GES.Clip.get_supported_formats

    def GES.Clip.get_supported_formats (self):
        #python wrapper for 'ges_clip_get_supported_formats'

Gets the supported_formats of the clip.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (GES.TrackType) –

The GES.TrackType-s supported by clip.

#### ges_clip_get_timeline_time_from_internal_time

    GstClockTime
    ges_clip_get_timeline_time_from_internal_time (GESClip * clip,
                                                   GESTrackElement * child,
                                                   GstClockTime internal_time,
                                                   GError ** error)

Convert the internal source time from the child to a timeline time. This will take any time effects placed on the clip into account (see GESBaseEffect for what time effects are supported, and how to declare them in GES).

When internal_time is above the in-point of child, this will return the timeline time at which the internal content found at internal_time appears in the output of the timeline's track. For example, this would let you know where in the timeline a particular scene in a media file would appear.

This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its duration-limit.

If, instead, internal_time is below the current in-point of child, this will return what you would need to set the start of clip to if you set the in-point of child to internal_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what position to use in a GES_EDIT_MODE_TRIM if you wish to trim to a specific point in the internal content, such as a particular scene in a media file.

Note that whilst a clip has no time effects, this second return is equivalent to finding the timeline time at which the content of child at internal_time would be found in the timeline if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use in ges_timeline_element_edit for GES_EDIT_MODE_TRIM, and similar, if you wish to use a particular internal point as a reference. For example, you could choose to end a clip at a certain internal 'out-point', similar to the in-point, by translating the desired end time into the timeline coordinates, and using this position to trim the end of a clip.

See ges_clip_get_internal_time_from_timeline_time, which performs the reverse, or ges_clip_get_timeline_time_from_source_frame which does the same conversion, but using frame numbers.

Parameters:

`clip` –

A GESClip

`child` –

An active child of clip with a track

`internal_time` –

A time in the internal time coordinates of child

`error` ( [nullable]) –

Return location for an error

Returns –

The time in the timeline coordinates corresponding to internal_time, or GST_CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.prototype.get_timeline_time_from_internal_time

    function GES.Clip.prototype.get_timeline_time_from_internal_time(child: GES.TrackElement, internal_time: Number): {
        // javascript wrapper for 'ges_clip_get_timeline_time_from_internal_time'
    }

Convert the internal source time from the child to a timeline time. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).

When internal_time is above the in-point of child, this will return the timeline time at which the internal content found at internal_time appears in the output of the timeline's track. For example, this would let you know where in the timeline a particular scene in a media file would appear.

This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its duration-limit.

If, instead, internal_time is below the current in-point of child, this will return what you would need to set the start of clip to if you set the in-point of child to internal_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what position to use in a GES.EditMode.EDIT_TRIM if you wish to trim to a specific point in the internal content, such as a particular scene in a media file.

Note that whilst a clip has no time effects, this second return is equivalent to finding the timeline time at which the content of child at internal_time would be found in the timeline if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use in GES.TimelineElement.prototype.edit for GES.EditMode.EDIT_TRIM, and similar, if you wish to use a particular internal point as a reference. For example, you could choose to end a clip at a certain internal 'out-point', similar to the in-point, by translating the desired end time into the timeline coordinates, and using this position to trim the end of a clip.

See GES.Clip.prototype.get_internal_time_from_timeline_time, which performs the reverse, or GES.Clip.prototype.get_timeline_time_from_source_frame which does the same conversion, but using frame numbers.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

An active child of clip with a track

`internal_time` (Number) –

A time in the internal time coordinates of child

Returns (Number) –

The time in the timeline coordinates corresponding to internal_time, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.get_timeline_time_from_internal_time

    @raises(GLib.GError)
    def GES.Clip.get_timeline_time_from_internal_time (self, child, internal_time):
        #python wrapper for 'ges_clip_get_timeline_time_from_internal_time'

Convert the internal source time from the child to a timeline time. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).

When internal_time is above the in_point of child, this will return the timeline time at which the internal content found at internal_time appears in the output of the timeline's track. For example, this would let you know where in the timeline a particular scene in a media file would appear.

This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its duration_limit.

If, instead, internal_time is below the current in_point of child, this will return what you would need to set the start of clip to if you set the in_point of child to internal_time and wanted to keep the content of child currently found at the current start of clip at the same timeline position. If this would be negative, the conversion fails. This is useful for determining what position to use in a GES.EditMode.EDIT_TRIM if you wish to trim to a specific point in the internal content, such as a particular scene in a media file.

Note that whilst a clip has no time effects, this second return is equivalent to finding the timeline time at which the content of child at internal_time would be found in the timeline if it had indefinite extent in both directions. However, with non-linear time effects this second return will be more distinct.

In either case, the returned time would be appropriate to use in GES.TimelineElement.edit for GES.EditMode.EDIT_TRIM, and similar, if you wish to use a particular internal point as a reference. For example, you could choose to end a clip at a certain internal 'out-point', similar to the in_point, by translating the desired end time into the timeline coordinates, and using this position to trim the end of a clip.

See GES.Clip.get_internal_time_from_timeline_time, which performs the reverse, or GES.Clip.get_timeline_time_from_source_frame which does the same conversion, but using frame numbers.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`child` (GES.TrackElement) –

An active child of clip with a track

`internal_time` (int) –

A time in the internal time coordinates of child

Returns (int) –

The time in the timeline coordinates corresponding to internal_time, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### ges_clip_get_timeline_time_from_source_frame

    GstClockTime
    ges_clip_get_timeline_time_from_source_frame (GESClip * clip,
                                                  GESFrameNumber frame_number,
                                                  GError ** error)

Convert the source frame number to a timeline time. This acts the same as ges_clip_get_timeline_time_from_internal_time using the core children of the clip and using the frame number to specify the internal position, rather than a timestamp.

The returned timeline time can be used to seek or edit to a specific frame.

Note that you can get the frame timestamp of a particular clip asset with ges_clip_asset_get_frame_time.

Parameters:

`clip` –

A GESClip

`frame_number` –

The frame number to get the corresponding timestamp of in the timeline coordinates

`error` ( [nullable]) –

Return location for an error

Returns –

The timestamp corresponding to frame_number in the core children of clip, in the timeline coordinates, or GST_CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.prototype.get_timeline_time_from_source_frame

    function GES.Clip.prototype.get_timeline_time_from_source_frame(frame_number: Number): {
        // javascript wrapper for 'ges_clip_get_timeline_time_from_source_frame'
    }

Convert the source frame number to a timeline time. This acts the same as GES.Clip.prototype.get_timeline_time_from_internal_time using the core children of the clip and using the frame number to specify the internal position, rather than a timestamp.

The returned timeline time can be used to seek or edit to a specific frame.

Note that you can get the frame timestamp of a particular clip asset with GES.ClipAsset.prototype.get_frame_time.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`frame_number` (Number) –

The frame number to get the corresponding timestamp of in the timeline coordinates

Returns (Number) –

The timestamp corresponding to frame_number in the core children of clip, in the timeline coordinates, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### GES.Clip.get_timeline_time_from_source_frame

    @raises(GLib.GError)
    def GES.Clip.get_timeline_time_from_source_frame (self, frame_number):
        #python wrapper for 'ges_clip_get_timeline_time_from_source_frame'

Convert the source frame number to a timeline time. This acts the same as GES.Clip.get_timeline_time_from_internal_time using the core children of the clip and using the frame number to specify the internal position, rather than a timestamp.

The returned timeline time can be used to seek or edit to a specific frame.

Note that you can get the frame timestamp of a particular clip asset with GES.ClipAsset.get_frame_time.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`frame_number` (int) –

The frame number to get the corresponding timestamp of in the timeline coordinates

Returns (int) –

The timestamp corresponding to frame_number in the core children of clip, in the timeline coordinates, or Gst.CLOCK_TIME_NONE if the conversion could not be performed.

Since : 1.18

#### ges_clip_get_top_effect_index

    gint
    ges_clip_get_top_effect_index (GESClip * clip,
                                   GESBaseEffect * effect)

Gets the internal index of an effect in the clip. The index of effects in a clip will run from 0 to n-1, where n is the total number of effects. If two effects share the same track, the effect with the numerically lower index will be applied to the source data after the other effect, i.e. output data will always flow from a higher index effect to a lower index effect.

Parameters:

`clip` –

A GESClip

`effect` –

The effect we want to get the index of

Returns –

The index of effect in clip, or -1 if something went wrong.

#### GES.Clip.prototype.get_top_effect_index

    function GES.Clip.prototype.get_top_effect_index(effect: GES.BaseEffect): {
        // javascript wrapper for 'ges_clip_get_top_effect_index'
    }

Gets the internal index of an effect in the clip. The index of effects in a clip will run from 0 to n-1, where n is the total number of effects. If two effects share the same track, the effect with the numerically lower index will be applied to the source data after the other effect, i.e. output data will always flow from a higher index effect to a lower index effect.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

The effect we want to get the index of

Returns (Number) –

The index of effect in clip, or -1 if something went wrong.

#### GES.Clip.get_top_effect_index

    def GES.Clip.get_top_effect_index (self, effect):
        #python wrapper for 'ges_clip_get_top_effect_index'

Gets the internal index of an effect in the clip. The index of effects in a clip will run from 0 to n-1, where n is the total number of effects. If two effects share the same track, the effect with the numerically lower index will be applied to the source data after the other effect, i.e. output data will always flow from a higher index effect to a lower index effect.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

The effect we want to get the index of

Returns (int) –

The index of effect in clip, or -1 if something went wrong.

#### ges_clip_get_top_effect_position

    gint
    ges_clip_get_top_effect_position (GESClip * clip,
                                      GESBaseEffect * effect)

Parameters:

`clip` –
No description available
`effect` –
No description available
Returns –
No description available

#### GES.Clip.prototype.get_top_effect_position

    function GES.Clip.prototype.get_top_effect_position(effect: GES.BaseEffect): {
        // javascript wrapper for 'ges_clip_get_top_effect_position'
    }

Parameters:

`clip` (GES.Clip) –
No description available
`effect` (GES.BaseEffect) –
No description available
Returns (Number) –
No description available

#### GES.Clip.get_top_effect_position

    def GES.Clip.get_top_effect_position (self, effect):
        #python wrapper for 'ges_clip_get_top_effect_position'

Parameters:

`clip` (GES.Clip) –
No description available
`effect` (GES.BaseEffect) –
No description available
Returns (int) –
No description available

#### ges_clip_get_top_effects

    GList *
    ges_clip_get_top_effects (GESClip * clip)

Gets the GESBaseEffect-s that have been added to the clip. The returned list is ordered by their internal index in the clip. See ges_clip_get_top_effect_index.

Parameters:

`clip` –

A GESClip

Returns ( [transfer: full][element-type GESTrackElement]) –

A list of all GESBaseEffect-s that have been added to clip.

#### GES.Clip.prototype.get_top_effects

    function GES.Clip.prototype.get_top_effects(): {
        // javascript wrapper for 'ges_clip_get_top_effects'
    }

Gets the GES.BaseEffect-s that have been added to the clip. The returned list is ordered by their internal index in the clip. See GES.Clip.prototype.get_top_effect_index.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns ([ GES.TrackElement ]) –

A list of all GES.BaseEffect-s that have been added to clip.

#### GES.Clip.get_top_effects

    def GES.Clip.get_top_effects (self):
        #python wrapper for 'ges_clip_get_top_effects'

Gets the GES.BaseEffect-s that have been added to the clip. The returned list is ordered by their internal index in the clip. See GES.Clip.get_top_effect_index.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns ([ GES.TrackElement ]) –

A list of all GES.BaseEffect-s that have been added to clip.

#### ges_clip_is_moving_between_layers

    gboolean
    ges_clip_is_moving_between_layers (GESClip * clip)

Tells you if the clip is currently in the process of being moved from one layer to another. This is useful from the layer::clip-added and layer::clip-removed callbacks to know if the clip is being moved between layers, or is being added/removed for other reasons (like being added for the first time, or being actually removed).

Parameters:

`clip` –

A GESClip

Returns –

TRUE if clip is currently being moved between layers, FALSE otherwise.

Since : 1.28

#### GES.Clip.prototype.is_moving_between_layers

    function GES.Clip.prototype.is_moving_between_layers(): {
        // javascript wrapper for 'ges_clip_is_moving_between_layers'
    }

Tells you if the clip is currently in the process of being moved from one layer to another. This is useful from the layer::clip-added and layer::clip-removed callbacks to know if the clip is being moved between layers, or is being added/removed for other reasons (like being added for the first time, or being actually removed).

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (Number) –

true if clip is currently being moved between layers, false otherwise.

Since : 1.28

#### GES.Clip.is_moving_between_layers

    def GES.Clip.is_moving_between_layers (self):
        #python wrapper for 'ges_clip_is_moving_between_layers'

Tells you if the clip is currently in the process of being moved from one layer to another. This is useful from the layer::clip-added and layer::clip-removed callbacks to know if the clip is being moved between layers, or is being added/removed for other reasons (like being added for the first time, or being actually removed).

Parameters:

`clip` (GES.Clip) –

A GES.Clip

Returns (bool) –

True if clip is currently being moved between layers, False otherwise.

Since : 1.28

#### ges_clip_move_to_layer

    gboolean
    ges_clip_move_to_layer (GESClip * clip,
                            GESLayer * layer)

See ges_clip_move_to_layer_full, which also gives an error.

Parameters:

`clip` –

A GESClip

`layer` –

The new layer

Returns –

TRUE if clip was successfully moved to layer.

#### GES.Clip.prototype.move_to_layer

    function GES.Clip.prototype.move_to_layer(layer: GES.Layer): {
        // javascript wrapper for 'ges_clip_move_to_layer'
    }

See GES.Clip.prototype.move_to_layer_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`layer` (GES.Layer) –

The new layer

Returns (Number) –

true if clip was successfully moved to layer.

#### GES.Clip.move_to_layer

    def GES.Clip.move_to_layer (self, layer):
        #python wrapper for 'ges_clip_move_to_layer'

See GES.Clip.move_to_layer_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`layer` (GES.Layer) –

The new layer

Returns (bool) –

True if clip was successfully moved to layer.

#### ges_clip_move_to_layer_full

    gboolean
    ges_clip_move_to_layer_full (GESClip * clip,
                                 GESLayer * layer,
                                 GError ** error)

Moves a clip to a new layer. If the clip already exists in a layer, it is first removed from its current layer before being added to the new layer.

Parameters:

`clip` –

A GESClip

`layer` –

The new layer

`error` ( [nullable]) –

Return location for an error

Returns –

TRUE if clip was successfully moved to layer.

Since : 1.18

#### GES.Clip.prototype.move_to_layer_full

    function GES.Clip.prototype.move_to_layer_full(layer: GES.Layer): {
        // javascript wrapper for 'ges_clip_move_to_layer_full'
    }

Moves a clip to a new layer. If the clip already exists in a layer, it is first removed from its current layer before being added to the new layer.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`layer` (GES.Layer) –

The new layer

Returns (Number) –

true if clip was successfully moved to layer.

Since : 1.18

#### GES.Clip.move_to_layer_full

    @raises(GLib.GError)
    def GES.Clip.move_to_layer_full (self, layer):
        #python wrapper for 'ges_clip_move_to_layer_full'

Moves a clip to a new layer. If the clip already exists in a layer, it is first removed from its current layer before being added to the new layer.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`layer` (GES.Layer) –

The new layer

Returns (bool) –

True if clip was successfully moved to layer.

Since : 1.18

#### ges_clip_remove_top_effect

    gboolean
    ges_clip_remove_top_effect (GESClip * clip,
                                GESBaseEffect * effect,
                                GError ** error)

Remove a top effect from the clip.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is removed.

Parameters:

`clip` –

A GESClip

`effect` –

The top effect to remove

`error` ( [nullable]) –

Return location for an error

Returns –

TRUE if effect was successfully added to clip at index.

Since : 1.18

#### GES.Clip.prototype.remove_top_effect

    function GES.Clip.prototype.remove_top_effect(effect: GES.BaseEffect): {
        // javascript wrapper for 'ges_clip_remove_top_effect'
    }

Remove a top effect from the clip.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is removed.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

The top effect to remove

Returns (Number) –

true if effect was successfully added to clip at index.

Since : 1.18

#### GES.Clip.remove_top_effect

    @raises(GLib.GError)
    def GES.Clip.remove_top_effect (self, effect):
        #python wrapper for 'ges_clip_remove_top_effect'

Remove a top effect from the clip.

Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is removed.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

The top effect to remove

Returns (bool) –

True if effect was successfully added to clip at index.

Since : 1.18

#### ges_clip_set_supported_formats

    ges_clip_set_supported_formats (GESClip * clip,
                                    GESTrackType supportedformats)

Sets the supported-formats of the clip. This should normally only be called by subclasses, which should be responsible for updating its value, rather than the user.

Parameters:

`clip` –

A GESClip

`supportedformats` –

The GESTrackType-s supported by clip

#### GES.Clip.prototype.set_supported_formats

    function GES.Clip.prototype.set_supported_formats(supportedformats: GES.TrackType): {
        // javascript wrapper for 'ges_clip_set_supported_formats'
    }

Sets the supported-formats of the clip. This should normally only be called by subclasses, which should be responsible for updating its value, rather than the user.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`supportedformats` (GES.TrackType) –

The GES.TrackType-s supported by clip

#### GES.Clip.set_supported_formats

    def GES.Clip.set_supported_formats (self, supportedformats):
        #python wrapper for 'ges_clip_set_supported_formats'

Sets the supported_formats of the clip. This should normally only be called by subclasses, which should be responsible for updating its value, rather than the user.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`supportedformats` (GES.TrackType) –

The GES.TrackType-s supported by clip

#### ges_clip_set_top_effect_index

    gboolean
    ges_clip_set_top_effect_index (GESClip * clip,
                                   GESBaseEffect * effect,
                                   guint newindex)

See ges_clip_set_top_effect_index_full, which also gives an error.

Parameters:

`clip` –

A GESClip

`effect` –

An effect within clip to move

`newindex` –

The index for effect in clip

Returns –

TRUE if effect was successfully moved to newindex.

#### GES.Clip.prototype.set_top_effect_index

    function GES.Clip.prototype.set_top_effect_index(effect: GES.BaseEffect, newindex: Number): {
        // javascript wrapper for 'ges_clip_set_top_effect_index'
    }

See GES.Clip.prototype.set_top_effect_index_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

An effect within clip to move

`newindex` (Number) –

The index for effect in clip

Returns (Number) –

true if effect was successfully moved to newindex.

#### GES.Clip.set_top_effect_index

    def GES.Clip.set_top_effect_index (self, effect, newindex):
        #python wrapper for 'ges_clip_set_top_effect_index'

See GES.Clip.set_top_effect_index_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

An effect within clip to move

`newindex` (int) –

The index for effect in clip

Returns (bool) –

True if effect was successfully moved to newindex.

#### ges_clip_set_top_effect_index_full

    gboolean
    ges_clip_set_top_effect_index_full (GESClip * clip,
                                        GESBaseEffect * effect,
                                        guint newindex,
                                        GError ** error)

Set the index of an effect within the clip. See ges_clip_get_top_effect_index. The new index must be an existing index of the clip. The effect is moved to the new index, and the other effects may be shifted in index accordingly to otherwise maintain the ordering.

Parameters:

`clip` –

A GESClip

`effect` –

An effect within clip to move

`newindex` –

The index for effect in clip

`error` ( [nullable]) –

Return location for an error

Returns –

TRUE if effect was successfully moved to newindex.

Since : 1.18

#### GES.Clip.prototype.set_top_effect_index_full

    function GES.Clip.prototype.set_top_effect_index_full(effect: GES.BaseEffect, newindex: Number): {
        // javascript wrapper for 'ges_clip_set_top_effect_index_full'
    }

Set the index of an effect within the clip. See GES.Clip.prototype.get_top_effect_index. The new index must be an existing index of the clip. The effect is moved to the new index, and the other effects may be shifted in index accordingly to otherwise maintain the ordering.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

An effect within clip to move

`newindex` (Number) –

The index for effect in clip

Returns (Number) –

true if effect was successfully moved to newindex.

Since : 1.18

#### GES.Clip.set_top_effect_index_full

    @raises(GLib.GError)
    def GES.Clip.set_top_effect_index_full (self, effect, newindex):
        #python wrapper for 'ges_clip_set_top_effect_index_full'

Set the index of an effect within the clip. See GES.Clip.get_top_effect_index. The new index must be an existing index of the clip. The effect is moved to the new index, and the other effects may be shifted in index accordingly to otherwise maintain the ordering.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`effect` (GES.BaseEffect) –

An effect within clip to move

`newindex` (int) –

The index for effect in clip

Returns (bool) –

True if effect was successfully moved to newindex.

Since : 1.18

#### ges_clip_set_top_effect_priority

    gboolean
    ges_clip_set_top_effect_priority (GESClip * clip,
                                      GESBaseEffect * effect,
                                      guint newpriority)

Parameters:

`clip` –
No description available
`effect` –
No description available
`newpriority` –
No description available
Returns –
No description available

#### GES.Clip.prototype.set_top_effect_priority

    function GES.Clip.prototype.set_top_effect_priority(effect: GES.BaseEffect, newpriority: Number): {
        // javascript wrapper for 'ges_clip_set_top_effect_priority'
    }

Parameters:

`clip` (GES.Clip) –
No description available
`effect` (GES.BaseEffect) –
No description available
`newpriority` (Number) –
No description available
Returns (Number) –
No description available

#### GES.Clip.set_top_effect_priority

    def GES.Clip.set_top_effect_priority (self, effect, newpriority):
        #python wrapper for 'ges_clip_set_top_effect_priority'

Parameters:

`clip` (GES.Clip) –
No description available
`effect` (GES.BaseEffect) –
No description available
`newpriority` (int) –
No description available
Returns (bool) –
No description available

#### ges_clip_split

    GESClip *
    ges_clip_split (GESClip * clip,
                    guint64 position)

See ges_clip_split_full, which also gives an error.

Parameters:

`clip` –

The GESClip to split

`position` –

The timeline position at which to perform the split

Returns ( [transfer: none][nullable]) –

The newly created clip resulting from the splitting clip, or NULL if clip can't be split.

#### GES.Clip.prototype.split

    function GES.Clip.prototype.split(position: Number): {
        // javascript wrapper for 'ges_clip_split'
    }

See GES.Clip.prototype.split_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

The GES.Clip to split

`position` (Number) –

The timeline position at which to perform the split

Returns (GES.Clip) –

The newly created clip resulting from the splitting clip, or null if clip can't be split.

#### GES.Clip.split

    def GES.Clip.split (self, position):
        #python wrapper for 'ges_clip_split'

See GES.Clip.split_full, which also gives an error.

Parameters:

`clip` (GES.Clip) –

The GES.Clip to split

`position` (int) –

The timeline position at which to perform the split

Returns (GES.Clip) –

The newly created clip resulting from the splitting clip, or None if clip can't be split.

#### ges_clip_split_full

    GESClip *
    ges_clip_split_full (GESClip * clip,
                         guint64 position,
                         GError ** error)

Splits a clip at the given timeline position into two clips. The clip must already have a layer.

The original clip's duration is reduced such that its end point matches the split position. Then a new clip is created in the same layer, whose start matches the split position and duration will be set such that its end point matches the old end point of the original clip. Thus, the two clips together will occupy the same positions in the timeline as the original clip did.

The children of the new clip will be new copies of the original clip's children, so it will share the same sources and use the same operations.

The new clip will also have its in-point set so that any internal data will appear in the timeline at the same time. Thus, when the timeline is played, the playback of data should appear the same. This may be complicated by any additional GESEffect-s that have been placed on the original clip that depend on the playback time or change the data consumption rate of sources. This method will attempt to translate these effects such that the playback appears the same. In such complex situations, you may get a better result if you place the clip in a separate sub GESProject, which only contains this clip (and its effects), and in the original layer create two neighbouring GESUriClip-s that reference this sub-project, but at a different in-point.

Parameters:

`clip` –

The GESClip to split

`position` –

The timeline position at which to perform the split, between the start and end of the clip

`error` –

Return location for an error

Returns ( [transfer: none][nullable]) –

The newly created clip resulting from the splitting clip, or NULL if clip can't be split.

Since : 1.18

#### GES.Clip.prototype.split_full

    function GES.Clip.prototype.split_full(position: Number): {
        // javascript wrapper for 'ges_clip_split_full'
    }

Splits a clip at the given timeline position into two clips. The clip must already have a layer.

The original clip's duration is reduced such that its end point matches the split position. Then a new clip is created in the same layer, whose start matches the split position and duration will be set such that its end point matches the old end point of the original clip. Thus, the two clips together will occupy the same positions in the timeline as the original clip did.

The children of the new clip will be new copies of the original clip's children, so it will share the same sources and use the same operations.

The new clip will also have its in-point set so that any internal data will appear in the timeline at the same time. Thus, when the timeline is played, the playback of data should appear the same. This may be complicated by any additional GES.Effect-s that have been placed on the original clip that depend on the playback time or change the data consumption rate of sources. This method will attempt to translate these effects such that the playback appears the same. In such complex situations, you may get a better result if you place the clip in a separate sub GES.Project, which only contains this clip (and its effects), and in the original layer create two neighbouring GES.UriClip-s that reference this sub-project, but at a different in-point.

Parameters:

`clip` (GES.Clip) –

The GES.Clip to split

`position` (Number) –

The timeline position at which to perform the split, between the start and end of the clip

Returns (GES.Clip) –

The newly created clip resulting from the splitting clip, or null if clip can't be split.

Since : 1.18

#### GES.Clip.split_full

    @raises(GLib.GError)
    def GES.Clip.split_full (self, position):
        #python wrapper for 'ges_clip_split_full'

Splits a clip at the given timeline position into two clips. The clip must already have a layer.

The original clip's duration is reduced such that its end point matches the split position. Then a new clip is created in the same layer, whose start matches the split position and duration will be set such that its end point matches the old end point of the original clip. Thus, the two clips together will occupy the same positions in the timeline as the original clip did.

The children of the new clip will be new copies of the original clip's children, so it will share the same sources and use the same operations.

The new clip will also have its in_point set so that any internal data will appear in the timeline at the same time. Thus, when the timeline is played, the playback of data should appear the same. This may be complicated by any additional GES.Effect-s that have been placed on the original clip that depend on the playback time or change the data consumption rate of sources. This method will attempt to translate these effects such that the playback appears the same. In such complex situations, you may get a better result if you place the clip in a separate sub GES.Project, which only contains this clip (and its effects), and in the original layer create two neighbouring GES.UriClip-s that reference this sub-project, but at a different in_point.

Parameters:

`clip` (GES.Clip) –

The GES.Clip to split

`position` (int) –

The timeline position at which to perform the split, between the start and end of the clip

Returns (GES.Clip) –

The newly created clip resulting from the splitting clip, or None if clip can't be split.

Since : 1.18

### Properties

#### duration-limit

    “duration-limit” guint64

The maximum duration that can be currently set for the clip, taking into account the in-point, max-duration, active, and track properties of its children, as well as any time effects. If there is no limit, this will be set to GST_CLOCK_TIME_NONE.

Note that whilst a clip has no children in any tracks, the limit will be unknown, and similarly set to GST_CLOCK_TIME_NONE.

If the duration-limit would ever go below the current duration of the clip due to a change in the above variables, its duration will be set to the new limit.

Flags : Read

Since : 1.18

#### duration-limit

    “duration-limit” Number

The maximum duration that can be currently set for the clip, taking into account the in-point, max-duration, active, and track properties of its children, as well as any time effects. If there is no limit, this will be set to Gst.CLOCK_TIME_NONE.

Note that whilst a clip has no children in any tracks, the limit will be unknown, and similarly set to Gst.CLOCK_TIME_NONE.

If the duration-limit would ever go below the current duration of the clip due to a change in the above variables, its duration will be set to the new limit.

Flags : Read

Since : 1.18

#### duration_limit

    “self.props.duration_limit” int

The maximum duration that can be currently set for the clip, taking into account the in_point, max_duration, active, and track properties of its children, as well as any time effects. If there is no limit, this will be set to Gst.CLOCK_TIME_NONE.

Note that whilst a clip has no children in any tracks, the limit will be unknown, and similarly set to Gst.CLOCK_TIME_NONE.

If the duration-limit would ever go below the current duration of the clip due to a change in the above variables, its duration will be set to the new limit.

Flags : Read

Since : 1.18

#### layer

    “layer” GESLayer *

The layer this clip lies in.

If you want to connect to this property's notify signal, you should connect to it with g_signal_connect_after since the signal emission may be stopped internally.

Flags : Read

#### layer

    “layer” GES.Layer

The layer this clip lies in.

If you want to connect to this property's notify signal, you should connect to it with g_signal_connect_after (not introspectable) since the signal emission may be stopped internally.

Flags : Read

#### layer

    “self.props.layer” GES.Layer

The layer this clip lies in.

If you want to connect to this property's notify signal, you should connect to it with g_signal_connect_after (not introspectable) since the signal emission may be stopped internally.

Flags : Read

#### supported-formats

    “supported-formats” GESTrackType *

The GESTrackType-s that the clip supports, which it can create GESTrackElement-s for. Note that this can be a combination of GESTrackType flags to indicate support for several track-type elements.

Flags : Read / Write / Construct

#### supported-formats

    “supported-formats” GES.TrackType

The GES.TrackType-s that the clip supports, which it can create GES.TrackElement-s for. Note that this can be a combination of GES.TrackType flags to indicate support for several track-type elements.

Flags : Read / Write / Construct

#### supported_formats

    “self.props.supported_formats” GES.TrackType

The GES.TrackType-s that the clip supports, which it can create GES.TrackElement-s for. Note that this can be a combination of GES.TrackType flags to indicate support for several track_type elements.

Flags : Read / Write / Construct

### Virtual Methods

#### create_track_element

    GESTrackElement *
    create_track_element (GESClip * clip,
                          GESTrackType type)

Method to create the core GESTrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as NULL, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

Parameters:

`clip` –
No description available
`type` –
No description available
Returns –
No description available

#### vfunc_create_track_element

    function vfunc_create_track_element(clip: GES.Clip, type: GES.TrackType): {
        // javascript implementation of the 'create_track_element' virtual method
    }

Method to create the core GES.TrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as null, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

Parameters:

`clip` (GES.Clip) –
No description available
`type` (GES.TrackType) –
No description available
Returns (GES.TrackElement) –
No description available

#### do_create_track_element

    def do_create_track_element (clip, type):
        #python implementation of the 'create_track_element' virtual method

Method to create the core GES.TrackElement of a clip of this class. If a clip of this class may create several track elements per track type, this should be left as None, and GESClipClass::create_track_elements should be used instead. Otherwise, you should implement this class method and leave GESClipClass::create_track_elements as the default implementation

Parameters:

`clip` (GES.Clip) –
No description available
`type` (GES.TrackType) –
No description available
Returns (GES.TrackElement) –
No description available

#### create_track_elements

    GList *
    create_track_elements (GESClip * clip,
                           GESTrackType type)

Method to create the (multiple) core GESTrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

Parameters:

`clip` –
No description available
`type` –
No description available
Returns –
No description available

#### vfunc_create_track_elements

    function vfunc_create_track_elements(clip: GES.Clip, type: GES.TrackType): {
        // javascript implementation of the 'create_track_elements' virtual method
    }

Method to create the (multiple) core GES.TrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

Parameters:

`clip` (GES.Clip) –
No description available
`type` (GES.TrackType) –
No description available
Returns ([ GES.TrackElement ]) –
No description available

#### do_create_track_elements

    def do_create_track_elements (clip, type):
        #python implementation of the 'create_track_elements' virtual method

Method to create the (multiple) core GES.TrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation

Parameters:

`clip` (GES.Clip) –
No description available
`type` (GES.TrackType) –
No description available
Returns ([ GES.TrackElement ]) –
No description available

## Function Macros

### GES_CLIP_CLASS_CAN_ADD_EFFECTS

    #define GES_CLIP_CLASS_CAN_ADD_EFFECTS(klass) ((GES_CLIP_CLASS (klass))->ABI.abi.can_add_effects)

Whether the class allows for the user to add additional non-core GESBaseEffect-s to clips from this class.

Parameters:

`klass` –

A GESClipClass

## Constants

### GES_TYPE_CLIP

    #define GES_TYPE_CLIP             ges_clip_get_type()

## Callbacks

### GESCreateTrackElementFunc

    GESTrackElement *
    (*GESCreateTrackElementFunc) (GESClip * clip,
                                  GESTrackType type)

A method for creating the core GESTrackElement of a clip, to be added to a GESTrack of the given track type.

If a clip may produce several track elements per track type, GESCreateTrackElementsFunc is more appropriate.

Parameters:

`clip` –

A GESClip

`type` –

A GESTrackType to create a GESTrackElement for

Returns ( [transfer: floating][nullable]) –

The GESTrackElement created by clip, or NULL if clip can not provide a track element for the given type or an error occurred.

### GES.CreateTrackElementFunc

    function GES.CreateTrackElementFunc(clip: GES.Clip, type: GES.TrackType): {
        // javascript wrapper for 'GESCreateTrackElementFunc'
    }

A method for creating the core GES.TrackElement of a clip, to be added to a GES.Track of the given track type.

If a clip may produce several track elements per track type, GES.CreateTrackElementsFunc is more appropriate.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`type` (GES.TrackType) –

A GES.TrackType to create a GES.TrackElement for

Returns (GES.TrackElement) –

The GES.TrackElement created by clip, or null if clip can not provide a track element for the given type or an error occurred.

### GES.CreateTrackElementFunc

    def GES.CreateTrackElementFunc (clip, type):
        #python wrapper for 'GESCreateTrackElementFunc'

A method for creating the core GES.TrackElement of a clip, to be added to a GES.Track of the given track type.

If a clip may produce several track elements per track type, GES.CreateTrackElementsFunc is more appropriate.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`type` (GES.TrackType) –

A GES.TrackType to create a GES.TrackElement for

Returns (GES.TrackElement) –

The GES.TrackElement created by clip, or None if clip can not provide a track element for the given type or an error occurred.

### GESCreateTrackElementsFunc

    GList *
    (*GESCreateTrackElementsFunc) (GESClip * clip,
                                   GESTrackType type)

A method for creating the core GESTrackElement-s of a clip, to be added to GESTrack-s of the given track type.

Parameters:

`clip` –

A GESClip

`type` –

A GESTrackType to create GESTrackElement-s for

Returns ( [transfer: container][element-type GESTrackElement]) –

A list of the GESTrackElement-s created by clip for the given type, or NULL if no track elements are created or an error occurred.

### GES.CreateTrackElementsFunc

    function GES.CreateTrackElementsFunc(clip: GES.Clip, type: GES.TrackType): {
        // javascript wrapper for 'GESCreateTrackElementsFunc'
    }

A method for creating the core GES.TrackElement-s of a clip, to be added to GES.Track-s of the given track type.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`type` (GES.TrackType) –

A GES.TrackType to create GES.TrackElement-s for

Returns ([ GES.TrackElement ]) –

A list of the GES.TrackElement-s created by clip for the given type, or null if no track elements are created or an error occurred.

### GES.CreateTrackElementsFunc

    def GES.CreateTrackElementsFunc (clip, type):
        #python wrapper for 'GESCreateTrackElementsFunc'

A method for creating the core GES.TrackElement-s of a clip, to be added to GES.Track-s of the given track type.

Parameters:

`clip` (GES.Clip) –

A GES.Clip

`type` (GES.TrackType) –

A GES.TrackType to create GES.TrackElement-s for

Returns ([ GES.TrackElement ]) –

A list of the GES.TrackElement-s created by clip for the given type, or None if no track elements are created or an error occurred.

### GESFillTrackElementFunc

    gboolean
    (*GESFillTrackElementFunc) (GESClip * clip,
                                GESTrackElement * track_element,
                                GstElement * nleobj)

A function that will be called when the nleobject of a corresponding track element needs to be filled.

The implementer of this function shall add the proper GstElement to nleobj using gst_bin_add.

Parameters:

`clip` –

The GESClip controlling the track elements

`track_element` –

The GESTrackElement

`nleobj` –

The nleobject that needs to be filled

Returns –

TRUE if the implementer successfully filled the nleobj.

deprecated : 1.18: This method type is no longer used.

### GES.FillTrackElementFunc

    function GES.FillTrackElementFunc(clip: GES.Clip, track_element: GES.TrackElement, nleobj: Gst.Element): {
        // javascript wrapper for 'GESFillTrackElementFunc'
    }

A function that will be called when the nleobject of a corresponding track element needs to be filled.

The implementer of this function shall add the proper Gst.Element to nleobj using Gst.Bin.prototype.add.

Parameters:

`clip` (GES.Clip) –

The GES.Clip controlling the track elements

`track_element` (GES.TrackElement) –

The GES.TrackElement

`nleobj` (Gst.Element) –

The nleobject that needs to be filled

Returns (Number) –

true if the implementer successfully filled the nleobj.

deprecated : 1.18: This method type is no longer used.

### GES.FillTrackElementFunc

    def GES.FillTrackElementFunc (clip, track_element, nleobj):
        #python wrapper for 'GESFillTrackElementFunc'

A function that will be called when the nleobject of a corresponding track element needs to be filled.

The implementer of this function shall add the proper Gst.Element to nleobj using Gst.Bin.add.

Parameters:

`clip` (GES.Clip) –

The GES.Clip controlling the track elements

`track_element` (GES.TrackElement) –

The GES.TrackElement

`nleobj` (Gst.Element) –

The nleobject that needs to be filled

Returns (bool) –

True if the implementer successfully filled the nleobj.

deprecated : 1.18: This method type is no longer used.

Subpages:

GESUriClip – An object for manipulating media files in a GESTimeline

GESTitleClip – Render stand-alone titles in GESLayer.

GESTestClip – Render video and audio test patterns in a GESLayer

GESTimeOverlayClip – Source with a time overlay on top

GESEffectClip – An effect created by parse-launch style bin descriptions in a GESLayer

GESTransitionClip – Transition from one clip to another in a GESLayer

The results of the search are