From eba7035050b68d63a3de47735a1ec1eb5262f069 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 12 Mar 2022 08:20:46 +0100 Subject: [PATCH] rtspsrc: Bring latency property in sync with rtpjitterbuffer Previously rtspsrc would set a 2s latency on rtpjitterbuffer. The problem with this is that it introduces a non-trivial latency, which cumulated with all the other sources of latency in a pipeline (decoders, parsers, ...) result in live playback being delayed by an unreasonable amount. The whole point of the rtpjitterbuffer latency size is to be able to cope with "jitter" up to that point (i.e. the quality of your connection) and also provide some room for retransmission if activated. It is NOT to cope with the transmission delay, and it is NOT to cope with buffering. If you don't have retransmission activated, a 200ms jitter should cover the vast majority of rtsp users. Buffering and transmission delay are handled by other elements in the pipeline. --- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 0032ae5882..2b7b86a52d 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -275,7 +275,7 @@ gst_rtsp_backchannel_get_type (void) #define DEFAULT_TIMEOUT 5000000 #define DEFAULT_UDP_BUFFER_SIZE 0x80000 #define DEFAULT_TCP_TIMEOUT 20000000 -#define DEFAULT_LATENCY_MS 2000 +#define DEFAULT_LATENCY_MS 200 #define DEFAULT_DROP_ON_LATENCY FALSE #define DEFAULT_CONNECTION_SPEED 0 #define DEFAULT_NAT_METHOD GST_RTSP_NAT_DUMMY