mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
audiobasesink: Add explanation to the GAP event handling code
This commit is contained in:
parent
7b12afa4cb
commit
1813701ef2
1 changed files with 4 additions and 0 deletions
|
@ -1024,6 +1024,10 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, GstEvent * event)
|
||||||
spec = &sink->ringbuffer->spec;
|
spec = &sink->ringbuffer->spec;
|
||||||
gst_event_parse_gap (event, ×tamp, &duration);
|
gst_event_parse_gap (event, ×tamp, &duration);
|
||||||
|
|
||||||
|
/* If the GAP event has a duration, handle it like a
|
||||||
|
* silence buffer of that duration. Otherwise at least
|
||||||
|
* start the ringbuffer to make sure the clock is running.
|
||||||
|
*/
|
||||||
if (duration != GST_CLOCK_TIME_NONE) {
|
if (duration != GST_CLOCK_TIME_NONE) {
|
||||||
n_samples =
|
n_samples =
|
||||||
gst_util_uint64_scale_ceil (duration, spec->info.rate, GST_SECOND);
|
gst_util_uint64_scale_ceil (duration, spec->info.rate, GST_SECOND);
|
||||||
|
|
Loading…
Reference in a new issue