meson: add FFMS2 wrap

This commit is contained in:
Myaamori 2020-10-27 17:16:01 +00:00 committed by Ryan Lucia
parent ce791773f6
commit f9f8b6c4d3
4 changed files with 66 additions and 1 deletions

View file

@ -139,7 +139,7 @@ foreach dep: [
['portaudio-2.0', '', 'PortAudio'],
['openal', '>=0.0.8', 'OpenAL'],
# video
['ffms2', '', 'FFMS2'], # needs a proper port
['ffms2', '', 'FFMS2'],
# other
['fftw3', '', 'FFTW3'],
['hunspell', '', 'Hunspell'], # needs a proper port

11
subprojects/ffmpeg.wrap Normal file
View file

@ -0,0 +1,11 @@
[wrap-git]
directory = ffmpeg
url = https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git
revision = meson-4.3
[provide]
libavformat = libavformat_dep
libavcodec = libavcodec_dep
libswscale = libswscale_dep
libavutil = libavutil_dep
libswresample = libswresample_dep

9
subprojects/ffms2.wrap Normal file
View file

@ -0,0 +1,9 @@
[wrap-file]
directory = ffms2-2.40
source_url = https://github.com/FFMS/ffms2/archive/2.40.tar.gz
source_filename = 2.40.tar.gz
source_hash = 82e95662946f3d6e1b529eadbd72bed196adfbc41368b2d50493efce6e716320
patch_directory = ffms2
[provide]
ffms2 = ffms2_dep

View file

@ -0,0 +1,45 @@
project('ffms2', 'cpp', version: '2.40.0')
deps = []
deps += dependency('zlib')
deps += dependency('libavformat')
deps += dependency('libavcodec')
deps += dependency('libswscale')
deps += dependency('libavutil')
deps += dependency('libswresample')
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)