| GStreamer Editing Services 0.11.89.1 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
#include <ges/ges.h>
GESClip;
GESClipClass;
GESTrackElement * (*GESCreateTrackElementFunc) (GESClip *clip,
GESTrackType type);
GList * (*GESCreateTrackElementsFunc) (GESClip *clip,
GESTrackType type);
gboolean (*GESFillTrackElementFunc) (GESClip *clip,
GESTrackElement *track_element,
GstElement *gnlobj);
GESTimelineLayer * ges_clip_get_layer (GESClip *clip);
GESTrackElement * ges_clip_find_track_element (GESClip *clip,
GESTrack *track,
GType type);
gboolean ges_clip_add_track_element (GESClip *clip,
GESTrackElement *track_element);
gboolean ges_clip_add_asset (GESClip *clip,
GESAsset *asset);
GList * ges_clip_get_top_effects (GESClip *clip);
gint ges_clip_get_top_effect_position (GESClip *clip,
GESBaseEffect *effect);
gboolean ges_clip_move_to_layer (GESClip *clip,
GESTimelineLayer *layer);
gboolean ges_clip_set_top_effect_priority (GESClip *clip,
GESBaseEffect *effect,
guint newpriority);
void ges_clip_set_supported_formats (GESClip *clip,
GESTrackType supportedformats);
GESTrackType ges_clip_get_supported_formats (GESClip *clip);
GESClip * ges_clip_split (GESClip *clip,
guint64 position);
gboolean ges_clip_edit (GESClip *clip,
GList *layers,
gint new_layer_priority,
GESEditMode mode,
GESEdge edge,
guint64 position);
void ges_clip_objects_set_locked (GESClip *clip,
gboolean locked);
GObject
+----GInitiallyUnowned
+----GESTimelineElement
+----GESClip
+----GESSourceClip
+----GESOperationClip
"height" guint : Read "layer" GESTimelineLayer* : Read "supported-formats" GESTrackType : Read / Write / Construct
"effect-added" :Run First"effect-removed" :Run First"track-element-added" :Run First"track-element-removed" :Run First
A GESClip is a 'natural' object which controls one or more GESTrackElement(s) in one or more GESTrack(s).
Keeps a reference to the GESTrackElement(s) it created and sets/updates their properties.
typedef struct {
GESCreateTrackElementFunc create_track_element;
GESCreateTrackElementsFunc create_track_elements;
/* FIXME : might need a release_track_element */
GESFillTrackElementFunc fill_track_element;
gboolean need_fill_track;
gboolean snaps;
void (*track_element_added) (GESClip *clip,
GESTrackElement *track_element);
void (*track_element_released) (GESClip *clip,
GESTrackElement *track_element);
} GESClipClass;
Subclasses can override the create_track_element and fill_track_element methods.
GESCreateTrackElementFunc |
method to create a single GESTrackElement for a given GESTrack. |
GESCreateTrackElementsFunc |
method to create multiple GESTrackElements for a GESTrack. |
GESFillTrackElementFunc |
method to fill an associated GESTrackElement. |
Set to TRUE if fill_track_element needs to be called. |
|
Set to TRUE if the objects of this type snap with
other objects in a timeline FALSE otherwise (default is FALSE). Basically only
sources snap. |
|
| Should be overridden by subclasses if they need to perform an operation when a GESTrackElement is added. Since: 0.10.2 | |
| Should be overridden by subclasses if they need to perform action when a GESTrackElement is released. Since: 0.10.2 |
GESTrackElement * (*GESCreateTrackElementFunc) (GESClip *clip,GESTrackType type);
Creates the 'primary' track element for this clip.
Subclasses should implement this method if they only provide a single GESTrackElement per track.
If the subclass needs to create more than one GESTrackElement for a given track, then it should implement the 'create_track_elements' method instead.
The implementer of this function shall return the proper GESTrackElement
that should be controlled by clip for the given track.
The returned GESTrackElement will be automatically added to the list of objects controlled by the GESClip.
|
a GESClip |
|
a GESTrackType |
Returns : |
the GESTrackElement to be used, or NULL if it can't provide one
for the given track. |
GList * (*GESCreateTrackElementsFunc) (GESClip *clip,GESTrackType type);
Create all track elements this clip handles for this type of track.
Subclasses should implement this method if they potentially need to return more than one GESTrackElement(s) for a given GESTrack.
For each clip created, the subclass must call
ges_clip_add_track_element() with the newly created clip
and provided type.
|
a GESClip |
|
a GESTrackType |
Returns : |
TRUE on success FALSE on failure. |
gboolean (*GESFillTrackElementFunc) (GESClip *clip,GESTrackElement *track_element,GstElement *gnlobj);
A function that will be called when the GNonLin object of a corresponding track element needs to be filled.
The implementer of this function shall add the proper GstElement to gnlobj
using gst_bin_add().
|
the GESClip controlling the track elements |
|
the GESTrackElement |
|
the GNonLin object that needs to be filled. |
Returns : |
TRUE if the implementer succesfully filled the gnlobj, else FALSE. |
GESTimelineLayer * ges_clip_get_layer (GESClip *clip);
Get the GESTimelineLayer to which this clip belongs.
|
a GESClip |
Returns : |
The GESTimelineLayer where this clip is being
used, or NULL if it is not used on any layer. The caller should unref it
usage. [transfer full]
|
GESTrackElement * ges_clip_find_track_element (GESClip *clip,GESTrack *track,GType type);
Finds the GESTrackElement controlled by clip that is used in track. You
may optionally specify a GType to further narrow search criteria.
Note: If many objects match, then the one with the highest priority will be returned.
|
a GESClip |
|
a GESTrack or NULL |
|
a GType indicating the type of track element you are looking
for or G_TYPE_NONE if you do not care about the track type. |
Returns : |
The GESTrackElement used by track, else NULL.
Unref after usage. [transfer full]
|
gboolean ges_clip_add_track_element (GESClip *clip,GESTrackElement *track_element);
Add a track element to the clip. Should only be called by subclasses implementing the create_track_elements (plural) vmethod.
Takes a reference on track_element.
|
a GESClip |
|
the GESTrackElement |
Returns : |
TRUE on success, FALSE on failure. |
gboolean ges_clip_add_asset (GESClip *clip,GESAsset *asset);
Extracts a GESTrackElement from asset and adds it to the clip.
Should only be called in order to add operations to a GESClip,
ni other cases TrackElement are added automatically when adding the
GESClip/GESAsset to a layer.
Takes a reference on track_element.
GList * ges_clip_get_top_effects (GESClip *clip);
Get effects applied on clip
|
The origin GESClip |
Returns : |
a GList of the
GESBaseEffect that are applied on clip order by ascendant priorities.
The refcount of the objects will be increased. The user will have to
unref each GESBaseEffect and free the GList. [transfer full][element-type GESTrackElement]
|
Since 0.10.2
gint ges_clip_get_top_effect_position (GESClip *clip,GESBaseEffect *effect);
Gets the top position of an effect.
|
The origin GESClip |
|
The GESBaseEffect we want to get the top position from |
Returns : |
The top position of the effect, -1 if something went wrong. |
Since 0.10.2
gboolean ges_clip_move_to_layer (GESClip *clip,GESTimelineLayer *layer);
Moves clip to layer. If clip is not in any layer, it adds it to
layer, else, it removes it from its current layer, and adds it to layer.
|
a GESClip |
|
the new GESTimelineLayer |
Returns : |
TRUE if clip could be moved FALSE otherwize |
gboolean ges_clip_set_top_effect_priority (GESClip *clip,GESBaseEffect *effect,guint newpriority);
This is a convenience method that lets you set the priority of a top effect.
|
The origin GESClip |
|
The GESBaseEffect to move |
|
the new position at which to move the effect inside this
GESClip
|
Returns : |
TRUE if effect was successfuly moved, FALSE otherwise. |
Since 0.10.2
void ges_clip_set_supported_formats (GESClip *clip,GESTrackType supportedformats);
Sets the formats supported by the file.
|
the GESClip to set supported formats on |
|
the GESTrackType defining formats supported by clip
|
Since 0.10.XX
GESTrackType ges_clip_get_supported_formats (GESClip *clip);
Get the formats supported by clip.
|
the GESClip |
Returns : |
The formats supported by clip. |
Since 0.10.XX
GESClip * ges_clip_split (GESClip *clip,guint64 position);
The function modifies clip, and creates another GESClip so
we have two clips at the end, splitted at the time specified by position.
gboolean ges_clip_edit (GESClip *clip,GList *layers,gint new_layer_priority,GESEditMode mode,GESEdge edge,guint64 position);
Edit clip in the different exisiting GESEditMode modes. In the case of
slide, and roll, you need to specify a GESEdge
|
the GESClip to edit |
|
The layers you want the edit to
happen in, NULL means that the edition is done in all the
GESTimelineLayers contained in the current timeline. [element-type GESTimelineLayer]
|
|
The priority of the layer clip should land in.
If the layer you're trying to move the clip to doesn't exist, it will
be created automatically. -1 means no move. |
|
The GESEditMode in which the editition will happen. |
|
The GESEdge the edit should happen on. |
|
The position at which to edit clip (in nanosecond) |
Returns : |
TRUE if the clip as been edited properly, FALSE if an error
occured |
Since 0.10.XX
void ges_clip_objects_set_locked (GESClip *clip,gboolean locked);
Set the locking status of all the GESTrackElement contained in clip to locked.
See the ges_track_element_set_locked documentation for more details.
|
the GESClip |
|
whether the GESTrackElement contained in clip are locked to it. |
Since 0.10.XX
"height" property "height" guint : Read
The span of layer priorities which this clip occupies.
Default value: 1
"layer" property"layer" GESTimelineLayer* : Read
The GESTimelineLayer where this clip is being used.
"supported-formats" property"supported-formats" GESTrackType : Read / Write / Construct
The formats supported by the clip.
Default value: GES_TRACK_TYPE_AUDIO|GES_TRACK_TYPE_VIDEO
Since 0.10.XX
"effect-added" signalvoid user_function (GESClip *clip,
GESBaseEffect *effect,
gpointer user_data) : Run First
Will be emitted after an effect was added to the clip.
|
the GESClip |
|
the GESBaseEffect that was added. |
|
user data set when the signal handler was connected. |
Since 0.10.2
"effect-removed" signalvoid user_function (GESClip *clip,
GESBaseEffect *effect,
gpointer user_data) : Run First
Will be emitted after an effect was remove from the clip.
|
the GESClip |
|
the GESBaseEffect that was added. |
|
user data set when the signal handler was connected. |
Since 0.10.2
"track-element-added" signalvoid user_function (GESClip *clip,
GESTrackElement *trackelement,
gpointer user_data) : Run First
Will be emitted after a track element was added to the clip.
|
the GESClip |
|
the GESTrackElement that was added. |
|
user data set when the signal handler was connected. |
Since 0.10.2
"track-element-removed" signalvoid user_function (GESClip *clip,
GESTrackElement *trackelement,
gpointer user_data) : Run First
Will be emitted after a track element was removed from clip.
|
the GESClip |
|
the GESTrackElement that was removed. |
|
user data set when the signal handler was connected. |
Since 0.10.2