mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
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:
parent
d8b2273583
commit
d72c6e95ed
4 changed files with 17 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -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>
|
2005-11-18 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
* gst/net/gstnetclientclock.c (gst_net_client_clock_class_init):
|
* gst/net/gstnetclientclock.c (gst_net_client_clock_class_init):
|
||||||
|
|
|
@ -1480,7 +1480,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
|
||||||
else
|
else
|
||||||
segment_time = 0;
|
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,
|
GST_DEBUG_OBJECT (basesink,
|
||||||
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"
|
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"
|
||||||
|
|
|
@ -280,8 +280,11 @@ gst_system_clock_async_thread (GstClock * clock)
|
||||||
* entry */
|
* entry */
|
||||||
GST_CAT_DEBUG (GST_CAT_CLOCK, "async entry %p unlocked", entry);
|
GST_CAT_DEBUG (GST_CAT_CLOCK, "async entry %p unlocked", entry);
|
||||||
if (entry->func) {
|
if (entry->func) {
|
||||||
|
/* unlock before firing the callback */
|
||||||
|
GST_UNLOCK (clock);
|
||||||
entry->func (clock, entry->time, (GstClockID) entry,
|
entry->func (clock, entry->time, (GstClockID) entry,
|
||||||
entry->user_data);
|
entry->user_data);
|
||||||
|
GST_LOCK (clock);
|
||||||
}
|
}
|
||||||
if (entry->type == GST_CLOCK_ENTRY_PERIODIC) {
|
if (entry->type == GST_CLOCK_ENTRY_PERIODIC) {
|
||||||
/* adjust time now */
|
/* adjust time now */
|
||||||
|
|
|
@ -1480,7 +1480,8 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
|
||||||
else
|
else
|
||||||
segment_time = 0;
|
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,
|
GST_DEBUG_OBJECT (basesink,
|
||||||
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"
|
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"
|
||||||
|
|
Loading…
Reference in a new issue