2016-08-12 15:51:45 +00:00
|
|
|
hls_sources = [
|
|
|
|
'gsthlsdemux.c',
|
|
|
|
'gsthlsdemux-util.c',
|
|
|
|
'gsthlsplugin.c',
|
|
|
|
'gsthlssink.c',
|
2017-04-19 12:47:57 +00:00
|
|
|
'gsthlssink2.c',
|
2016-08-12 15:51:45 +00:00
|
|
|
'gstm3u8playlist.c',
|
|
|
|
'm3u8.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
hls_cargs = ['-DGST_USE_UNSTABLE_API']
|
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
hls_crypto = get_option('hls-crypto')
|
|
|
|
hls_option = get_option('hls')
|
2019-04-09 11:07:05 +00:00
|
|
|
hls_crypto_dep = dependency('', required : false)
|
2019-05-12 10:21:23 +00:00
|
|
|
# used for unit test
|
|
|
|
hls_dep = dependency('', required : false)
|
2018-07-27 13:29:23 +00:00
|
|
|
|
2019-04-09 11:07:05 +00:00
|
|
|
if hls_option.disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2018-07-27 13:29:23 +00:00
|
|
|
|
2019-04-09 11:07:05 +00:00
|
|
|
if ['auto', 'nettle'].contains(hls_crypto)
|
2020-01-10 07:03:48 +00:00
|
|
|
hls_crypto_dep = dependency('nettle', version : '>= 3.0', required : false)
|
2019-04-09 11:07:05 +00:00
|
|
|
if hls_crypto_dep.found()
|
|
|
|
hls_cargs += ['-DHAVE_NETTLE']
|
2018-07-27 13:29:23 +00:00
|
|
|
endif
|
2019-04-09 11:07:05 +00:00
|
|
|
endif
|
2018-07-27 13:29:23 +00:00
|
|
|
|
2019-04-09 11:07:05 +00:00
|
|
|
if not hls_crypto_dep.found() and ['auto', 'libgcrypt'].contains(hls_crypto)
|
|
|
|
hls_crypto_dep = cc.find_library('gcrypt', required : false)
|
|
|
|
if hls_crypto_dep.found()
|
|
|
|
hls_cargs += ['-DHAVE_LIBGCRYPT']
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|
2019-04-09 11:07:05 +00:00
|
|
|
endif
|
2018-07-27 13:29:23 +00:00
|
|
|
|
2019-04-09 11:07:05 +00:00
|
|
|
if not hls_crypto_dep.found() and ['auto', 'openssl'].contains(hls_crypto)
|
|
|
|
hls_crypto_dep = dependency('openssl', required : false)
|
|
|
|
if hls_crypto_dep.found()
|
|
|
|
hls_cargs += ['-DHAVE_OPENSSL']
|
2018-07-27 13:29:23 +00:00
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|
|
|
|
|
2019-04-09 11:07:05 +00:00
|
|
|
if not hls_crypto_dep.found()
|
|
|
|
if hls_crypto == 'auto'
|
|
|
|
message('Enable HLS plugin enable without crypto')
|
|
|
|
elif hls_option.enabled()
|
|
|
|
error('HLS plugin enabled with crypto, but crypto library "@0@" not found'.format(hls_crypto))
|
|
|
|
else
|
|
|
|
subdir_done()
|
|
|
|
endif
|
2016-10-21 07:37:03 +00:00
|
|
|
endif
|
2019-04-09 11:07:05 +00:00
|
|
|
|
|
|
|
gsthls = library('gsthls',
|
|
|
|
hls_sources,
|
|
|
|
c_args : gst_plugins_bad_args + hls_cargs,
|
|
|
|
link_args : noseh_link_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstpbutils_dep, gsttag_dep, gstvideo_dep,
|
|
|
|
gstadaptivedemux_dep, gsturidownloader_dep,
|
2019-12-12 17:02:25 +00:00
|
|
|
hls_crypto_dep, gio_dep, libm],
|
2019-04-09 11:07:05 +00:00
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
|
|
|
pkgconfig.generate(gsthls, install_dir : plugins_pkgconfig_install_dir)
|
|
|
|
plugins += [gsthls]
|
|
|
|
hls_dep = declare_dependency(include_directories : include_directories('.'))
|