• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1srtp_sources = [
2  'gstsrtp.c',
3  'gstsrtpelement.c',
4  'gstsrtpplugin.c',
5  'gstsrtpdec.c',
6  'gstsrtpenc.c',
7]
8
9srtp_cargs = []
10if get_option('srtp').disabled()
11  subdir_done()
12endif
13
14srtp_dep = dependency('libsrtp2', version : '>= 2.1.0', required : false)
15if srtp_dep.found()
16  srtp_cargs += ['-DHAVE_SRTP2']
17else
18  srtp_dep = dependency('libsrtp', version: '>= 1.6.0', required : false)
19  if not srtp_dep.found() and cc.has_header_symbol('srtp/srtp.h', 'crypto_policy_set_aes_gcm_128_16_auth')
20    srtp_dep = cc.find_library('srtp', required : false)
21  endif
22endif
23if not srtp_dep.found() and get_option('srtp').enabled()
24  error('srtp plugin enabled but libsrtp not found')
25endif
26
27if srtp_dep.found()
28  gstsrtp_enums = gnome.mkenums_simple('gstsrtp-enumtypes',
29    sources : ['gstsrtpenums.h'],
30    decorator : 'G_GNUC_INTERNAL',
31    install_header: false)
32
33  gstsrtp = library('gstsrtp',
34    srtp_sources, gstsrtp_enums,
35    c_args : gst_plugins_bad_args + srtp_cargs,
36    link_args : noseh_link_args,
37    include_directories : [configinc],
38    dependencies : [gstrtp_dep, gstvideo_dep, srtp_dep],
39    install : true,
40    install_dir : plugins_install_dir,
41  )
42  pkgconfig.generate(gstsrtp, install_dir : plugins_pkgconfig_install_dir)
43  plugins += [gstsrtp]
44endif
45