Aegisub/subprojects/packagefiles/ffms2/meson.build
arch1t3cht e994934e24 Link ffmpeg with dav1d to enable AV1 support.
The patched meson.build for dav1d just changes the include_directories
from 'include/dav1d' to 'include' and, while we're at it, removes the
pkg_config stuff to avoid a deprecation warning.

AV1 decoding is pretty broken in upstream ffms2, so point the wrap to a
fork that has some hack patches for it. BestSource works fine out of the
box, though.
2023-02-20 17:16:23 +01:00

47 lines
1.4 KiB
Meson

project('ffms2', 'cpp', version: '2.40.0')
deps = []
opts = ['tests=disabled', 'libdav1d=enabled']
deps += dependency('zlib')
deps += dependency('libavformat', default_options: opts)
deps += dependency('libavcodec', default_options: opts)
deps += dependency('libswscale', default_options: opts)
deps += dependency('libavutil', default_options: opts)
deps += dependency('libswresample', default_options: opts)
args = ['-D_FILE_OFFSET_BITNS=64', '-DFFMS_EXPORTS', '-D__STDC_CONSTANT_MACROS']
usage_args = []
if get_option('default_library') == 'static'
usage_args += '-DFFMS_STATIC'
endif
ffms2_sources = [
'src/core/audiosource.cpp',
#'src/core/audiosource.h',
'src/core/ffms.cpp',
'src/core/filehandle.cpp',
#'src/core/filehandle.h',
'src/core/indexing.cpp',
#'src/core/indexing.h',
'src/core/track.cpp',
#'src/core/track.h',
'src/core/utils.cpp',
#'src/core/utils.h',
'src/core/videosource.cpp',
#'src/core/videosource.h',
'src/core/videoutils.cpp',
#'src/core/videoutils.h',
'src/core/zipfile.cpp',
#'src/core/zipfile.h',
]
deps_inc = include_directories('include')
ffms2 = library('ffms2', ffms2_sources, include_directories: deps_inc, dependencies: deps,
cpp_args: args + usage_args)
ffms2_dep = declare_dependency(link_with: ffms2,
include_directories: deps_inc,
compile_args: usage_args)