2016-08-12 15:51:45 +00:00
|
|
|
openjpeg_sources = [
|
|
|
|
'gstopenjpeg.c',
|
|
|
|
'gstopenjpegdec.c',
|
|
|
|
'gstopenjpegenc.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
openjpeg_cargs = []
|
|
|
|
|
2018-07-27 13:29:23 +00:00
|
|
|
if get_option('openjpeg').disabled()
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2017-10-19 14:36:17 +00:00
|
|
|
openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
|
2017-10-20 09:44:50 +00:00
|
|
|
if not openjpeg_dep.found()
|
|
|
|
# Fallback to v1.5
|
|
|
|
openjpeg_dep = dependency('libopenjpeg1', required : false)
|
|
|
|
openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|
2018-07-27 13:29:23 +00:00
|
|
|
if not openjpeg_dep.found() and get_option('openjpeg').enabled()
|
|
|
|
error('openjpeg plugin enabled, but neither libopenjp2 nor libopenjpeg1 not found')
|
|
|
|
endif
|
2016-08-12 15:51:45 +00:00
|
|
|
|
|
|
|
if openjpeg_dep.found()
|
|
|
|
gstopenjpeg = library('gstopenjpeg',
|
|
|
|
openjpeg_sources,
|
|
|
|
c_args : gst_plugins_bad_args + openjpeg_cargs,
|
|
|
|
link_args : noseh_link_args,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gst_dep, gstvideo_dep, openjpeg_dep,
|
|
|
|
gstcodecparsers_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir,
|
|
|
|
)
|
2018-04-24 18:05:30 +00:00
|
|
|
pkgconfig.generate(gstopenjpeg, install_dir : plugins_pkgconfig_install_dir)
|
2016-08-12 15:51:45 +00:00
|
|
|
endif
|