From: Thibault Saunier Date: Fri, 30 Mar 2012 07:40:50 +0000 (-0400) Subject: timeline-object: Properly reflect contained TrackObject duration and inpoint properti... X-Git-Tag: 1.19.3~493^2~2215^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=259af361bcb0da3b77d4f99e57a76a4a18baeb10;p=platform%2Fupstream%2Fgstreamer.git timeline-object: Properly reflect contained TrackObject duration and inpoint properties changes --- diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c index d446b875e7..a27c60c0d6 100644 --- a/ges/ges-timeline-object.c +++ b/ges/ges-timeline-object.c @@ -1593,18 +1593,54 @@ static void track_object_inpoint_changed_cb (GESTrackObject * child, GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object) { + ObjectMapping *map; + if (object->priv->ignore_notifies) return; + map = find_object_mapping (object, child); + if (G_UNLIKELY (map == NULL)) + /* something massively screwed up if we get this */ + return; + + if (!ges_track_object_is_locked (child)) { + /* Update the internal start_offset */ + map->inpoint_offset = object->inpoint - child->inpoint; + } else { + /* Or update the parent start */ + object->priv->initiated_move = child; + ges_timeline_object_set_inpoint (object, + child->inpoint + map->inpoint_offset); + object->priv->initiated_move = NULL; + } + } static void track_object_duration_changed_cb (GESTrackObject * child, GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object) { + ObjectMapping *map; + if (object->priv->ignore_notifies) return; + map = find_object_mapping (object, child); + if (G_UNLIKELY (map == NULL)) + /* something massively screwed up if we get this */ + return; + + if (!ges_track_object_is_locked (child)) { + /* Update the internal start_offset */ + map->duration_offset = object->duration - child->duration; + } else { + /* Or update the parent start */ + object->priv->initiated_move = child; + ges_timeline_object_set_duration (object, + child->duration + map->duration_offset); + object->priv->initiated_move = NULL; + } + } static void