WebRTC sender latency is affected by the receiver
Increasing the rtpbin latency in webrtcbin allows more time for lost packet retransmission or jittery network links, but also has the nasty side-effect of increasing the configured latency on the transmission path as well:
For example, increasing the latency to 4s in the webrtc-sendrecv example:
0:00:07.166805660 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1227:gst_base_sink_query_latency:<autovideosink0-actual-sink-xvimage> we are ready for LATENCY query
0:00:07.167211352 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1285:gst_base_sink_query_latency:<autovideosink0-actual-sink-xvimage> latency query: live: 1, have_latency 1, upstream: 1, min 0:00:04.015000000, max 99:99:99.999999999
0:00:07.167245104 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5512:default_element_query:<autovideosink0-actual-sink-xvimage> query latency returns 1
0:00:07.167513166 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1227:gst_base_sink_query_latency:<nicesink1> we are ready for LATENCY query
0:00:07.167618613 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1285:gst_base_sink_query_latency:<nicesink1> latency query: live: 0, have_latency 1, upstream: 0, min 0:00:00.000000000, max 99:99:99.999999999
0:00:07.167639783 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5512:default_element_query:<nicesink1> query latency returns 1
0:00:07.167681516 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1227:gst_base_sink_query_latency:<nicesink0> we are ready for LATENCY query
0:00:07.167924690 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:1285:gst_base_sink_query_latency:<nicesink0> latency query: live: 0, have_latency 1, upstream: 1, min 0:00:00.033333333, max 0:00:04.066666656
0:00:07.167945578 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5512:default_element_query:<nicesink0> query latency returns 1
0:00:07.168206470 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:4974:gst_base_sink_send_event:<autovideosink0-actual-sink-xvimage> latency set to 0:00:04.015000000
0:00:07.168234446 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5008:gst_base_sink_send_event:<autovideosink0-actual-sink-xvimage> sending event 0x7f688800ad20 latency event: 0x7f688800ad20, time 99:99:99.999999999, seq-num 606, GstEventLatency, latency=(guint64)4015000000;
0:00:07.168386869 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5096:gst_base_sink_send_event:<autovideosink0-actual-sink-xvimage> handled event: 1
0:00:07.168600948 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:4957:gst_base_sink_send_event:<nicesink1> handling event 0x7f688800ad20 latency event: 0x7f688800ad20, time 99:99:99.999999999, seq-num 606, GstEventLatency, latency=(guint64)4015000000;
0:00:07.168625795 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:4974:gst_base_sink_send_event:<nicesink1> latency set to 0:00:04.015000000
0:00:07.168666071 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5008:gst_base_sink_send_event:<nicesink1> sending event 0x7f688800ad20 latency event: 0x7f688800ad20, time 99:99:99.999999999, seq-num 606, GstEventLatency, latency=(guint64)4015000000;
0:00:07.168723189 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5096:gst_base_sink_send_event:<nicesink1> handled event: 1
0:00:07.168764974 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:4957:gst_base_sink_send_event:<nicesink0> handling event 0x7f688800ad20 latency event: 0x7f688800ad20, time 99:99:99.999999999, seq-num 606, GstEventLatency, latency=(guint64)4015000000;
0:00:07.168787039 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:4974:gst_base_sink_send_event:<nicesink0> latency set to 0:00:04.015000000
0:00:07.168811084 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5008:gst_base_sink_send_event:<nicesink0> sending event 0x7f688800ad20 latency event: 0x7f688800ad20, time 99:99:99.999999999, seq-num 606, GstEventLatency, latency=(guint64)4015000000;
0:00:07.168952155 545003 0x7f68880036d0 DEBUG basesink gstbasesink.c:5096:gst_base_sink_send_event:<nicesink0> handled event: 1