fixups in the prop view/controller compilation fixes in the player add gst-editor...
authorAndy Wingo <wingo@pobox.com>
Mon, 27 May 2002 04:48:57 +0000 (04:48 +0000)
committerAndy Wingo <wingo@pobox.com>
Mon, 27 May 2002 04:48:57 +0000 (04:48 +0000)
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
gst/gstelement.c
gst/schedulers/gstbasicscheduler.c
tests/old/examples/plugins/Makefile.am

index 71070f8..99445f0 100644 (file)
@@ -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 
index 8a4b351..8d3c039 100644 (file)
@@ -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
index 94c2a8d..99b59ce 100644 (file)
@@ -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) &&
index 71070f8..99445f0 100644 (file)
@@ -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