![]() |
![]() |
![]() |
GStreamer Editing Services 0.10.1.1 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
GESTimelineObjectGESTimelineObject — Base Class for objects in a GESTimelineLayer |
#include <ges/ges.h> GESTimelineObject; GESTimelineObjectClass; GESTrackObject * (*GESCreateTrackObjectFunc) (GESTimelineObject *object
,GESTrack *track
); gboolean (*GESCreateTrackObjectsFunc) (GESTimelineObject *object
,GESTrack *track
); gboolean (*GESFillTrackObjectFunc) (GESTimelineObject *object
,GESTrackObject *trobject
,GstElement *gnlobj
); void ges_timeline_object_set_inpoint (GESTimelineObject *object
,guint64 inpoint
); void ges_timeline_object_set_start (GESTimelineObject *object
,guint64 start
); void ges_timeline_object_set_duration (GESTimelineObject *object
,guint64 duration
); GESTimelineLayer * ges_timeline_object_get_layer (GESTimelineObject *object
); GESTrackObject * ges_timeline_object_find_track_object (GESTimelineObject *object
,GESTrack *track
,GType type
); gboolean ges_timeline_object_add_track_object (GESTimelineObject *object
,GESTrackObject *trobj
); GList * ges_timeline_object_get_top_effects (GESTimelineObject *object
); gint ges_timeline_object_get_top_effect_position (GESTimelineObject *object
,GESTrackEffect *effect
); gboolean ges_timeline_object_set_top_effect_priority (GESTimelineObject *object
,GESTrackEffect *effect
,guint newpriority
);
GObject +----GInitiallyUnowned +----GESTimelineObject +----GESTimelineSource +----GESTimelineOperation
"duration" guint64 : Read / Write "height" guint : Read "in-point" guint64 : Read / Write "layer" GESTimelineLayer* : Read "priority" guint : Read / Write "start" guint64 : Read / Write
A GESTimelineObject is a 'natural' object which controls one or more GESTrackObject(s) in one or more GESTrack(s).
Keeps a reference to the GESTrackObject(s) it created and sets/updates their properties.
typedef struct _GESTimelineObject GESTimelineObject;
The GESTimelineObject base class.
typedef struct { GESCreateTrackObjectFunc create_track_object; GESCreateTrackObjectsFunc create_track_objects; void (*track_object_added) (GESTimelineObject *object, GESTrackObject *tck_object); void (*track_object_released) (GESTimelineObject *object, GESTrackObject *tck_object); /* FIXME : might need a release_track_object */ GESFillTrackObjectFunc fill_track_object; gboolean need_fill_track; } GESTimelineObjectClass;
Subclasses can override the create_track_object
and fill_track_object
methods.
GESCreateTrackObjectFunc |
method to create a single GESTrackObject for a given GESTrack. |
GESCreateTrackObjectsFunc |
method to create multiple GESTrackObjects for a GESTrack. |
Should be overridden by subclasses if they need to perform an operation when a GESTrackObject is added. | |
Should be overridden by subclassed if they need to perform action when a GESTrackObject is released. | |
GESFillTrackObjectFunc |
method to fill an associated GESTrackObject. |
gboolean |
Set to TRUE if fill_track_object needs to be called. |
GESTrackObject * (*GESCreateTrackObjectFunc) (GESTimelineObject *object
,GESTrack *track
);
Creates the 'primary' track object for this object
.
Subclasses should implement this method if they only provide a single GESTrackObject per track.
If the subclass needs to create more than one GESTrackObject for a given track, then it should implement the 'create_track_objects' method instead.
The implementer of this function shall return the proper GESTrackObject
that should be controlled by object
for the given track
.
The returned GESTrackObject will be automatically added to the list of objects controlled by the GESTimelineObject.
|
a GESTimelineObject |
|
a GESTrack |
Returns : |
the GESTrackObject to be used, or NULL if it can't provide one
for the given track . |
gboolean (*GESCreateTrackObjectsFunc) (GESTimelineObject *object
,GESTrack *track
);
Create all track objects this object handles for this type of track.
Subclasses should implement this method if they potentially need to return more than one GESTrackObject(s) for a given GESTrack.
For each object created, the subclass must call
ges_timeline_object_add_track_object()
with the newly created object
and provided track
.
|
a GESTimelineObject |
|
a GESTrack |
Returns : |
TRUE on success FALSE on failure. |
gboolean (*GESFillTrackObjectFunc) (GESTimelineObject *object
,GESTrackObject *trobject
,GstElement *gnlobj
);
A function that will be called when the GNonLin object of a corresponding track object needs to be filled.
The implementer of this function shall add the proper GstElement to gnlobj
using gst_bin_add()
.
|
the GESTimelineObject controlling the track object |
|
the GESTrackObject |
|
the GNonLin object that needs to be filled. |
Returns : |
TRUE if the implementer succesfully filled the gnlobj , else FALSE. |
void ges_timeline_object_set_inpoint (GESTimelineObject *object
,guint64 inpoint
);
Set the in-point, that is the moment at which the object
will start
outputting data from its contents.
|
a GESTimelineObject |
|
the in-point in GstClockTime |
void ges_timeline_object_set_start (GESTimelineObject *object
,guint64 start
);
Set the position of the object in its containing layer
|
a GESTimelineObject |
|
the position in GstClockTime |
void ges_timeline_object_set_duration (GESTimelineObject *object
,guint64 duration
);
Set the duration of the object
|
a GESTimelineObject |
|
the duration in GstClockTime |
GESTimelineLayer * ges_timeline_object_get_layer (GESTimelineObject *object
);
Get the GESTimelineLayer to which this object belongs.
|
a GESTimelineObject |
Returns : |
The GESTimelineLayer where this object is being
used, or NULL if it is not used on any layer. The caller should unref it
usage. [transfer full]
|
GESTrackObject * ges_timeline_object_find_track_object (GESTimelineObject *object
,GESTrack *track
,GType type
);
Finds the GESTrackObject controlled by object
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 GESTimelineObject |
|
a GESTrack or NULL |
|
a GType indicating the type of track object you are looking
for or G_TYPE_NONE if you do not care about the track type. |
Returns : |
The GESTrackObject used by track , else NULL .
Unref after usage. [transfer full]
|
gboolean ges_timeline_object_add_track_object (GESTimelineObject *object
,GESTrackObject *trobj
);
Add a track object to the timeline object. Should only be called by subclasses implementing the create_track_objects (plural) vmethod.
Takes a reference on trobj
.
|
a GESTimelineObject |
|
the GESTrackObject |
Returns : |
TRUE on success, FALSE on failure. |
GList * ges_timeline_object_get_top_effects (GESTimelineObject *object
);
Get effects applied on object
|
The origin GESTimelineObject |
Returns : |
a GList of the
GESTrackEffect that are applied on object order by ascendant priorities.
The refcount of the objects will be increased. The user will have to
unref each GESTrackEffect and free the GList. [transfer full][element-type GESTrackObject]
|
Since 0.10.2
gint ges_timeline_object_get_top_effect_position (GESTimelineObject *object
,GESTrackEffect *effect
);
Gets the top position of an effect.
|
The origin GESTimelineObject |
|
The GESTrackEffect 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_timeline_object_set_top_effect_priority (GESTimelineObject *object
,GESTrackEffect *effect
,guint newpriority
);
This is a convenience method that lets you set the priority of a top effect.
|
The origin GESTimelineObject |
|
The GESTrackEffect to move |
|
the new position at which to move the effect inside this
GESTimelineObject
|
Returns : |
TRUE if effect was successfuly moved, FALSE otherwise. |
Since 0.10.2
"duration"
property"duration" guint64 : Read / Write
The duration (in nanoseconds) which will be used in the container GESTrack starting from 'in-point'.
Default value: 18446744073709551615
"height"
property"height" guint : Read
The span of layer priorities which this object occupies.
Default value: 1
"in-point"
property"in-point" guint64 : Read / Write
The in-point at which this GESTimelineObject will start outputting data from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.
Default value: 0
"layer"
property"layer" GESTimelineLayer* : Read
The GESTimelineLayer where this object is being used.
"priority"
property"priority" guint : Read / Write
The layer priority of the timeline object.
Default value: 0
"start"
property"start" guint64 : Read / Write
The position of the object in the GESTimelineLayer (in nanoseconds).
Default value: 0
"effect-added"
signalvoid user_function (GESTimelineObject *object,
GESTrackEffect *effect,
gpointer user_data) : Run First
Will be emitted after an effect was added to the object.
|
the GESTimelineObject |
|
the GESTrackEffect that was added. |
|
user data set when the signal handler was connected. |
Since 0.10.2
"effect-removed"
signalvoid user_function (GESTimelineObject *object,
GESTrackEffect *effect,
gpointer user_data) : Run First
Will be emitted after an effect was remove from the object.
|
the GESTimelineObject |
|
the GESTrackEffect that was added. |
|
user data set when the signal handler was connected. |
Since 0.10.2