From: Mathieu Duponchelle Date: Mon, 14 Jul 2014 13:35:47 +0000 (+0200) Subject: composition: remove now useless "flushing" flag. X-Git-Tag: 1.19.3~493^2~1411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f826851f3b4d4e0dba2cb112995aa4b800f55772;p=platform%2Fupstream%2Fgstreamer.git composition: remove now useless "flushing" flag. Co-Authored by: Thibault Saunier --- diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index efb58a4..16c7c05 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -121,14 +121,6 @@ struct _GnlCompositionPrivate GHashTable *pending_io; GMutex pending_io_lock; - /* - thread-safe Seek handling. - flushing_lock : mutex to access flushing and pending_idle - flushing : - */ - GMutex flushing_lock; - gboolean flushing; - /* source top-level ghostpad, probe and entry */ gulong ghosteventprobe; GnlCompositionEntry *toplevelentry; @@ -296,19 +288,6 @@ static void _restart_task (GnlComposition * comp, gboolean emit_commit); g_thread_self()); \ } G_STMT_END -#define COMP_FLUSHING_LOCK(comp) G_STMT_START { \ - GST_LOG_OBJECT (comp, "locking flushing_lock from thread %p", \ - g_thread_self()); \ - g_mutex_lock (&comp->priv->flushing_lock); \ - GST_LOG_OBJECT (comp, "locked flushing_lock from thread %p", \ - g_thread_self()); \ - } G_STMT_END -#define COMP_FLUSHING_UNLOCK(comp) G_STMT_START { \ - GST_LOG_OBJECT (comp, "unlocking flushing_lock from thread %p", \ - g_thread_self()); \ - g_mutex_unlock (&comp->priv->flushing_lock); \ - } G_STMT_END - #define MAIN_CONTEXT_LOCK(comp) G_STMT_START { \ GST_LOG_OBJECT (comp, "Getting MAIN_CONTEXT_LOCK in thread %p", \ g_thread_self()); \ @@ -845,9 +824,6 @@ gnl_composition_init (GnlComposition * comp) priv->objects_start = NULL; priv->objects_stop = NULL; - g_mutex_init (&priv->flushing_lock); - priv->flushing = FALSE; - priv->segment = gst_segment_new (); priv->outside_segment = gst_segment_new (); @@ -943,7 +919,6 @@ gnl_composition_finalize (GObject * object) gst_segment_free (priv->outside_segment); g_mutex_clear (&priv->objects_lock); - g_mutex_clear (&priv->flushing_lock); g_mutex_clear (&priv->pending_io_lock); g_rec_mutex_clear (&comp->task_rec_lock); @@ -1138,12 +1113,6 @@ gnl_composition_reset (GnlComposition * comp) reset_children (comp); - COMP_FLUSHING_LOCK (comp); - - priv->flushing = FALSE; - - COMP_FLUSHING_UNLOCK (comp); - priv->reset_time = FALSE; priv->initialized = FALSE; priv->send_stream_start = TRUE; @@ -1204,11 +1173,6 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstEvent *event2; /* next_base_time */ - COMP_FLUSHING_LOCK (comp); - - priv->flushing = FALSE; - COMP_FLUSHING_UNLOCK (comp); - gst_event_parse_segment (event, &segment); gst_segment_copy_into (segment, ©); @@ -1238,15 +1202,6 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, { gint seqnum = gst_event_get_seqnum (event); - COMP_FLUSHING_LOCK (comp); - if (priv->flushing) { - GST_DEBUG_OBJECT (comp, "flushing, bailing out"); - COMP_FLUSHING_UNLOCK (comp); - retval = GST_PAD_PROBE_DROP; - break; - } - COMP_FLUSHING_UNLOCK (comp); - GST_INFO_OBJECT (comp, "Got EOS, last EOS seqnum id : %i current " "seq num is: %i", comp->priv->real_eos_seqnum, seqnum); @@ -1557,11 +1512,6 @@ seek_handling (GnlComposition * comp, GnlUpdateStackReason update_stack_reason) GST_DEBUG_OBJECT (comp, "Seek hnalding update pipeline reason: %s", UPDATE_PIPELINE_REASONS[update_stack_reason]); - COMP_FLUSHING_LOCK (comp); - GST_DEBUG_OBJECT (comp, "Setting flushing to TRUE"); - comp->priv->flushing = TRUE; - COMP_FLUSHING_UNLOCK (comp); - COMP_OBJECTS_LOCK (comp); if (have_to_update_pipeline (comp, update_stack_reason)) { if (comp->priv->segment->rate >= 0.0)