avtp: Introduce AVTP sink element
authorAndre Guedes <andre.guedes@intel.com>
Wed, 23 Jan 2019 18:56:10 +0000 (10:56 -0800)
committerEderson de Souza <ederson.desouza@intel.com>
Wed, 3 Jul 2019 16:59:35 +0000 (09:59 -0700)
commit37550226d885bad8b63d1035c862c9b917c02b99
tree42a2dae901cddc68d102a6546086cadae23c68bb
parent6477884a56fb9bf59b2f13d8b0c6244d8ce32039
avtp: Introduce AVTP sink element

This patch introduces the avtpsink elements which implements a typical
network sink. Implementation is pretty straightforward since the burden
is implemented by GstBaseSink class.

The avtpsink element defines three new properties: 1) network interface
from where AVTPDU should be transmitted, 2) destination MAC address
(usually a multicast address), and 3) socket priority (SO_PRIORITY).

Socket setup and teardown are done in start/stop virtual methods while
AVTPDU transmission is carried out by render(). AVTPDUs are encapsulated
into Ethernet frames and transmitted to the network via AF_PACKET socket
domain.  Linux requires CAP_NET_RAW capability in order to open an
AF_PACKET socket so the application that utilize this element must have
it. For further info about AF_PACKET socket domain see packet(7).

Finally, AVTPDUs are expected to be transmitted at specific times -
according to the GstBuffer presentation timestamp - so the 'sync'
property from GstBaseSink is set to TRUE by default.
ext/avtp/Makefile.am
ext/avtp/gstavtp.c
ext/avtp/gstavtpsink.c [new file with mode: 0644]
ext/avtp/gstavtpsink.h [new file with mode: 0644]
ext/avtp/meson.build