diff -r 567bb019e3e3 -r 7e817e7e631c gstreamer_core/gst/gsttask.h --- a/gstreamer_core/gst/gsttask.h Tue Aug 31 15:30:33 2010 +0300 +++ b/gstreamer_core/gst/gsttask.h Wed Sep 01 12:16:41 2010 +0100 @@ -24,7 +24,6 @@ #define __GST_TASK_H__ #include -#include G_BEGIN_DECLS @@ -32,8 +31,8 @@ * GstTaskFunction: * @data: user data passed to the function * - * A function that will repeatedly be called in the thread created by - * a #GstTask. + * A function that will repeadedly be called in the thread created by + * a GstTask. */ typedef void (*GstTaskFunction) (void *data); @@ -48,12 +47,11 @@ typedef struct _GstTask GstTask; typedef struct _GstTaskClass GstTaskClass; -typedef struct _GstTaskPrivate GstTaskPrivate; /** * GstTaskState: * @GST_TASK_STARTED: the task is started and running - * @GST_TASK_STOPPED: the task is stopped + * @GST_TASK_STOPPED: the task is stopped * @GST_TASK_PAUSED: the task is paused * * The different states a task can be in @@ -110,32 +108,13 @@ #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock) /** - * GstTaskThreadCallbacks: - * @enter_thread: a thread is entered, this callback is called when the new - * thread enters its function. - * @leave_thread: a thread is exiting, this is called when the thread is about - * to leave its function - * - * Custom GstTask thread callback functions that can be installed. - * - * Since: 0.10.24 - */ -typedef struct { - /* manage the lifetime of the thread */ - void (*enter_thread) (GstTask *task, GThread *thread, gpointer user_data); - void (*leave_thread) (GstTask *task, GThread *thread, gpointer user_data); - /*< private >*/ - gpointer _gst_reserved[GST_PADDING]; -} GstTaskThreadCallbacks; - -/** * GstTask: * @state: the state of the task * @cond: used to pause/resume the task - * @lock: The lock taken when iterating the task function + * @lock: The lock taken when iterating the taskfunction * @func: the function executed by this task * @data: data passed to the task function - * @running: a flag indicating that the task is running + * @running: a flag indicating that the task is running. * * The #GstTask object. */ @@ -159,17 +138,17 @@ /* thread this task is currently running in */ GThread *thread; } ABI; - gpointer _gst_reserved[GST_PADDING - 1]; + /* adding + 0 to mark ABI change to be undone later */ + gpointer _gst_reserved[GST_PADDING + 0]; } abidata; - GstTaskPrivate *priv; }; struct _GstTaskClass { GstObjectClass parent_class; /*< private >*/ - GstTaskPool *pool; + GThreadPool *pool; /*< private >*/ gpointer _gst_reserved[GST_PADDING]; @@ -201,42 +180,12 @@ IMPORT_C #endif -void gst_task_set_priority (GstTask *task, GThreadPriority priority); -#ifdef __SYMBIAN32__ -IMPORT_C -#endif - - -GstTaskPool * gst_task_get_pool (GstTask *task); -#ifdef __SYMBIAN32__ -IMPORT_C -#endif - -void gst_task_set_pool (GstTask *task, GstTaskPool *pool); -#ifdef __SYMBIAN32__ -IMPORT_C -#endif - - -void gst_task_set_thread_callbacks (GstTask *task, - GstTaskThreadCallbacks *callbacks, - gpointer user_data, - GDestroyNotify notify); -#ifdef __SYMBIAN32__ -IMPORT_C -#endif - GstTaskState gst_task_get_state (GstTask *task); #ifdef __SYMBIAN32__ IMPORT_C #endif -gboolean gst_task_set_state (GstTask *task, GstTaskState state); -#ifdef __SYMBIAN32__ -IMPORT_C -#endif - gboolean gst_task_start (GstTask *task); #ifdef __SYMBIAN32__ @@ -259,3 +208,4 @@ G_END_DECLS #endif /* __GST_TASK_H__ */ +