*/
#include <glib.h>
+#include <gst/gstthread.h>
/* the name of this cothreads */
#define COTHREADS_NAME "gthread"
cothread * main;
cothread * current;
GMutex * mutex;
+ GstThread * gst_thread; /* the GstThread we're running from */
};
struct _cothread {
ret->mutex = g_mutex_new ();
ret->cothreads = NULL;
ret->current = ret->main;
+ ret->gst_thread = gst_thread_get_current();
g_mutex_lock (ret->mutex);
return ret;
cothread *self = (cothread *) data;
g_mutex_lock (self->context->mutex);
+ g_private_set (gst_thread_current, self->context->gst_thread);
g_cond_signal (self->creator->cond);
g_cond_wait (self->cond, self->context->mutex);
if (self->die)
#define do_cothread_get_current(context) ((context)->current)
#define do_cothread_get_main(context) ((context)->main)
-
-
-
-