1hls_sources = [ 2 'gsthlsdemux.c', 3 'gsthlsdemux-util.c', 4 'gsthlselement.c', 5 'gsthlsplugin.c', 6 'gsthlssink.c', 7 'gsthlssink2.c', 8 'gstm3u8playlist.c', 9 'm3u8.c', 10] 11 12hls_cargs = ['-DGST_USE_UNSTABLE_API'] 13 14hls_crypto = get_option('hls-crypto') 15hls_option = get_option('hls') 16hls_crypto_dep = dependency('', required : false) 17# used for unit test 18hls_dep = dependency('', required : false) 19 20if hls_option.disabled() 21 subdir_done() 22endif 23 24if ['auto', 'nettle'].contains(hls_crypto) 25 hls_crypto_dep = dependency('nettle', version : '>= 3.0', required : false) 26 if hls_crypto_dep.found() 27 hls_cargs += ['-DHAVE_NETTLE'] 28 endif 29endif 30 31if not hls_crypto_dep.found() and ['auto', 'libgcrypt'].contains(hls_crypto) 32 hls_crypto_dep = cc.find_library('gcrypt', required : false) 33 if hls_crypto_dep.found() 34 hls_cargs += ['-DHAVE_LIBGCRYPT'] 35 endif 36endif 37 38if not hls_crypto_dep.found() and ['auto', 'openssl'].contains(hls_crypto) 39 hls_crypto_dep = dependency('openssl', required : false) 40 if hls_crypto_dep.found() 41 hls_cargs += ['-DHAVE_OPENSSL'] 42 endif 43endif 44 45if not hls_crypto_dep.found() 46 if hls_crypto == 'auto' 47 message('Enable HLS plugin enable without crypto') 48 elif hls_option.enabled() 49 error('HLS plugin enabled with crypto, but crypto library "@0@" not found'.format(hls_crypto)) 50 else 51 subdir_done() 52 endif 53endif 54 55gsthls = library('gsthls', 56 hls_sources, 57 c_args : gst_plugins_bad_args + hls_cargs, 58 link_args : noseh_link_args, 59 include_directories : [configinc], 60 dependencies : [gstpbutils_dep, gsttag_dep, gstvideo_dep, 61 gstadaptivedemux_dep, gsturidownloader_dep, 62 hls_crypto_dep, gio_dep, libm], 63 install : true, 64 install_dir : plugins_install_dir, 65) 66pkgconfig.generate(gsthls, install_dir : plugins_pkgconfig_install_dir) 67plugins += [gsthls] 68hls_dep = declare_dependency(include_directories : include_directories('.')) 69