gst/rtpmanager/async_jitter_queue.c (tail_buffer_duration, async_jitter_queue_ref, async_jitter_queue_ref_unlocked, a...

Original commit message from CVS:
* gst/rtpmanager/async_jitter_queue.c (tail_buffer_duration,
async_jitter_queue_ref, async_jitter_queue_ref_unlocked,
async_jitter_queue_set_low_threshold,
async_jitter_queue_length_ts_units_unlocked,
async_jitter_queue_unref_and_unlock, async_jitter_queue_unref,
async_jitter_queue_lock, async_jitter_queue_push,
async_jitter_queue_push_unlocked, async_jitter_queue_push_sorted,
async_jitter_queue_pop_intern_unlocked, async_jitter_queue_pop,
async_jitter_queue_pop_unlocked, async_jitter_queue_length_unlocked,
async_jitter_queue_set_flushing_unlocked,
async_jitter_queue_unset_flushing_unlocked):
Format arg fix (spotted by Ali Sabil <ali.sabil@gmail.com>)
This commit is contained in:
Stefan Kost 2007-05-10 12:38:49 +00:00 committed by Tim-Philipp Müller
parent 88f2441722
commit 091c2cfbc0

View file

@ -1,9 +1,9 @@
/* /*
* Async Jitter Queue based on g_async_queue * Async Jitter Queue based on g_async_queue
* This code is GST RTP smart and deals with timestamps * This code is GST RTP smart and deals with timestamps
* *
* Farsight Voice+Video library * Farsight Voice+Video library
* Copyright 2007 Collabora Ltd, * Copyright 2007 Collabora Ltd,
* Copyright 2007 Nokia Corporation * Copyright 2007 Nokia Corporation
* @author: Philippe Khalaf <philippe.khalaf@collabora.co.uk>. * @author: Philippe Khalaf <philippe.khalaf@collabora.co.uk>.
* *
@ -69,9 +69,9 @@ struct _AsyncJitterQueue
/** /**
* async_jitter_queue_new: * async_jitter_queue_new:
* *
* Creates a new asynchronous queue with the initial reference count of 1. * Creates a new asynchronous queue with the initial reference count of 1.
* *
* Return value: the new #AsyncJitterQueue. * Return value: the new #AsyncJitterQueue.
**/ **/
AsyncJitterQueue * AsyncJitterQueue *
@ -134,7 +134,7 @@ async_jitter_queue_ref (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_ref_unlocked: * async_jitter_queue_ref_unlocked:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Increases the reference count of the asynchronous @queue by 1. * Increases the reference count of the asynchronous @queue by 1.
**/ **/
void void
@ -150,7 +150,7 @@ async_jitter_queue_ref_unlocked (AsyncJitterQueue * queue)
* async_jitter_queue_set_low_threshold: * async_jitter_queue_set_low_threshold:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @threshold: the lower threshold (fraction of max size) * @threshold: the lower threshold (fraction of max size)
* *
* Sets the low threshold on the queue. This threshold indicates the minimum * Sets the low threshold on the queue. This threshold indicates the minimum
* number of items allowed in the queue before we refill it up to the set * number of items allowed in the queue before we refill it up to the set
* maximum threshold. * maximum threshold.
@ -169,7 +169,7 @@ async_jitter_queue_set_low_threshold (AsyncJitterQueue * queue,
* async_jitter_queue_set_max_threshold: * async_jitter_queue_set_max_threshold:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @threshold: the higher threshold (fraction of max size) * @threshold: the higher threshold (fraction of max size)
* *
* Sets the high threshold on the queue. This threshold indicates the amount of * Sets the high threshold on the queue. This threshold indicates the amount of
* items to fill in the queue before releasing any blocking pop calls. This * items to fill in the queue before releasing any blocking pop calls. This
* blocking mecanism is only triggered when we reach the low threshold and must * blocking mecanism is only triggered when we reach the low threshold and must
@ -255,7 +255,7 @@ async_jitter_queue_length_ts_units_unlocked (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_unref_and_unlock: * async_jitter_queue_unref_and_unlock:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Decreases the reference count of the asynchronous @queue by 1 and * Decreases the reference count of the asynchronous @queue by 1 and
* releases the lock. This function must be called while holding the * releases the lock. This function must be called while holding the
* @queue's lock. If the reference count went to 0, the @queue will be * @queue's lock. If the reference count went to 0, the @queue will be
@ -274,7 +274,7 @@ async_jitter_queue_unref_and_unlock (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_unref: * async_jitter_queue_unref:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Decreases the reference count of the asynchronous @queue by 1. If * Decreases the reference count of the asynchronous @queue by 1. If
* the reference count went to 0, the @queue will be destroyed and the * the reference count went to 0, the @queue will be destroyed and the
* memory allocated will be freed. So you are not allowed to use the * memory allocated will be freed. So you are not allowed to use the
@ -300,7 +300,7 @@ async_jitter_queue_unref (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_lock: * async_jitter_queue_lock:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Acquires the @queue's lock. After that you can only call the * Acquires the @queue's lock. After that you can only call the
* <function>async_jitter_queue_*_unlocked()</function> function variants on that * <function>async_jitter_queue_*_unlocked()</function> function variants on that
* @queue. Otherwise it will deadlock. * @queue. Otherwise it will deadlock.
@ -317,7 +317,7 @@ async_jitter_queue_lock (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_unlock: * async_jitter_queue_unlock:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Releases the queue's lock. * Releases the queue's lock.
**/ **/
void void
@ -352,7 +352,7 @@ async_jitter_queue_push (AsyncJitterQueue * queue, gpointer data)
* async_jitter_queue_push_unlocked: * async_jitter_queue_push_unlocked:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @data: @data to push into the @queue. * @data: @data to push into the @queue.
* *
* Pushes the @data into the @queue. @data must not be %NULL. This * Pushes the @data into the @queue. @data must not be %NULL. This
* function must be called while holding the @queue's lock. * function must be called while holding the @queue's lock.
**/ **/
@ -378,17 +378,17 @@ async_jitter_queue_push_unlocked (AsyncJitterQueue * queue, gpointer data)
* should be higher in the @queue or a positive value if the first * should be higher in the @queue or a positive value if the first
* element should be lower in the @queue than the second element. * element should be lower in the @queue than the second element.
* @user_data: user data passed to @func. * @user_data: user data passed to @func.
* *
* Inserts @data into @queue using @func to determine the new * Inserts @data into @queue using @func to determine the new
* position. * position.
* *
* This function requires that the @queue is sorted before pushing on * This function requires that the @queue is sorted before pushing on
* new elements. * new elements.
* *
* This function will lock @queue before it sorts the queue and unlock * This function will lock @queue before it sorts the queue and unlock
* it when it is finished. * it when it is finished.
* *
* For an example of @func see async_jitter_queue_sort(). * For an example of @func see async_jitter_queue_sort().
* *
* Since: 2.10 * Since: 2.10
**/ **/
@ -416,19 +416,19 @@ async_jitter_queue_push_sorted (AsyncJitterQueue * queue,
* should be higher in the @queue or a positive value if the first * should be higher in the @queue or a positive value if the first
* element should be lower in the @queue than the second element. * element should be lower in the @queue than the second element.
* @user_data: user data passed to @func. * @user_data: user data passed to @func.
* *
* Inserts @data into @queue using @func to determine the new * Inserts @data into @queue using @func to determine the new
* position. * position.
* *
* This function requires that the @queue is sorted before pushing on * This function requires that the @queue is sorted before pushing on
* new elements. * new elements.
* *
* If @GCompareDataFunc returns 0, this function does not insert @data and * If @GCompareDataFunc returns 0, this function does not insert @data and
* return FALSE. * return FALSE.
* *
* This function is called while holding the @queue's lock. * This function is called while holding the @queue's lock.
* *
* For an example of @func see async_jitter_queue_sort(). * For an example of @func see async_jitter_queue_sort().
* *
* Since: 2.10 * Since: 2.10
**/ **/
@ -491,7 +491,7 @@ async_jitter_queue_pop_intern_unlocked (AsyncJitterQueue * queue)
tsunits = async_jitter_queue_length_ts_units_unlocked (queue); tsunits = async_jitter_queue_length_ts_units_unlocked (queue);
GST_DEBUG ("tsunits %u, pops: %u, limit %d", tsunits, queue->pops_remaining, GST_DEBUG ("tsunits %u, pops: %u, limit %d", tsunits, queue->pops_remaining,
queue->low_threshold * queue->max_queue_length); (int) (queue->low_threshold * queue->max_queue_length));
if (tsunits <= queue->low_threshold * queue->max_queue_length if (tsunits <= queue->low_threshold * queue->max_queue_length
&& queue->pops_remaining == 0) { && queue->pops_remaining == 0) {
@ -539,7 +539,7 @@ async_jitter_queue_pop_intern_unlocked (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_pop: * async_jitter_queue_pop:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Pops data from the @queue. This function blocks until data become * Pops data from the @queue. This function blocks until data become
* available. If pop is disabled, tis function return NULL. * available. If pop is disabled, tis function return NULL.
* *
@ -563,7 +563,7 @@ async_jitter_queue_pop (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_pop_unlocked: * async_jitter_queue_pop_unlocked:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Pops data from the @queue. This function blocks until data become * Pops data from the @queue. This function blocks until data become
* available. This function must be called while holding the @queue's * available. This function must be called while holding the @queue's
* lock. * lock.
@ -582,7 +582,7 @@ async_jitter_queue_pop_unlocked (AsyncJitterQueue * queue)
/** /**
* async_jitter_queue_length: * async_jitter_queue_length:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* *
* Returns the length of the queue * Returns the length of the queue
* Return value: the length of the @queue. * Return value: the length of the @queue.
**/ **/
@ -623,7 +623,7 @@ async_jitter_queue_length_unlocked (AsyncJitterQueue * queue)
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @free_func: a function to call to free the elements * @free_func: a function to call to free the elements
* @user_data: user data passed to @free_func * @user_data: user data passed to @free_func
* *
* This function is used to set/unset flushing. If flushing is set any * This function is used to set/unset flushing. If flushing is set any
* waiting/blocked pops will be unblocked. Any subsequent calls to pop will * waiting/blocked pops will be unblocked. Any subsequent calls to pop will
* return NULL. Flushing is set by default. * return NULL. Flushing is set by default.
@ -648,7 +648,7 @@ async_jitter_queue_set_flushing_unlocked (AsyncJitterQueue * queue,
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @free_func: a function to call to free the elements * @free_func: a function to call to free the elements
* @user_data: user data passed to @free_func * @user_data: user data passed to @free_func
* *
* This function is used to set/unset flushing. If flushing is set any * This function is used to set/unset flushing. If flushing is set any
* waiting/blocked pops will be unblocked. Any subsequent calls to pop will * waiting/blocked pops will be unblocked. Any subsequent calls to pop will
* return NULL. Flushing is set by default. * return NULL. Flushing is set by default.
@ -669,7 +669,7 @@ async_jitter_queue_unset_flushing_unlocked (AsyncJitterQueue * queue)
* async_jitter_queue_set_blocking_unlocked: * async_jitter_queue_set_blocking_unlocked:
* @queue: a #AsyncJitterQueue. * @queue: a #AsyncJitterQueue.
* @enabled: a boolean to enable/disable blocking * @enabled: a boolean to enable/disable blocking
* *
* This function is used to enable/disable blocking. If blocking is enabled any * This function is used to enable/disable blocking. If blocking is enabled any
* pops will be blocked until the queue is unblocked. The queue is blocked by * pops will be blocked until the queue is unblocked. The queue is blocked by
* default. * default.