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