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.
This commit is contained in:
Edward Hervey 2022-03-12 08:20:46 +01:00 committed by Edward Hervey
parent 2b827948d5
commit eba7035050

View file

@ -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