summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 80ca485)
raw | patch | inline | side by side (parent: 80ca485)
author | Wim Taymans <wim.taymans@gmail.com> | |
Sat, 8 Oct 2005 08:00:37 +0000 (08:00 +0000) | ||
committer | Wim Taymans <wim.taymans@gmail.com> | |
Sat, 8 Oct 2005 08:00:37 +0000 (08:00 +0000) |
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_pop):
* gst/gstclock.c:
* gst/gstsystemclock.c: (gst_system_clock_async_thread):
Small cleanups and doc updates.
* gst/gstbus.c: (gst_bus_pop):
* gst/gstclock.c:
* gst/gstsystemclock.c: (gst_system_clock_async_thread):
Small cleanups and doc updates.
ChangeLog | patch | blob | history | |
gst/gstbus.c | patch | blob | history | |
gst/gstclock.c | patch | blob | history | |
gst/gstsystemclock.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 10d31385e7ab5320fd5cc74b4479007bcf70afe0..53b6a11cdb700d67e48e339b1ff9528c7000f652 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2005-10-08 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstbus.c: (gst_bus_pop):
+ * gst/gstclock.c:
+ * gst/gstsystemclock.c: (gst_system_clock_async_thread):
+ Small cleanups and doc updates.
+
2005-10-08 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gst.c: (init_pre):
diff --git a/gst/gstbus.c b/gst/gstbus.c
index 4ae6b3289d5c61637e5685eb8533ed8057013449..c2763eead82c46746b51ff0b19dd051c1358b4a2 100644 (file)
--- a/gst/gstbus.c
+++ b/gst/gstbus.c
*
* The GstBus provides support for #GSource based notifications. This makes it
* possible to handle the delivery in the glib mainloop.
+ *
+ * The #GSource callback function gst_bus_async_signal_func() can be used to
+ * convert all bus messages into signal emissions.
*
* A message is posted on the bus with the gst_bus_post() method. With the
* gst_bus_peek() and _pop() methods one can look at or retrieve a previously
* message on the bus. This should only be used if the application is able
* to deal with messages from different threads.
*
- * Every #GstBin has one bus.
+ * Every #GstPipeline has one bus.
*
- * Note that a #GstBin will set its bus into flushing state when changing from
+ * Note that a #GstPipeline will set its bus into flushing state when changing from
* READY to NULL state.
*/
g_return_val_if_fail (GST_IS_BUS (bus), NULL);
- GST_DEBUG_OBJECT (bus, "%d messages on the bus",
- g_queue_get_length (bus->queue));
-
g_mutex_lock (bus->queue_lock);
message = g_queue_pop_head (bus->queue);
- g_mutex_unlock (bus->queue_lock);
-
if (message)
- GST_DEBUG_OBJECT (bus, "pop on bus, got message %p, %s", message,
+ GST_DEBUG_OBJECT (bus, "pop from bus, have %d messages, got message %p, %s",
+ g_queue_get_length (bus->queue) + 1, message,
gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
else
- GST_DEBUG_OBJECT (bus, "pop on bus, no message");
+ GST_DEBUG_OBJECT (bus, "pop from bus, no messages");
+ g_mutex_unlock (bus->queue_lock);
return message;
}
diff --git a/gst/gstclock.c b/gst/gstclock.c
index 03843e8f27a3076d58509d0ef58a980abbd86fa0..a25c9c906dd9217c5a0443114949019b5a58b28e 100644 (file)
--- a/gst/gstclock.c
+++ b/gst/gstclock.c
*
* Converts the given @internal clock time to the real time, adjusting
* and making sure that the returned time is increasing.
- * This function should be called with the clock lock held.
+ * This function should be called with the clock LOCK held and is
+ * mainly used by clock subclasses.
*
* Returns: the converted time of the clock.
*
diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c
index d60cfaf2bff63abd9208052bc8e2f451f867a395..14193241aed03ca30e129d3f171e33c4657f9e93 100644 (file)
--- a/gst/gstsystemclock.c
+++ b/gst/gstsystemclock.c
GST_LOCK (clock);
/* signal spinup */
GST_CLOCK_BROADCAST (clock);
- /* now enter our infinite loop */
+ /* now enter our (almost) infinite loop */
while (!sysclock->stopping) {
GstClockEntry *entry;
GstClockReturn res;
/* check if something to be done */
while (clock->entries == NULL) {
- GST_CAT_DEBUG (GST_CAT_CLOCK, "nothing to wait for");
+ GST_CAT_DEBUG (GST_CAT_CLOCK, "no clock entries, waiting..");
/* wait for work to do */
GST_CLOCK_WAIT (clock);
GST_CAT_DEBUG (GST_CAT_CLOCK, "got signal");
default:
GST_CAT_DEBUG (GST_CAT_CLOCK,
"strange result %d waiting for %p, skipping", res, entry);
+ g_warning ("%s: strange result %d waiting for %p, skipping",
+ GST_OBJECT_NAME (clock), res, entry);
goto next_entry;
}
next_entry:
* Entries that arrive too late are simply not waited on and a
* GST_CLOCK_EARLY result is returned.
*
+ * should be called with LOCK held.
+ *
* MT safe.
*/
static GstClockReturn