2 * Copyright (C) 2006 Edward Hervey <edward@fluendo.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 * SECTION:gstdataqueue
24 * @title: GstDataQueue
25 * @short_description: Threadsafe queueing object
27 * #GstDataQueue is an object that handles threadsafe queueing of objects. It
28 * also provides size-related functionality. This object should be used for
29 * any #GstElement that wishes to provide some sort of queueing functionality.
34 #include "gstdataqueue.h"
35 #include "gstqueuearray.h"
36 #include "gst/glib-compat-private.h"
38 GST_DEBUG_CATEGORY_STATIC (data_queue_debug);
39 #define GST_CAT_DEFAULT (data_queue_debug)
40 GST_DEBUG_CATEGORY_STATIC (data_queue_dataflow);
43 /* Queue signals and args */
54 PROP_CUR_LEVEL_VISIBLE,
60 struct _GstDataQueuePrivate
62 /* the array of data we're keeping our grubby hands on */
65 GstDataQueueSize cur_level; /* size of the queue */
66 GstDataQueueCheckFullFunction checkfull; /* Callback to check if the queue is full */
69 GMutex qlock; /* lock for queue (vs object lock) */
71 GCond item_add; /* signals buffers now available for reading */
73 GCond item_del; /* signals space now available for writing */
74 gboolean flushing; /* indicates whether conditions where signalled because
75 * of external flushing */
76 GstDataQueueFullCallback fullcallback;
77 GstDataQueueEmptyCallback emptycallback;
80 #define GST_DATA_QUEUE_MUTEX_LOCK(q) G_STMT_START { \
81 GST_CAT_TRACE (data_queue_dataflow, \
82 "locking qlock from thread %p", \
84 g_mutex_lock (&q->priv->qlock); \
85 GST_CAT_TRACE (data_queue_dataflow, \
86 "locked qlock from thread %p", \
90 #define GST_DATA_QUEUE_MUTEX_LOCK_CHECK(q, label) G_STMT_START { \
91 GST_DATA_QUEUE_MUTEX_LOCK (q); \
92 if (q->priv->flushing) \
96 #define GST_DATA_QUEUE_MUTEX_UNLOCK(q) G_STMT_START { \
97 GST_CAT_TRACE (data_queue_dataflow, \
98 "unlocking qlock from thread %p", \
100 g_mutex_unlock (&q->priv->qlock); \
103 #define STATUS(q, msg) \
104 GST_CAT_LOG (data_queue_dataflow, \
105 "queue:%p " msg ": %u visible items, %u " \
106 "bytes, %"G_GUINT64_FORMAT \
107 " ns, %u elements", \
109 q->priv->cur_level.visible, \
110 q->priv->cur_level.bytes, \
111 q->priv->cur_level.time, \
112 gst_queue_array_get_length (q->priv->queue))
114 static void gst_data_queue_finalize (GObject * object);
116 static void gst_data_queue_set_property (GObject * object,
117 guint prop_id, const GValue * value, GParamSpec * pspec);
118 static void gst_data_queue_get_property (GObject * object,
119 guint prop_id, GValue * value, GParamSpec * pspec);
121 static guint gst_data_queue_signals[LAST_SIGNAL] = { 0 };
125 GST_DEBUG_CATEGORY_INIT (data_queue_debug, "dataqueue", 0, \
126 "data queue object"); \
127 GST_DEBUG_CATEGORY_INIT (data_queue_dataflow, "data_queue_dataflow", 0, \
128 "dataflow inside the data queue object"); \
131 #define parent_class gst_data_queue_parent_class
132 G_DEFINE_TYPE_WITH_CODE (GstDataQueue, gst_data_queue, G_TYPE_OBJECT,
133 G_ADD_PRIVATE (GstDataQueue) _do_init);
136 gst_data_queue_class_init (GstDataQueueClass * klass)
138 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
140 gobject_class->set_property = gst_data_queue_set_property;
141 gobject_class->get_property = gst_data_queue_get_property;
145 * GstDataQueue::empty: (skip)
146 * @queue: the queue instance
148 * Reports that the queue became empty (empty).
149 * A queue is empty if the total amount of visible items inside it (num-visible, time,
150 * size) is lower than the boundary values which can be set through the GObject
153 gst_data_queue_signals[SIGNAL_EMPTY] =
154 g_signal_new ("empty", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
155 G_STRUCT_OFFSET (GstDataQueueClass, empty), NULL, NULL,
156 g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
159 * GstDataQueue::full: (skip)
160 * @queue: the queue instance
162 * Reports that the queue became full (full).
163 * A queue is full if the total amount of data inside it (num-visible, time,
164 * size) is higher than the boundary values which can be set through the GObject
167 gst_data_queue_signals[SIGNAL_FULL] =
168 g_signal_new ("full", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
169 G_STRUCT_OFFSET (GstDataQueueClass, full), NULL, NULL,
170 g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
173 g_object_class_install_property (gobject_class, PROP_CUR_LEVEL_BYTES,
174 g_param_spec_uint ("current-level-bytes", "Current level (kB)",
175 "Current amount of data in the queue (bytes)",
176 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
177 g_object_class_install_property (gobject_class, PROP_CUR_LEVEL_VISIBLE,
178 g_param_spec_uint ("current-level-visible",
179 "Current level (visible items)",
180 "Current number of visible items in the queue", 0, G_MAXUINT, 0,
181 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
182 g_object_class_install_property (gobject_class, PROP_CUR_LEVEL_TIME,
183 g_param_spec_uint64 ("current-level-time", "Current level (ns)",
184 "Current amount of data in the queue (in ns)", 0, G_MAXUINT64, 0,
185 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
187 gobject_class->finalize = gst_data_queue_finalize;
191 gst_data_queue_init (GstDataQueue * queue)
193 queue->priv = gst_data_queue_get_instance_private (queue);
195 queue->priv->cur_level.visible = 0; /* no content */
196 queue->priv->cur_level.bytes = 0; /* no content */
197 queue->priv->cur_level.time = 0; /* no content */
199 queue->priv->checkfull = NULL;
201 g_mutex_init (&queue->priv->qlock);
202 g_cond_init (&queue->priv->item_add);
203 g_cond_init (&queue->priv->item_del);
204 queue->priv->queue = gst_queue_array_new (50);
206 GST_DEBUG ("initialized queue's not_empty & not_full conditions");
210 * gst_data_queue_new: (skip)
211 * @checkfull: the callback used to tell if the element considers the queue full
213 * @fullcallback: the callback which will be called when the queue is considered full.
214 * @emptycallback: the callback which will be called when the queue is considered empty.
215 * @checkdata: a #gpointer that will be passed to the @checkfull, @fullcallback,
216 * and @emptycallback callbacks.
218 * Creates a new #GstDataQueue. If @fullcallback or @emptycallback are supplied, then
219 * the #GstDataQueue will call the respective callback to signal full or empty condition.
220 * If the callbacks are NULL the #GstDataQueue will instead emit 'full' and 'empty'
223 * Returns: a new #GstDataQueue.
228 gst_data_queue_new (GstDataQueueCheckFullFunction checkfull,
229 GstDataQueueFullCallback fullcallback,
230 GstDataQueueEmptyCallback emptycallback, gpointer checkdata)
234 g_return_val_if_fail (checkfull != NULL, NULL);
236 ret = g_object_new (GST_TYPE_DATA_QUEUE, NULL);
237 ret->priv->checkfull = checkfull;
238 ret->priv->checkdata = checkdata;
239 ret->priv->fullcallback = fullcallback;
240 ret->priv->emptycallback = emptycallback;
246 gst_data_queue_cleanup (GstDataQueue * queue)
248 GstDataQueuePrivate *priv = queue->priv;
250 while (!gst_queue_array_is_empty (priv->queue)) {
251 GstDataQueueItem *item = gst_queue_array_pop_head (priv->queue);
253 /* Just call the destroy notify on the item */
254 item->destroy (item);
256 priv->cur_level.visible = 0;
257 priv->cur_level.bytes = 0;
258 priv->cur_level.time = 0;
261 /* called only once, as opposed to dispose */
263 gst_data_queue_finalize (GObject * object)
265 GstDataQueue *queue = GST_DATA_QUEUE (object);
266 GstDataQueuePrivate *priv = queue->priv;
268 GST_DEBUG ("finalizing queue");
270 gst_data_queue_cleanup (queue);
271 gst_queue_array_free (priv->queue);
273 GST_DEBUG ("free mutex");
274 g_mutex_clear (&priv->qlock);
275 GST_DEBUG ("done free mutex");
277 g_cond_clear (&priv->item_add);
278 g_cond_clear (&priv->item_del);
280 G_OBJECT_CLASS (parent_class)->finalize (object);
284 gst_data_queue_locked_flush (GstDataQueue * queue)
286 GstDataQueuePrivate *priv = queue->priv;
288 STATUS (queue, "before flushing");
289 gst_data_queue_cleanup (queue);
290 STATUS (queue, "after flushing");
291 /* we deleted something... */
292 if (priv->waiting_del)
293 g_cond_signal (&priv->item_del);
296 static inline gboolean
297 gst_data_queue_locked_is_empty (GstDataQueue * queue)
299 GstDataQueuePrivate *priv = queue->priv;
301 return (gst_queue_array_get_length (priv->queue) == 0);
304 static inline gboolean
305 gst_data_queue_locked_is_full (GstDataQueue * queue)
307 GstDataQueuePrivate *priv = queue->priv;
309 return priv->checkfull (queue, priv->cur_level.visible,
310 priv->cur_level.bytes, priv->cur_level.time, priv->checkdata);
314 * gst_data_queue_flush: (skip)
315 * @queue: a #GstDataQueue.
317 * Flushes all the contents of the @queue. Any call to #gst_data_queue_push and
318 * #gst_data_queue_pop will be released.
324 gst_data_queue_flush (GstDataQueue * queue)
326 GST_DEBUG ("queue:%p", queue);
327 GST_DATA_QUEUE_MUTEX_LOCK (queue);
328 gst_data_queue_locked_flush (queue);
329 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
333 * gst_data_queue_is_empty: (skip)
334 * @queue: a #GstDataQueue.
336 * Queries if there are any items in the @queue.
339 * Returns: %TRUE if @queue is empty.
344 gst_data_queue_is_empty (GstDataQueue * queue)
348 GST_DATA_QUEUE_MUTEX_LOCK (queue);
349 res = gst_data_queue_locked_is_empty (queue);
350 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
356 * gst_data_queue_is_full: (skip)
357 * @queue: a #GstDataQueue.
359 * Queries if @queue is full. This check will be done using the
360 * #GstDataQueueCheckFullFunction registered with @queue.
363 * Returns: %TRUE if @queue is full.
368 gst_data_queue_is_full (GstDataQueue * queue)
372 GST_DATA_QUEUE_MUTEX_LOCK (queue);
373 res = gst_data_queue_locked_is_full (queue);
374 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
380 * gst_data_queue_set_flushing: (skip)
381 * @queue: a #GstDataQueue.
382 * @flushing: a #gboolean stating if the queue will be flushing or not.
384 * Sets the queue to flushing state if @flushing is %TRUE. If set to flushing
385 * state, any incoming data on the @queue will be discarded. Any call currently
386 * blocking on #gst_data_queue_push or #gst_data_queue_pop will return straight
387 * away with a return value of %FALSE. While the @queue is in flushing state,
388 * all calls to those two functions will return %FALSE.
395 gst_data_queue_set_flushing (GstDataQueue * queue, gboolean flushing)
397 GstDataQueuePrivate *priv = queue->priv;
399 GST_DEBUG ("queue:%p , flushing:%d", queue, flushing);
401 GST_DATA_QUEUE_MUTEX_LOCK (queue);
402 priv->flushing = flushing;
404 /* release push/pop functions */
405 if (priv->waiting_add)
406 g_cond_signal (&priv->item_add);
407 if (priv->waiting_del)
408 g_cond_signal (&priv->item_del);
410 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
414 gst_data_queue_push_force_unlocked (GstDataQueue * queue,
415 GstDataQueueItem * item)
417 GstDataQueuePrivate *priv = queue->priv;
419 gst_queue_array_push_tail (priv->queue, item);
422 priv->cur_level.visible++;
423 priv->cur_level.bytes += item->size;
424 priv->cur_level.time += item->duration;
428 * gst_data_queue_push_force: (skip)
429 * @queue: a #GstDataQueue.
430 * @item: a #GstDataQueueItem.
432 * Pushes a #GstDataQueueItem (or a structure that begins with the same fields)
433 * on the @queue. It ignores if the @queue is full or not and forces the @item
434 * to be pushed anyway.
437 * Note that this function has slightly different semantics than gst_pad_push()
438 * and gst_pad_push_event(): this function only takes ownership of @item and
439 * the #GstMiniObject contained in @item if the push was successful. If %FALSE
440 * is returned, the caller is responsible for freeing @item and its contents.
442 * Returns: %TRUE if the @item was successfully pushed on the @queue.
447 gst_data_queue_push_force (GstDataQueue * queue, GstDataQueueItem * item)
449 GstDataQueuePrivate *priv = queue->priv;
451 g_return_val_if_fail (GST_IS_DATA_QUEUE (queue), FALSE);
452 g_return_val_if_fail (item != NULL, FALSE);
454 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
456 STATUS (queue, "before pushing");
457 gst_data_queue_push_force_unlocked (queue, item);
458 STATUS (queue, "after pushing");
459 if (priv->waiting_add)
460 g_cond_signal (&priv->item_add);
462 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
469 GST_DEBUG ("queue:%p, we are flushing", queue);
470 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
476 * gst_data_queue_push: (skip)
477 * @queue: a #GstDataQueue.
478 * @item: a #GstDataQueueItem.
480 * Pushes a #GstDataQueueItem (or a structure that begins with the same fields)
481 * on the @queue. If the @queue is full, the call will block until space is
482 * available, OR the @queue is set to flushing state.
485 * Note that this function has slightly different semantics than gst_pad_push()
486 * and gst_pad_push_event(): this function only takes ownership of @item and
487 * the #GstMiniObject contained in @item if the push was successful. If %FALSE
488 * is returned, the caller is responsible for freeing @item and its contents.
490 * Returns: %TRUE if the @item was successfully pushed on the @queue.
495 gst_data_queue_push (GstDataQueue * queue, GstDataQueueItem * item)
497 GstDataQueuePrivate *priv = queue->priv;
499 g_return_val_if_fail (GST_IS_DATA_QUEUE (queue), FALSE);
500 g_return_val_if_fail (item != NULL, FALSE);
502 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
504 STATUS (queue, "before pushing");
506 /* We ALWAYS need to check for queue fillness */
507 if (gst_data_queue_locked_is_full (queue)) {
508 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
509 if (G_LIKELY (priv->fullcallback))
510 priv->fullcallback (queue, priv->checkdata);
512 g_signal_emit (queue, gst_data_queue_signals[SIGNAL_FULL], 0);
513 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
515 /* signal might have removed some items */
516 while (gst_data_queue_locked_is_full (queue)) {
517 priv->waiting_del = TRUE;
518 g_cond_wait (&priv->item_del, &priv->qlock);
519 priv->waiting_del = FALSE;
525 gst_data_queue_push_force_unlocked (queue, item);
527 STATUS (queue, "after pushing");
528 if (priv->waiting_add)
529 g_cond_signal (&priv->item_add);
531 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
538 GST_DEBUG ("queue:%p, we are flushing", queue);
539 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
545 _gst_data_queue_wait_non_empty (GstDataQueue * queue)
547 GstDataQueuePrivate *priv = queue->priv;
549 while (gst_data_queue_locked_is_empty (queue)) {
550 priv->waiting_add = TRUE;
551 g_cond_wait (&priv->item_add, &priv->qlock);
552 priv->waiting_add = FALSE;
560 * gst_data_queue_pop: (skip)
561 * @queue: a #GstDataQueue.
562 * @item: (out): pointer to store the returned #GstDataQueueItem.
564 * Retrieves the first @item available on the @queue. If the queue is currently
565 * empty, the call will block until at least one item is available, OR the
566 * @queue is set to the flushing state.
569 * Returns: %TRUE if an @item was successfully retrieved from the @queue.
574 gst_data_queue_pop (GstDataQueue * queue, GstDataQueueItem ** item)
576 GstDataQueuePrivate *priv = queue->priv;
578 g_return_val_if_fail (GST_IS_DATA_QUEUE (queue), FALSE);
579 g_return_val_if_fail (item != NULL, FALSE);
581 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
583 STATUS (queue, "before popping");
585 if (gst_data_queue_locked_is_empty (queue)) {
586 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
587 if (G_LIKELY (priv->emptycallback))
588 priv->emptycallback (queue, priv->checkdata);
590 g_signal_emit (queue, gst_data_queue_signals[SIGNAL_EMPTY], 0);
591 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
593 if (!_gst_data_queue_wait_non_empty (queue))
597 /* Get the item from the GQueue */
598 *item = gst_queue_array_pop_head (priv->queue);
600 /* update current level counter */
601 if ((*item)->visible)
602 priv->cur_level.visible--;
603 priv->cur_level.bytes -= (*item)->size;
604 priv->cur_level.time -= (*item)->duration;
606 STATUS (queue, "after popping");
607 if (priv->waiting_del)
608 g_cond_signal (&priv->item_del);
610 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
617 GST_DEBUG ("queue:%p, we are flushing", queue);
618 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
624 is_of_type (gconstpointer a, gconstpointer b)
626 return !G_TYPE_CHECK_INSTANCE_TYPE (a, GPOINTER_TO_SIZE (b));
630 * gst_data_queue_peek: (skip)
631 * @queue: a #GstDataQueue.
632 * @item: (out): pointer to store the returned #GstDataQueueItem.
634 * Retrieves the first @item available on the @queue without removing it.
635 * If the queue is currently empty, the call will block until at least
636 * one item is available, OR the @queue is set to the flushing state.
639 * Returns: %TRUE if an @item was successfully retrieved from the @queue.
644 gst_data_queue_peek (GstDataQueue * queue, GstDataQueueItem ** item)
646 GstDataQueuePrivate *priv = queue->priv;
648 g_return_val_if_fail (GST_IS_DATA_QUEUE (queue), FALSE);
649 g_return_val_if_fail (item != NULL, FALSE);
651 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
653 STATUS (queue, "before peeking");
655 if (gst_data_queue_locked_is_empty (queue)) {
656 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
657 if (G_LIKELY (priv->emptycallback))
658 priv->emptycallback (queue, priv->checkdata);
660 g_signal_emit (queue, gst_data_queue_signals[SIGNAL_EMPTY], 0);
661 GST_DATA_QUEUE_MUTEX_LOCK_CHECK (queue, flushing);
663 if (!_gst_data_queue_wait_non_empty (queue))
667 /* Get the item from the GQueue */
668 *item = gst_queue_array_peek_head (priv->queue);
670 STATUS (queue, "after peeking");
671 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
678 GST_DEBUG ("queue:%p, we are flushing", queue);
679 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
685 * gst_data_queue_drop_head: (skip)
686 * @queue: The #GstDataQueue to drop an item from.
687 * @type: The #GType of the item to drop.
689 * Pop and unref the head-most #GstMiniObject with the given #GType.
691 * Returns: %TRUE if an element was removed.
696 gst_data_queue_drop_head (GstDataQueue * queue, GType type)
698 gboolean res = FALSE;
699 GstDataQueueItem *leak = NULL;
701 GstDataQueuePrivate *priv = queue->priv;
703 g_return_val_if_fail (GST_IS_DATA_QUEUE (queue), FALSE);
705 GST_DEBUG ("queue:%p", queue);
707 GST_DATA_QUEUE_MUTEX_LOCK (queue);
708 idx = gst_queue_array_find (priv->queue, is_of_type, GSIZE_TO_POINTER (type));
713 leak = gst_queue_array_drop_element (priv->queue, idx);
716 priv->cur_level.visible--;
717 priv->cur_level.bytes -= leak->size;
718 priv->cur_level.time -= leak->duration;
720 leak->destroy (leak);
725 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
727 GST_DEBUG ("queue:%p , res:%d", queue, res);
733 * gst_data_queue_limits_changed: (skip)
734 * @queue: The #GstDataQueue
736 * Inform the queue that the limits for the fullness check have changed and that
737 * any blocking gst_data_queue_push() should be unblocked to recheck the limits.
742 gst_data_queue_limits_changed (GstDataQueue * queue)
744 GstDataQueuePrivate *priv = queue->priv;
746 g_return_if_fail (GST_IS_DATA_QUEUE (queue));
748 GST_DATA_QUEUE_MUTEX_LOCK (queue);
749 if (priv->waiting_del) {
750 GST_DEBUG ("signal del");
751 g_cond_signal (&priv->item_del);
753 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);
757 * gst_data_queue_get_level: (skip)
758 * @queue: The #GstDataQueue
759 * @level: (out): the location to store the result
761 * Get the current level of the queue.
766 gst_data_queue_get_level (GstDataQueue * queue, GstDataQueueSize * level)
768 GstDataQueuePrivate *priv = queue->priv;
770 memcpy (level, (&priv->cur_level), sizeof (GstDataQueueSize));
774 gst_data_queue_set_property (GObject * object,
775 guint prop_id, const GValue * value, GParamSpec * pspec)
779 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
785 gst_data_queue_get_property (GObject * object,
786 guint prop_id, GValue * value, GParamSpec * pspec)
788 GstDataQueue *queue = GST_DATA_QUEUE (object);
789 GstDataQueuePrivate *priv = queue->priv;
791 GST_DATA_QUEUE_MUTEX_LOCK (queue);
794 case PROP_CUR_LEVEL_BYTES:
795 g_value_set_uint (value, priv->cur_level.bytes);
797 case PROP_CUR_LEVEL_VISIBLE:
798 g_value_set_uint (value, priv->cur_level.visible);
800 case PROP_CUR_LEVEL_TIME:
801 g_value_set_uint64 (value, priv->cur_level.time);
804 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
808 GST_DATA_QUEUE_MUTEX_UNLOCK (queue);