mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
timeline-element: Add a method to get the topelevel parent of an element
API: ges_timeline_element_get_toplevel_parent
This commit is contained in:
parent
4e51b347ff
commit
bce084f4fd
3 changed files with 24 additions and 0 deletions
|
@ -374,6 +374,7 @@ ges_timeline_element_ripple_end
|
|||
ges_timeline_element_roll_start
|
||||
ges_timeline_element_roll_end
|
||||
ges_timeline_element_trim
|
||||
ges_timeline_element_get_toplevel_parent
|
||||
GES_TIMELINE_ELEMENT_PARENT
|
||||
GES_TIMELINE_ELEMENT_TIMELINE
|
||||
GES_TIMELINE_ELEMENT_START
|
||||
|
|
|
@ -832,3 +832,24 @@ ges_timeline_element_copy (GESTimelineElement * self, gboolean deep)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_element_get_toplevel_parent:
|
||||
* @self: The #GESTimelineElement to get the toplevel parent from
|
||||
*
|
||||
* Gets the toplevel #GESTimelineElement controlling @self
|
||||
*
|
||||
* Returns: (transfer full): The toplevel controlling parent of @self
|
||||
*/
|
||||
GESTimelineElement *
|
||||
ges_timeline_element_get_toplevel_parent (GESTimelineElement * self)
|
||||
{
|
||||
GESTimelineElement *toplevel = self;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_ELEMENT (self), NULL);
|
||||
|
||||
while (GES_TIMELINE_ELEMENT_PARENT (toplevel))
|
||||
toplevel = GES_TIMELINE_ELEMENT_PARENT (toplevel);
|
||||
|
||||
return gst_object_ref (toplevel);
|
||||
}
|
||||
|
|
|
@ -179,6 +179,8 @@ struct _GESTimelineElementClass
|
|||
|
||||
GType ges_timeline_element_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GESTimelineElement *
|
||||
ges_timeline_element_get_toplevel_parent (GESTimelineElement *self);
|
||||
GESTimelineElement * ges_timeline_element_get_parent (GESTimelineElement * self);
|
||||
gboolean ges_timeline_element_set_parent (GESTimelineElement *self, GESTimelineElement *parent);
|
||||
gboolean ges_timeline_element_set_timeline (GESTimelineElement *self, GESTimeline *timeline);
|
||||
|
|
Loading…
Reference in a new issue