task: remove gst_task_set_priority()
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 8 Apr 2012 20:17:14 +0000 (21:17 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 8 Apr 2012 20:17:46 +0000 (21:17 +0100)
It doesn't actually do anything.

docs/gst/gstreamer-sections.txt
gst/gsttask.c
gst/gsttask.h
tests/examples/streams/stream-status.c

index 1b943e8..e4f78cf 100644 (file)
@@ -2650,7 +2650,6 @@ GST_TASK_WAIT
 
 gst_task_new
 gst_task_set_lock
-gst_task_set_priority
 
 gst_task_set_pool
 gst_task_get_pool
index 2730904..96c687b 100644 (file)
@@ -96,9 +96,6 @@ struct _GstTaskPrivate
   gpointer thr_user_data;
   GDestroyNotify thr_notify;
 
-  gboolean prio_set;
-  GThreadPriority priority;
-
   /* configured pool */
   GstTaskPool *pool;
 
@@ -190,7 +187,6 @@ gst_task_init (GstTask * task)
   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 */
@@ -275,10 +271,6 @@ gst_task_func (GstTask * task)
   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 */
@@ -441,42 +433,6 @@ is_running:
 }
 
 /**
- * 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
  *
index 492052b..5c1600e 100644 (file)
@@ -177,7 +177,6 @@ GType           gst_task_get_type       (void);
 
 GstTask*        gst_task_new            (GstTaskFunction func, gpointer data);
 void            gst_task_set_lock       (GstTask *task, GRecMutex *mutex);
-void            gst_task_set_priority   (GstTask *task, GThreadPriority priority);
 
 GstTaskPool *   gst_task_get_pool       (GstTask *task);
 void            gst_task_set_pool       (GstTask *task, GstTaskPool *pool);
index f667468..0494ebd 100644 (file)
@@ -83,8 +83,8 @@ sync_bus_handler (GstBus * bus, GstMessage * message, GstElement * bin)
           break;
         case GST_STREAM_STATUS_TYPE_ENTER:
           if (task) {
-            g_message ("raising task priority for %p", task);
-            gst_task_set_priority (task, G_THREAD_PRIORITY_HIGH);
+            /* g_message ("raising task priority for %p", task); */
+            /* FIXME: do something here */
           }
           break;
         case GST_STREAM_STATUS_TYPE_LEAVE: