mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
validate: Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson
This commit is contained in:
parent
fcff932e09
commit
da327d8625
21 changed files with 337 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -20,3 +20,4 @@
|
||||||
*.libs/*
|
*.libs/*
|
||||||
.#*
|
.#*
|
||||||
tags
|
tags
|
||||||
|
build*
|
||||||
|
|
53
meson.build
Normal file
53
meson.build
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
project('gst-devtools', 'c',
|
||||||
|
version : '1.9.1.1',
|
||||||
|
meson_version : '>= 0.33.0',
|
||||||
|
default_options : [ 'warning_level=1',
|
||||||
|
'c_std=gnu99',
|
||||||
|
'buildtype=debugoptimized' ])
|
||||||
|
|
||||||
|
gst_version = meson.project_version()
|
||||||
|
version_arr = gst_version.split('.')
|
||||||
|
gst_version_major = version_arr[0]
|
||||||
|
gst_version_minor = version_arr[1]
|
||||||
|
gst_version_micro = version_arr[2]
|
||||||
|
if version_arr.length() == 4
|
||||||
|
gst_version_nano = version_arr[3]
|
||||||
|
TESTUITE_VERSION = '@0@.@1@'.format(gst_version_major, gst_version_minor)
|
||||||
|
else
|
||||||
|
gst_version_nano = 0
|
||||||
|
TESTUITE_VERSION = 'master'
|
||||||
|
endif
|
||||||
|
|
||||||
|
apiversion = '1.0'
|
||||||
|
soversion = 0
|
||||||
|
# maintaining compatibility with the previous libtool versioning
|
||||||
|
# current = minor * 100 + micro
|
||||||
|
libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
|
||||||
|
|
||||||
|
prefix = get_option('prefix')
|
||||||
|
|
||||||
|
glib_req = '>= 2.40.0'
|
||||||
|
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
||||||
|
|
||||||
|
cc = meson.get_compiler('c')
|
||||||
|
gst_dep = dependency('gstreamer-' + apiversion, version : gst_req,
|
||||||
|
fallback : ['gstreamer', 'gst_dep'])
|
||||||
|
gst_pbutils_dep = dependency('gstreamer-pbutils-' + apiversion, version : gst_req,
|
||||||
|
fallback : ['gst-plugins-base', 'pbutils_dep'])
|
||||||
|
gst_video_dep = dependency('gstreamer-video-' + apiversion, version : gst_req,
|
||||||
|
fallback : ['gst-plugins-base', 'video_dep'])
|
||||||
|
glib_dep = dependency('glib-2.0', version: glib_req)
|
||||||
|
gio_dep = dependency('gio-2.0', version: glib_req)
|
||||||
|
gmodule_dep = dependency('gmodule-2.0', version: glib_req)
|
||||||
|
gtk_dep = dependency('gtk+-3.0', required: false)
|
||||||
|
mathlib = cc.find_library('m', required : false)
|
||||||
|
|
||||||
|
gst_c_args = ['-DHAVE_CONFIG_H', '-DGST_USE_UNSTABLE_API']
|
||||||
|
|
||||||
|
gir = find_program('g-ir-scanner', required : false)
|
||||||
|
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable-introspection')
|
||||||
|
gnome = import('gnome')
|
||||||
|
|
||||||
|
gtkdoc = find_program('gtkdoc-scan', required : false)
|
||||||
|
|
||||||
|
subdir('validate')
|
3
meson_options.txt
Normal file
3
meson_options.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
option('disable-introspection',
|
||||||
|
type : 'boolean', value : false,
|
||||||
|
description : 'Whether to disable the introspection generation')
|
1
validate/.gitignore
vendored
1
validate/.gitignore
vendored
|
@ -43,6 +43,7 @@ stamp-h.in
|
||||||
*.stamp
|
*.stamp
|
||||||
*.log
|
*.log
|
||||||
*.trs
|
*.trs
|
||||||
|
build*/
|
||||||
|
|
||||||
.arcconfig
|
.arcconfig
|
||||||
/m4/*m4
|
/m4/*m4
|
||||||
|
|
11
validate/config.h.meson
Normal file
11
validate/config.h.meson
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* GStreamer API Version */
|
||||||
|
#mesondefine GST_API_VERSION
|
||||||
|
|
||||||
|
/* data dir */
|
||||||
|
#mesondefine GST_DATADIR
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#mesondefine PACKAGE_NAME
|
||||||
|
|
||||||
|
/* directory where plugins are located */
|
||||||
|
#mesondefine VALIDATEPLUGINDIR
|
1
validate/data/meson.build
Normal file
1
validate/data/meson.build
Normal file
|
@ -0,0 +1 @@
|
||||||
|
subdir('scenarios')
|
30
validate/data/scenarios/meson.build
Normal file
30
validate/data/scenarios/meson.build
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
_scenarios = ['simple_seeks.scenario',
|
||||||
|
'seek_forward.scenario',
|
||||||
|
'seek_backward.scenario',
|
||||||
|
'seek_forward_backward.scenario',
|
||||||
|
'reverse_playback.scenario',
|
||||||
|
'fast_forward.scenario',
|
||||||
|
'fast_backward.scenario',
|
||||||
|
'alternate_fast_backward_forward.scenario',
|
||||||
|
'pause_resume.scenario',
|
||||||
|
'scrub_forward_seeking.scenario',
|
||||||
|
'scrub_backward_seeking.scenario',
|
||||||
|
'scrub_forward_seeking_full.scenario',
|
||||||
|
'scrub_backward_seeking_full.scenario',
|
||||||
|
'adaptive_video_size.scenario',
|
||||||
|
'adaptive_video_framerate.scenario',
|
||||||
|
'adaptive_video_framerate_size.scenario',
|
||||||
|
'force_key_unit.scenario',
|
||||||
|
'seek_with_stop.scenario',
|
||||||
|
'switch_audio_track_while_paused.scenario',
|
||||||
|
'switch_subtitle_track.scenario',
|
||||||
|
'switch_subtitle_track_while_paused.scenario',
|
||||||
|
'disable_subtitle_track_while_paused.scenario',
|
||||||
|
'play_15s.scenario',
|
||||||
|
'change_state_intensive.scenario',
|
||||||
|
'switch_audio_track.scenario',
|
||||||
|
'setup_sink_props_max_lateness.scenario']
|
||||||
|
|
||||||
|
install_data(sources: _scenarios,
|
||||||
|
install_dir: get_option('datadir') + '/gstreamer-' +
|
||||||
|
apiversion + '/validate/scenarios')
|
2
validate/docs/meson.build
Normal file
2
validate/docs/meson.build
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
subdir('validate')
|
||||||
|
# subdir('launcher')
|
29
validate/docs/validate/meson.build
Normal file
29
validate/docs/validate/meson.build
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
configure_file(input : 'gst-validate.types',
|
||||||
|
output : 'gst-validate.types',
|
||||||
|
configuration : configuration_data())
|
||||||
|
|
||||||
|
doc_deps_names = ['glib-2.0',
|
||||||
|
'gstreamer-@0@'.format(apiversion),
|
||||||
|
'gstreamer-plugins-base-@0@'.format(apiversion)]
|
||||||
|
|
||||||
|
doc_deps = []
|
||||||
|
foreach doc_dep : doc_deps_names
|
||||||
|
runcmd = run_command('pkg-config', '--variable=prefix', doc_dep)
|
||||||
|
if runcmd.returncode() == 0
|
||||||
|
tmp = '--extra-dir=' + runcmd.stdout().strip() + '/share/gtk-doc/html/'
|
||||||
|
tmp.strip()
|
||||||
|
doc_deps = doc_deps + [tmp]
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
if gtkdoc.found()
|
||||||
|
gnome.gtkdoc('gst-validate-@0@'.format(apiversion),
|
||||||
|
main_sgml : 'gst-validate-docs.sgml',
|
||||||
|
src_dir : '@0@/../../gst/validate'.format(meson.current_source_dir()),
|
||||||
|
scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED',
|
||||||
|
'--ignore-decorators=GST_EXPORT',
|
||||||
|
'--ignore-headers= gettext.h gst-validate-internal.h gst-validate-monitor.h gst-validate-bin-monitor.h gst-validate-element-monitor.h gst-validate-pad-monitor.h gst-validate-override.h gst-validate-override-registry.h gst-validate-utils.h gst-validate-media-info.h gst-validate-report.h media-descriptor.h media-descriptor-parser.h media-descriptor-writer.h gst-validate-i18n-lib.h'
|
||||||
|
],
|
||||||
|
fixxref_args: doc_deps + ['--html-dir=' + get_option('prefix') + '/share/gtk-doc/html/'],
|
||||||
|
install : true)
|
||||||
|
endif
|
5
validate/gst/meson.build
Normal file
5
validate/gst/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
subdir('validate')
|
||||||
|
|
||||||
|
# if HAVE_LD_PRELOAD
|
||||||
|
#subdir('preload')
|
||||||
|
# endif
|
74
validate/gst/validate/meson.build
Normal file
74
validate/gst/validate/meson.build
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
gstvalidate_sources = [
|
||||||
|
'gst-validate-runner.c',
|
||||||
|
'gst-validate-reporter.c',
|
||||||
|
'gst-validate-monitor.c',
|
||||||
|
'gst-validate-element-monitor.c',
|
||||||
|
'gst-validate-bin-monitor.c',
|
||||||
|
'gst-validate-pipeline-monitor.c',
|
||||||
|
'gst-validate-pad-monitor.c',
|
||||||
|
'gst-validate-monitor-factory.c',
|
||||||
|
'gst-validate-report.c',
|
||||||
|
'gst-validate-scenario.c',
|
||||||
|
'gst-validate-override.c',
|
||||||
|
'gst-validate-utils.c',
|
||||||
|
'gst-validate-override-registry.c',
|
||||||
|
'media-descriptor.c',
|
||||||
|
'media-descriptor-writer.c',
|
||||||
|
'media-descriptor-parser.c',
|
||||||
|
'gst-validate-media-info.c',
|
||||||
|
'validate.c',
|
||||||
|
'validate.h',
|
||||||
|
'gst-validate-types.h',
|
||||||
|
'gst-validate-bin-monitor.h',
|
||||||
|
'gst-validate-pipeline-monitor.h',
|
||||||
|
'gst-validate-element-monitor.h',
|
||||||
|
'gst-validate-enums.h',
|
||||||
|
'media-descriptor.h',
|
||||||
|
'media-descriptor-writer.h',
|
||||||
|
'media-descriptor-parser.h',
|
||||||
|
'gst-validate-monitor-factory.h',
|
||||||
|
'gst-validate-monitor.h',
|
||||||
|
'gst-validate-override.h',
|
||||||
|
'gst-validate-override-registry.h',
|
||||||
|
'gst-validate-pad-monitor.h',
|
||||||
|
'gst-validate-reporter.h',
|
||||||
|
'gst-validate-report.h',
|
||||||
|
'gst-validate-runner.h',
|
||||||
|
'gst-validate-scenario.h',
|
||||||
|
'gst-validate-utils.h',
|
||||||
|
'gst-validate-media-info.h']
|
||||||
|
|
||||||
|
gstvalidate = shared_library('gstvalidate',
|
||||||
|
sources: gstvalidate_sources,
|
||||||
|
version : libversion,
|
||||||
|
soversion : soversion,
|
||||||
|
include_directories : [inc_dirs],
|
||||||
|
install: true,
|
||||||
|
c_args : [gst_c_args],
|
||||||
|
dependencies : [gst_dep, glib_dep, gio_dep, gmodule_dep,
|
||||||
|
gst_pbutils_dep, mathlib])
|
||||||
|
|
||||||
|
if build_gir
|
||||||
|
gnome.generate_gir(gstvalidate,
|
||||||
|
include_directories : include_directories('..'),
|
||||||
|
sources : gstvalidate_sources,
|
||||||
|
nsversion : '1.0',
|
||||||
|
namespace : 'GstValidate',
|
||||||
|
symbol_prefix : 'gst_',
|
||||||
|
identifier_prefix : 'Gst',
|
||||||
|
export_packages : 'gstvalidate-' + apiversion,
|
||||||
|
includes : ['GObject-2.0',
|
||||||
|
'GLib-2.0',
|
||||||
|
'Gio-2.0',
|
||||||
|
'GModule-2.0',
|
||||||
|
'GstVideo-' + apiversion,
|
||||||
|
'Gst-' + apiversion,
|
||||||
|
'GstPbutils-' + apiversion],
|
||||||
|
install : true
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
validate_dep = declare_dependency(link_with : gstvalidate,
|
||||||
|
include_directories : [inc_dirs],
|
||||||
|
dependencies : [gst_dep, glib_dep, gio_dep, gmodule_dep,
|
||||||
|
gst_pbutils_dep, mathlib])
|
2
validate/launcher/apps/meson.build
Normal file
2
validate/launcher/apps/meson.build
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
install_data(sources: ['__init__.py', 'gstvalidate.py'],
|
||||||
|
install_dir: _launcherdir + '/apps')
|
23
validate/launcher/meson.build
Normal file
23
validate/launcher/meson.build
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
_launcherdir = get_option('libdir') + '/gst-validate-launcher/python/launcher/'
|
||||||
|
|
||||||
|
launcher_configure = configuration_data()
|
||||||
|
launcher_configure.set('GST_VALIDATE_TESTSUITE_VERSION', '"@0@"'.format(TESTUITE_VERSION))
|
||||||
|
configure_file(input : 'config.py.in',
|
||||||
|
output : 'config.py',
|
||||||
|
configuration : launcher_configure)
|
||||||
|
|
||||||
|
_sources = ['baseclasses.py',
|
||||||
|
'__init__.py',
|
||||||
|
'loggable.py',
|
||||||
|
'reporters.py',
|
||||||
|
'main.py',
|
||||||
|
'httpserver.py',
|
||||||
|
'RangeHTTPServer.py',
|
||||||
|
'utils.py',
|
||||||
|
'vfb_server.py',
|
||||||
|
'config.py']
|
||||||
|
|
||||||
|
install_data(sources: _sources,
|
||||||
|
install_dir: _launcherdir)
|
||||||
|
|
||||||
|
subdir('apps')
|
19
validate/meson.build
Normal file
19
validate/meson.build
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
inc_dirs = include_directories('.')
|
||||||
|
|
||||||
|
cdata = configuration_data()
|
||||||
|
cdata.set('GST_API_VERSION', '"@0@"'.format(apiversion))
|
||||||
|
cdata.set('VALIDATEPLUGINDIR', '"@0@/@1@/gstreamer-1.0/validate"'.format(get_option('prefix'),get_option('libdir')))
|
||||||
|
cdata.set('GST_DATADIR', '"@0@/@1@"'.format(prefix, get_option('datadir')))
|
||||||
|
cdata.set('PACKAGE_NAME', '"GStreamer Validate"')
|
||||||
|
configure_file(input : 'config.h.meson',
|
||||||
|
output : 'config.h',
|
||||||
|
configuration : cdata)
|
||||||
|
|
||||||
|
subdir('data')
|
||||||
|
subdir('gst')
|
||||||
|
subdir('launcher')
|
||||||
|
subdir('tools')
|
||||||
|
subdir('docs')
|
||||||
|
subdir('pkgconfig')
|
||||||
|
#subdir('tests')
|
||||||
|
#subdir('po')
|
15
validate/pkgconfig/meson.build
Normal file
15
validate/pkgconfig/meson.build
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
pkgconf = configuration_data()
|
||||||
|
|
||||||
|
pkgconf.set('prefix', get_option('prefix'))
|
||||||
|
pkgconf.set('exec_prefix', '${prefix}')
|
||||||
|
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
|
||||||
|
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
|
||||||
|
pkgconf.set('GST_API_VERSION', apiversion)
|
||||||
|
pkgconf.set('VERSION', gst_version)
|
||||||
|
|
||||||
|
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
|
||||||
|
|
||||||
|
configure_file(input : 'gst-validate.pc.in',
|
||||||
|
output : 'gst-validate-1.0.pc',
|
||||||
|
configuration : pkgconf,
|
||||||
|
install_dir : pkg_install_dir)
|
5
validate/plugins/fault_injection/meson.build
Normal file
5
validate/plugins/fault_injection/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
shared_library('gstvalidatefaultinjection',
|
||||||
|
'socket_interposer.c',
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep]
|
||||||
|
)
|
8
validate/plugins/gapplication/meson.build
Normal file
8
validate/plugins/gapplication/meson.build
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
shared_library('gstvalidategapplication',
|
||||||
|
'gstvalidategapplication.c',
|
||||||
|
install: true,
|
||||||
|
install_dir: PLUGINDIR,
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep, gst_pbutils_dep],
|
||||||
|
link_with : [gstvalidate]
|
||||||
|
)
|
6
validate/plugins/gtk/meson.build
Normal file
6
validate/plugins/gtk/meson.build
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
shared_library('gstvalidategtk', 'gstvalidategtk.c',
|
||||||
|
install: true,
|
||||||
|
install_dir: PLUGINDIR,
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep, gst_pbutils_dep, gtk_dep],
|
||||||
|
link_with : [gstvalidate])
|
6
validate/plugins/meson.build
Normal file
6
validate/plugins/meson.build
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
subdir('fault_injection')
|
||||||
|
subdir('gapplication')
|
||||||
|
|
||||||
|
if gtk_dep.found()
|
||||||
|
subdir('gtk')
|
||||||
|
endif
|
10
validate/tools/gst-validate-launcher.in
Normal file → Executable file
10
validate/tools/gst-validate-launcher.in
Normal file → Executable file
|
@ -22,6 +22,8 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
LIBDIR = '@LIBDIR@'
|
LIBDIR = '@LIBDIR@'
|
||||||
|
BUILDDIR = '@BUILDDIR@'
|
||||||
|
SRCDIR = '@SRCDIR@'
|
||||||
GIT_FIRST_HASH = 'da962d096af9460502843e41b7d25fdece7ff1c2'
|
GIT_FIRST_HASH = 'da962d096af9460502843e41b7d25fdece7ff1c2'
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,12 +47,14 @@ def _in_devel():
|
||||||
|
|
||||||
|
|
||||||
def _add_gst_launcher_path():
|
def _add_gst_launcher_path():
|
||||||
if not _in_devel():
|
if _in_devel():
|
||||||
root = os.path.join(LIBDIR, 'gst-validate-launcher', 'python')
|
|
||||||
else:
|
|
||||||
print "Running with development path"
|
print "Running with development path"
|
||||||
dir_ = os.path.dirname(os.path.abspath(__file__))
|
dir_ = os.path.dirname(os.path.abspath(__file__))
|
||||||
root = os.path.split(dir_)[0]
|
root = os.path.split(dir_)[0]
|
||||||
|
elif __file__.startswith(BUILDDIR):
|
||||||
|
root = os.path.abspath(os.path.join(SRCDIR, "../"))
|
||||||
|
else:
|
||||||
|
root = os.path.join(LIBDIR, 'gst-validate-launcher', 'python')
|
||||||
|
|
||||||
sys.path.insert(0, root)
|
sys.path.insert(0, root)
|
||||||
return os.path.join(root, "launcher")
|
return os.path.join(root, "launcher")
|
||||||
|
|
36
validate/tools/meson.build
Normal file
36
validate/tools/meson.build
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
executable('gst-validate-' + apiversion,
|
||||||
|
'gst-validate.c',
|
||||||
|
install: true,
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep, gst_pbutils_dep, gio_dep],
|
||||||
|
c_args : [gst_c_args],
|
||||||
|
link_with : [gstvalidate]
|
||||||
|
)
|
||||||
|
executable('gst-validate-transcoding-' + apiversion,
|
||||||
|
'gst-validate-transcoding.c', install: true,
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep, gst_pbutils_dep, gst_video_dep, gio_dep],
|
||||||
|
c_args : [gst_c_args],
|
||||||
|
link_with : [gstvalidate]
|
||||||
|
)
|
||||||
|
executable('gst-validate-media-check-' + apiversion,
|
||||||
|
'gst-validate-media-check.c',
|
||||||
|
install: true,
|
||||||
|
include_directories : inc_dirs,
|
||||||
|
dependencies : [gst_dep, glib_dep, gst_pbutils_dep, gio_dep],
|
||||||
|
c_args : [gst_c_args],
|
||||||
|
link_with : [gstvalidate]
|
||||||
|
)
|
||||||
|
|
||||||
|
tmpconf = configuration_data()
|
||||||
|
tmpconf.set('LIBDIR', get_option('prefix') + '/' + get_option('datadir') +
|
||||||
|
'/' + get_option('libdir'))
|
||||||
|
tmpconf.set('BUILDDIR', meson.current_build_dir())
|
||||||
|
tmpconf.set('SRCDIR', meson.current_source_dir())
|
||||||
|
|
||||||
|
configure_file(input : 'gst-validate-launcher.in',
|
||||||
|
output : 'gst-validate-launcher',
|
||||||
|
configuration : tmpconf)
|
||||||
|
|
||||||
|
install_data(sources: 'gst-validate-launcher',
|
||||||
|
install_dir: get_option('bindir'))
|
Loading…
Reference in a new issue