summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/meson.build1
-rw-r--r--ext/sctp/meson.build31
-rw-r--r--gst-libs/gst/meson.build1
-rw-r--r--gst-libs/gst/sctp/Makefile.am5
-rw-r--r--gst-libs/gst/sctp/meson.build26
-rw-r--r--gst-libs/gst/sctp/sctp-prelude.h31
-rw-r--r--gst-libs/gst/sctp/sctpreceivemeta.h4
-rw-r--r--gst-libs/gst/sctp/sctpsendmeta.h4
-rw-r--r--meson_options.txt1
9 files changed, 103 insertions, 1 deletions
diff --git a/ext/meson.build b/ext/meson.build
index 1ffa1a248..e765f7b79 100644
--- a/ext/meson.build
+++ b/ext/meson.build
@@ -44,6 +44,7 @@ subdir('resindvd')
subdir('rsvg')
subdir('rtmp')
subdir('sbc')
+subdir('sctp')
subdir('smoothstreaming')
#subdir('sndfile')
subdir('soundtouch')
diff --git a/ext/sctp/meson.build b/ext/sctp/meson.build
new file mode 100644
index 000000000..fe697fe1d
--- /dev/null
+++ b/ext/sctp/meson.build
@@ -0,0 +1,31 @@
+sctp_sources = [
+ 'gstsctpdec.c',
+ 'gstsctpenc.c',
+ 'gstsctpplugin.c',
+ 'sctpassociation.c'
+]
+
+if get_option('sctp').disabled()
+ subdir_done()
+endif
+
+sctp_dep = cc.find_library('usrsctp', required : get_option('sctp').enabled())
+sctp_header = cc.has_header('usrsctp.h')
+
+if get_option('sctp').enabled()
+ if not sctp_dep.found() or not sctp_header
+ error('sctp plugin enabled but could not find libusrsctp')
+ endif
+endif
+
+if sctp_dep.found() and sctp_header
+ gstsctp = library('gstsctp',
+ sctp_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc],
+ dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+ )
+ pkgconfig.generate(gstsctp, install_dir : plugins_pkgconfig_install_dir)
+endif
diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build
index 2e579540e..e0c6b389e 100644
--- a/gst-libs/gst/meson.build
+++ b/gst-libs/gst/meson.build
@@ -10,6 +10,7 @@ subdir('isoff')
subdir('mpegts')
subdir('opencv')
subdir('player')
+subdir('sctp')
subdir('video')
subdir('wayland')
subdir('webrtc')
diff --git a/gst-libs/gst/sctp/Makefile.am b/gst-libs/gst/sctp/Makefile.am
index 54d6589e1..56ef20867 100644
--- a/gst-libs/gst/sctp/Makefile.am
+++ b/gst-libs/gst/sctp/Makefile.am
@@ -5,6 +5,8 @@ libgstsctp_1_0_la_SOURCES = \
sctpreceivemeta.c
libgstsctp_1_0_la_CFLAGS = \
+ -I$(top_srcdir)/gst-libs \
+ -I$(top_builddir)/gst-libs \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS)
@@ -14,4 +16,5 @@ libgstsctp_1_0_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
libgstsctp_1_0_includedir = $(includedir)/gstreamer-1.0/gst/sctp
libgstsctp_1_0_include_HEADERS = \
sctpsendmeta.h \
- sctpreceivemeta.h
+ sctpreceivemeta.h \
+ sctp-prelude.h
diff --git a/gst-libs/gst/sctp/meson.build b/gst-libs/gst/sctp/meson.build
new file mode 100644
index 000000000..b3d12a454
--- /dev/null
+++ b/gst-libs/gst/sctp/meson.build
@@ -0,0 +1,26 @@
+sctp_sources = [
+ 'sctpreceivemeta.c',
+ 'sctpsendmeta.c',
+]
+
+sctp_headers = [
+ 'sctpreceivemeta.h',
+ 'sctpsendmeta.h',
+ 'sctp-prelude.h',
+]
+
+install_headers(sctp_headers, subdir : 'gstreamer-1.0/gst/sctp')
+
+libgstsctp = library('gstsctp-' + api_version,
+ sctp_sources,
+ c_args : gst_plugins_bad_args,
+ include_directories : [configinc, libsinc],
+ version : libversion,
+ soversion : soversion,
+ install : true,
+ dependencies : [gstbase_dep],
+)
+
+gstsctp_dep = declare_dependency(link_with : libgstsctp,
+ include_directories : [libsinc],
+ dependencies : [gstbase_dep])
diff --git a/gst-libs/gst/sctp/sctp-prelude.h b/gst-libs/gst/sctp/sctp-prelude.h
new file mode 100644
index 000000000..b89984c2f
--- /dev/null
+++ b/gst-libs/gst/sctp/sctp-prelude.h
@@ -0,0 +1,31 @@
+/* GStreamer SCTP Library
+ * Copyright (C) 2018 GStreamer developers
+ *
+ * sctp-prelude.h: prelude include header for gst-audiobad library
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_SCTP_PRELUDE_H__
+#define __GST_SCTP_PRELUDE_H__
+
+#include <gst/gst.h>
+
+#ifndef GST_SCTP_API
+#define GST_SCTP_API GST_EXPORT
+#endif
+
+#endif /* __GST_SCTP_PRELUDE_H__ */
diff --git a/gst-libs/gst/sctp/sctpreceivemeta.h b/gst-libs/gst/sctp/sctpreceivemeta.h
index f3be3288a..b651b95ac 100644
--- a/gst-libs/gst/sctp/sctpreceivemeta.h
+++ b/gst-libs/gst/sctp/sctpreceivemeta.h
@@ -27,6 +27,7 @@
#define __GST_SCTP_RECEIVE_META_H__
#include <gst/gst.h>
+#include <gst/sctp/sctp-prelude.h>
G_BEGIN_DECLS
@@ -41,8 +42,11 @@ struct _GstSctpReceiveMeta
guint32 ppid;
};
+GST_SCTP_API
GType gst_sctp_receive_meta_api_get_type (void);
+GST_SCTP_API
const GstMetaInfo *gst_sctp_receive_meta_get_info (void);
+GST_SCTP_API
GstSctpReceiveMeta *gst_sctp_buffer_add_receive_meta (GstBuffer * buffer,
guint32 ppid);
diff --git a/gst-libs/gst/sctp/sctpsendmeta.h b/gst-libs/gst/sctp/sctpsendmeta.h
index 8a7cd0b63..a45f77fbd 100644
--- a/gst-libs/gst/sctp/sctpsendmeta.h
+++ b/gst-libs/gst/sctp/sctpsendmeta.h
@@ -27,6 +27,7 @@
#define __GST_SCTP_SEND_META_H__
#include <gst/gst.h>
+#include <gst/sctp/sctp-prelude.h>
G_BEGIN_DECLS
@@ -52,8 +53,11 @@ struct _GstSctpSendMeta
guint32 pr_param;
};
+GST_SCTP_API
GType gst_sctp_send_meta_api_get_type (void);
+GST_SCTP_API
const GstMetaInfo *gst_sctp_send_meta_get_info (void);
+GST_SCTP_API
GstSctpSendMeta *gst_sctp_buffer_add_send_meta (GstBuffer * buffer,
guint32 ppid, gboolean ordered, GstSctpSendMetaPartiallyReliability pr,
guint32 pr_param);
diff --git a/meson_options.txt b/meson_options.txt
index b3557f86d..14d910fd1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -119,6 +119,7 @@ option('resindvd', type : 'feature', value : 'auto', description : 'Resin DVD pl
option('rsvg', type : 'feature', value : 'auto', description : 'SVG overlayer and image decoder plugin')
option('rtmp', type : 'feature', value : 'auto', description : 'RTMP video network source and sink plugin')
option('sbc', type : 'feature', value : 'auto', description : 'SBC bluetooth audio codec plugin')
+option('sctp', type : 'feature', value : 'auto', description : 'SCTP plugin')
option('shm', type : 'feature', value : 'auto', description : 'Shared memory source/sink plugin')
option('smoothstreaming', type : 'feature', value : 'auto', description : 'Microsoft Smooth Streaming demuxer plugin')
option('soundtouch', type : 'feature', value : 'auto', description : 'Audio pitch controller & BPM detection plugin')