GstTask: add private data, fix parent_class

Use the parent class that the glib macro gave us
Actually add the private data to the task.
This commit is contained in:
Wim Taymans 2009-04-20 17:07:50 +02:00 committed by Wim Taymans
parent d68a20906a
commit a830dcd9c2

View file

@ -84,8 +84,6 @@ static void gst_task_finalize (GObject * object);
static void gst_task_func (GstTask * task, GstTaskClass * tclass); static void gst_task_func (GstTask * task, GstTaskClass * tclass);
static GstObjectClass *parent_class = NULL;
static GStaticMutex pool_lock = G_STATIC_MUTEX_INIT; static GStaticMutex pool_lock = G_STATIC_MUTEX_INIT;
#define _do_init \ #define _do_init \
@ -102,7 +100,7 @@ gst_task_class_init (GstTaskClass * klass)
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (GstTaskPrivate));
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_task_finalize); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_task_finalize);
@ -139,7 +137,7 @@ gst_task_finalize (GObject * object)
g_cond_free (task->cond); g_cond_free (task->cond);
task->cond = NULL; task->cond = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (gst_task_parent_class)->finalize (object);
} }
static void static void