mq = sq->mqueue;
/* Get a unique incrementing id */
- GST_MULTI_QUEUE_MUTEX_LOCK (mq);
curid = mq->counter++;
- GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
GST_LOG_OBJECT (mq, "SingleQueue %d : about to enqueue buffer %p with id %d",
sq->id, buffer, curid);
break;
}
- /* Get an unique incrementing id */
- GST_MULTI_QUEUE_MUTEX_LOCK (mq);
+ /* Get an unique incrementing id. protected with the STREAM_LOCK, unserialized
+ * events already got pushed and don't end up in the queue. */
curid = mq->counter++;
- GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
item = gst_multi_queue_event_item_new ((GstMiniObject *) event, curid);
GstDataQueueSize max_size, extra_size;
- guint32 counter; /* incoming object counter */
+ guint32 counter; /* incoming object counter, protected with STREAM_LOCK */
guint32 highid; /* contains highest id of last outputted object */
GMutex * qlock; /* Global queue lock (vs object lock or individual */