From c887de833289049237c69faf997b32c5a0caa7df Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 27 May 2002 04:48:57 +0000 Subject: [PATCH] fixups in the prop view/controller compilation fixes in the player add gst-editor to gst-all fixes to adder to comply... Original commit message from CVS: * fixups in the prop view/controller * compilation fixes in the player * add gst-editor to gst-all * fixes to adder to comply with new osssink sync issues * alsa fixes, although still 100% cpu is used, yum * reenable locking of threaded elements, seems to work fine here * fix a makefile in examples/plugins --- examples/plugins/Makefile.am | 3 +-- gst/gstelement.c | 4 ++-- gst/schedulers/gstbasicscheduler.c | 15 +++++++-------- tests/old/examples/plugins/Makefile.am | 3 +-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/plugins/Makefile.am b/examples/plugins/Makefile.am index 71070f8..99445f0 100644 --- a/examples/plugins/Makefile.am +++ b/examples/plugins/Makefile.am @@ -4,7 +4,6 @@ plugin_LTLIBRARIES = libexample.la libexample_la_SOURCES = example.c libexample_la_CFLAGS = $(GST_CFLAGS) -libexample_la_LIBADD = -libexample_la_LDFLAGS = $(GST_LDFLAGS) +libexample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) noinst_HEADERS = example.h diff --git a/gst/gstelement.c b/gst/gstelement.c index 8a4b351..8d3c039 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -266,7 +266,7 @@ static void gst_element_threadsafe_properties_pre_run (GstElement *element) { GST_DEBUG (GST_CAT_THREAD, "locking element %s", GST_OBJECT_NAME (element)); - //g_mutex_lock (element->property_mutex); + g_mutex_lock (element->property_mutex); gst_element_set_pending_properties (element); } @@ -274,7 +274,7 @@ static void gst_element_threadsafe_properties_post_run (GstElement *element) { GST_DEBUG (GST_CAT_THREAD, "unlocking element %s", GST_OBJECT_NAME (element)); - //g_mutex_unlock (element->property_mutex); + g_mutex_unlock (element->property_mutex); } void diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 94c2a8d..99b59ce 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -130,11 +130,9 @@ static GstSchedulerClass *parent_class = NULL; if (from->post_run_func) \ from->post_run_func (from); \ SCHED (element)->current = element; \ + if (element->pre_run_func) \ + element->pre_run_func (element); \ do_cothread_switch (GST_ELEMENT_THREADSTATE (element)); \ - /* we assume other cothread switches will set ->current \ - * properly, no need to do it from this side */ \ - if (from->pre_run_func) \ - from->pre_run_func (from); \ }G_STMT_END static GType @@ -304,6 +302,10 @@ gst_basic_scheduler_chain_wrapper (int argc, char *argv[]) GST_FLAG_UNSET (element, GST_ELEMENT_COTHREAD_STOPPING); gst_object_unref (GST_OBJECT (element)); + /* this will return to cothread 0, so we need to unlock the current element */ + if (element->post_run_func) + element->post_run_func (element); + GST_DEBUG_LEAVE ("(%d,'%s')", argc, name); return 0; } @@ -1054,7 +1056,7 @@ static gboolean gst_basic_scheduler_interrupt (GstScheduler *sched, GstElement *element) { GstElement *current = SCHED (element)->current; - + GST_FLAG_SET (element, GST_ELEMENT_COTHREAD_STOPPING); if (current->post_run_func) @@ -1265,9 +1267,6 @@ gst_basic_scheduler_iterate (GstScheduler * sched) bsched->current = entry; do_cothread_switch (GST_ELEMENT_THREADSTATE (entry)); - if (bsched->current && bsched->current->post_run_func) - bsched->current->post_run_func (bsched->current); - state = GST_SCHEDULER_STATE (sched); /* if something changed, return - go on else */ if (GST_FLAG_IS_SET(bsched, GST_BASIC_SCHEDULER_CHANGE) && diff --git a/tests/old/examples/plugins/Makefile.am b/tests/old/examples/plugins/Makefile.am index 71070f8..99445f0 100644 --- a/tests/old/examples/plugins/Makefile.am +++ b/tests/old/examples/plugins/Makefile.am @@ -4,7 +4,6 @@ plugin_LTLIBRARIES = libexample.la libexample_la_SOURCES = example.c libexample_la_CFLAGS = $(GST_CFLAGS) -libexample_la_LIBADD = -libexample_la_LDFLAGS = $(GST_LDFLAGS) +libexample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) noinst_HEADERS = example.h -- 2.7.4