* stopped and the thread is stopped.
*
* After creating a #GstTask, use gst_object_unref() to free its resources. This can
- * only be done it the task is not running anymore.
+ * only be done when the task is not running anymore.
*
* Task functions can send a #GstMessage to send out-of-band data to the
* application. The application can receive messages from the #GstBus in its
* mainloop.
*
- * For debugging perposes, the task will configure its object name as the thread
+ * For debugging purposes, the task will configure its object name as the thread
* name on Linux. Please note that the object name should be configured before the
* task is started; changing the object name after the task has been started, has
* no effect on the thread name.
*
- * Last reviewed on 2010-03-15 (0.10.29)
+ * Last reviewed on 2012-03-29 (0.11.3)
*/
#include "gst_private.h"
gpointer thr_user_data;
GDestroyNotify thr_notify;
- gboolean prio_set;
- GThreadPriority priority;
-
/* configured pool */
GstTaskPool *pool;
task->lock = NULL;
g_cond_init (&task->cond);
SET_TASK_STATE (task, GST_TASK_STOPPED);
- task->priv->prio_set = FALSE;
/* use the default klass pool for this task, users can
* override this later */
if (G_UNLIKELY (lock == NULL))
goto no_lock;
task->thread = tself;
- /* only update the priority when it was changed */
- if (priv->prio_set) {
- GST_INFO_OBJECT (task, "Thread priorities no longer have any effect");
- }
GST_OBJECT_UNLOCK (task);
/* fire the enter_thread callback when we need to */
GST_OBJECT_LOCK (task);
if (G_UNLIKELY (task->running))
goto is_running;
+ GST_INFO ("setting stream lock %p on task %p", mutex, task);
GST_TASK_GET_LOCK (task) = mutex;
GST_OBJECT_UNLOCK (task);
}
/**
- * gst_task_set_priority:
- * @task: a #GstTask
- * @priority: a new priority for @task
- *
- * Changes the priority of @task to @priority.
- *
- * Note: try not to depend on task priorities.
- *
- * MT safe.
- *
- * Since: 0.10.24
- */
-/* FIXME 0.11: remove gst_task_set_priority() */
-void
-gst_task_set_priority (GstTask * task, GThreadPriority priority)
-{
- GstTaskPrivate *priv;
- GThread *thread;
-
- g_return_if_fail (GST_IS_TASK (task));
-
- priv = task->priv;
-
- GST_OBJECT_LOCK (task);
- priv->prio_set = TRUE;
- priv->priority = priority;
- thread = task->thread;
- if (thread != NULL) {
- /* if this task already has a thread, we can configure the priority right
- * away, else we do that when we assign a thread to the task. */
- GST_INFO_OBJECT (task, "Thread priorities no longer have any effect");
- }
- GST_OBJECT_UNLOCK (task);
-}
-
-/**
* gst_task_get_pool:
* @task: a #GstTask
*