Update sctp plugin for the current build system

- Add meson build definitions
- Add necessary API decorators
This commit is contained in:
Matthew Waters 2018-09-06 17:27:27 +10:00
parent e2f06326ea
commit 88b4ce9fc0
9 changed files with 103 additions and 1 deletions

View file

@ -44,6 +44,7 @@ subdir('resindvd')
subdir('rsvg')
subdir('rtmp')
subdir('sbc')
subdir('sctp')
subdir('smoothstreaming')
#subdir('sndfile')
subdir('soundtouch')

31
ext/sctp/meson.build Normal file
View file

@ -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

View file

@ -10,6 +10,7 @@ subdir('isoff')
subdir('mpegts')
subdir('opencv')
subdir('player')
subdir('sctp')
subdir('video')
subdir('wayland')
subdir('webrtc')

View file

@ -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

View file

@ -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])

View file

@ -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__ */

View file

@ -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);

View file

@ -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);

View file

@ -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')