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.
2005-06-29 Wim Taymans <wim@fluendo.com>
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.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
We are actually prerolling before commiting the state
change.
-Subproject commit d6e46b214fac0ecb46010ff522af2f7653e1c18e
+Subproject commit 2826306411790bf8aa9298922aa59b126897431f
/* if we don't have a preroll buffer and we have not received EOS,
* we need to wait for a preroll */
/* 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;
if (!basesink->have_preroll && !basesink->eos) {
basesink->need_preroll = TRUE;
ret = GST_STATE_ASYNC;
#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_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;
struct _GstClock {
GstObject object;
/* we do a GST_OBJECT_CAST to avoid type checking, better call these
* function with a valid object! */
/* 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)
#define GST_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
#define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
setcaps = GST_PAD_SETCAPSFUNC (pad);
/* call setcaps function to configure the pad */
setcaps = GST_PAD_SETCAPSFUNC (pad);
/* call setcaps function to configure the pad */
+ if (setcaps != NULL && caps) {
if (!GST_PAD_IS_IN_SETCAPS (pad)) {
GST_FLAG_SET (pad, GST_PAD_IN_SETCAPS);
GST_UNLOCK (pad);
if (!GST_PAD_IS_IN_SETCAPS (pad)) {
GST_FLAG_SET (pad, GST_PAD_IN_SETCAPS);
GST_UNLOCK (pad);
}
g_list_free (clock->entries);
clock->entries = NULL;
}
g_list_free (clock->entries);
clock->entries = NULL;
- GST_CLOCK_SIGNAL (clock);
+ GST_CLOCK_BROADCAST (clock);
GST_UNLOCK (clock);
if (sysclock->thread)
GST_UNLOCK (clock);
if (sysclock->thread)
GST_CAT_DEBUG (GST_CAT_CLOCK, "enter system clock thread");
GST_LOCK (clock);
/* signal spinup */
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;
/* now enter our infinite loop */
while (!sysclock->stopping) {
GstClockEntry *entry;
}
exit:
/* signal exit */
}
exit:
/* signal exit */
- GST_CLOCK_SIGNAL (clock);
+ GST_CLOCK_BROADCAST (clock);
GST_UNLOCK (clock);
GST_CAT_DEBUG (GST_CAT_CLOCK, "exit system clock thread");
}
GST_UNLOCK (clock);
GST_CAT_DEBUG (GST_CAT_CLOCK, "exit system clock thread");
}
* will get to this entry automatically. */
if (clock->entries->data == entry) {
GST_CAT_DEBUG (GST_CAT_CLOCK, "send signal");
* 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_LOCK (clock);
entry->status = GST_CLOCK_UNSCHEDULED;
GST_CAT_DEBUG (GST_CAT_CLOCK, "send signal");
GST_LOCK (clock);
entry->status = GST_CLOCK_UNSCHEDULED;
GST_CAT_DEBUG (GST_CAT_CLOCK, "send signal");
- GST_CLOCK_SIGNAL (clock);
+ GST_CLOCK_BROADCAST (clock);
/* if we don't have a preroll buffer and we have not received EOS,
* we need to wait for a preroll */
/* 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;
if (!basesink->have_preroll && !basesink->eos) {
basesink->need_preroll = TRUE;
ret = GST_STATE_ASYNC;