## GstTask GstTask |

## Functions

void | (*GstTaskFunction) ()
#define | GST_TASK_BROADCAST()
#define | GST_TASK_GET_COND()
#define | GST_TASK_GET_LOCK()
#define | GST_TASK_SIGNAL()
#define | GST_TASK_STATE()
#define | GST_TASK_WAIT()
GstTask * | gst_task_new ()
void | gst_task_set_lock ()
void | gst_task_set_pool ()
GstTaskPool * | gst_task_get_pool ()
void | (*GstTaskThreadFunc) ()
void | gst_task_set_enter_callback ()
void | gst_task_set_leave_callback ()
GstTaskState | gst_task_get_state ()
gboolean | gst_task_set_state ()
gboolean | gst_task_pause ()
gboolean | gst_task_start ()
gboolean | gst_task_stop ()
gboolean | gst_task_join ()
void | gst_task_cleanup_all ()

## Types and Values

struct | GstTask
enum | GstTaskState

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstTask

## Includes

    #include <gst/gst.h>

## Description

## Functions

### GstTaskFunction ()

    void
    (*GstTaskFunction) (gpointer user_data);

### GST_TASK_BROADCAST()

    #define GST_TASK_BROADCAST(task)        g_cond_broadcast(GST_TASK_GET_COND (task))

### GST_TASK_GET_COND()

    #define GST_TASK_GET_COND(task)         (&GST_TASK_CAST(task)->cond)

### GST_TASK_GET_LOCK()

    #define GST_TASK_GET_LOCK(task)         (GST_TASK_CAST(task)->lock)

### GST_TASK_SIGNAL()

    #define GST_TASK_SIGNAL(task)           g_cond_signal(GST_TASK_GET_COND (task))

### GST_TASK_STATE()

    #define GST_TASK_STATE(task)            (GST_TASK_CAST(task)->state)

### GST_TASK_WAIT()

    #define GST_TASK_WAIT(task)             g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))

### gst_task_new ()

    GstTask *
    gst_task_new (GstTaskFunction func,
                  gpointer user_data,
                  GDestroyNotify notify);

### gst_task_set_lock ()

    void
    gst_task_set_lock (GstTask *task,
                       GRecMutex *mutex);

### gst_task_set_pool ()

    void
    gst_task_set_pool (GstTask *task,
                       GstTaskPool *pool);

### gst_task_get_pool ()

    GstTaskPool *
    gst_task_get_pool (GstTask *task);

### GstTaskThreadFunc ()

    void
    (*GstTaskThreadFunc) (GstTask *task,
                          GThread *thread,
                          gpointer user_data);

### gst_task_set_enter_callback ()

    void
    gst_task_set_enter_callback (GstTask *task,
                                 GstTaskThreadFunc enter_func,
                                 gpointer user_data,
                                 GDestroyNotify notify);

### gst_task_set_leave_callback ()

    void
    gst_task_set_leave_callback (GstTask *task,
                                 GstTaskThreadFunc leave_func,
                                 gpointer user_data,
                                 GDestroyNotify notify);

### gst_task_get_state ()

    GstTaskState
    gst_task_get_state (GstTask *task);

### gst_task_set_state ()

    gboolean
    gst_task_set_state (GstTask *task,
                        GstTaskState state);

### gst_task_pause ()

    gboolean
    gst_task_pause (GstTask *task);

### gst_task_start ()

    gboolean
    gst_task_start (GstTask *task);

### gst_task_stop ()

    gboolean
    gst_task_stop (GstTask *task);

### gst_task_join ()

    gboolean
    gst_task_join (GstTask *task);

### gst_task_cleanup_all ()

    void
    gst_task_cleanup_all (void);

## Types and Values

### struct GstTask

    struct GstTask {
      GstTaskState     state;
      GCond            cond;

      GRecMutex       *lock;

      GstTaskFunction  func;
      gpointer         user_data;
      GDestroyNotify   notify;

      gboolean         running;
    };

### enum GstTaskState

#### Members

GST_TASK_STARTED |  |
GST_TASK_STOPPED |  |
GST_TASK_PAUSED |  |