Why one latency-time extra latency in the gstaudiosink?

danny.smith danny.smith at axis.com
Wed May 8 14:00:06 UTC 2019


Hi,

I am working with low-latency audio streaming and found a curious behavior
using the alsasink. When I, for instance, request 40ms buffer-time and 20ms
latency-time, I do not get the expected minimum latency for the sink of 40
ms but instead one latency-time extra reported minimum latency(i.e. 60ms). 

I have traced it down to this line in gstaudiosink.c (line 402) which was
added by a patch in 2008:

  /* set latency to one more segment as we need some headroom */
  spec->seglatency = spec->segtotal + 1;

https://github.com/GStreamer/gst-plugins-base/commit/fc523e047ceefcba5db19b94bcfd66289a409374

If I remove this line I get the expected minimum latency of 40ms and audio
seems to play fine.

What is the reason for the additional latency?

Best Regards,
Danny



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list