gstreamer/ext
Andre Guedes 352bf28a35 avtpsink: Implement synchronization mechanism
The avtpsink element is expected to transmit AVTPDUs at specific times,
according to GstBuffer timestamps. Currently, the transmission time is
controlled in software via the rendering synchronization mechanism
provided by GstBaseSink class. However, that mechanism may not cope with
some AVB use-cases such as Class A streams, where AVTPDUs are expected
to be transmitted at every 125 us. Thus, this patch introduces avtpsink
own mechanism which leverages the socket transmission scheduling
infrastructure introduced in Linux kernel 4.19.  When supported by the
NIC, the transmission scheduling is offloaded to the hardware, improving
transmission time accuracy considerably.

To illustrate that, a before-after experiment was carried out. The
experimental setup consisted in 2 PCs with Intel i210 card connected
back-to-back running an up-to-date Archlinux with kernel 5.3.1. In one
host gst-launch-1.0 was used to generate a 2-minute Class A stream while
the other host captured the packets. The metric under evaluation is the
transmission interval and it is measured by checking the 'time_delta'
information from ethernet frames captured at the receiving side.

The table below shows the outcome for a 48 kHz, 16-bit sample, stereo
audio stream. The unit is nanoseconds.

       |   Mean |   Stdev |     Min |     Max |   Range |
-------+--------+---------+---------+---------+---------+
Before | 125000 │    2401 │  110056 │  288432 │  178376 |
After  | 125000 │      18 │  124943 │  125055 │     112 |

Before this patch, the transmission interval mean is equal to the
optimal value (Class A stream -> 125 us interval), and it is kept the
same after the patch.  The dispersion measurements, however, had
improved considerably, meaning the system is now consistently
transmitting AVTPDUs at the correct time.

Finally, the socket transmission scheduling infrastructure requires the
system clock to be synchronized with PTP clock so this patches modifies
the AVTP plugin documentation to cover how to achieve that.
2020-02-05 22:28:12 +00:00
..
aom documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
assrender documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
avtp avtpsink: Implement synchronization mechanism 2020-02-05 22:28:12 +00:00
bs2b Remove autotools build system 2019-10-14 13:54:27 +01:00
bz2 Remove autotools build system 2019-10-14 13:54:27 +01:00
chromaprint Remove autotools build system 2019-10-14 13:54:27 +01:00
closedcaption ccconverter: Fill remainder of the cc_data in CDP packets with empty packets 2020-01-24 09:26:28 +00:00
colormanagement documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
curl remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
dash dash: Remove spurious condition check and remove unused debug category 2020-01-07 04:11:27 +00:00
dc1394 Remove autotools build system 2019-10-14 13:54:27 +01:00
directfb documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
dtls dtls: Keep track of the connection state and signal it through all the layers 2020-01-19 11:16:34 +00:00
dts Remove autotools build system 2019-10-14 13:54:27 +01:00
faac Remove autotools build system 2019-10-14 13:54:27 +01:00
faad Remove autotools build system 2019-10-14 13:54:27 +01:00
fdkaac fdkaacdec: add support for mpegversion=2 2020-02-04 07:52:22 +00:00
flite Remove autotools build system 2019-10-14 13:54:27 +01:00
fluidsynth Remove autotools build system 2019-10-14 13:54:27 +01:00
gme Remove autotools build system 2019-10-14 13:54:27 +01:00
gsm Remove autotools build system 2019-10-14 13:54:27 +01:00
hls hls: Check nettle version to ensure AES128 support 2020-01-10 16:03:48 +09:00
iqa Remove autotools build system 2019-10-14 13:54:27 +01:00
kate remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
ladspa documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
libde265 Remove autotools build system 2019-10-14 13:54:27 +01:00
libmms documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
lv2 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
mdns ext: add libmicrodns-based mdns device provider 2019-10-08 12:28:01 +00:00
modplug Remove autotools build system 2019-10-14 13:54:27 +01:00
mpeg2enc documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
mplex Remove autotools build system 2019-10-14 13:54:27 +01:00
musepack Remove autotools build system 2019-10-14 13:54:27 +01:00
neon bad: use of g_value_dup_string 2019-12-30 14:13:03 +00:00
ofa Remove autotools build system 2019-10-14 13:54:27 +01:00
openal Remove autotools build system 2019-10-14 13:54:27 +01:00
opencv opencv: allow compilation against 4.2.x 2019-12-26 22:43:35 +01:00
openexr openexr: Fix check for when to pass -std=c++98 2019-12-02 08:53:59 +00:00
openh264 openh264enc: keep the headers 2019-12-06 08:35:00 +00:00
openjpeg openjpegenc: add support for sub-frame encoding 2019-12-22 02:54:00 +00:00
openmpt Remove autotools build system 2019-10-14 13:54:27 +01:00
openni2 remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
opus Remove autotools build system 2019-10-14 13:54:27 +01:00
resindvd remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
rsvg Remove autotools build system 2019-10-14 13:54:27 +01:00
rtmp documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
sbc Remove autotools build system 2019-10-14 13:54:27 +01:00
sctp sctpassociation: Add missing return to prevent double unlock 2020-01-31 08:55:10 +02:00
smoothstreaming Remove autotools build system 2019-10-14 13:54:27 +01:00
sndfile Remove autotools build system 2019-10-14 13:54:27 +01:00
soundtouch remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
spandsp documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
srt gstsrtsink: Add wait-for-connection property to srtsink 2019-12-19 19:46:47 +00:00
srtp srtp: Remove %z as it doesn't work on Windows 2019-12-09 15:41:13 -05:00
svthevcenc svthevcenc: Add new SVT-HEVC encoder element 2019-12-20 15:43:55 +00:00
teletextdec remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
ttml ttmlparse: Collect buffers until detecting complete xml document 2019-11-22 18:31:10 +09:00
voaacenc Remove autotools build system 2019-10-14 13:54:27 +01:00
voamrwbenc Remove autotools build system 2019-10-14 13:54:27 +01:00
vulkan vulkansink: Fix null pointer exception 2020-01-03 08:45:12 +00:00
wayland waylandsink: Clear window when pipeline is stopped 2020-01-28 13:22:36 +01:00
webp documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
webrtc webrtcbin: fix blocking of receive bin 2020-02-01 01:46:57 +01:00
webrtcdsp documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
wildmidi documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
wpe Don't pass default GLib marshallers for signals 2019-11-06 14:27:46 +00:00
x265 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
zbar zbar: remove useless conditional on passthrough 2020-01-07 17:24:50 +00:00
zxing zxing: initial plugin revision 2020-01-07 17:24:50 +00:00
meson.build zxing: initial plugin revision 2020-01-07 17:24:50 +00:00