gst/base/gstbasesink.c: For the current position in stream time, we need to subtract accumulated time.

Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_get_position):
For the current position in stream time, we need to subtract
accumulated time.

* gst/gstsystemclock.c: (gst_system_clock_async_thread):
Release lock before calling the callback function of async
entries.
This commit is contained in:
Wim Taymans 2005-11-18 13:18:44 +00:00
parent d8b2273583
commit d72c6e95ed
4 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2005-11-18 Wim Taymans <wim@fluendo.com>
* gst/base/gstbasesink.c: (gst_base_sink_get_position):
For the current position in stream time, we need to subtract
accumulated time.
* gst/gstsystemclock.c: (gst_system_clock_async_thread):
Release lock before calling the callback function of async
entries.
2005-11-18 Andy Wingo <wingo@pobox.com>
* gst/net/gstnetclientclock.c (gst_net_client_clock_class_init):

View file

@ -1480,7 +1480,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
else
segment_time = 0;
*cur = now - GST_ELEMENT_CAST (basesink)->base_time + segment_time;
*cur = now - GST_ELEMENT_CAST (basesink)->base_time -
basesink->segment_accum + segment_time;
GST_DEBUG_OBJECT (basesink,
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"

View file

@ -280,8 +280,11 @@ gst_system_clock_async_thread (GstClock * clock)
* entry */
GST_CAT_DEBUG (GST_CAT_CLOCK, "async entry %p unlocked", entry);
if (entry->func) {
/* unlock before firing the callback */
GST_UNLOCK (clock);
entry->func (clock, entry->time, (GstClockID) entry,
entry->user_data);
GST_LOCK (clock);
}
if (entry->type == GST_CLOCK_ENTRY_PERIODIC) {
/* adjust time now */

View file

@ -1480,7 +1480,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
else
segment_time = 0;
*cur = now - GST_ELEMENT_CAST (basesink)->base_time + segment_time;
*cur = now - GST_ELEMENT_CAST (basesink)->base_time -
basesink->segment_accum + segment_time;
GST_DEBUG_OBJECT (basesink,
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"