docs: Generate libgstva GI and pkg-config.

Currently libgstva is only exposed internally to gst-plugins-bad. No
headers are installed, no documentation generated, pkgconfig file,
neither gobject-introspection files.

This patch turn on all that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-10-03 10:17:00 +02:00
parent e5e72ede26
commit 38491e25a3
2 changed files with 45 additions and 7 deletions

View file

@ -140,6 +140,10 @@ if build_gir
]
endif
if gstva_dep.found()
libs += [{'name': 'va', 'gir': va_gir, 'lib': gstva_dep, 'suffix': 'lib'}]
endif
if gstvulkan_dep.found()
libs += [
{'name': 'vulkan', 'gir': vulkan_gir, 'lib': gstvulkan_dep, 'suffix': 'lib'},

View file

@ -1,4 +1,4 @@
va_sources = [
va_sources = files(
'gstvaallocator.c',
'gstvadisplay.c',
'gstvadisplay_drm.c',
@ -8,9 +8,9 @@ va_sources = [
'gstvautils.c',
'gstvavideoformat.c',
'vasurfaceimage.c',
]
)
va_headers = [
va_headers = files(
'gstva.h',
'gstvaallocator.h',
'gstvadisplay.h',
@ -21,7 +21,7 @@ va_headers = [
'gstvavideoformat.h',
'va-prelude.h',
'va_fwd.h',
]
)
gstva_dep = dependency('', required : false)
@ -47,9 +47,12 @@ va_enums = gnome.mkenums_simple('va-enumtypes',
decorator: 'GST_VA_API',
header_prefix: '#include <gst/va/va-prelude.h>',
body_prefix: '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
install_header: false)
install_header: true,
install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/va'),
)
va_enumtypes_h = va_enums[1]
va_gen_sources = [va_enumtypes_h]
gstva = library('gstva-' + api_version,
va_sources, va_enums,
@ -61,12 +64,43 @@ gstva = library('gstva-' + api_version,
dependencies : [gst_dep, gstbase_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep],
)
library_def = {'lib': gstva}
pkg_name = 'gstreamer-va-' + api_version
gst_libraries += [[pkg_name, {'lib': gstva}]]
pkgconfig.generate(gstva,
libraries : [gst_dep, gstvideo_dep],
variables : pkgconfig_variables,
subdirs : pkgconfig_subdirs,
name : pkg_name,
description : 'GStreamer VA support',
)
if build_gir
gir = {
'sources' : [va_sources, va_headers, va_enums],
'namespace' : 'GstVa',
'nsversion' : api_version,
'identifier_prefix' : 'Gst',
'symbol_prefix' : 'gst',
'export_packages' : pkg_name,
'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'],
'install' : true,
'extra_args' : gir_init_section + ['-DGST_USE_UNSTABLE_API'],
'dependencies' : [gst_dep, gstbase_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep]
}
library_def = {'lib': library_def['lib'], 'gir': [gir]}
if not static_build
va_gir = gnome.generate_gir(gstva, kwargs: gir)
va_gen_sources += va_gir
endif
endif
gst_libraries += [[pkg_name, library_def]]
install_headers(va_headers, subdir : 'gstreamer-1.0/gst/va/')
gstva_dep = declare_dependency(link_with : gstva,
include_directories : [libsinc],
dependencies : [gst_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep],
sources : [va_enumtypes_h])
sources : va_gen_sources)
meson.override_dependency(pkg_name, gstva_dep)