[Bug 667314] baseaudiosink: allow the internal clock to be calibrated externally

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 6 03:35:35 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=667314
  GStreamer | gst-plugins-base | git

--- Comment #2 from Håvard Graff (hgr) <havard.graff at tandberg.com> 2012-01-06 11:35:30 UTC ---
We basically want to dictate what time position 0 is in the ringbuffer. The way
to do this is to externally use gst_clock_set_calibration
(base_sink->provided_clock, 0, time, 1, 1);

Now the ringbuffer will have the same idea about time that our internal thread
(that is reading from the ringbuffer) is using . This is really important for
the over/under-run checks in the _get_alignment () function, because if the two
ideas about time (ringbuffer and our reader-thread) are different, it can cause
a permanent long delay (over-run) or complete silence. (under-run).

Now, we found that if our thread has started before the sink starts, we will
have to apply the right calibration *before* reading any buffers, or you will
start up the buffer with one calibration, and then by changing it after having
read out a few, you will basically create an enormous headroom in the buffer.
(with clock-time not starting from 0, you could have *years* of headroom...),
so it becomes important to be able to set the right calibration *prior* to
having performed "sync-latency". We do this in _ringbuffer_start() which seems
like the natural place for it.

However, sync-latency will always reset the calibration, so this patch
basically tries to preserve an external effort of dictating the start-time of
the internal ringbuffer.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list