2016-08-12 15:51:45 +00:00
|
|
|
srtp_sources = [
|
|
|
|
'gstsrtp.c',
|
2021-02-24 11:52:08 +00:00
|
|
|
'gstsrtpelement.c',
|
|
|
|
'gstsrtpplugin.c',
|
2016-08-12 15:51:45 +00:00
|
|
|
'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()
|
2022-10-17 11:48:12 +00:00
|
|
|
srtp_dep = dependency('', required : false)
|
2018-07-27 13:29:23 +00:00
|
|
|
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
|
2019-03-29 12:09:02 +00:00
|
|
|
srtp_dep = dependency('libsrtp', version: '>= 1.6.0', required : false)
|
|
|
|
if not srtp_dep.found() and cc.has_header_symbol('srtp/srtp.h', 'crypto_policy_set_aes_gcm_128_16_auth')
|
2018-01-26 15:25:33 +00:00
|
|
|
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-10-22 09:30:45 +00:00
|
|
|
plugins += [gstsrtp]
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|