appsrc: minimum latency bigger than maximum latency

Milian Wolff milian.wolff at kdab.com
Wed Nov 27 12:39:57 UTC 2019


On Mittwoch, 27. November 2019 12:49:17 CET Tim Müller wrote:
> On Wed, 2019-11-27 at 12:03 +0100, Milian Wolff wrote:
> > Quite frankly, the documentation on that topic is quasi
> > impossible to understand for me. GstAppSrc just references latency
> > but doesn't explain when one should use it and what values one should
> > use. Then the overall topic on Latency just talks about the time
> > between two points which is a metric I can understand - but how does
> > one apply this concept to a single point (AppSrc)? If my AppSrc is
> > fed with a 25Hz timer, is the max-latency then  40ms?
> 
> There's some more detailed documentation here:
> 
> https://gstreamer.freedesktop.org/documentation/additional/design/latency.ht
> ml?gi-language=c
> 
> You would typically set min-latency (which is "the latency") and not
> set max-latency. max-latency indicates how much internal buffering
> there is.
> 
> For example: an audio source might push out data in 20ms chunks, so
> would introduce 20ms latency, but might have an internal ring buffer of
> 10 chunks, so 200ms. Now if another branch (going into the same
> audiomixer, say) advertised 500ms latency that would be a problem,
> because it means the audio source branch does not have enough buffering
> to accommodate the 500ms of latency/delay/wait-time caused by the other
> branch's latency. To fix that you'd have to add a queue of at least
> 300ms after the audio source or configure the audio source to have a
> larger ring buffer.

Thanks a lot for that explanation. If one then has a source which produces 
image data (to be used as video frame overlays) in a somewhat unpredictable 
manner but roughly at ~25Hz, without any internal buffering, would the min-
latency then be 40ms? Or should one still introduce a videorate or queue 
afterwards to get a well-behaved source?

Thanks

-- 
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191127/3cfadcc0/attachment-0001.bin>


More information about the gstreamer-devel mailing list