task: api cleanup
authorWim Taymans <wim.taymans@collabora.co.uk>
Sat, 29 Oct 2011 07:26:49 +0000 (09:26 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 2 Nov 2011 07:59:44 +0000 (08:59 +0100)
  gst_task_create() -> gst_task_new()

docs/gst/gstreamer-sections.txt
docs/random/porting-to-0.11.txt
gst/gstpad.c
gst/gsttask.c
gst/gsttask.h
tests/check/gst/gstmessage.c
tests/check/gst/gsttask.c
win32/common/libgstreamer.def

index ea8d99c..b113605 100644 (file)
@@ -2560,7 +2560,7 @@ GST_TASK_SIGNAL
 GST_TASK_STATE
 GST_TASK_WAIT
 
-gst_task_create
+gst_task_new
 gst_task_set_lock
 gst_task_set_priority
 
index d10efaf..cb1eb05 100644 (file)
@@ -322,6 +322,10 @@ The 0.11 porting guide
 * GstTypeFind
     gst_type_find_peek() returns a const guint8 * now.
 
+* GstTask
+
+    gst_task_create() -> gst_task_new()
+
 * GstAdapter
     gst_adapter_peek() is removed, use gst_adapter_map() and gst_adapter_unmap()
     to get access to raw data from the adapter.
index 1e1d8b7..871f451 100644 (file)
@@ -4836,7 +4836,7 @@ gst_pad_start_task (GstPad * pad, GstTaskFunction func, gpointer data)
   GST_OBJECT_LOCK (pad);
   task = GST_PAD_TASK (pad);
   if (task == NULL) {
-    task = gst_task_create (func, data);
+    task = gst_task_new (func, data);
     gst_task_set_lock (task, GST_PAD_GET_STREAM_LOCK (pad));
     gst_task_set_thread_callbacks (task, &thr_callbacks, pad, NULL);
     GST_DEBUG_OBJECT (pad, "created task");
index aac6b7a..818a3fa 100644 (file)
@@ -45,7 +45,7 @@
  * and gst_task_stop() respectively or with the gst_task_set_state() function.
  *
  * A #GstTask will repeatedly call the #GstTaskFunction with the user data
- * that was provided when creating the task with gst_task_create(). While calling
+ * that was provided when creating the task with gst_task_new(). While calling
  * the function it will acquire the provided lock. The provided lock is released
  * when the task pauses or stops.
  *
@@ -377,7 +377,7 @@ gst_task_cleanup_all (void)
 }
 
 /**
- * gst_task_create:
+ * gst_task_new:
  * @func: The #GstTaskFunction to use
  * @data: (closure): User data to pass to @func
  *
@@ -400,7 +400,7 @@ gst_task_cleanup_all (void)
  * MT safe.
  */
 GstTask *
-gst_task_create (GstTaskFunction func, gpointer data)
+gst_task_new (GstTaskFunction func, gpointer data)
 {
   GstTask *task;
 
index 21784b7..1417525 100644 (file)
@@ -175,7 +175,7 @@ void            gst_task_cleanup_all    (void);
 
 GType           gst_task_get_type       (void);
 
-GstTask*        gst_task_create         (GstTaskFunction func, gpointer data);
+GstTask*        gst_task_new            (GstTaskFunction func, gpointer data);
 void            gst_task_set_lock       (GstTask *task, GStaticRecMutex *mutex);
 void            gst_task_set_priority   (GstTask *task, GThreadPriority priority);
 
index ea3f190..91f4e38 100644 (file)
@@ -208,7 +208,7 @@ GST_START_TEST (test_parsing)
 
     /* create a task with some dummy function, we're not actually going to run
      * the task here */
-    task = gst_task_create ((GstTaskFunction) gst_object_unref, NULL);
+    task = gst_task_new ((GstTaskFunction) gst_object_unref, NULL);
 
     ASSERT_OBJECT_REFCOUNT (task, "task", 1);
 
index e7b169a..12791d2 100644 (file)
@@ -46,7 +46,7 @@ GST_START_TEST (test_join)
   GstTask *t;
   gboolean ret;
 
-  t = gst_task_create (task_func2, &t);
+  t = gst_task_new (task_func2, &t);
   fail_if (t == NULL);
 
   gst_task_set_lock (t, &task_mutex);
@@ -89,7 +89,7 @@ GST_START_TEST (test_lock_start)
   GstTask *t;
   gboolean ret;
 
-  t = gst_task_create (task_func, NULL);
+  t = gst_task_new (task_func, NULL);
   fail_if (t == NULL);
 
   gst_task_set_lock (t, &task_mutex);
@@ -126,7 +126,7 @@ GST_START_TEST (test_lock)
   GstTask *t;
   gboolean ret;
 
-  t = gst_task_create (task_func, NULL);
+  t = gst_task_new (task_func, NULL);
   fail_if (t == NULL);
 
   gst_task_set_lock (t, &task_mutex);
@@ -153,7 +153,7 @@ GST_START_TEST (test_no_lock)
   GstTask *t;
   gboolean ret;
 
-  t = gst_task_create (task_func, NULL);
+  t = gst_task_new (task_func, NULL);
   fail_if (t == NULL);
 
   /* stop should be possible without lock */
@@ -179,7 +179,7 @@ GST_START_TEST (test_create)
 {
   GstTask *t;
 
-  t = gst_task_create (task_func, NULL);
+  t = gst_task_new (task_func, NULL);
   fail_if (t == NULL);
 
   gst_object_unref (t);
index a7a8369..56f9543 100644 (file)
@@ -1101,11 +1101,11 @@ EXPORTS
        gst_tag_setter_reset_tags
        gst_tag_setter_set_tag_merge_mode
        gst_task_cleanup_all
-       gst_task_create
        gst_task_get_pool
        gst_task_get_state
        gst_task_get_type
        gst_task_join
+       gst_task_new
        gst_task_pause
        gst_task_pool_cleanup
        gst_task_pool_get_type