From 619b157ec3c0c8103ba897586cc7420ce48e4687 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 14 Jul 2014 13:36:31 +0200 Subject: [PATCH] composition: Do not use 'update' seek for now This is not working in our new context and the seek do not work at all when we set seek start to CLOCK_TIME_NONE and type to TYPE_NONE. Co-Authored by: Mathieu Duponchelle --- gnl/gnlcomposition.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 02dec1e80c..efb58a44c8 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -3023,7 +3023,6 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, GstClockTime new_stop = GST_CLOCK_TIME_NONE; GstClockTime new_start = GST_CLOCK_TIME_NONE; - gboolean startchanged, stopchanged; GstState nextstate = (GST_STATE_NEXT (comp) == GST_STATE_VOID_PENDING) ? GST_STATE (comp) : GST_STATE_NEXT (comp); @@ -3052,14 +3051,6 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, /* invalidate the stack while modifying it */ priv->stackvalid = FALSE; - if (priv->segment->rate >= 0.0) { - startchanged = priv->segment_start != currenttime; - stopchanged = priv->segment_stop != new_stop; - } else { - startchanged = priv->segment_start != new_start; - stopchanged = priv->segment_stop != currenttime; - } - /* set new segment_start/stop (the current zone over which the new stack * is valid) */ if (priv->segment->rate >= 0.0) { @@ -3070,6 +3061,21 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, priv->segment_stop = currenttime; } +# if 0 + /* FIXME -- We should be ablt to use updatestoponly in that case, + * but it simply does not work! Not using it leads to same + * behaviour, but less optimized */ + + gboolean startchanged, stopchanged; + + if (priv->segment->rate >= 0.0) { + startchanged = priv->segment_start != currenttime; + stopchanged = priv->segment_stop != new_stop; + } else { + startchanged = priv->segment_start != new_start; + stopchanged = priv->segment_stop != currenttime; + } + if (samestack) { if (startchanged || stopchanged) { /* Update seek events need to be flushing if not in PLAYING, @@ -3077,6 +3083,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, updatestoponly = (state == GST_STATE_PLAYING) ? FALSE : TRUE; } } +#endif toplevel_seek = get_new_seek_event (comp, TRUE, updatestoponly); _set_real_eos_seqnum_from_seek (comp, toplevel_seek);