mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
timeline-object: Properly reflect contained TrackObject duration and inpoint properties changes
This commit is contained in:
parent
c783f4140a
commit
259af361bc
1 changed files with 36 additions and 0 deletions
|
@ -1593,18 +1593,54 @@ static void
|
||||||
track_object_inpoint_changed_cb (GESTrackObject * child,
|
track_object_inpoint_changed_cb (GESTrackObject * child,
|
||||||
GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object)
|
GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object)
|
||||||
{
|
{
|
||||||
|
ObjectMapping *map;
|
||||||
|
|
||||||
if (object->priv->ignore_notifies)
|
if (object->priv->ignore_notifies)
|
||||||
return;
|
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
|
static void
|
||||||
track_object_duration_changed_cb (GESTrackObject * child,
|
track_object_duration_changed_cb (GESTrackObject * child,
|
||||||
GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object)
|
GParamSpec * arg G_GNUC_UNUSED, GESTimelineObject * object)
|
||||||
{
|
{
|
||||||
|
ObjectMapping *map;
|
||||||
|
|
||||||
if (object->priv->ignore_notifies)
|
if (object->priv->ignore_notifies)
|
||||||
return;
|
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
|
static void
|
||||||
|
|
Loading…
Reference in a new issue