mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
meson: add FFmpeg meson as a fallback
https://bugzilla.gnome.org/show_bug.cgi?id=792900
This commit is contained in:
parent
e1d0d73fc0
commit
b3dc5c2799
1 changed files with 25 additions and 5 deletions
30
meson.build
30
meson.build
|
@ -15,10 +15,14 @@ else
|
||||||
gst_version_nano = 0
|
gst_version_nano = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libavfilter_dep = dependency('libavfilter', version: '>= 7.16.100')
|
libavfilter_dep = dependency('libavfilter', version: '>= 7.16.100',
|
||||||
libavformat_dep = dependency('libavformat', version: '>= 58.12.100')
|
fallback: ['FFmpeg', 'libavfilter_dep'])
|
||||||
libavcodec_dep = dependency('libavcodec', version: '>= 58.18.100')
|
libavformat_dep = dependency('libavformat', version: '>= 58.12.100',
|
||||||
libavutil_dep = dependency('libavutil', version: '>= 56.14.100')
|
fallback: ['FFmpeg', 'libavformat_dep'])
|
||||||
|
libavcodec_dep = dependency('libavcodec', version: '>= 58.18.100',
|
||||||
|
fallback: ['FFmpeg', 'libavcodec_dep'])
|
||||||
|
libavutil_dep = dependency('libavutil', version: '>= 56.14.100',
|
||||||
|
fallback: ['FFmpeg', 'libavutil_dep'])
|
||||||
|
|
||||||
libav_deps = [libavfilter_dep, libavformat_dep, libavcodec_dep, libavutil_dep]
|
libav_deps = [libavfilter_dep, libavformat_dep, libavcodec_dep, libavutil_dep]
|
||||||
|
|
||||||
|
@ -31,8 +35,24 @@ check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
|
||||||
#error libav provider should be FFmpeg
|
#error libav provider should be FFmpeg
|
||||||
#endif'''
|
#endif'''
|
||||||
|
|
||||||
if not cc.compiles(check_ffmpeg_src, dependencies : libav_deps, name : 'libav is provided by FFmpeg')
|
libav_deps_type_name = ''
|
||||||
|
|
||||||
|
foreach dep: libav_deps
|
||||||
|
message('type name: @0@'.format(dep.type_name()))
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach dep: libav_deps
|
||||||
|
message('[@0@] / [@1@]'.format(libav_deps_type_name, dep.type_name()))
|
||||||
|
if libav_deps_type_name != '' and dep.type_name() != libav_deps_type_name
|
||||||
|
error('Libav deps must be either all internal or all external')
|
||||||
|
endif
|
||||||
|
libav_deps_type_name = dep.type_name()
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
if dep.type_name() != 'internal'
|
||||||
|
if not cc.compiles(check_ffmpeg_src, dependencies : libav_deps, name : 'libav is provided by FFmpeg')
|
||||||
error('Uncompatible libavcodec found')
|
error('Uncompatible libavcodec found')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
|
|
Loading…
Reference in a new issue