2018-09-06 07:27:27 +00:00
|
|
|
sctp_sources = [
|
|
|
|
'gstsctpdec.c',
|
|
|
|
'gstsctpenc.c',
|
|
|
|
'gstsctpplugin.c',
|
|
|
|
'sctpassociation.c'
|
|
|
|
]
|
|
|
|
|
|
|
|
if get_option('sctp').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2018-10-17 10:04:51 +00:00
|
|
|
sctp_platform_deps = []
|
|
|
|
|
2020-07-25 16:56:43 +00:00
|
|
|
found_system_usrsctp = false
|
|
|
|
|
|
|
|
if not get_option('sctp-internal-usrsctp').enabled()
|
|
|
|
sctp_dep = cc.find_library('usrsctp', required: false)
|
|
|
|
sctp_header = cc.has_header('usrsctp.h')
|
|
|
|
if host_system == 'windows'
|
|
|
|
sctp_platform_deps += [cc.find_library('ws2_32')]
|
|
|
|
endif
|
|
|
|
|
|
|
|
found_system_usrsctp = sctp_dep.found() and sctp_header
|
|
|
|
|
|
|
|
if get_option('sctp-internal-usrsctp').disabled() and not found_system_usrsctp
|
|
|
|
if get_option('sctp').enabled()
|
|
|
|
error('sctp plugin enabled but could not find libusrsctp or usrsctp.h, and internal libusrsctp disabled')
|
|
|
|
else
|
|
|
|
message('Could not find libusrsctp or usrsctp.h, and internal libusrsctp disabled - not building sctp plugin')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
endif
|
2018-10-17 10:04:51 +00:00
|
|
|
endif
|
2018-09-06 07:27:27 +00:00
|
|
|
|
2020-07-25 16:56:43 +00:00
|
|
|
if not found_system_usrsctp
|
|
|
|
message('Using internal libusrsctp')
|
|
|
|
subdir('usrsctp')
|
|
|
|
sctp_dep = usrsctp_dep
|
|
|
|
sctp_header = true
|
|
|
|
if get_option('sctp').enabled() and not sctp_dep.found()
|
|
|
|
error('sctp plugin enabled but could not find system libusrsctp or configure internal libusrsctp')
|
2018-09-06 07:27:27 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-07-25 16:56:43 +00:00
|
|
|
if not gst_debug_disabled
|
|
|
|
sctp_args = ['-DSCTP_DEBUG']
|
|
|
|
else
|
|
|
|
sctp_args = []
|
|
|
|
endif
|
|
|
|
|
2018-09-06 07:27:27 +00:00
|
|
|
if sctp_dep.found() and sctp_header
|
|
|
|
gstsctp = library('gstsctp',
|
|
|
|
sctp_sources,
|
2020-07-25 16:56:43 +00:00
|
|
|
c_args : gst_plugins_bad_args + sctp_args,
|
2018-09-06 07:27:27 +00:00
|
|
|
include_directories : [configinc],
|
2018-10-17 10:04:51 +00:00
|
|
|
dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep, sctp_platform_deps],
|
2018-09-06 07:27:27 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2019-05-29 10:28:00 +00:00
|
|
|
plugins += [gstsctp]
|
2018-09-06 07:27:27 +00:00
|
|
|
endif
|