Skip to content

Introduce AVTP plugin

Ederson de Souza requested to merge edersondisouza/gst-plugins-bad:avtp into master

Hello everyone,

This patchset introduces the AVTP plugin for GStreamer, that enables TSN audio and video applications on Linux.

For those not familiar with TSN, or Time-Sensitive Networking, it’s a set of IEEE technologies (enhancements to IEEE 802.1Q and Ethernet protocols) that provide precise time synchronisation, bounded latency, and application interoperability to bridged networks. Those technologies enable time-sensitive applications such as audio, video and control loops to run on top of bridged networks, co-existing with regular applications. TSN technologies are a super set of the Audio Video Bridging (AVB) technologies also developed by IEEE. AVTP (IEEE 1722) is the protocol defined to transport data in a TSN system. This patchset focus on the AAF (AVTP Audio Format) and CVF (Compressed Video Format), defined in chapters 7 and 8 of the AVTP spec [1].

This work is part of the effort to enable TSN technologies on upstream Linux ecosystem. Several building blocks required to enable TSN audio and video applications have been already developed and pushed to upstream projects. Time synchronisation features are provided by the linuxptp project [2], bounded latency features are provided by the Linux Traffic Control subsystem since kernel version 4.15 [3] and AVTP packetisation is provided by libavtp [4]. The ALSA project also has a plugin to enable TSN audio applications (AAF plugin) [5]. The plugin we introduce here aims to add to the ecosystem support for TSN video (and audio) applications, by enabling GStreamer to do so.

The AVTP plugin provides a set of elements: avtpaafpay: Payloads raw audio into AVTP Data Units (AVTPDU). avtpaafdepay: Extract raw audio from AVTPDUs avtpcvfpay: Payloads compressed video - currently, H.264 - into AVTPDUs avpcvfdepay: Extract compressed video - currently, H.264 - from AVTPDUs. avtpsink: Network sink that sends AVTPDUs to the network - directly over layer 2. avtpsrc: Network source that receives AVTPDUs from the network - directly over layer 2.

The goal is that the elements fit nicely into GStreamer pipelines. Audio elements are also available, as they help to provide a more complete and natural usage of the plugin. For examples of usage, please see the documentation for each element.

One requirement for TSN networks is that they have a common synchronised clock. Fortunately, GStreamer provides the GstPtpClock that can be used to provide, for the pipeline, the common synchronised clock. Therefore, anyone willing to test/use the AVTP plugin, can simply set the pipeline clock to be GstPtpClock. For more information about the GstPtpClock, refer to its documentation. For more AVTP plugin configuration and test options, refer to the “ext/avtp/README” file.

This patchset also provides unit tests for the elements. This is still being worked on, especially on the AAF elements, and we expect to have a better coverage in place before the final version is sent.

Future work on the AVTP plugin could include more video formats support, AVTP Clock Reference Format (CRF) support and support for other clocks.

Thanks,

Ederson

[1] 1722-2016 - IEEE Standard for a Transport Protocol for Time-Sensitive Applications in Bridged Local Area Networks [2] http://linuxptp.sourceforge.net [3] https://patchwork.ozlabs.org/cover/826678/ [4] https://github.com/AVnu/libavtp [5] www.alsa-project.org

Edited by Ederson de Souza

Merge request reports