task: api cleanup

gst_task_create() -> gst_task_new()
This commit is contained in:
Wim Taymans 2011-10-29 09:26:49 +02:00
parent e4725d9df2
commit d9dc9f9d52
8 changed files with 17 additions and 13 deletions

View 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

View 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.

View 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");

View 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;

View 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);

View 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);

View 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);

View 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