GES.Clip¶
Subclasses: | GES.OperationClip , GES.SourceClip |
---|
Methods¶
Inherited: | GES.Container (6), GES.TimelineElement (33), GObject.Object (40), GES.Extractable (3), GES.MetaContainer (37) |
---|---|
Structs: | GObject.ObjectClass (5) |
add_asset (asset) |
|
find_track_element (track, type) |
|
find_track_elements (track, track_type, type) |
|
get_layer () |
|
get_supported_formats () |
|
get_top_effect_index (effect) |
|
get_top_effect_position (effect) |
|
get_top_effects () |
|
move_to_layer (layer) |
|
set_supported_formats (supportedformats) |
|
set_top_effect_index (effect, newindex) |
|
set_top_effect_priority (effect, newpriority) |
|
split (position) |
Virtual Methods¶
Inherited: | GES.Container (6), GES.TimelineElement (14), GObject.Object (7), GES.Extractable (3) |
---|
Properties¶
Inherited: | GES.Container (1), GES.TimelineElement (9) |
---|
Name | Type | Flags | Short Description |
---|---|---|---|
layer |
GES.Layer |
r | The GES.Layer where this clip is being used. |
supported-formats |
GES.TrackType |
r/w/c | Formats supported by the file |
Signals¶
Inherited: | GES.Container (2), GES.TimelineElement (1), GObject.Object (1), GES.MetaContainer (1) |
---|
Fields¶
Inherited: | GES.Container (2), GES.TimelineElement (1), GObject.Object (1), GES.MetaContainer (1) |
---|
Name | Type | Access | Description |
---|---|---|---|
parent | GES.Container |
r |
Class Details¶
-
class
GES.
Clip
(**kwargs)¶ Bases: GES.Container
Abstract: Yes Structure: GES.ClipClass
A
GES.Clip
is a ‘natural’ object which controls one or moreGES.TrackElement
(s) in one or moreGES.Track
(s).Keeps a reference to the
GES.TrackElement
(s) it created and sets/updates their properties.-
add_asset
(asset)[source]¶ Parameters: asset ( GES.Asset
) – aGES.Asset
with #GES_TYPE_TRACK_ELEMENT as extractable_typeReturns: Created GES.TrackElement
orNone
if an error happenedReturn type: GES.TrackElement
orNone
Extracts a
GES.TrackElement
from asset and adds it to the self. Should only be called in order to add operations to aGES.Clip
, ni other cases TrackElement are added automatically when adding theGES.Clip
/GES.Asset
to a layer.Takes a reference on track_element.
-
find_track_element
(track, type)[source]¶ Parameters: - track (
GES.Track
orNone
) – aGES.Track
orNone
- type (
GObject.GType
) – aGObject.GType
indicating the type of track element you are looking for orGObject.TYPE_NONE
if you do not care about the track type.
Returns: The
GES.TrackElement
used by track, elseNone
. Unref after usageReturn type: Finds the
GES.TrackElement
controlled by self that is used in track. You may optionally specify aGObject.GType
to further narrow search criteria.Note: If many objects match, then the one with the highest priority will be returned.
- track (
-
find_track_elements
(track, track_type, type)[source]¶ Parameters: - track (
GES.Track
orNone
) – aGES.Track
orNone
- track_type (
GES.TrackType
) – aGES.TrackType
indicating the type of tracks in which elements should be searched. - type (
GObject.GType
) – aGObject.GType
indicating the type of track element you are looking for orGObject.TYPE_NONE
if you do not care about the track type.
Returns: a
GLib.List
of theGES.TrackElement
contained in self. The refcount of the objects will be increased. The user will have to unref eachGES.TrackElement
and free theGLib.List
.Return type: Finds all the
GES.TrackElement
controlled by self that is used in track. You may optionally specify aGObject.GType
to further narrow search criteria.- track (
-
get_layer
()[source]¶ Returns: The GES.Layer
where this self is being used, orNone
if it is not used on any layer. The caller should unref it usage.Return type: GES.Layer
orNone
Get the
GES.Layer
to which this clip belongs.
-
get_supported_formats
()[source]¶ Returns: The formats supported by self. Return type: GES.TrackType
Get the formats supported by self.
-
get_top_effect_index
(effect)[source]¶ Parameters: effect ( GES.BaseEffect
) – TheGES.BaseEffect
we want to get the top index fromReturns: The top index of the effect, -1 if something went wrong. Return type: int
Gets the index position of an effect.
-
get_top_effect_position
(effect)[source]¶ Parameters: effect ( GES.BaseEffect
) –Return type: int
-
get_top_effects
()[source]¶ Returns: a GLib.List
of theGES.BaseEffect
that are applied on self order by ascendant priorities. The refcount of the objects will be increased. The user will have to unref eachGES.BaseEffect
and free theGLib.List
.Return type: [ GES.TrackElement
]Get effects applied on self
-
move_to_layer
(layer)[source]¶ Parameters: layer ( GES.Layer
) – the newGES.Layer
Returns: True
if self could be movedFalse
otherwizeReturn type: bool
Moves self to layer. If self is not in any layer, it adds it to layer, else, it removes it from its current layer, and adds it to layer.
-
set_supported_formats
(supportedformats)[source]¶ Parameters: supportedformats ( GES.TrackType
) – theGES.TrackType
defining formats supported by selfSets the formats supported by the file.
-
set_top_effect_index
(effect, newindex)[source]¶ Parameters: - effect (
GES.BaseEffect
) – TheGES.BaseEffect
to move - newindex (
int
) – the new index at which to move the effect inside thisGES.Clip
Returns: Return type: This is a convenience method that lets you set the index of a top effect.
- effect (
-
set_top_effect_priority
(effect, newpriority)[source]¶ Parameters: - effect (
GES.BaseEffect
) – - newpriority (
int
) –
Return type: - effect (
-
split
(position)[source]¶ Parameters: position ( int
) – a #GstClockTime representing the timeline position at which to splitReturns: The newly created GES.Clip
resulting from the splitting orNone
if the clip can’t be split.Return type: GES.Clip
orNone
The function modifies self, and creates another
GES.Clip
so we have two clips at the end, splitted at the time specified by position, as a position in the timeline (not in the clip to be split). For example, ifGES.Clip.split
is called on a 4-second clip playing from 0:01.00 until 0:05.00, with a split position of 0:02.00, this will result in one clip of 1 second and one clip of 3 seconds, not in two clips of 2 seconds.The newly created clip will be added to the same layer as self is in. This implies that self must be in a
GES.Layer
for the operation to be possible.This method supports clips playing at a different tempo than one second per second. For example, splitting a clip with a
GES.Effect
‘pitch tempo=1.5’ four seconds after it starts, will set the inpoint of the new clip to six seconds after that of the clip to split. For this, the rate-changing property must be registered using ges_effect_class_register_rate_property; for the ‘pitch’ plugin, this is already done.
-
Property Details¶
-
GES.Clip.props.
layer
¶ Name: layer
Type: GES.Layer
Default Value: None
Flags: READABLE
The
GES.Layer
where this clip is being used. If you want to connect to its notify signal you should connect to it with g_signal_connect_after as the signal emission can be stop in the first fase.
-
GES.Clip.props.
supported_formats
¶ Name: supported-formats
Type: GES.TrackType
Default Value: GES.TrackType.AUDIO
|GES.TrackType.VIDEO
Flags: READABLE
,WRITABLE
,CONSTRUCT
The formats supported by the clip.