X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgsttask.c;h=30f25fef8f7799f822af55e783144411f5822010;hb=5688773b91c3ea1094996a573f119230727a0978;hp=30959f8cdbf549e63f3525f7d1532c2223dc4e3c;hpb=daa98fc02a7bece11709b485645320c00bcd6599;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gsttask.c b/gst/gsttask.c index 30959f8..30f25fe 100644 --- a/gst/gsttask.c +++ b/gst/gsttask.c @@ -89,9 +89,6 @@ GST_DEBUG_CATEGORY_STATIC (task_debug); #define SET_TASK_STATE(t,s) (g_atomic_int_set (&GST_TASK_STATE(t), (s))) #define GET_TASK_STATE(t) ((GstTaskState) g_atomic_int_get (&GST_TASK_STATE(t))) -#define GST_TASK_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_TASK, GstTaskPrivate)) - struct _GstTaskPrivate { /* callbacks for managing the thread of this task */ @@ -153,7 +150,8 @@ static GMutex pool_lock; GST_DEBUG_CATEGORY_INIT (task_debug, "task", 0, "Processing tasks"); \ } -G_DEFINE_TYPE_WITH_CODE (GstTask, gst_task, GST_TYPE_OBJECT, _do_init); +G_DEFINE_TYPE_WITH_CODE (GstTask, gst_task, GST_TYPE_OBJECT, + G_ADD_PRIVATE (GstTask) _do_init); static void init_klass_pool (GstTaskClass * klass) @@ -177,8 +175,6 @@ gst_task_class_init (GstTaskClass * klass) gobject_class = (GObjectClass *) klass; - g_type_class_add_private (klass, sizeof (GstTaskPrivate)); - gobject_class->finalize = gst_task_finalize; init_klass_pool (klass); @@ -191,7 +187,7 @@ gst_task_init (GstTask * task) klass = GST_TASK_GET_CLASS (task); - task->priv = GST_TASK_GET_PRIVATE (task); + task->priv = gst_task_get_instance_private (task); task->running = FALSE; task->thread = NULL; task->lock = NULL;