mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
timeline-element: Add a set_parent vmethod
API: GESTimelineElment->set_parent vmethod
This commit is contained in:
parent
bd30bbd4a8
commit
9fa99df5a7
2 changed files with 13 additions and 1 deletions
|
@ -225,6 +225,7 @@ ges_timeline_element_class_init (GESTimelineElementClass * klass)
|
||||||
|
|
||||||
object_class->finalize = ges_timeline_element_finalize;
|
object_class->finalize = ges_timeline_element_finalize;
|
||||||
|
|
||||||
|
klass->set_parent = NULL;
|
||||||
klass->set_start = NULL;
|
klass->set_start = NULL;
|
||||||
klass->set_inpoint = NULL;
|
klass->set_inpoint = NULL;
|
||||||
klass->set_duration = NULL;
|
klass->set_duration = NULL;
|
||||||
|
@ -267,6 +268,11 @@ ges_timeline_element_set_parent (GESTimelineElement * self,
|
||||||
if (self->parent != NULL && parent != NULL)
|
if (self->parent != NULL && parent != NULL)
|
||||||
goto had_parent;
|
goto had_parent;
|
||||||
|
|
||||||
|
if (GES_TIMELINE_ELEMENT_GET_CLASS (self)->set_parent) {
|
||||||
|
if (!GES_TIMELINE_ELEMENT_GET_CLASS (self)->set_parent (self, parent))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
self->parent = parent;
|
self->parent = parent;
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PARENT]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PARENT]);
|
||||||
|
|
|
@ -138,6 +138,7 @@ struct _GESTimelineElement
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineElementClass:
|
* GESTimelineElementClass:
|
||||||
|
* @set_parent: method to set the parent of a #GESTimelineElement.
|
||||||
* @set_start: method to set the start of a #GESTimelineElement
|
* @set_start: method to set the start of a #GESTimelineElement
|
||||||
* @set_duration: method to set the duration of a #GESTimelineElement
|
* @set_duration: method to set the duration of a #GESTimelineElement
|
||||||
* @set_inpoint: method to set the inpoint of a #GESTimelineElement
|
* @set_inpoint: method to set the inpoint of a #GESTimelineElement
|
||||||
|
@ -152,13 +153,18 @@ struct _GESTimelineElement
|
||||||
*
|
*
|
||||||
* The GESTimelineElement base class. Subclasses should override at least
|
* The GESTimelineElement base class. Subclasses should override at least
|
||||||
* @set_start @set_inpoint @set_duration @ripple @ripple_end @roll_start
|
* @set_start @set_inpoint @set_duration @ripple @ripple_end @roll_start
|
||||||
* @roll_end and @trim
|
* @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.
|
||||||
*/
|
*/
|
||||||
struct _GESTimelineElementClass
|
struct _GESTimelineElementClass
|
||||||
{
|
{
|
||||||
GInitiallyUnownedClass parent_class;
|
GInitiallyUnownedClass parent_class;
|
||||||
|
|
||||||
/*< public > */
|
/*< public > */
|
||||||
|
gboolean (*set_parent) (GESTimelineElement * self, GESTimelineElement *parent);
|
||||||
gboolean (*set_start) (GESTimelineElement * self, GstClockTime start);
|
gboolean (*set_start) (GESTimelineElement * self, GstClockTime start);
|
||||||
gboolean (*set_inpoint) (GESTimelineElement * self, GstClockTime inpoint);
|
gboolean (*set_inpoint) (GESTimelineElement * self, GstClockTime inpoint);
|
||||||
gboolean (*set_duration) (GESTimelineElement * self, GstClockTime duration);
|
gboolean (*set_duration) (GESTimelineElement * self, GstClockTime duration);
|
||||||
|
|
Loading…
Reference in a new issue