mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:46:13 +00:00
timeline: Do not snap object within the moving context
Reviewed-by: Alex Băluț <<alexandru.balut@gmail.com>> Differential Revision: https://phabricator.freedesktop.org/D1873
This commit is contained in:
parent
62891c3f03
commit
f3dbcd2753
2 changed files with 16 additions and 2 deletions
|
@ -169,9 +169,16 @@ ges_auto_transition_new (GESTrackElement * transition,
|
||||||
G_CALLBACK (_track_changed_cb), self);
|
G_CALLBACK (_track_changed_cb), self);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Created transition %" GST_PTR_FORMAT
|
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: %"
|
" 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
|
ges_layer_get_priority (ges_clip_get_layer
|
||||||
(self->previous_clip)),
|
(self->previous_clip)),
|
||||||
GST_TIME_ARGS (_START (transition)),
|
GST_TIME_ARGS (_START (transition)),
|
||||||
|
|
|
@ -1306,6 +1306,10 @@ ges_timeline_snap_position (GESTimeline * timeline,
|
||||||
if (tmp_container == container)
|
if (tmp_container == container)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (g_hash_table_lookup (priv->movecontext.toplevel_containers,
|
||||||
|
tmp_container))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (timecode > *iter_tc)
|
if (timecode > *iter_tc)
|
||||||
diff = timecode - *iter_tc;
|
diff = timecode - *iter_tc;
|
||||||
else
|
else
|
||||||
|
@ -1481,11 +1485,14 @@ ges_timeline_set_moving_context (GESTimeline * timeline, GESTrackElement * obj,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (clip,
|
GST_DEBUG_OBJECT (clip,
|
||||||
"Changing context:\nold: obj: %p, mode: %d, edge: %d \n"
|
"Changing context:\nold: obj: %p, mode: %d, edge: %d \n"
|
||||||
"new: obj: %p, mode: %d, edge: %d ! Has changed %i", mv_ctx->clip,
|
"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);
|
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);
|
clean_movecontext (mv_ctx);
|
||||||
mv_ctx->edge = edge;
|
mv_ctx->edge = edge;
|
||||||
mv_ctx->mode = mode;
|
mv_ctx->mode = mode;
|
||||||
|
|
Loading…
Reference in a new issue