mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
TimelineObject: add the ges_timeline_object_get_top_effect_position method
tests: adapt the effect testsuite to use this function docs: add the method to the documentation
This commit is contained in:
parent
dd298b99c7
commit
ca2d5bca2b
4 changed files with 27 additions and 1 deletions
|
@ -281,6 +281,7 @@ ges_timeline_object_get_layer
|
|||
ges_timeline_object_find_track_object
|
||||
ges_timeline_object_add_track_object
|
||||
ges_timeline_object_get_effects
|
||||
ges_timeline_object_get_top_effect_position
|
||||
<SUBSECTION Standard>
|
||||
GES_TIMELINE_OBJECT_DURATION
|
||||
GES_TIMELINE_OBJECT_INPOINT
|
||||
|
|
|
@ -822,6 +822,24 @@ ges_timeline_object_get_effects (GESTimelineObject * object)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_object_get_top_effect_position:
|
||||
*
|
||||
* @object: The origin #GESTimelineObject
|
||||
* @effect: The #GESTrackEffect we want to get the top position from
|
||||
*
|
||||
* Gets the top position of an effect.
|
||||
*
|
||||
* Returns: The top position of the effect, -1 if something went wrong.
|
||||
*/
|
||||
gint
|
||||
ges_timeline_object_get_top_effect_position (GESTimelineObject * object,
|
||||
GESTrackOperation * effect)
|
||||
{
|
||||
return find_object_mapping (object,
|
||||
GES_TRACK_OBJECT (effect))->priority_offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* PROPERTY NOTIFICATIONS FROM TRACK OBJECTS
|
||||
*/
|
||||
|
|
|
@ -244,6 +244,10 @@ ges_timeline_object_add_track_object (GESTimelineObject *object, GESTrackObject
|
|||
GList *
|
||||
ges_timeline_object_get_effects (GESTimelineObject *object);
|
||||
|
||||
gint
|
||||
ges_timeline_object_get_top_effect_position (GESTimelineObject *object,
|
||||
GESTrackOperation *effect);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_TIMELINE_OBJECT */
|
||||
|
|
|
@ -135,7 +135,10 @@ GST_START_TEST (test_get_effects_from_tl)
|
|||
effects = ges_timeline_object_get_effects (GES_TIMELINE_OBJECT (source));
|
||||
|
||||
for (tmp = effects; tmp; tmp = tmp->next) {
|
||||
int priority = GES_TRACK_OBJECT (tmp->data)->priority;
|
||||
gint priority =
|
||||
ges_timeline_object_get_top_effect_position (GES_TIMELINE_OBJECT
|
||||
(source),
|
||||
GES_TRACK_OPERATION (tmp->data));
|
||||
fail_unless (priority > effect_prio);
|
||||
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
|
||||
effect_prio = priority;
|
||||
|
|
Loading…
Reference in a new issue