| 1 |
hls_sources = [ |
| 2 |
'hls/gsthlsdemux.c', |
| 3 |
'hls/gsthlsdemux-stream.c', |
| 4 |
'hls/gsthlsdemux-playlist-loader.c', |
| 5 |
'hls/gsthlsdemux-preloader.c', |
| 6 |
'hls/gsthlsdemux-util.c', |
| 7 |
'hls/gsthlselement.c', |
| 8 |
'hls/m3u8.c', |
| 9 |
] |
| 10 |
|
| 11 |
hls_headers = [ |
| 12 |
'hls/gsthlsdemux.h', |
| 13 |
'hls/gsthlsdemux-playlist-loader.h', |
| 14 |
'hls/gsthlsdemux-preloader.h', |
| 15 |
'hls/gsthlsdemux-stream.h', |
| 16 |
'hls/gsthlselements.h', |
| 17 |
'hls/m3u8.h', |
| 18 |
] |
| 19 |
|
| 20 |
hls_cargs = [] |
| 21 |
|
| 22 |
hls_crypto = get_option('hls-crypto') |
| 23 |
hls_crypto_dep = dependency('', required : false) |
| 24 |
|
| 25 |
if ['auto', 'nettle'].contains(hls_crypto) |
| 26 |
hls_crypto_dep = dependency('nettle', version : '>= 3.0', required : false) |
| 27 |
if hls_crypto_dep.found() |
| 28 |
hls_cargs += ['-DHAVE_NETTLE'] |
| 29 |
endif |
| 30 |
endif |
| 31 |
|
| 32 |
if not hls_crypto_dep.found() and ['auto', 'libgcrypt'].contains(hls_crypto) |
| 33 |
hls_crypto_dep = cc.find_library('gcrypt', required : false) |
| 34 |
if hls_crypto_dep.found() |
| 35 |
hls_cargs += ['-DHAVE_LIBGCRYPT'] |
| 36 |
endif |
| 37 |
endif |
| 38 |
|
| 39 |
if not hls_crypto_dep.found() and ['auto', 'openssl'].contains(hls_crypto) |
| 40 |
hls_crypto_dep = dependency('openssl', required : false) |
| 41 |
if hls_crypto_dep.found() |
| 42 |
hls_cargs += ['-DHAVE_OPENSSL'] |
| 43 |
endif |
| 44 |
endif |
| 45 |
|
| 46 |
if not hls_crypto_dep.found() |
| 47 |
if hls_crypto == 'auto' |
| 48 |
message('Could not find a supported crypto library for HLS support') |
| 49 |
else |
| 50 |
error('HLS crypto support library "@0@" not found'.format(hls_crypto)) |
| 51 |
endif |
| 52 |
endif |
| 53 |
hls_dep = declare_dependency(include_directories : include_directories('.')) |