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;
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()); \
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 ();
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);
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;
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, ©);
{
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);
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)