Top | ![]() |
![]() |
![]() |
![]() |
GESTimelineObjectGESTimelineObject — Base Class for objects in a GESTimelineLayer |
GESTrackObject * | (*GESCreateTrackObjectFunc) () |
gboolean | (*GESCreateTrackObjectsFunc) () |
gboolean | (*GESFillTrackObjectFunc) () |
void | ges_timeline_object_set_inpoint () |
void | ges_timeline_object_set_start () |
void | ges_timeline_object_set_duration () |
GESTimelineLayer * | ges_timeline_object_get_layer () |
GESTrackObject * | ges_timeline_object_find_track_object () |
gboolean | ges_timeline_object_add_track_object () |
GObject ╰── GInitiallyUnowned ╰── GESTimelineObject ├── GESTimelineSource ╰── GESTimelineOperation
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.
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.
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
.
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()
.
object |
the GESTimelineObject controlling the track object |
|
trobject |
the GESTrackObject |
|
gnlobj |
the GNonLin object that needs to be filled. |
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.
void ges_timeline_object_set_start (GESTimelineObject *object
,guint64 start
);
Set the position of the object in its containing layer
void ges_timeline_object_set_duration (GESTimelineObject *object
,guint64 duration
);
Set the duration of the object
GESTimelineLayer *
ges_timeline_object_get_layer (GESTimelineObject *object
);
Note: The reference count of the returned GESTimelineLayer will be increased, The user is responsible for unreffing it.
The GESTimelineLayer where this object
is being used, NULL if
it is not used on any layer.
[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: The reference count of the returned GESTrackObject will be increased, unref when done with it.
object |
||
track |
a GESTrack or NULL |
|
type |
a GType indicating the type of track object you are looking
for or |
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
.
typedef struct _GESTimelineObject GESTimelineObject;
The GESTimelineObject base class.
typedef struct { GESCreateTrackObjectFunc create_track_object; GESCreateTrackObjectsFunc create_track_objects; /* 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. |
|
GESFillTrackObjectFunc |
method to fill an associated GESTrackObject. |
|
Set to TRUE if |
“duration”
property “duration” guint64
The duration (in nanoseconds) which will be used in the container GESTrack starting from 'in-point'.
Flags: Read / Write
Default value: 18446744073709551615
“height”
property “height” guint
The span of layer priorities which this object occupies.
Flags: Read
Default value: 1
“in-point”
property “in-point” guint64
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.
Flags: Read / Write
Default value: 0
“layer”
property“layer” GESTimelineLayer *
The GESTimelineLayer where this object is being used.
Flags: Read
“priority”
property “priority” guint
The layer priority of the timeline object.
Flags: Read / Write
Default value: 0
“start”
property “start” guint64
The position of the object in the GESTimelineLayer (in nanoseconds).
Flags: Read / Write
Default value: 0