![]() |
![]() |
![]() |
GStreamer Editing Services 1.2.1 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
GESTimelineElementGESTimelineElement — Base Class for all elements that will be in a way or another inside a GESTimeline. |
#include <ges/ges.h> GESTimelineElement; GESTimelineElementClass; gboolean ges_timeline_element_set_parent (GESTimelineElement *self
,GESTimelineElement *parent
); GESTimelineElement * ges_timeline_element_get_parent (GESTimelineElement *self
); gboolean ges_timeline_element_set_timeline (GESTimelineElement *self
,GESTimeline *timeline
); GESTimeline * ges_timeline_element_get_timeline (GESTimelineElement *self
); void ges_timeline_element_set_start (GESTimelineElement *self
,GstClockTime start
); void ges_timeline_element_set_inpoint (GESTimelineElement *self
,GstClockTime inpoint
); void ges_timeline_element_set_duration (GESTimelineElement *self
,GstClockTime duration
); void ges_timeline_element_set_max_duration (GESTimelineElement *self
,GstClockTime maxduration
); void ges_timeline_element_set_priority (GESTimelineElement *self
,guint32 priority
); GstClockTime ges_timeline_element_get_start (GESTimelineElement *self
); GstClockTime ges_timeline_element_get_inpoint (GESTimelineElement *self
); GstClockTime ges_timeline_element_get_duration (GESTimelineElement *self
); GstClockTime ges_timeline_element_get_max_duration (GESTimelineElement *self
); guint32 ges_timeline_element_get_priority (GESTimelineElement *self
); gboolean ges_timeline_element_ripple (GESTimelineElement *self
,GstClockTime start
); gboolean ges_timeline_element_ripple_end (GESTimelineElement *self
,GstClockTime end
); gboolean ges_timeline_element_roll_start (GESTimelineElement *self
,GstClockTime start
); gboolean ges_timeline_element_roll_end (GESTimelineElement *self
,GstClockTime end
); gboolean ges_timeline_element_trim (GESTimelineElement *self
,GstClockTime start
); GESTimelineElement * ges_timeline_element_get_toplevel_parent (GESTimelineElement *self
); GESTimelineElement * ges_timeline_element_copy (GESTimelineElement *self
,gboolean deep
); #define GES_TIMELINE_ELEMENT_PARENT (obj) #define GES_TIMELINE_ELEMENT_TIMELINE (obj) #define GES_TIMELINE_ELEMENT_START (obj) #define GES_TIMELINE_ELEMENT_END (obj) #define GES_TIMELINE_ELEMENT_INPOINT (obj) #define GES_TIMELINE_ELEMENT_DURATION (obj) #define GES_TIMELINE_ELEMENT_MAX_DURATION (obj) #define GES_TIMELINE_ELEMENT_PRIORITY (obj)
GObject +----GInitiallyUnowned +----GESTimelineElement +----GESContainer +----GESTrackElement
The GESTimelineElement base class implements the notion of timing as well as priority. A GESTimelineElement can have a parent object which will be responsible for controlling its timing properties.
typedef struct { /*< read only >*/ GESTimelineElement *parent; GESAsset *asset; GstClockTime start; GstClockTime inpoint; GstClockTime duration; GstClockTime maxduration; guint32 priority; GESTimeline *timeline; } GESTimelineElement;
Those filed can be accessed from outside but in no case should be changed from there. Subclasses can write them but should make sure to properly call g_object_notify.
GESTimelineElement * |
The GESTimelineElement that controls the object |
GESAsset * |
The GESAsset from which the object has been extracted |
GstClockTime |
position (in time) of the object |
GstClockTime |
Position in the media from which the object should be used |
GstClockTime |
duration of the object to be used |
GstClockTime |
The maximum duration the object can have |
guint32 |
priority of the object in the layer (0:top priority) |
GESTimeline * |
typedef struct { GInitiallyUnownedClass parent_class; gboolean (*set_parent) (GESTimelineElement * self, GESTimelineElement *parent); gboolean (*set_start) (GESTimelineElement * self, GstClockTime start); gboolean (*set_inpoint) (GESTimelineElement * self, GstClockTime inpoint); gboolean (*set_duration) (GESTimelineElement * self, GstClockTime duration); gboolean (*set_max_duration) (GESTimelineElement * self, GstClockTime maxduration); gboolean (*set_priority) (GESTimelineElement * self, guint32 priority); gboolean (*ripple) (GESTimelineElement *self, guint64 start); gboolean (*ripple_end) (GESTimelineElement *self, guint64 end); gboolean (*roll_start) (GESTimelineElement *self, guint64 start); gboolean (*roll_end) (GESTimelineElement *self, guint64 end); gboolean (*trim) (GESTimelineElement *self, guint64 start); void (*deep_copy) (GESTimelineElement *self, GESTimelineElement *copy); } GESTimelineElementClass;
The GESTimelineElement base class. Subclasses should override at least
set_start
set_inpoint
set_duration
ripple
ripple_end
roll_start
roll_end
and trim
.
Vmethods in subclasses should apply all the operation they need to but the real method implementation is in charge of setting the proper field, and emit the notify signal.
GInitiallyUnownedClass |
|
method to set the parent of a GESTimelineElement. | |
method to set the start of a GESTimelineElement | |
method to set the inpoint of a GESTimelineElement | |
method to set the duration of a GESTimelineElement | |
method to set the maximun duration of a GESTimelineElement | |
method to set the priority of a GESTimelineElement | |
method to ripple an object | |
method to ripple an object on its GES_EDGE_END edge | |
method to roll an object on its GES_EDGE_START edge | |
method to roll an object on its GES_EDGE_END edge | |
method to trim an object | |
Copy the children properties of self into copy
|
gboolean ges_timeline_element_set_parent (GESTimelineElement *self
,GESTimelineElement *parent
);
Sets the parent of self
to parent
. The object's reference count will
be incremented, and any floating reference will be removed (see gst_object_ref_sink()
).
|
a GESTimelineElement |
|
new parent of self |
Returns : |
TRUE if parent could be set or FALSE when self
already had a parent or self and parent are the same. |
GESTimelineElement * ges_timeline_element_get_parent (GESTimelineElement *self
);
Returns the parent of self
. This function increases the refcount
of the parent object so you should gst_object_unref()
it after usage.
|
a GESTimelineElement |
Returns : |
parent of self , this can be NULL if self
has no parent. unref after usage. [transfer full]
|
gboolean ges_timeline_element_set_timeline (GESTimelineElement *self
,GESTimeline *timeline
);
Sets the timeline of self
to timeline
.
|
a GESTimelineElement |
|
The GESTimeline self is in |
Returns : |
TRUE if timeline could be set or FALSE when timeline
already had a timeline. |
GESTimeline * ges_timeline_element_get_timeline (GESTimelineElement *self
);
Returns the timeline of self
. This function increases the refcount
of the timeline so you should gst_object_unref()
it after usage.
|
a GESTimelineElement |
Returns : |
timeline of self , this can be NULL if self
has no timeline. unref after usage. [transfer full]
|
void ges_timeline_element_set_start (GESTimelineElement *self
,GstClockTime start
);
Set the position of the object in its containing layer
Note that if the timeline snap-distance property of the timeline containing
self
is set, self
will properly snap to its neighboors.
|
a GESTimelineElement |
|
the position in GstClockTime |
void ges_timeline_element_set_inpoint (GESTimelineElement *self
,GstClockTime inpoint
);
Set the in-point, that is the moment at which the self
will start
outputting data from its contents.
|
a GESTimelineElement |
|
the in-point in GstClockTime |
void ges_timeline_element_set_duration (GESTimelineElement *self
,GstClockTime duration
);
Set the duration of the object
Note that if the timeline snap-distance property of the timeline containing
self
is set, self
will properly snap to its neighboors.
|
a GESTimelineElement |
|
the duration in GstClockTime |
void ges_timeline_element_set_max_duration (GESTimelineElement *self
,GstClockTime maxduration
);
Set the maximun duration of the object
|
a GESTimelineElement |
|
the maximum duration in GstClockTime |
void ges_timeline_element_set_priority (GESTimelineElement *self
,guint32 priority
);
Sets the priority of the object within the containing layer
|
a GESTimelineElement |
|
the priority |
GstClockTime ges_timeline_element_get_start (GESTimelineElement *self
);
|
a GESTimelineElement |
Returns : |
The start of self
|
GstClockTime ges_timeline_element_get_inpoint (GESTimelineElement *self
);
|
a GESTimelineElement |
Returns : |
The inpoint of self
|
GstClockTime ges_timeline_element_get_duration (GESTimelineElement *self
);
|
a GESTimelineElement |
Returns : |
The duration of self
|
GstClockTime ges_timeline_element_get_max_duration
(GESTimelineElement *self
);
|
a GESTimelineElement |
Returns : |
The maxduration of self
|
guint32 ges_timeline_element_get_priority (GESTimelineElement *self
);
|
a GESTimelineElement |
Returns : |
The priority of self
|
gboolean ges_timeline_element_ripple (GESTimelineElement *self
,GstClockTime start
);
Edits self
in ripple mode. It allows you to modify the
start of self
and move the following neighbours accordingly.
This will change the overall timeline duration.
|
The GESTimelineElement to ripple. |
|
The new start of self in ripple mode. |
Returns : |
TRUE if the self as been rippled properly, FALSE if an error
occured |
gboolean ges_timeline_element_ripple_end (GESTimelineElement *self
,GstClockTime end
);
Edits self
in ripple mode. It allows you to modify the
duration of a self
and move the following neighbours accordingly.
This will change the overall timeline duration.
|
The GESTimelineElement to ripple. |
|
The new end (start + duration) of self in ripple mode. It will
basically only change the duration of self . |
Returns : |
TRUE if the self as been rippled properly, FALSE if an error
occured |
gboolean ges_timeline_element_roll_start (GESTimelineElement *self
,GstClockTime start
);
Edits self
in roll mode. It allows you to modify the
start and inpoint of a self
and "resize" (basicly change the duration
in this case) of the previous neighbours accordingly.
This will not change the overall timeline duration.
|
The GESTimelineElement to roll |
|
The new start of self in roll mode, it will also adapat
the in-point of self according |
Returns : |
TRUE if the self as been roll properly, FALSE if an error
occured |
gboolean ges_timeline_element_roll_end (GESTimelineElement *self
,GstClockTime end
);
Edits self
in roll mode. It allows you to modify the
duration of a self
and trim (basicly change the start + inpoint
in this case) the following neighbours accordingly.
This will not change the overall timeline duration.
|
The GESTimelineElement to roll. |
|
The new end (start + duration) of self in roll mode |
Returns : |
TRUE if the self as been rolled properly, FALSE if an error
occured |
gboolean ges_timeline_element_trim (GESTimelineElement *self
,GstClockTime start
);
Edits self
in trim mode. It allows you to modify the
inpoint and start of self
.
This will not change the overall timeline duration.
Note that to trim the end of an self you can just set its duration. The same way
as this method, it will take into account the snapping-distance property of the
timeline in which self
is.
|
The GESTimelineElement to trim. |
|
The new start of self in trim mode, will adapt the inpoint
of self accordingly |
Returns : |
TRUE if the self as been trimmed properly, FALSE if an error
occured |
GESTimelineElement * ges_timeline_element_get_toplevel_parent
(GESTimelineElement *self
);
Gets the toplevel GESTimelineElement controlling self
|
The GESTimelineElement to get the toplevel parent from |
Returns : |
The toplevel controlling parent of self . [transfer full]
|
GESTimelineElement * ges_timeline_element_copy (GESTimelineElement *self
,gboolean deep
);
Copies self
|
The GESTimelineElement to copy |
|
whether we want to create the elements self contains or not |
Returns : |
The newly create GESTimelineElement, copied from self . [transfer floating]
|
#define GES_TIMELINE_ELEMENT_PARENT(obj) (((GESTimelineElement*)obj)->parent)
The parent of the object.
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_TIMELINE(obj) (((GESTimelineElement*)obj)->timeline)
The timeline in which the object is.
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_START(obj) (((GESTimelineElement*)obj)->start)
The start position of the object (in nanoseconds).
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_END(obj) ((((GESTimelineElement*)obj)->start) + (((GESTimelineElement*)obj)->duration))
The end position of the object (in nanoseconds).
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_INPOINT(obj) (((GESTimelineElement*)obj)->inpoint)
The in-point of the object (in nanoseconds).
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_DURATION(obj) (((GESTimelineElement*)obj)->duration)
The duration of the object (in nanoseconds).
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_MAX_DURATION(obj) (((GESTimelineElement*)obj)->maxduration)
The maximun duration of the object (in nanoseconds).
|
a GESTimelineElement |
#define GES_TIMELINE_ELEMENT_PRIORITY(obj) (((GESTimelineElement*)obj)->priority)
The priority of the object.
|
a GESTimelineElement |