Skip to content
Snippets Groups Projects
Commit 0abc023d authored by Thibault Saunier's avatar Thibault Saunier :cactus:
Browse files

timeline: Do not snap object within the moving context


Reviewed-by: default avatarAlex Băluț <&lt;alexandru.balut@gmail.com&gt;>
Differential Revision: https://phabricator.freedesktop.org/D1873
parent f0bef3d8
No related branches found
No related tags found
No related merge requests found
......@@ -169,9 +169,16 @@ ges_auto_transition_new (GESTrackElement * transition,
G_CALLBACK (_track_changed_cb), self);
GST_DEBUG_OBJECT (self, "Created transition %" GST_PTR_FORMAT
" between %" GST_PTR_FORMAT " and: %" GST_PTR_FORMAT
" between %" GST_PTR_FORMAT "[% " GST_TIME_FORMAT
" - %" GST_TIME_FORMAT "] and: %" GST_PTR_FORMAT
"[% " GST_TIME_FORMAT " - %" GST_TIME_FORMAT "]"
" in layer nb %i, start: %" GST_TIME_FORMAT " duration: %"
GST_TIME_FORMAT, transition, next_source, previous_source,
GST_TIME_FORMAT, transition, previous_source,
GST_TIME_ARGS (_START (previous_source)),
GST_TIME_ARGS (_END (previous_source)),
next_source,
GST_TIME_ARGS (_START (next_source)),
GST_TIME_ARGS (_END (next_source)),
ges_layer_get_priority (ges_clip_get_layer
(self->previous_clip)),
GST_TIME_ARGS (_START (transition)),
......
......@@ -1306,6 +1306,10 @@ ges_timeline_snap_position (GESTimeline * timeline,
if (tmp_container == container)
continue;
if (g_hash_table_lookup (priv->movecontext.toplevel_containers,
tmp_container))
continue;
if (timecode > *iter_tc)
diff = timecode - *iter_tc;
else
......@@ -1464,11 +1468,14 @@ ges_timeline_set_moving_context (GESTimeline * timeline, GESTrackElement * obj,
return TRUE;
}
GST_DEBUG_OBJECT (clip,
"Changing context:\nold: obj: %p, mode: %d, edge: %d \n"
"new: obj: %p, mode: %d, edge: %d ! Has changed %i", mv_ctx->clip,
mv_ctx->mode, mv_ctx->edge, clip, mode, edge, mv_ctx->needs_move_ctx);
/* Make sure snapping context is reset when changing the moving context */
ges_timeline_emit_snappig (timeline, NULL, NULL);
clean_movecontext (mv_ctx);
mv_ctx->edge = edge;
mv_ctx->mode = mode;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment