Top | ![]() |
![]() |
![]() |
![]() |
GESTimeline * | ges_timeline_new () |
GESTimeline * | ges_timeline_new_audio_video () |
GESTimeline * | ges_timeline_new_from_uri () |
gboolean | ges_timeline_add_layer () |
GESLayer * | ges_timeline_append_layer () |
gboolean | ges_timeline_remove_layer () |
gboolean | ges_timeline_add_track () |
gboolean | ges_timeline_remove_track () |
gboolean | ges_timeline_load_from_uri () |
gboolean | ges_timeline_save_to_uri () |
GList * | ges_timeline_get_tracks () |
GList * | ges_timeline_get_layers () |
GESTrack * | ges_timeline_get_track_for_pad () |
GstClockTime | ges_timeline_get_duration () |
#define | ges_timeline_get_project() |
gboolean | ges_timeline_get_auto_transition () |
void | ges_timeline_set_auto_transition () |
GstClockTime | ges_timeline_get_snapping_distance () |
void | ges_timeline_set_snapping_distance () |
GESTimelineElement * | ges_timeline_get_element () |
gboolean | auto-transition | Read / Write |
guint64 | duration | Read |
guint64 | snapping-distance | Read / Write |
void | commited | Run Last |
void | layer-added | Run First |
void | layer-removed | Run First |
GPtrArray* | select-tracks-for-object | Run Last |
void | snapping-ended | Run Last |
void | snapping-started | Run Last |
void | track-added | Run First |
void | track-removed | Run First |
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBin ╰── GESTimeline
GESTimeline is the central object for any multimedia timeline.
Contains a list of GESLayer which users should use to arrange the various clips through time.
The output type is determined by the GESTrack that are set on the GESTimeline.
To save/load a timeline, you can use the ges_timeline_load_from_uri()
and
ges_timeline_save_to_uri()
methods to use the default format. If you wish
Note that any change you make in the timeline will not actually be taken into account until you call the ges_timeline_commit method.
GESTimeline *
ges_timeline_new_audio_video (void
);
Creates a new GESTimeline containing a raw audio and a raw video track.
GESTimeline * ges_timeline_new_from_uri (const gchar *uri
,GError **error
);
Creates a timeline from the given URI.
uri |
the URI to load from |
|
error |
An error to be set in case something wrong happens or |
[out][allow-none] |
gboolean ges_timeline_add_layer (GESTimeline *timeline
,GESLayer *layer
);
Add the layer to the timeline. The reference to the layer
will be stolen
by the timeline
.
GESLayer *
ges_timeline_append_layer (GESTimeline *timeline
);
Append a newly created GESLayer to timeline
Note that you do not own any reference to the returned layer.
gboolean ges_timeline_remove_layer (GESTimeline *timeline
,GESLayer *layer
);
Removes the layer from the timeline. The reference that the timeline
holds on
the layer will be dropped. If you wish to use the layer
after calling this
method, you need to take a reference before calling.
gboolean ges_timeline_add_track (GESTimeline *timeline
,GESTrack *track
);
Add a track to the timeline. The reference to the track will be stolen by the pipeline.
gboolean ges_timeline_remove_track (GESTimeline *timeline
,GESTrack *track
);
Remove the track
from the timeline
. The reference stolen when adding the
track
will be removed. If you wish to use the track
after calling this
function you must ensure that you have a reference to it.
gboolean ges_timeline_load_from_uri (GESTimeline *timeline
,const gchar *uri
,GError **error
);
Loads the contents of URI into the given timeline.
timeline |
an empty GESTimeline into which to load the formatter |
|
uri |
The URI to load from |
|
error |
An error to be set in case something wrong happens or |
[out][allow-none] |
gboolean ges_timeline_save_to_uri (GESTimeline *timeline
,const gchar *uri
,GESAsset *formatter_asset
,gboolean overwrite
,GError **error
);
Saves the timeline to the given location
timeline |
||
uri |
The location to save to |
|
formatter_asset |
The formatter asset to use or |
[allow-none] |
overwrite |
|
|
error |
An error to be set in case something wrong happens or |
[out][allow-none] |
GList *
ges_timeline_get_tracks (GESTimeline *timeline
);
Returns the list of GESTrack used by the Timeline.
A list of GESTrack. The caller should unref each track once he is done with them.
[transfer full][element-type GESTrack]
GList *
ges_timeline_get_layers (GESTimeline *timeline
);
Get the list of GESLayer present in the Timeline.
the list of GESLayer present in the Timeline sorted by priority. The caller should unref each Layer once he is done with them.
[transfer full][element-type GESLayer]
GESTrack * ges_timeline_get_track_for_pad (GESTimeline *timeline
,GstPad *pad
);
Search the GESTrack corresponding to the given timeline
's pad
.
GstClockTime
ges_timeline_get_duration (GESTimeline *timeline
);
Get the current duration of timeline
#define ges_timeline_get_project(obj) (GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE(obj))))
Helper macro to retrieve the project from which a GESTimeline as been extracted
gboolean
ges_timeline_get_auto_transition (GESTimeline *timeline
);
Gets whether transitions are automatically added when objects overlap or not.
void ges_timeline_set_auto_transition (GESTimeline *timeline
,gboolean auto_transition
);
Sets the layer to the given auto_transition
. See the documentation of the
property auto_transition for more information.
GstClockTime
ges_timeline_get_snapping_distance (GESTimeline *timeline
);
Gets the configured snapping distance of the timeline. See the documentation of the property snapping_distance for more information.
void ges_timeline_set_snapping_distance (GESTimeline *timeline
,GstClockTime snapping_distance
);
Sets the snapping_distance
of the timeline. See the documentation of the
property snapping_distance for more information.
GESTimelineElement * ges_timeline_get_element (GESTimeline *timeline
,const gchar *name
);
Gets a GESTimelineElement contained in the timeline
“auto-transition”
property “auto-transition” gboolean
Sets whether transitions are added automagically when clips overlap.
Flags: Read / Write
Default value: FALSE
“duration”
property “duration” guint64
Current duration (in nanoseconds) of the GESTimeline
Flags: Read
Default value: 18446744073709551615
“commited”
signalvoid user_function (GESTimeline *timeline, gpointer user_data)
Flags: Run Last
“layer-added”
signalvoid user_function (GESTimeline *timeline, GESLayer *layer, gpointer user_data)
Will be emitted after the layer was added to the timeline.
timeline |
the GESTimeline |
|
layer |
the GESLayer that was added to the timeline |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“layer-removed”
signalvoid user_function (GESTimeline *timeline, GESLayer *layer, gpointer user_data)
Will be emitted after the layer was removed from the timeline.
timeline |
the GESTimeline |
|
layer |
the GESLayer that was removed from the timeline |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“select-tracks-for-object”
signalGPtrArray* user_function (GESTimeline *timeline, GESClip *clip, GESTrackElement *track-element, gpointer user_data)
timeline |
the GESTimeline |
|
clip |
The GESClip on which |
|
track-element |
The GESTrackElement for which to choose the tracks it should land into |
|
user_data |
user data set when the signal handler was connected. |
a GPtrArray of GESTrack-s where that object should be added.
[transfer full][element-type GESTrack]
Flags: Run Last
“snapping-ended”
signalvoid user_function (GESTimeline *gestimeline, GESTrackElement *arg1, GESTrackElement *arg2, guint64 arg3, gpointer user_data)
Flags: Run Last
“snapping-started”
signalvoid user_function (GESTimeline *gestimeline, GESTrackElement *arg1, GESTrackElement *arg2, guint64 arg3, gpointer user_data)
Flags: Run Last
“track-added”
signalvoid user_function (GESTimeline *timeline, GESTrack *track, gpointer user_data)
Will be emitted after the track was added to the timeline.
timeline |
the GESTimeline |
|
track |
the GESTrack that was added to the timeline |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“track-removed”
signalvoid user_function (GESTimeline *timeline, GESTrack *track, gpointer user_data)
Will be emitted after the track was removed from the timeline.
timeline |
the GESTimeline |
|
track |
the GESTrack that was removed from the timeline |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First