diff options
author | Andre Guedes <andre.guedes@intel.com> | 2019-01-14 10:18:42 -0800 |
---|---|---|
committer | Ederson de Souza <ederson.desouza@intel.com> | 2019-07-03 09:59:35 -0700 |
commit | eaeab383bb7dc15b3f18a120486f61c2838fc80c (patch) | |
tree | 8ccf1213411c8080891469dac7d99b0603c4b147 /ext/avtp | |
parent | bd46630b62d4b3c547e0abf768c2b2681c999264 (diff) | |
download | gstreamer-plugins-bad-eaeab383bb7dc15b3f18a120486f61c2838fc80c.tar.gz |
avtp: AVTP plugin bootstrap code
This patch introduces the bootstrap code from the AVTP plugin (plugin
definition and init) as well as the build system files. Upcoming patches
will introduce payloaders, source and sink elements provided by the AVTP
plugin. These elements can be utilized by a GStreamer pipeline to
implement TSN audio/video applications.
Regarding the plugin build system files, both autotools and meson files
are introduced. The AVTP plugin is landed in ext/ since it has an
external dependency on libavtp, an opensource AVTP packetization
library. For further information about libavtp check [1].
[1] https://github.com/AVnu/libavtp
Diffstat (limited to 'ext/avtp')
-rw-r--r-- | ext/avtp/Makefile.am | 17 | ||||
-rw-r--r-- | ext/avtp/gstavtp.c | 54 | ||||
-rw-r--r-- | ext/avtp/meson.build | 17 |
3 files changed, 88 insertions, 0 deletions
diff --git a/ext/avtp/Makefile.am b/ext/avtp/Makefile.am new file mode 100644 index 000000000..709bdfa67 --- /dev/null +++ b/ext/avtp/Makefile.am @@ -0,0 +1,17 @@ +plugin_LTLIBRARIES = libgstavtp.la + +libgstavtp_la_SOURCES = gstavtp.c + +libgstavtp_la_CFLAGS = \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ + $(AVTP_CFLAGS) + +libgstavtp_la_LIBADD = \ + $(GST_PLUGINS_BASE_LIBS) \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ + $(AVTP_LIBS) + +libgstavtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) diff --git a/ext/avtp/gstavtp.c b/ext/avtp/gstavtp.c new file mode 100644 index 000000000..af0adf712 --- /dev/null +++ b/ext/avtp/gstavtp.c @@ -0,0 +1,54 @@ +/* + * GStreamer AVTP Plugin + * Copyright (C) 2019 Intel Corporation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +/** + * plugin-avtp: + * + * ## Audio Video Transport Protocol (AVTP) Plugin + * + * The AVTP plugin implements typical Talker and Listener functionalities that + * can be leveraged by GStreamer-based applications in order to implement TSN + * audio/video applications. + * + * ### Dependencies + * + * The plugin uses libavtp to handle AVTP packetization. Libavtp source code can + * be found in https://github.com/AVnu/libavtp as well as instructions to build + * and install it. + * + * If libavtp isn't detected by configure, the plugin isn't built. + * + */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gst/gst.h> + +static gboolean +plugin_init (GstPlugin * plugin) +{ + return TRUE; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, + avtp, "Audio/Video Transport Protocol (AVTP) plugin", + plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN); diff --git a/ext/avtp/meson.build b/ext/avtp/meson.build new file mode 100644 index 000000000..17706d927 --- /dev/null +++ b/ext/avtp/meson.build @@ -0,0 +1,17 @@ +avtp_sources = [ + 'gstavtp.c', +] + +avtp_dep = dependency('avtp', required: get_option('avtp')) + +if avtp_dep.found() + gstavtp = library('gstavtp', + avtp_sources, + c_args : gst_plugins_bad_args, + include_directories : [configinc], + dependencies : libavtp_dep, + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstavtp, install_dir : plugins_pkgconfig_install_dir) +endif |