From 1abf5ae7a6ab3d567fb94d102f476c8a150406ba Mon Sep 17 00:00:00 2001 From: Erik Walthinsen Date: Mon, 12 Mar 2001 00:37:33 +0000 Subject: [PATCH] some cleanup and compile fixes Original commit message from CVS: some cleanup and compile fixes --- gst/gstthread.c | 8 ++------ gst/gstthread.h | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gst/gstthread.c b/gst/gstthread.c index 733d66e43b..0ef5dd9346 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -136,10 +136,7 @@ gst_thread_init (GstThread *thread) GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER); // default is to create a thread - GST_FLAG_UNSET (thread, GST_THREAD_STATE_STARTED); - GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING); - GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING); - GST_FLAG_UNSET (thread, GST_THREAD_STATE_ELEMENT_CHANGED); + GST_FLAG_SET (thread, GST_THREAD_CREATE); thread->lock = g_mutex_new(); thread->cond = g_cond_new(); @@ -299,7 +296,7 @@ gst_thread_change_state (GstElement *element) //GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING); gst_thread_signal_thread (thread,GST_THREAD_STATE_REAPING); - pthread_join(thread->thread_id); + pthread_join(thread->thread_id,NULL); GST_FLAG_UNSET(thread,GST_THREAD_STATE_REAPING); GST_FLAG_UNSET(thread,GST_THREAD_STATE_STARTED); @@ -369,7 +366,6 @@ gst_thread_main_loop (void *arg) gst_thread_signal_thread (thread,GST_THREAD_STATE_ELEMENT_CHANGED); } } - GST_INFO (GST_CAT_THREAD, "gstthread: thread \"%s\" is stopped", GST_ELEMENT_NAME (thread)); diff --git a/gst/gstthread.h b/gst/gstthread.h index f29566f619..0d12703784 100644 --- a/gst/gstthread.h +++ b/gst/gstthread.h @@ -37,7 +37,9 @@ extern GstElementDetails gst_thread_details; typedef enum { - GST_THREAD_STATE_STARTED = GST_BIN_FLAG_LAST, + GST_THREAD_CREATE = GST_BIN_FLAG_LAST, + + GST_THREAD_STATE_STARTED, GST_THREAD_STATE_SPINNING, GST_THREAD_STATE_REAPING, GST_THREAD_STATE_ELEMENT_CHANGED,