GstThread

GstThread — A bin that will become a thread

Synopsis


#include <gst/gst.h>


enum        GstThreadState;
struct      GstThread;
GstElement* gst_thread_new                  (const gchar *name);

Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBin
                     +----GstThread

Properties


  "priority"             GstThreadPriority    : Read / Write

Signal Prototypes


"shutdown"  void        user_function      (GstThread *gstthread,
                                            gpointer user_data);

Description

A bin that will become a thread if possible when the pipeline is started up. It can contain any set of GstObjects.

A Thread can act as a toplevel bin as it has its own scheduler.

Details

enum GstThreadState

typedef enum {
  GST_THREAD_STATE_SPINNING	= GST_BIN_FLAG_LAST,
  GST_THREAD_STATE_REAPING,
  /* when iterating with mutex locked (special cases)
     may only be set by thread itself */
  GST_THREAD_MUTEX_LOCKED,

  /* padding */
  GST_THREAD_FLAG_LAST 		= GST_BIN_FLAG_LAST + 4
} GstThreadState;

Thread flags:

GST_THREAD_STATE_SPINNINGThe thread is runnning
GST_THREAD_STATE_REAPINGThe thread is ending.
GST_THREAD_MUTEX_LOCKED
GST_THREAD_FLAG_LASTsubclass use this to start their enumeration

struct GstThread

struct GstThread;

The GstThread object


gst_thread_new ()

GstElement* gst_thread_new                  (const gchar *name);

Create a new thread with the given name.

name : the name of the thread
Returns : The new thread

Properties

"priority" (GstThreadPriority : Read / Write)

The thread priority

Signals

The "shutdown" signal

void        user_function                  (GstThread *gstthread,
                                            gpointer user_data);

gstthread :the object which received the signal.
user_data :user data set when the signal handler was connected.

See Also

GstBin, GstPipeline