gst/base/gstbasesink.c: Small debug line.
authorWim Taymans <wim.taymans@gmail.com>
Wed, 29 Jun 2005 11:10:44 +0000 (11:10 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 29 Jun 2005 11:10:44 +0000 (11:10 +0000)
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Small debug line.

* gst/gstclock.h:
map SIGNAL and BROADCAST to the right function.

* gst/gstobject.h:
Remove redundant braces.

* gst/gstpad.c: (gst_pad_set_caps):
Don't call setcaps function when reseting caps to NULL.

* gst/gstsystemclock.c: (gst_system_clock_dispose),
(gst_system_clock_async_thread), (gst_system_clock_id_wait_async),
(gst_system_clock_id_unschedule):
Use BROADCAST as this is what we do.

ChangeLog
common
gst/base/gstbasesink.c
gst/gstclock.h
gst/gstobject.h
gst/gstpad.c
gst/gstsystemclock.c
libs/gst/base/gstbasesink.c

index 848573e..bfdcf05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2005-06-29  Wim Taymans  <wim@fluendo.com>
 
+       * gst/base/gstbasesink.c: (gst_base_sink_handle_object),
+       (gst_base_sink_change_state):
+       Small debug line.
+
+       * gst/gstclock.h:
+       map SIGNAL and BROADCAST to the right function.
+
+       * gst/gstobject.h:
+       Remove redundant braces.
+
+       * gst/gstpad.c: (gst_pad_set_caps):
+       Don't call setcaps function when reseting caps to NULL.
+
+       * gst/gstsystemclock.c: (gst_system_clock_dispose),
+       (gst_system_clock_async_thread), (gst_system_clock_id_wait_async),
+       (gst_system_clock_id_unschedule):
+       Use BROADCAST as this is what we do.
+
+2005-06-29  Wim Taymans  <wim@fluendo.com>
+
        * gst/base/gstbasesink.c: (gst_base_sink_handle_object):
        We are actually prerolling before commiting the state
        change. 
diff --git a/common b/common
index d6e46b2..2826306 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit d6e46b214fac0ecb46010ff522af2f7653e1c18e
+Subproject commit 2826306411790bf8aa9298922aa59b126897431f
index d7f53dc..be4c2bb 100644 (file)
@@ -966,6 +966,8 @@ gst_base_sink_change_state (GstElement * element)
 
       /* if we don't have a preroll buffer and we have not received EOS,
        * we need to wait for a preroll */
+      GST_DEBUG ("have_preroll: %d, EOS: %d", basesink->have_preroll,
+          basesink->eos);
       if (!basesink->have_preroll && !basesink->eos) {
         basesink->need_preroll = TRUE;
         ret = GST_STATE_ASYNC;
index c594fbb..5438938 100644 (file)
@@ -130,7 +130,7 @@ typedef enum
 #define GST_CLOCK_COND(clock)            (GST_CLOCK_CAST(clock)->entries_changed)
 #define GST_CLOCK_WAIT(clock)            g_cond_wait(GST_CLOCK_COND(clock),GST_GET_LOCK(clock))
 #define GST_CLOCK_TIMED_WAIT(clock,tv)   g_cond_timed_wait(GST_CLOCK_COND(clock),GST_GET_LOCK(clock),tv)
-#define GST_CLOCK_SIGNAL(clock)          g_cond_broadcast(GST_CLOCK_COND(clock))
+#define GST_CLOCK_BROADCAST(clock)       g_cond_broadcast(GST_CLOCK_COND(clock))
 
 struct _GstClock {
   GstObject     object;
index fbbd916..f466a29 100644 (file)
@@ -63,9 +63,9 @@ typedef enum
 
 /* we do a GST_OBJECT_CAST to avoid type checking, better call these
  * function with a valid object! */
-#define GST_LOCK(obj)                   (g_mutex_lock(GST_OBJECT_CAST(obj)->lock))
-#define GST_TRYLOCK(obj)                (g_mutex_trylock(GST_OBJECT_CAST(obj)->lock))
-#define GST_UNLOCK(obj)                 (g_mutex_unlock(GST_OBJECT_CAST(obj)->lock))
+#define GST_LOCK(obj)                   g_mutex_lock(GST_OBJECT_CAST(obj)->lock)
+#define GST_TRYLOCK(obj)                g_mutex_trylock(GST_OBJECT_CAST(obj)->lock)
+#define GST_UNLOCK(obj)                 g_mutex_unlock(GST_OBJECT_CAST(obj)->lock)
 #define GST_GET_LOCK(obj)               (GST_OBJECT_CAST(obj)->lock)
 
 #define GST_OBJECT_NAME(obj)            (GST_OBJECT_CAST(obj)->name)
index 7401c83..1b1c7a9 100644 (file)
@@ -1833,7 +1833,7 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps)
   setcaps = GST_PAD_SETCAPSFUNC (pad);
 
   /* call setcaps function to configure the pad */
-  if (setcaps != NULL) {
+  if (setcaps != NULL && caps) {
     if (!GST_PAD_IS_IN_SETCAPS (pad)) {
       GST_FLAG_SET (pad, GST_PAD_IN_SETCAPS);
       GST_UNLOCK (pad);
index 5c67a92..7c51d63 100644 (file)
@@ -152,7 +152,7 @@ gst_system_clock_dispose (GObject * object)
     }
     g_list_free (clock->entries);
     clock->entries = NULL;
-    GST_CLOCK_SIGNAL (clock);
+    GST_CLOCK_BROADCAST (clock);
     GST_UNLOCK (clock);
 
     if (sysclock->thread)
@@ -227,7 +227,7 @@ gst_system_clock_async_thread (GstClock * clock)
   GST_CAT_DEBUG (GST_CAT_CLOCK, "enter system clock thread");
   GST_LOCK (clock);
   /* signal spinup */
-  GST_CLOCK_SIGNAL (clock);
+  GST_CLOCK_BROADCAST (clock);
   /* now enter our infinite loop */
   while (!sysclock->stopping) {
     GstClockEntry *entry;
@@ -301,7 +301,7 @@ gst_system_clock_async_thread (GstClock * clock)
   }
 exit:
   /* signal exit */
-  GST_CLOCK_SIGNAL (clock);
+  GST_CLOCK_BROADCAST (clock);
   GST_UNLOCK (clock);
   GST_CAT_DEBUG (GST_CAT_CLOCK, "exit system clock thread");
 }
@@ -424,7 +424,7 @@ gst_system_clock_id_wait_async (GstClock * clock, GstClockEntry * entry)
    * will get to this entry automatically. */
   if (clock->entries->data == entry) {
     GST_CAT_DEBUG (GST_CAT_CLOCK, "send signal");
-    GST_CLOCK_SIGNAL (clock);
+    GST_CLOCK_BROADCAST (clock);
   }
   GST_UNLOCK (clock);
 
@@ -446,6 +446,6 @@ gst_system_clock_id_unschedule (GstClock * clock, GstClockEntry * entry)
   GST_LOCK (clock);
   entry->status = GST_CLOCK_UNSCHEDULED;
   GST_CAT_DEBUG (GST_CAT_CLOCK, "send signal");
-  GST_CLOCK_SIGNAL (clock);
+  GST_CLOCK_BROADCAST (clock);
   GST_UNLOCK (clock);
 }
index d7f53dc..be4c2bb 100644 (file)
@@ -966,6 +966,8 @@ gst_base_sink_change_state (GstElement * element)
 
       /* if we don't have a preroll buffer and we have not received EOS,
        * we need to wait for a preroll */
+      GST_DEBUG ("have_preroll: %d, EOS: %d", basesink->have_preroll,
+          basesink->eos);
       if (!basesink->have_preroll && !basesink->eos) {
         basesink->need_preroll = TRUE;
         ret = GST_STATE_ASYNC;