| GStreamer Editing Services 0.11.89.1 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
#include <ges/ges.h>
GESTimeline;
GESTimeline * ges_timeline_new (void);
GESTimeline * ges_timeline_new_audio_video (void);
GESTimeline * ges_timeline_new_from_uri (const gchar *uri,
GError **error);
gboolean ges_timeline_add_layer (GESTimeline *timeline,
GESTimelineLayer *layer);
GESTimelineLayer * ges_timeline_append_layer (GESTimeline *timeline);
gboolean ges_timeline_remove_layer (GESTimeline *timeline,
GESTimelineLayer *layer);
gboolean ges_timeline_add_track (GESTimeline *timeline,
GESTrack *track);
gboolean ges_timeline_remove_track (GESTimeline *timeline,
GESTrack *track);
gboolean ges_timeline_load_from_uri (GESTimeline *timeline,
const gchar *uri,
GError **error);
gboolean ges_timeline_save_to_uri (GESTimeline *timeline,
const gchar *uri,
GESAsset *formatter_asset,
gboolean overwrite,
GError **error);
gboolean ges_timeline_enable_update (GESTimeline *timeline,
gboolean enabled);
gboolean ges_timeline_is_updating (GESTimeline *timeline);
GList * ges_timeline_get_tracks (GESTimeline *timeline);
GList * ges_timeline_get_layers (GESTimeline *timeline);
GESTrack * ges_timeline_get_track_for_pad (GESTimeline *timeline,
GstPad *pad);
GstClockTime ges_timeline_get_duration (GESTimeline *timeline);
#define ges_timeline_get_project (obj)
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBin
+----GESTimeline
"duration" guint64 : Read "snapping-distance" guint64 : Read / Write "update" gboolean : Read / Write
"layer-added" :Run First"layer-removed" :Run First"select-tracks-for-object" :Run Last"snapping-ended" :Run Last"snapping-started" :Run Last"track-added" :Run First"track-removed" :Run First
GESTimeline is the central object for any multimedia timeline.
Contains a list of GESTimelineLayer 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
GESTimeline * ges_timeline_new (void);
Creates a new empty GESTimeline.
Returns : |
The new timeline. |
GESTimeline * ges_timeline_new_audio_video (void);
Creates a new GESTimeline containing a raw audio and a raw video track.
Returns : |
The newly created GESTimeline. |
GESTimeline * ges_timeline_new_from_uri (const gchar *uri,GError **error);
Creates a timeline from the given URI.
|
the URI to load from |
|
An error to be set in case something wrong happens or NULL. [out][allow-none]
|
Returns : |
A new timeline if the uri was loaded successfully, or NULL if the uri could not be loaded |
gboolean ges_timeline_add_layer (GESTimeline *timeline,GESTimelineLayer *layer);
Add the layer to the timeline. The reference to the layer will be stolen
by the timeline.
|
a GESTimeline |
|
the GESTimelineLayer to add |
Returns : |
TRUE if the layer was properly added, else FALSE. |
GESTimelineLayer * ges_timeline_append_layer (GESTimeline *timeline);
Append a newly created GESTimelineLayer to timeline
Note that you do not own any reference to the returned layer.
|
a GESTimeline |
Returns : |
The newly created GESTimelineLayer, or the last (empty)
GESTimelineLayer of timeline. [transfer none]
|
gboolean ges_timeline_remove_layer (GESTimeline *timeline,GESTimelineLayer *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.
|
a GESTimeline |
|
the GESTimelineLayer to remove |
Returns : |
TRUE if the layer was properly removed, else FALSE. |
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.
|
a GESTimeline |
|
the GESTrack to add |
Returns : |
TRUE if the track was properly added, else FALSE. |
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.
|
a GESTimeline |
|
the GESTrack to remove |
Returns : |
TRUE if the track was properly removed, else FALSE. |
gboolean ges_timeline_load_from_uri (GESTimeline *timeline,const gchar *uri,GError **error);
Loads the contents of URI into the given timeline.
|
an empty GESTimeline into which to load the formatter |
|
The URI to load from |
|
An error to be set in case something wrong happens or NULL. [out][allow-none]
|
Returns : |
TRUE if the timeline was loaded successfully, or FALSE if the uri could not be loaded. |
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
|
a GESTimeline |
|
The location to save to |
|
The formatter asset to use or NULL. If NULL,
will try to save in the same format as the one from which the timeline as been loaded
or default to the formatter with highest rank. [allow-none]
|
|
TRUE to overwrite file if it exists |
|
An error to be set in case something wrong happens or NULL. [out][allow-none]
|
Returns : |
TRUE if the timeline was successfully saved to the given location, else FALSE. |
gboolean ges_timeline_enable_update (GESTimeline *timeline,gboolean enabled);
Control whether the timeline is updated for every change happening within.
Users will want to use this method with FALSE before doing lots of changes,
and then call again with TRUE for the changes to take effect in one go.
|
a GESTimeline |
|
Whether the timeline should update on every change or not. |
Returns : |
TRUE if the update status could be changed, else FALSE. |
gboolean ges_timeline_is_updating (GESTimeline *timeline);
Get whether the timeline is updated for every change happening within or not.
|
a GESTimeline |
Returns : |
TRUE if timeline is updating on every changes, else FALSE. |
GList * ges_timeline_get_tracks (GESTimeline *timeline);
Returns the list of GESTrack used by the Timeline.
|
a GESTimeline |
Returns : |
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 GESTimelineLayer present in the Timeline.
|
a GESTimeline |
Returns : |
the list of GESTimelineLayer present in the Timeline sorted by priority. The caller should unref each Layer once he is done with them. [transfer full][element-type GESTimelineLayer] |
GESTrack * ges_timeline_get_track_for_pad (GESTimeline *timeline,GstPad *pad);
Search the GESTrack corresponding to the given timeline's pad.
|
The GESTimeline |
|
The GstPad |
Returns : |
The corresponding GESTrack if it is found,
or NULL if there is an error. [transfer none]
|
GstClockTime ges_timeline_get_duration (GESTimeline *timeline);
Get the current duration of timeline
|
a GESTimeline |
Returns : |
The current duration of timeline
|
#define ges_timeline_get_project(obj) (GES_TIMELINE (ges_extractable_get_asset (obj))
Helper macro to retrieve the project from which a GESTimeline as been extracted
|
The GESClip from which to retrieve the project |
"duration" property "duration" guint64 : Read
Current duration (in nanoseconds) of the GESTimeline
Default value: 18446744073709551615
"snapping-distance" property "snapping-distance" guint64 : Read / Write
Distance (in nanoseconds) from which a moving object will snap with it neighboors. 0 means no snapping.
Default value: 0
"update" property "update" gboolean : Read / Write
If TRUE, then all modifications to objects within the timeline will
cause a internal pipeline update (if required).
If FALSE, then only the timeline start/duration/stop properties
will be updated, and the internal pipeline will only be updated when the
property is set back to TRUE.
It is recommended to temporarily set this property to FALSE before doing
more than one modification in the timeline (like adding or moving
several objects at once) in order to speed up the process, and then setting
back the property to TRUE when done.
Default value: TRUE
"layer-added" signalvoid user_function (GESTimeline *timeline,
GESTimelineLayer *layer,
gpointer user_data) : Run First
Will be emitted after the layer was added to the timeline.
|
the GESTimeline |
|
the GESTimelineLayer that was added to the timeline |
|
user data set when the signal handler was connected. |
"layer-removed" signalvoid user_function (GESTimeline *timeline,
GESTimelineLayer *layer,
gpointer user_data) : Run First
Will be emitted after the layer was removed from the timeline.
|
the GESTimeline |
|
the GESTimelineLayer that was removed from the timeline |
|
user data set when the signal handler was connected. |
"select-tracks-for-object" signalGPtrArray* user_function (GESTimeline *timeline,
GESClip *clip,
GESTrackElement *track-element,
gpointer user_data) : Run Last
|
the GESTimeline |
|
The GESClip on which track-element will land |
|
The GESTrackElement for which to choose the tracks it should land into |
|
user data set when the signal handler was connected. |
Returns : |
a GPtrArray of GESTrack-s where that object should be added. [transfer full][element-type GESTrack] |
Since 0.10.XX
"snapping-ended" signalvoid user_function (GESTimeline *gestimeline,
GESTrackElement *arg1,
GESTrackElement *arg2,
guint64 arg3,
gpointer user_data) : Run Last
"snapping-started" signalvoid user_function (GESTimeline *gestimeline,
GESTrackElement *arg1,
GESTrackElement *arg2,
guint64 arg3,
gpointer user_data) : Run Last
"track-added" signalvoid user_function (GESTimeline *timeline,
GESTrack *track,
gpointer user_data) : Run First
Will be emitted after the track was added to the timeline.
|
the GESTimeline |
|
the GESTrack that was added to the timeline |
|
user data set when the signal handler was connected. |
"track-removed" signalvoid user_function (GESTimeline *timeline,
GESTrack *track,
gpointer user_data) : Run First
Will be emitted after the track was removed from the timeline.
|
the GESTimeline |
|
the GESTrack that was removed from the timeline |
|
user data set when the signal handler was connected. |