11 hls_cargs = ['-DGST_USE_UNSTABLE_API']
13 hls_crypto = get_option('hls-crypto')
14 hls_option = get_option('hls')
16 hls_dep = dependency('', required : false)
18 have_hls_crypto = false
19 if not hls_option.disabled()
20 if ['auto', 'nettle'].contains(hls_crypto)
21 hls_crypto_dep = dependency('nettle', required : false)
22 if hls_crypto_dep.found()
23 have_hls_crypto = true
24 hls_cargs += ['-DHAVE_NETTLE']
28 if not have_hls_crypto and ['auto', 'libgcrypt'].contains(hls_crypto)
29 hls_crypto_dep = cc.find_library('gcrypt', required : false)
30 if hls_crypto_dep.found()
31 have_hls_crypto = true
32 hls_cargs += ['-DHAVE_LIBGCRYPT']
36 if not have_hls_crypto and ['auto', 'openssl'].contains(hls_crypto)
37 hls_crypto_dep = dependency('openssl', required : false)
38 if hls_crypto_dep.found()
39 have_hls_crypto = true
40 hls_cargs += ['-DHAVE_OPENSSL']
44 if not have_hls_crypto and hls_option.enabled()
45 if hls_crypto == 'auto'
46 error('HLS plugin enabled, but found none of nettle, libgcrypt, or openssl')
48 error('HLS plugin enabled, but crypto library "@0@" not found'.format(hls_crypto))
54 gsthls = library('gsthls',
56 c_args : gst_plugins_bad_args + hls_cargs,
57 link_args : noseh_link_args,
58 include_directories : [configinc],
59 dependencies : [gstpbutils_dep, gsttag_dep, gstvideo_dep,
60 gstadaptivedemux_dep, gsturidownloader_dep,
61 hls_crypto_dep, libm],
63 install_dir : plugins_install_dir,
65 pkgconfig.generate(gsthls, install_dir : plugins_pkgconfig_install_dir)
67 hls_dep = declare_dependency(include_directories : include_directories('.'))