mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
timeline: Never create transitions between rippled objects
In case of groups, we can have track elements that do not belong directly to the moved_trackelements but will be moved as others. Never create transition to all object that have a start > moving group start.
This commit is contained in:
parent
c17dae8f0e
commit
87b790a9da
2 changed files with 27 additions and 2 deletions
|
@ -52,6 +52,18 @@ GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
|
||||||
#define _set_duration0 ges_timeline_element_set_duration
|
#define _set_duration0 ges_timeline_element_set_duration
|
||||||
#define _set_priority0 ges_timeline_element_set_priority
|
#define _set_priority0 ges_timeline_element_set_priority
|
||||||
|
|
||||||
|
#define GES_TIMELINE_ELEMENT_FORMAT \
|
||||||
|
"s:%p" \
|
||||||
|
" start: %" GST_TIME_FORMAT \
|
||||||
|
" inpoint: %" GST_TIME_FORMAT \
|
||||||
|
" duration: %" GST_TIME_FORMAT
|
||||||
|
|
||||||
|
#define GES_TIMELINE_ELEMENT_ARGS(element) \
|
||||||
|
GES_TIMELINE_ELEMENT_NAME(element), element, \
|
||||||
|
GST_TIME_ARGS(GES_TIMELINE_ELEMENT_START(element)), \
|
||||||
|
GST_TIME_ARGS(GES_TIMELINE_ELEMENT_INPOINT(element)), \
|
||||||
|
GST_TIME_ARGS(GES_TIMELINE_ELEMENT_DURATION(element))
|
||||||
|
|
||||||
G_GNUC_INTERNAL gboolean
|
G_GNUC_INTERNAL gboolean
|
||||||
timeline_ripple_object (GESTimeline *timeline, GESTrackElement *obj,
|
timeline_ripple_object (GESTimeline *timeline, GESTrackElement *obj,
|
||||||
GList * layers, GESEdge edge,
|
GList * layers, GESEdge edge,
|
||||||
|
|
|
@ -115,6 +115,9 @@ struct _MoveContext
|
||||||
GESEdge edge;
|
GESEdge edge;
|
||||||
GESEditMode mode;
|
GESEditMode mode;
|
||||||
|
|
||||||
|
/* The start of the moving context */
|
||||||
|
GstClockTime start;
|
||||||
|
|
||||||
/* Ripple and Roll Objects */
|
/* Ripple and Roll Objects */
|
||||||
GList *moving_trackelements;
|
GList *moving_trackelements;
|
||||||
|
|
||||||
|
@ -966,7 +969,8 @@ _create_transitions_on_layer (GESTimeline * timeline, GESLayer * layer,
|
||||||
== toplevel)
|
== toplevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (g_list_find (priv->movecontext.moving_trackelements, next))
|
if (priv->movecontext.moving_trackelements &&
|
||||||
|
GES_TIMELINE_ELEMENT_START (next) > priv->movecontext.start)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
transition_duration = (_START (prev) + _DURATION (prev)) - _START (next);
|
transition_duration = (_START (prev) + _DURATION (prev)) - _START (next);
|
||||||
|
@ -995,11 +999,18 @@ create_transitions (GESTimeline * timeline, GESTrackElement * track_element)
|
||||||
GList *layer_node;
|
GList *layer_node;
|
||||||
|
|
||||||
GESTimelinePrivate *priv = timeline->priv;
|
GESTimelinePrivate *priv = timeline->priv;
|
||||||
|
MoveContext *mv_ctx = &timeline->priv->movecontext;
|
||||||
|
|
||||||
if (!priv->needs_transitions_update)
|
if (!priv->needs_transitions_update)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (timeline, "Creating transitions around %p", track_element);
|
if (mv_ctx->moving_trackelements &&
|
||||||
|
GES_TIMELINE_ELEMENT_START (track_element) > mv_ctx->start) {
|
||||||
|
GST_DEBUG_OBJECT (timeline, "Not creating transition around %"
|
||||||
|
GES_TIMELINE_ELEMENT_FORMAT " as it is not the first rippled"
|
||||||
|
" element", GES_TIMELINE_ELEMENT_ARGS (track_element));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
track = ges_track_element_get_track (track_element);
|
track = ges_track_element_get_track (track_element);
|
||||||
layer_node = g_list_find_custom (timeline->layers,
|
layer_node = g_list_find_custom (timeline->layers,
|
||||||
|
@ -1022,6 +1033,7 @@ init_movecontext (MoveContext * mv_ctx, gboolean first_init)
|
||||||
g_hash_table_new (g_direct_hash, g_direct_equal);
|
g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||||
|
|
||||||
mv_ctx->moving_trackelements = NULL;
|
mv_ctx->moving_trackelements = NULL;
|
||||||
|
mv_ctx->start = G_MAXUINT64;
|
||||||
mv_ctx->max_trim_pos = G_MAXUINT64;
|
mv_ctx->max_trim_pos = G_MAXUINT64;
|
||||||
mv_ctx->min_move_layer = G_MAXUINT;
|
mv_ctx->min_move_layer = G_MAXUINT;
|
||||||
mv_ctx->max_layer_prio = 0;
|
mv_ctx->max_layer_prio = 0;
|
||||||
|
@ -1307,6 +1319,7 @@ add_toplevel_container (MoveContext * mv_ctx, GESTrackElement * trackelement)
|
||||||
} else
|
} else
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
|
||||||
|
mv_ctx->start = MIN (mv_ctx->start, GES_TIMELINE_ELEMENT_START (toplevel));
|
||||||
g_hash_table_insert (mv_ctx->toplevel_containers, toplevel, toplevel);
|
g_hash_table_insert (mv_ctx->toplevel_containers, toplevel, toplevel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue