diff options
author | Mathieu Duponchelle <mathieu.duponchelle@epitech.eu> | 2013-06-11 18:22:11 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-06-11 21:53:56 +0200 |
commit | cdb90d3c8e7554216fac0af63041a820c79669d5 (patch) | |
tree | 7e1f5ad6bd51b9c769afef7ba603501f4d8b7a0e | |
parent | cb1818f086dd4772ef6344193831aba8273b8215 (diff) |
composition: update operations base time even when we don't update the pipeline.
-rw-r--r-- | gnl/gnlcomposition.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 88e600f..6575caa 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -985,6 +985,31 @@ beach: return (guint64) value; } +static gboolean +update_base_time (GNode * node, GstClockTime * timestamp) +{ + if (GNL_IS_OPERATION (node->data)) + gnl_operation_update_base_time (GNL_OPERATION (node->data), *timestamp); + + return FALSE; +} + +static void +update_operations_base_time (GnlComposition * comp, gboolean reverse) +{ + GstClockTime timestamp; + + if (reverse) + timestamp = comp->priv->segment->stop; + else + timestamp = comp->priv->segment->start; + + COMP_OBJECTS_LOCK (comp); + g_node_traverse (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, -1, + (GNodeTraverseFunc) update_base_time, ×tamp); + COMP_OBJECTS_UNLOCK (comp); +} + /* Figures out if pipeline needs updating. Updates it and sends the seek event. @@ -1011,6 +1036,8 @@ seek_handling (GnlComposition * comp, gboolean initial, gboolean update) !update); else update_pipeline (comp, comp->priv->segment->stop, initial, TRUE, !update); + } else { + update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0)); } return TRUE; |