module-rtp: Fix and improve direct timestamp mode and documentation

Direct timestamp mode was incorrectly using over/underrun detection logic
and fill level tracking logic that is actually meant for the other mode
(referred to from now on as "constant latency mode"). Over/underruns are
tracked implicitly in the direct timestamp mode, and the absolute fill
level is not relevant in that mode, since the latency is not needed to
be constant then.

Also improve log lines and the RTP module documentation to define these
buffer modes clearly and explain their differences and use cases.

Opus and MIDI code get TODOs added, since their direct timestamp mode
implementations still may be incorrect. Fixing those will be done in
a separate commit.
This commit is contained in:
Carlos Rafael Giani 2025-07-23 21:05:10 +02:00 committed by Wim Taymans
parent f8b0d0a43c
commit 2bcc8589fa
4 changed files with 218 additions and 76 deletions

View file

@ -7,6 +7,8 @@
#include <opus/opus.h>
#include <opus/opus_multistream.h>
/* TODO: Direct timestamp mode here may require a rework. See audio.c for a reference. */
static void rtp_opus_process_playback(void *data)
{
struct impl *impl = data;