2016-08-12 15:51:45 +00:00
|
|
|
srtp_sources = [
|
|
|
|
'gstsrtp.c',
|
|
|
|
'gstsrtpdec.c',
|
|
|
|
'gstsrtpenc.c',
|
|
|
|
]
|
|
|
|
|
2018-01-26 15:25:33 +00:00
|
|
|
srtp_cargs = []
|
2018-07-27 13:29:23 +00:00
|
|
|
if get_option('srtp').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2018-01-26 15:25:33 +00:00
|
|
|
|
|
|
|
srtp_dep = dependency('libsrtp2', version : '>= 2.1.0', required : false)
|
|
|
|
if srtp_dep.found()
|
|
|
|
srtp_cargs += ['-DHAVE_SRTP2']
|
|
|
|
else
|
|
|
|
srtp_dep = dependency('libsrtp', required : false)
|
|
|
|
if not srtp_dep.found() and cc.has_header_symbol('srtp/srtp.h', 'srtp_init')
|
|
|
|
srtp_dep = cc.find_library('srtp', required : false)
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|
2018-07-27 13:29:23 +00:00
|
|
|
if not srtp_dep.found() and get_option('srtp').enabled()
|
|
|
|
error('srtp plugin enabled but libsrtp not found')
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
|
|
|
|
if srtp_dep.found()
|
2017-07-20 07:47:55 +00:00
|
|
|
gstsrtp_enums = gnome.mkenums_simple('gstsrtp-enumtypes',
|
|
|
|
sources : ['gstsrtpenums.h'],
|
|
|
|
decorator : 'G_GNUC_INTERNAL',
|
|
|
|
install_header: false)
|
2016-08-12 15:51:45 +00:00
|
|
|
|
|
|
|
gstsrtp = library('gstsrtp',
|
2017-07-20 07:47:55 +00:00
|
|
|
srtp_sources, gstsrtp_enums,
|
2018-01-26 15:25:33 +00:00
|
|
|
c_args : gst_plugins_bad_args + srtp_cargs,
|
2016-08-12 15:51:45 +00:00
|
|
|
link_args : noseh_link_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstrtp_dep, gstvideo_dep, srtp_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-04-24 18:05:30 +00:00
|
|
|
pkgconfig.generate(gstsrtp, install_dir : plugins_pkgconfig_install_dir)
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|