composition: Handle seeking current stack while PAUSED

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
This commit is contained in:
Thibault Saunier 2014-07-10 18:01:32 +02:00
parent 6869c58e28
commit afc483b69d

View file

@ -241,6 +241,8 @@ _gnl_composition_remove_entry (GnlComposition * comp, GnlObject * object);
static void _deactivate_stack (GnlComposition * comp); static void _deactivate_stack (GnlComposition * comp);
static GstPadProbeReturn _add_emit_commited_and_restart_task (GnlComposition * static GstPadProbeReturn _add_emit_commited_and_restart_task (GnlComposition *
comp); comp);
static gboolean
_set_real_eos_seqnum_from_seek (GnlComposition * comp, GstEvent * event);
/* COMP_REAL_START: actual position to start current playback at. */ /* COMP_REAL_START: actual position to start current playback at. */
@ -471,7 +473,7 @@ _seek_pipeline_func (SeekData * seekd)
" seek (though it just does basic comparision and not full rebuild)"); " seek (though it just does basic comparision and not full rebuild)");
priv->reset_time = TRUE; priv->reset_time = TRUE;
seek_handling (seekd->comp, FALSE, TRUE); seek_handling (seekd->comp, TRUE, FALSE);
priv->reset_time = FALSE; priv->reset_time = FALSE;
beach: beach:
@ -1534,6 +1536,11 @@ seek_handling (GnlComposition * comp, gboolean initial, gboolean update)
else else
update_pipeline (comp, comp->priv->segment->stop, initial, !update); update_pipeline (comp, comp->priv->segment->stop, initial, !update);
} else { } else {
GstEvent *toplevel_seek = get_new_seek_event (comp, FALSE, FALSE);
_set_real_eos_seqnum_from_seek (comp, toplevel_seek);
_seek_current_stack (comp, toplevel_seek);
update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0)); update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0));
} }
COMP_OBJECTS_UNLOCK (comp); COMP_OBJECTS_UNLOCK (comp);
@ -2324,7 +2331,7 @@ update_pipeline_func (GnlComposition * comp)
priv->segment->stop = priv->segment_start; priv->segment->stop = priv->segment_start;
} }
seek_handling (comp, TRUE, TRUE); seek_handling (comp, TRUE, FALSE);
/* Post segment done if last seek was a segment seek */ /* Post segment done if last seek was a segment seek */
if (!priv->current && (priv->segment->flags & GST_SEEK_FLAG_SEGMENT)) { if (!priv->current && (priv->segment->flags & GST_SEEK_FLAG_SEGMENT)) {