gst/base/gstbasesink.c: Small debug line.

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.
This commit is contained in:
Wim Taymans 2005-06-29 11:10:44 +00:00
parent a34bc0bd60
commit 06ab4b7831
8 changed files with 35 additions and 11 deletions

View file

@ -1,3 +1,23 @@
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):

2
common

@ -1 +1 @@
Subproject commit d6e46b214fac0ecb46010ff522af2f7653e1c18e
Subproject commit 2826306411790bf8aa9298922aa59b126897431f

View 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;

View 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;

View 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)

View 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);

View 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);
}

View 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;