mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
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:
parent
e5e72ede26
commit
38491e25a3
2 changed files with 45 additions and 7 deletions
|
@ -140,6 +140,10 @@ if build_gir
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if gstva_dep.found()
|
||||||
|
libs += [{'name': 'va', 'gir': va_gir, 'lib': gstva_dep, 'suffix': 'lib'}]
|
||||||
|
endif
|
||||||
|
|
||||||
if gstvulkan_dep.found()
|
if gstvulkan_dep.found()
|
||||||
libs += [
|
libs += [
|
||||||
{'name': 'vulkan', 'gir': vulkan_gir, 'lib': gstvulkan_dep, 'suffix': 'lib'},
|
{'name': 'vulkan', 'gir': vulkan_gir, 'lib': gstvulkan_dep, 'suffix': 'lib'},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
va_sources = [
|
va_sources = files(
|
||||||
'gstvaallocator.c',
|
'gstvaallocator.c',
|
||||||
'gstvadisplay.c',
|
'gstvadisplay.c',
|
||||||
'gstvadisplay_drm.c',
|
'gstvadisplay_drm.c',
|
||||||
|
@ -8,9 +8,9 @@ va_sources = [
|
||||||
'gstvautils.c',
|
'gstvautils.c',
|
||||||
'gstvavideoformat.c',
|
'gstvavideoformat.c',
|
||||||
'vasurfaceimage.c',
|
'vasurfaceimage.c',
|
||||||
]
|
)
|
||||||
|
|
||||||
va_headers = [
|
va_headers = files(
|
||||||
'gstva.h',
|
'gstva.h',
|
||||||
'gstvaallocator.h',
|
'gstvaallocator.h',
|
||||||
'gstvadisplay.h',
|
'gstvadisplay.h',
|
||||||
|
@ -21,7 +21,7 @@ va_headers = [
|
||||||
'gstvavideoformat.h',
|
'gstvavideoformat.h',
|
||||||
'va-prelude.h',
|
'va-prelude.h',
|
||||||
'va_fwd.h',
|
'va_fwd.h',
|
||||||
]
|
)
|
||||||
|
|
||||||
gstva_dep = dependency('', required : false)
|
gstva_dep = dependency('', required : false)
|
||||||
|
|
||||||
|
@ -47,9 +47,12 @@ va_enums = gnome.mkenums_simple('va-enumtypes',
|
||||||
decorator: 'GST_VA_API',
|
decorator: 'GST_VA_API',
|
||||||
header_prefix: '#include <gst/va/va-prelude.h>',
|
header_prefix: '#include <gst/va/va-prelude.h>',
|
||||||
body_prefix: '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
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_enumtypes_h = va_enums[1]
|
||||||
|
va_gen_sources = [va_enumtypes_h]
|
||||||
|
|
||||||
gstva = library('gstva-' + api_version,
|
gstva = library('gstva-' + api_version,
|
||||||
va_sources, va_enums,
|
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],
|
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
|
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,
|
gstva_dep = declare_dependency(link_with : gstva,
|
||||||
include_directories : [libsinc],
|
include_directories : [libsinc],
|
||||||
dependencies : [gst_dep, gstvideo_dep, gstallocators_dep, libva_dep, libva_drm_dep, libdrm_dep],
|
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)
|
meson.override_dependency(pkg_name, gstva_dep)
|
||||||
|
|
Loading…
Reference in a new issue