mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
docs: generate hotdoc configs for libraries with our helper script
With this patch, configure time is identical no matter whether doc is enabled or not. The configuration files also now contain explicitly-listed sources with no wildcards. For the four libraries where hotdoc needs to use clang to generate the documentation (as opposed to the rest of the libraries where hotdoc uses the gir), the script will call pkg-config to determine the appropriate C flags. This means a side effect of this patch is that pkg-config files are now generated for the gstadaptivedemux and gstopencv libraries. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
This commit is contained in:
parent
17e53f8c95
commit
7983ecff1c
49 changed files with 901 additions and 551 deletions
|
@ -31,25 +31,15 @@ if not build_gir
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
if gst_dep.type_name() == 'internal'
|
||||
gst_proj = subproject('gstreamer')
|
||||
plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
|
||||
else
|
||||
plugins_cache_generator = find_program('gst-plugins-doc-cache-generator',
|
||||
dirs: [join_paths(gst_dep.get_variable('libexecdir', default_value: ''), 'gstreamer-' + api_version)],
|
||||
required: false)
|
||||
endif
|
||||
|
||||
required_hotdoc_extensions = ['gi-extension']
|
||||
hotdoc = import('hotdoc')
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
excludes = ['gettext.h',
|
||||
'gst-validate-internal.h',
|
||||
'gst-validate-i18n-lib.c'
|
||||
|
@ -62,18 +52,41 @@ foreach f: excludes
|
|||
'validate', 'gst', 'validate', f)]
|
||||
endforeach
|
||||
|
||||
validate_sources = gstvalidate_headers + gstvalidate_sources
|
||||
hotdoc = import('hotdoc')
|
||||
libs_doc = [hotdoc.generate_doc('gst-devtools',
|
||||
project_version: api_version,
|
||||
sitemap: 'sitemap.txt',
|
||||
index: 'index.md',
|
||||
gi_c_sources: validate_sources,
|
||||
gi_c_source_filters: validate_excludes,
|
||||
gi_index: 'gi-index.md',
|
||||
gi_smart_index: true,
|
||||
gi_sources: [validate_gir[0].full_path()],
|
||||
disable_incremental_build: true,
|
||||
dependencies : [validate_dep],
|
||||
depends: validate_gir[0],
|
||||
)]
|
||||
cdir = meson.current_source_dir()
|
||||
doc_sources = []
|
||||
foreach s: gstvalidate_headers + gstvalidate_sources
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
lib_sources = {
|
||||
'validate': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
lib_doc_source_file = configure_file(
|
||||
output: 'lib_doc_sources.json',
|
||||
configuration: lib_sources,
|
||||
output_format: 'json')
|
||||
|
||||
lib_doc_gi_source_file = configure_file(
|
||||
output: 'lib_doc_gi_sources.json',
|
||||
configuration: {'validate': validate_gir[0].full_path()},
|
||||
output_format: 'json')
|
||||
|
||||
lib_hotdoc_config = custom_target(
|
||||
'build-gst-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', lib_doc_gi_source_file,
|
||||
'--gi_c_source_file', lib_doc_source_file,
|
||||
'--gi_c_source_filters', validate_excludes,
|
||||
'--source_root', cdir,
|
||||
'--gi_source_root', cdir / '..' / 'validate' / 'gst' / 'validate',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-lib-configs.json',
|
||||
)
|
||||
|
|
|
@ -62,6 +62,7 @@ plugins_doc = ''
|
|||
deps = []
|
||||
plugins_sitemap = ''
|
||||
plugin_configs = []
|
||||
libs_configs = []
|
||||
if built_subprojects != ''
|
||||
foreach project_name: built_subprojects.split(',')
|
||||
sub = subproject(project_name)
|
||||
|
@ -86,6 +87,10 @@ if built_subprojects != ''
|
|||
endforeach
|
||||
|
||||
plugin_configs += sub.get_variable('plugin_hotdoc_configs', [])
|
||||
|
||||
# Handle the GStreamer special case with two custom targets
|
||||
libs_configs += sub.get_variable('lib_hotdoc_config', [])
|
||||
libs_configs += sub.get_variable('libs_hotdoc_configs', [])
|
||||
else
|
||||
message('@0@ did not build hotdoc documentation, can\'t build API doc'.format(project_name))
|
||||
endif
|
||||
|
@ -106,7 +111,8 @@ sitemap = custom_target(command: [
|
|||
'--markdown-index', 'gi-index',
|
||||
'--libs', libs,
|
||||
'--plugins', plugins_doc,
|
||||
'--plugin-configs', plugin_configs],
|
||||
'--plugin-configs', plugin_configs,
|
||||
'--lib-configs', libs_configs],
|
||||
input: 'sitemap.txt',
|
||||
output: 'sitemap.txt')
|
||||
deps += [sitemap]
|
||||
|
|
|
@ -13,32 +13,44 @@ if __name__ == "__main__":
|
|||
parser.add_argument('--libs', type=str)
|
||||
parser.add_argument('--plugins', type=str)
|
||||
parser.add_argument('--plugin-configs', nargs='*', default=[])
|
||||
parser.add_argument('--lib-configs', nargs='*', default=[])
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
in_ = args.input_sitemap
|
||||
out = args.output_sitemap
|
||||
index_md = args.markdown_index
|
||||
libs = args.libs
|
||||
plugins = args.plugins
|
||||
plugin_configs = args.plugin_configs
|
||||
lib_configs = args.lib_configs
|
||||
|
||||
with open(in_) as f:
|
||||
index = f.read()
|
||||
index = '\n'.join(line for line in index.splitlines())
|
||||
|
||||
if args.libs is None:
|
||||
libs = []
|
||||
else:
|
||||
libs = args.libs.split(os.pathsep)
|
||||
for config in lib_configs:
|
||||
with open(config) as f:
|
||||
libs += json.load(f)
|
||||
plugins = plugins.replace('\n', '').split(os.pathsep)
|
||||
for config in plugin_configs:
|
||||
with open(config) as f:
|
||||
plugins += json.load(f)
|
||||
plugins = sorted(plugins, key=lambda x: os.path.basename(x))
|
||||
|
||||
if libs:
|
||||
libs = libs.split(os.pathsep)
|
||||
plugins = plugins.replace('\n', '').split(os.pathsep)
|
||||
for config in plugin_configs:
|
||||
with open(config) as f:
|
||||
plugins += json.load(f)
|
||||
plugins = sorted(plugins, key=lambda x: os.path.basename(x))
|
||||
index += '\n\tlibs.md'
|
||||
for lib in libs:
|
||||
if not lib:
|
||||
continue
|
||||
index += "\n\t\t" + lib + '.json'
|
||||
name = lib
|
||||
if not name.endswith('.json'):
|
||||
name += '.json'
|
||||
index += "\n\t\t" + name
|
||||
if plugins:
|
||||
index += '\n\tgst-index'
|
||||
for plugin in plugins:
|
||||
if not plugin:
|
||||
|
|
|
@ -52,34 +52,6 @@ endif
|
|||
if get_option('doc').disabled()
|
||||
subdir_done()
|
||||
endif
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@, not building documentation'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but gi-extension missing')
|
||||
endif
|
||||
|
||||
message('@0@ extensions not found, not building documentation requiring it'.format(extension))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
build_hotdoc = true
|
||||
ges_excludes = []
|
||||
|
@ -98,23 +70,44 @@ foreach f: ['gesmarshal.*',
|
|||
ges_excludes += [join_paths(meson.current_source_dir(), '..', '..', 'ges', f)]
|
||||
endforeach
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
libs_doc = [hotdoc.generate_doc('gst-editing-services',
|
||||
project_version: api_version,
|
||||
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
|
||||
gi_c_sources: ges_sources + ges_headers,
|
||||
gi_c_source_roots: [join_paths(meson.current_source_dir(), '../ges/')],
|
||||
gi_sources: [ges_gir[0].full_path()],
|
||||
gi_c_source_filters: ges_excludes,
|
||||
sitemap: 'sitemap.txt',
|
||||
index: 'index.md',
|
||||
gi_index: 'index.md',
|
||||
gi_smart_index: true,
|
||||
gi_order_generated_subpages: true,
|
||||
dependencies: [ges_dep],
|
||||
disable_incremental_build: true,
|
||||
depends: ges_gir[0],
|
||||
)]
|
||||
cdir = meson.current_source_dir()
|
||||
doc_sources = []
|
||||
foreach s: ges_headers + ges_sources
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
lib_sources = {
|
||||
'ges': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
lib_doc_source_file = configure_file(
|
||||
output: 'lib_doc_sources.json',
|
||||
configuration: lib_sources,
|
||||
output_format: 'json')
|
||||
|
||||
lib_doc_gi_source_file = configure_file(
|
||||
output: 'lib_doc_gi_sources.json',
|
||||
configuration: {'ges': ges_gir[0].full_path()},
|
||||
output_format: 'json')
|
||||
|
||||
lib_hotdoc_config = custom_target(
|
||||
'build-gst-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', lib_doc_gi_source_file,
|
||||
'--gi_c_source_file', lib_doc_source_file,
|
||||
'--gi_c_source_filters', ges_excludes,
|
||||
'--source_root', cdir,
|
||||
'--gi_source_root', cdir / '..' / 'ges',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-lib-configs.json',
|
||||
)
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
|
|
|
@ -43,40 +43,7 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
build_hotdoc = true
|
||||
hotdoc = import('hotdoc')
|
||||
docconf = configuration_data()
|
||||
docconf.set('GST_API_VERSION', api_version)
|
||||
|
||||
required_hotdoc_extensions = ['gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but gi-extension missing')
|
||||
endif
|
||||
|
||||
message('@0@ extensions not found, not building documentation requiring it'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
|
|
|
@ -54,36 +54,6 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gi-extension', 'c-extension', 'gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extensions not found, not building documentation requiring it'.format(extension))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
build_hotdoc = true
|
||||
|
||||
docconf = configuration_data()
|
||||
|
@ -124,125 +94,83 @@ foreach f: [
|
|||
excludes += [join_paths(meson.current_source_dir(), root_rel, f)]
|
||||
endforeach
|
||||
|
||||
libs_doc_source_file = configure_file(
|
||||
output: 'libs_doc_sources.json',
|
||||
configuration: libs_sources,
|
||||
output_format: 'json')
|
||||
|
||||
libs_doc_c_source_file = configure_file(
|
||||
output: 'libs_doc_c_sources.json',
|
||||
configuration: libs_c_sources,
|
||||
output_format: 'json')
|
||||
|
||||
libs_doc_gi_conf = {}
|
||||
|
||||
libs = []
|
||||
if build_gir
|
||||
libs = [
|
||||
{'name': 'mpegts', 'gir': mpegts_gir, 'lib': gstmpegts_dep},
|
||||
{'name': 'play', 'gir': play_gir, 'lib': gstplay_dep},
|
||||
{'name': 'player', 'gir': player_gir, 'lib': gstplayer_dep},
|
||||
{'name': 'insertbin', 'gir': insertbin_gir, 'lib': gstinsertbin_dep},
|
||||
{'name': 'codecparsers', 'lib': gstcodecparsers_dep},
|
||||
{'name': 'adaptivedemux', 'lib': gstadaptivedemux_dep},
|
||||
{'name': 'basecamerabinsrc', 'gir': basecamerabin_gir, 'lib': gstbasecamerabin_dep},
|
||||
{'name': 'webrtc', 'gir': webrtc_gir, 'lib': gstwebrtc_dep, 'suffix': 'lib'},
|
||||
{'name': 'audio', 'gir': audio_gir, 'lib': gstbadaudio_dep, 'prefix': 'bad-'},
|
||||
{'name': 'transcoder', 'gir': transcoder_gir, 'lib': gst_transcoder_dep},
|
||||
{'name': 'codecs', 'gir': codecs_gir, 'lib': gstcodecs_dep},
|
||||
{'name': 'dxva', 'gir': dxva_gir, 'lib': gstdxva_dep, 'c_source_patterns': ['*.h', '*.cpp']},
|
||||
{'name': 'mse', 'gir': mse_gir, 'lib': gstmse_dep, 'suffix': 'lib'},
|
||||
{'name': 'analytics', 'gir': analytics_gir, 'lib': gstanalytics_dep},
|
||||
]
|
||||
libs_doc_gi_conf += {
|
||||
'mpegts': mpegts_gir[0].full_path(),
|
||||
'play': play_gir[0].full_path(),
|
||||
'player': player_gir[0].full_path(),
|
||||
'insertbin': insertbin_gir[0].full_path(),
|
||||
'basecamerabinsrc': basecamerabin_gir[0].full_path(),
|
||||
'webrtc': webrtc_gir[0].full_path(),
|
||||
'audio': audio_gir[0].full_path(),
|
||||
'transcoder': transcoder_gir[0].full_path(),
|
||||
'codecs': codecs_gir[0].full_path(),
|
||||
'dxva': dxva_gir[0].full_path(),
|
||||
'mse': mse_gir[0].full_path(),
|
||||
'analytics': analytics_gir[0].full_path(),
|
||||
}
|
||||
|
||||
if get_variable('gst_cuda_gir', []).length() > 0
|
||||
libs += [{'name': 'cuda', 'gir': gst_cuda_gir, 'lib': gstcuda_dep, 'c_source_patterns': ['*.h', '*.cpp']}]
|
||||
endif
|
||||
|
||||
if gstopencv_dep.found()
|
||||
libs += [
|
||||
{'name': 'opencv', 'lib': gstopencv_dep, 'c_source_patterns': ['*.h', '*.cpp'], 'extra_c_flags': ['-x c++']},
|
||||
]
|
||||
libs_doc_gi_conf += {'cuda': gst_cuda_gir[0].full_path()}
|
||||
endif
|
||||
|
||||
if gstva_dep.found()
|
||||
libs += [{'name': 'va', 'gir': va_gir, 'lib': gstva_dep, 'suffix': 'lib'}]
|
||||
libs_doc_gi_conf += {'va': va_gir[0].full_path()}
|
||||
else
|
||||
libs += [{'name': 'va', 'gir-file': join_paths(meson.global_source_root(), 'girs', 'GstVa-1.0.gir'), 'lib': []}]
|
||||
libs_doc_gi_conf += {'va': join_paths(meson.global_source_root(), 'girs', 'GstVa-1.0.gir')}
|
||||
endif
|
||||
|
||||
if gstvulkan_dep.found()
|
||||
libs += [
|
||||
{'name': 'vulkan', 'gir': vulkan_gir, 'lib': gstvulkan_dep, 'suffix': 'lib'},
|
||||
]
|
||||
libs_doc_gi_conf += {'vulkan': vulkan_gir[0].full_path()}
|
||||
if enabled_vulkan_winsys.contains('xcb')
|
||||
libs += [
|
||||
{'name': 'vulkan-xcb', 'gir': vulkan_xcb_gir, 'lib': gstvulkanxcb_dep, 'extra_sources' : [
|
||||
join_paths(root_rel, 'gst-libs/gst/vulkan/xcb/gstvkdisplay_xcb.[ch]'),
|
||||
]},
|
||||
]
|
||||
libs_doc_gi_conf += {'vulkan-xcb': vulkan_xcb_gir[0].full_path()}
|
||||
endif
|
||||
if enabled_vulkan_winsys.contains('wayland')
|
||||
libs += [
|
||||
{'name': 'vulkan-wayland', 'gir': vulkan_wayland_gir, 'lib': gstvulkanwayland_dep, 'extra_sources' : [
|
||||
join_paths(root_rel, 'gst-libs/gst/vulkan/wayland/gstvkdisplay_wayland.[ch]'),
|
||||
]},
|
||||
]
|
||||
libs_doc_gi_conf += {'vulkan-wayland': vulkan_wayland_gir[0].full_path()}
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
has_gi_extension = hotdoc.has_extensions('gi-extension')
|
||||
has_c_extension = hotdoc.has_extensions('c-extension')
|
||||
libs_doc = []
|
||||
foreach lib_def: libs
|
||||
name = lib_def['name']
|
||||
lib = lib_def['lib']
|
||||
extra_sources = lib_def.get('extra_sources', [])
|
||||
cdir = meson.current_source_dir()
|
||||
|
||||
c_source_patterns = lib_def.get('c_source_patterns', ['*.[hc]'])
|
||||
c_sources = []
|
||||
foreach pattern: c_source_patterns
|
||||
c_sources += join_paths(root_rel, 'gst-libs/gst', name, pattern)
|
||||
endforeach
|
||||
c_sources += extra_sources
|
||||
libs_doc_gi_source_file = configure_file(
|
||||
output: 'libs_doc_gi_sources.json',
|
||||
configuration: libs_doc_gi_conf,
|
||||
output_format: 'json')
|
||||
|
||||
if lib_def.has_key('gir') or lib_def.has_key('gir-file')
|
||||
if has_gi_extension
|
||||
if lib_def.has_key('gir')
|
||||
gir_targets = lib_def['gir']
|
||||
gir = gir_targets[0]
|
||||
gir_file = gir[0].full_path()
|
||||
else
|
||||
gir_targets = []
|
||||
gir = []
|
||||
gir_file = lib_def['gir-file']
|
||||
endif
|
||||
|
||||
prefix = lib_def.get('prefix', '')
|
||||
suffix = lib_def.get('suffix', '')
|
||||
libs_doc += [hotdoc.generate_doc(prefix + name + suffix,
|
||||
project_version: api_version,
|
||||
gi_c_sources: c_sources,
|
||||
gi_sources: gir_file,
|
||||
gi_c_source_filters: excludes,
|
||||
sitemap: join_paths('libs', name, 'sitemap.txt'),
|
||||
index: join_paths('libs/', name, 'index.md'),
|
||||
gi_index: join_paths('libs/', name, 'index.md'),
|
||||
gi_smart_index: true,
|
||||
gi_order_generated_subpages: true,
|
||||
dependencies: [lib, gir_targets],
|
||||
c_flags: '-DGST_USE_UNSTABLE_API',
|
||||
install: false,
|
||||
depends: gir,
|
||||
)]
|
||||
endif
|
||||
else
|
||||
if has_c_extension
|
||||
libs_doc += [hotdoc.generate_doc('gst-plugins-bad-' + name,
|
||||
sitemap: join_paths('libs', name, 'sitemap.txt'),
|
||||
index: join_paths('libs', name, 'index.md'),
|
||||
project_version: api_version,
|
||||
c_sources: c_sources,
|
||||
c_source_filters: excludes,
|
||||
c_index: join_paths('libs', name, 'index.md'),
|
||||
c_smart_index: true,
|
||||
c_order_generated_subpages: true,
|
||||
extra_c_flags: ['-DGST_USE_UNSTABLE_API'] + lib_def.get('extra_c_flags', []),
|
||||
dependencies: lib,
|
||||
install: false,
|
||||
)]
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
libs_hotdoc_configs = custom_target(
|
||||
'build-libs-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', libs_doc_gi_source_file,
|
||||
'--gi_c_source_file', libs_doc_source_file,
|
||||
'--gi_c_source_filters', excludes,
|
||||
'--c_source_filters', excludes,
|
||||
'--c_source_file', libs_doc_c_source_file,
|
||||
'--source_root', cdir / 'libs',
|
||||
'--gi_source_root', cdir / '..' / 'gst-libs' / 'gst',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-libs-configs.json',
|
||||
)
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
adaptivedemux_sources = files('gstadaptivedemux.c')
|
||||
adaptivedemux_headers = files('gstadaptivedemux.h')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: adaptivedemux_sources + adaptivedemux_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_c_sources += {
|
||||
'adaptivedemux': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
pkg_name = 'gstreamer-adaptivedemux-1.0'
|
||||
gstadaptivedemux = library('gstadaptivedemux-' + api_version,
|
||||
adaptivedemux_sources,
|
||||
|
@ -12,10 +21,11 @@ gstadaptivedemux = library('gstadaptivedemux-' + api_version,
|
|||
install : true,
|
||||
dependencies : [gstbase_dep, gsturidownloader_dep],
|
||||
)
|
||||
|
||||
gst_libraries += [[pkg_name, {'lib': gstadaptivedemux}]]
|
||||
|
||||
gstadaptivedemux_dep = declare_dependency(link_with : gstadaptivedemux,
|
||||
include_directories : [libsinc],
|
||||
dependencies : [gstbase_dep, gsturidownloader_dep])
|
||||
|
||||
meson.override_dependency(pkg_name, gstadaptivedemux_dep)
|
||||
meson.override_dependency(pkg_name, gstadaptivedemux_dep)
|
||||
|
|
|
@ -17,6 +17,15 @@ analytics_headers = files( 'analytics.h',
|
|||
'gsttensor.h')
|
||||
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: analytics_sources + analytics_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'analytics': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
pkg_name = 'gstreamer-analytics-1.0'
|
||||
gstanalytics = library('gstanalytics-' + api_version,
|
||||
analytics_sources,
|
||||
|
|
|
@ -2,6 +2,14 @@ badaudio_sources = files('gstnonstreamaudiodecoder.c', 'gstplanaraudioadapter.c'
|
|||
badaudio_headers = files('gstnonstreamaudiodecoder.h', 'audio-bad-prelude.h', 'gstplanaraudioadapter.h')
|
||||
install_headers(badaudio_headers, subdir : 'gstreamer-1.0/gst/audio')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: badaudio_sources + badaudio_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'audio': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstbadaudio = library('gstbadaudio-' + api_version,
|
||||
badaudio_sources,
|
||||
|
|
|
@ -11,6 +11,15 @@ camerabin_headers = files(
|
|||
)
|
||||
install_headers(camerabin_headers, subdir : 'gstreamer-1.0/gst/basecamerabinsrc')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: camerabin_sources + camerabin_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'basecamerabinsrc': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstbasecamerabin = library('gstbasecamerabinsrc-' + api_version,
|
||||
camerabin_sources,
|
||||
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_BASE_CAMERA_BIN_SRC', '-DG_LOG_DOMAIN="GStreamer-BaseCameraBinSrc"'],
|
||||
|
|
|
@ -24,7 +24,7 @@ codecparser_sources = files([
|
|||
'gstjpegbitwriter.c',
|
||||
'gstlcevcmeta.c',
|
||||
])
|
||||
codecparser_headers = [
|
||||
codecparser_headers = files([
|
||||
'codecparsers-prelude.h',
|
||||
'gstmpegvideoparser.h',
|
||||
'gsth264parser.h',
|
||||
|
@ -39,9 +39,19 @@ codecparser_headers = [
|
|||
'gstvp9parser.h',
|
||||
'gstav1parser.h',
|
||||
'gstlcevcmeta.h',
|
||||
]
|
||||
'gsth266parser.h',
|
||||
])
|
||||
install_headers(codecparser_headers, subdir : 'gstreamer-1.0/gst/codecparsers')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: codecparser_sources + codecparser_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_c_sources += {
|
||||
'codecparsers': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
cp_args = [
|
||||
'-DGST_USE_UNSTABLE_API',
|
||||
'-DBUILDING_GST_CODEC_PARSERS',
|
||||
|
|
|
@ -38,6 +38,15 @@ cp_args = [
|
|||
'-DG_LOG_DOMAIN="GStreamer-Codecs"'
|
||||
]
|
||||
|
||||
doc_sources = []
|
||||
foreach s: codecs_sources + codecs_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'codecs': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstcodecs = library('gstcodecs-' + api_version,
|
||||
codecs_sources,
|
||||
c_args : gst_plugins_bad_args + cp_args,
|
||||
|
|
|
@ -23,6 +23,15 @@ cuda_headers = files([
|
|||
'gstcudautils.h',
|
||||
])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: cuda_sources + cuda_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'cuda': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
extra_deps = []
|
||||
gstcuda_dep = dependency('', required : false)
|
||||
cuda_stubinc = include_directories('./stub')
|
||||
|
|
|
@ -25,6 +25,15 @@ extra_args = [
|
|||
'-DG_LOG_DOMAIN="GStreamer-Dxva"',
|
||||
]
|
||||
|
||||
doc_sources = []
|
||||
foreach s: dxva_sources + dxva_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'dxva': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
if host_system != 'windows' and not build_gir
|
||||
subdir_done()
|
||||
endif
|
||||
|
|
|
@ -2,6 +2,15 @@ insert_sources = files('gstinsertbin.c')
|
|||
insert_headers = files('gstinsertbin.h')
|
||||
install_headers(insert_headers, subdir : 'gstreamer-1.0/gst/insertbin')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: insert_sources + insert_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'insertbin': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstinsertbin = library('gstinsertbin-' + api_version,
|
||||
insert_sources,
|
||||
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_INSERT_BIN', '-DG_LOG_DOMAIN="GStreamer-InsertBin"'],
|
||||
|
|
|
@ -23,6 +23,15 @@ mpegts_headers = files(
|
|||
)
|
||||
install_headers(mpegts_headers, subdir : 'gstreamer-1.0/gst/mpegts')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: mpegts_sources + mpegts_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'mpegts': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
mpegts_enums = gnome.mkenums_simple('gstmpegts-enumtypes',
|
||||
sources : mpegts_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -34,6 +34,15 @@ gstmse_sources_public = files(
|
|||
'gstsourcebufferlist.c',
|
||||
)
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gstmse_headers_private + gstmse_sources_private + gstmse_headers_public + gstmse_sources_public
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'mse': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstmse_header_dir = 'gstreamer-' + api_version + '/gst/mse/'
|
||||
|
||||
gstmse_enums_private = gnome.mkenums_simple('mse-enumtypes-private',
|
||||
|
|
|
@ -3,16 +3,16 @@ if get_option('opencv').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
opencv_sources = [
|
||||
opencv_sources = files([
|
||||
'gstopencvutils.cpp',
|
||||
'gstopencvvideofilter.cpp',
|
||||
]
|
||||
])
|
||||
|
||||
opencv_headers = [
|
||||
opencv_headers = files([
|
||||
'opencv-prelude.h',
|
||||
'gstopencvutils.h',
|
||||
'gstopencvvideofilter.h',
|
||||
]
|
||||
])
|
||||
|
||||
libopencv_headers = [
|
||||
'opencv2/bgsegm.hpp',
|
||||
|
@ -25,6 +25,7 @@ libopencv_headers = [
|
|||
'opencv2/tracking.hpp',
|
||||
]
|
||||
|
||||
|
||||
gstopencv_cargs = ['-DGST_HAAR_CASCADES_DIR="@0@"']
|
||||
|
||||
opencv_dep = dependency('opencv', version : ['>= 3.0.0', '< 3.5.0'], required : false)
|
||||
|
@ -88,6 +89,15 @@ if opencv_found
|
|||
dependencies : [gstbase_dep, gstvideo_dep, opencv_dep],
|
||||
)
|
||||
|
||||
doc_sources = []
|
||||
foreach s: opencv_sources + opencv_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_c_sources += {
|
||||
'opencv': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gst_libraries += [[pkg_name, {'lib': gstopencv}]]
|
||||
gstopencv_dep = declare_dependency(link_with: gstopencv,
|
||||
include_directories : [libsinc],
|
||||
|
|
|
@ -21,6 +21,15 @@ gstplay_headers = files(
|
|||
|
||||
install_headers(gstplay_headers, subdir : 'gstreamer-' + api_version + '/gst/play/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gstplay_sources + gstplay_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'play': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstplay = library('gstplay-' + api_version,
|
||||
gstplay_sources,
|
||||
c_args : gst_plugins_bad_args + ['-DBUILDING_GST_PLAY', '-DG_LOG_DOMAIN="GStreamer-Play"'],
|
||||
|
|
|
@ -24,6 +24,15 @@ gstplayer_headers = files([
|
|||
|
||||
install_headers(gstplayer_headers, subdir : 'gstreamer-' + api_version + '/gst/player/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gstplayer_sources + gstplayer_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'player': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstplayer = library('gstplayer-' + api_version,
|
||||
gstplayer_sources,
|
||||
c_args : gst_plugins_bad_args + ['-DBUILDING_GST_PLAYER', '-DG_LOG_DOMAIN="GStreamer-Player"'],
|
||||
|
|
|
@ -3,6 +3,15 @@ headers = files(['gsttranscoder.h', 'transcoder-prelude.h', 'gsttranscoder-signa
|
|||
|
||||
install_headers(headers, subdir : 'gstreamer-' + api_version + '/gst/transcoder')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: sources + headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'transcoder': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
transcoder_enums = gnome.mkenums_simple('transcoder-enumtypes',
|
||||
sources : headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -39,6 +39,15 @@ va_win32_headers = files(
|
|||
'gstvadisplay_win32.h',
|
||||
)
|
||||
|
||||
doc_sources = []
|
||||
foreach s: va_sources + va_sources_priv + va_headers + va_linux_sources + va_linux_headers + va_win32_sources + va_win32_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'va': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstva_dep = dependency('', required : false)
|
||||
platform_deps = []
|
||||
extra_args = ['-DGST_USE_UNSTABLE_API',
|
||||
|
|
|
@ -77,6 +77,14 @@ vulkan_headers = files(
|
|||
'vulkan_fwd.h',
|
||||
'vulkan.h',
|
||||
)
|
||||
doc_sources = []
|
||||
foreach s: vulkan_sources + vulkan_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'vulkan': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
vulkan_priv_sources = []
|
||||
vulkan_xcb_sources = []
|
||||
|
@ -446,6 +454,15 @@ if enabled_vulkan_winsys.contains('xcb')
|
|||
)
|
||||
vulkan_xcb_gir = []
|
||||
if build_gir
|
||||
doc_sources = []
|
||||
foreach s: vulkan_xcb_sources + vulkan_xcb_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'vulkan-xcb': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gir = {
|
||||
'sources' : vulkan_xcb_sources + vulkan_xcb_headers,
|
||||
'namespace' : 'GstVulkanXCB',
|
||||
|
@ -483,6 +500,15 @@ if enabled_vulkan_winsys.contains('wayland')
|
|||
)
|
||||
vulkan_wayland_gir = []
|
||||
if build_gir
|
||||
doc_sources = []
|
||||
foreach s: vulkan_wayland_sources + vulkan_wayland_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'vulkan-wayland': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gir = {
|
||||
'sources' : vulkan_wayland_sources + vulkan_wayland_headers,
|
||||
'namespace' : 'GstVulkanWayland',
|
||||
|
|
|
@ -36,6 +36,15 @@ webrtc_enumtypes_headers = files([
|
|||
'webrtc_fwd.h',
|
||||
])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: webrtc_sources + webrtc_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'webrtc': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
webrtc_enums = gnome.mkenums_simple('webrtc-enumtypes',
|
||||
sources : webrtc_enumtypes_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
libs_sources = {}
|
||||
libs_c_sources = {}
|
||||
|
||||
subdir('gst')
|
||||
|
|
|
@ -56,37 +56,8 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
build_hotdoc = true
|
||||
|
||||
docconf = configuration_data()
|
||||
docconf.set('GST_API_VERSION', api_version)
|
||||
|
||||
|
@ -108,97 +79,67 @@ foreach h: ['pbutils-private.h', 'gsttageditingprivate.h', 'id3v2.h',
|
|||
libs_excludes += [join_paths(meson.current_source_dir(), '..', 'gst-libs/gst/*/', h)]
|
||||
endforeach
|
||||
|
||||
libs = [
|
||||
['allocators', allocators_gir, allocators_dep],
|
||||
['app', app_gir, app_dep],
|
||||
['audio', audio_gir, audio_dep],
|
||||
# FIXME! ['fft', fft_gir, fft_dep],
|
||||
['pbutils', pbutils_gir, pbutils_dep],
|
||||
['rtp', rtp_gir, rtp_dep],
|
||||
['rtsp', rtsp_gir, rtsp_dep],
|
||||
['sdp', sdp_gir, sdp_dep],
|
||||
['tag', tag_gir, tag_dep],
|
||||
['video', video_gir, video_dep],
|
||||
]
|
||||
libs_doc_source_file = configure_file(
|
||||
output: 'libs_doc_sources.json',
|
||||
configuration: libs_sources,
|
||||
output_format: 'json')
|
||||
|
||||
if build_gstgl
|
||||
libs += [['gl', gl_gir, gstgl_dep]]
|
||||
if enabled_gl_platforms.contains('egl')
|
||||
libs += [['gl-egl', gl_egl_gir, gstgl_dep, [
|
||||
join_paths('../gst-libs/gst', 'gl', 'egl', 'gstegl.[ch]'),
|
||||
join_paths('../gst-libs/gst', 'gl', 'egl', 'gsteglimage.[ch]'),
|
||||
join_paths('../gst-libs/gst', 'gl', 'egl', 'gstgldisplay_egl.[ch]'),
|
||||
join_paths('../gst-libs/gst', 'gl', 'egl', 'gstgldisplay_egl_device.[ch]'),
|
||||
join_paths('../gst-libs/gst', 'gl', 'egl', 'gstglmemoryegl.[ch]'),
|
||||
]]]
|
||||
endif
|
||||
if enabled_gl_winsys.contains('x11')
|
||||
libs += [['gl-x11', gl_x11_gir, gstgl_dep, [
|
||||
join_paths('../gst-libs/gst', 'gl', 'x11', 'gstgldisplay_x11.[ch]'),
|
||||
]]]
|
||||
endif
|
||||
if enabled_gl_winsys.contains('wayland')
|
||||
libs += [['gl-wayland', gl_wayland_gir, gstgl_dep, [
|
||||
join_paths('../gst-libs/gst', 'gl', 'wayland', 'gstgldisplay_wayland.[ch]'),
|
||||
]]]
|
||||
endif
|
||||
endif
|
||||
libs_doc_c_source_file = configure_file(
|
||||
output: 'libs_doc_c_sources.json',
|
||||
configuration: libs_c_sources,
|
||||
output_format: 'json')
|
||||
|
||||
# Used to avoid conflicts with known plugin names
|
||||
project_names = {
|
||||
'app': 'applib',
|
||||
'rtp': 'rtplib',
|
||||
'rtsp': 'rtsplib',
|
||||
libs_doc_gi_conf = {
|
||||
'allocators': allocators_gir[0].full_path(),
|
||||
'app': app_gir[0].full_path(),
|
||||
'audio': audio_gir[0].full_path(),
|
||||
'pbutils': pbutils_gir[0].full_path(),
|
||||
'rtp': rtp_gir[0].full_path(),
|
||||
'rtsp': rtsp_gir[0].full_path(),
|
||||
'sdp': sdp_gir[0].full_path(),
|
||||
'tag': tag_gir[0].full_path(),
|
||||
'video': video_gir[0].full_path(),
|
||||
}
|
||||
|
||||
libs_doc = []
|
||||
foreach lib: libs
|
||||
name = lib[0]
|
||||
gir = lib[1]
|
||||
deps = [lib[2], gir]
|
||||
extra_sources = []
|
||||
if lib.length() >= 4
|
||||
extra_sources = lib[3]
|
||||
if build_gstgl
|
||||
libs_doc_gi_conf += {'gl': gl_gir[0].full_path()}
|
||||
if enabled_gl_platforms.contains('egl')
|
||||
libs_doc_gi_conf += {'gl-egl': gl_egl_gir[0].full_path()}
|
||||
endif
|
||||
if enabled_gl_winsys.contains('x11')
|
||||
libs_doc_gi_conf += {'gl-x11': gl_x11_gir[0].full_path()}
|
||||
endif
|
||||
if enabled_gl_winsys.contains('wayland')
|
||||
libs_doc_gi_conf += {'gl-wayland': gl_wayland_gir[0].full_path()}
|
||||
endif
|
||||
project_name = project_names.get(name, name)
|
||||
libs_doc += [hotdoc.generate_doc(project_name,
|
||||
project_version: api_version,
|
||||
gi_c_sources: [join_paths('../gst-libs/gst', name, '*.[hc]')] + extra_sources,
|
||||
gi_sources: gir[0].full_path(),
|
||||
gi_c_source_filters: libs_excludes,
|
||||
gi_c_source_roots: [join_paths(meson.current_source_dir(), '../gst-libs/gst/' + name), ],
|
||||
sitemap: 'libs/' + name + '/sitemap.txt',
|
||||
index: 'libs/' + name + '/index.md',
|
||||
gi_index: 'libs/' + name + '/index.md',
|
||||
gi_smart_index: true,
|
||||
gi_order_generated_subpages: true,
|
||||
dependencies: deps,
|
||||
install: false,
|
||||
depends: gir[0],
|
||||
)]
|
||||
endforeach
|
||||
|
||||
if not hotdoc.has_extensions('c-extension')
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but c-extension missing')
|
||||
endif
|
||||
message('c-extension not found, not building documentation')
|
||||
else
|
||||
libs_doc += [hotdoc.generate_doc('riff',
|
||||
project_version: api_version,
|
||||
c_sources: ['../gst-libs/gst/riff/*.[hc]'],
|
||||
c_source_filters: libs_excludes,
|
||||
sitemap: 'libs/riff/sitemap.txt',
|
||||
index: 'libs/riff/index.md',
|
||||
c_index: 'libs/riff/index.md',
|
||||
c_smart_index: true,
|
||||
c_order_generated_subpages: true,
|
||||
dependencies: [gst_base_dep, riff_dep],
|
||||
install: false,
|
||||
disable_incremental_build: true,
|
||||
)]
|
||||
endif
|
||||
|
||||
libs_doc_gi_source_file = configure_file(
|
||||
output: 'libs_doc_gi_sources.json',
|
||||
configuration: libs_doc_gi_conf,
|
||||
output_format: 'json')
|
||||
|
||||
libs_hotdoc_configs = custom_target(
|
||||
'build-libs-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', libs_doc_gi_source_file,
|
||||
'--gi_c_source_file', libs_doc_source_file,
|
||||
'--gi_c_source_filters', libs_excludes,
|
||||
'--c_source_filters', libs_excludes,
|
||||
'--c_source_file', libs_doc_c_source_file,
|
||||
'--source_root', cdir / 'libs',
|
||||
'--gi_source_root', cdir / '..' / 'gst-libs' / 'gst',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-libs-configs.json',
|
||||
)
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
plugin_libraries = {}
|
||||
|
|
|
@ -17,6 +17,15 @@ gst_allocators_sources = files([
|
|||
'gstshmallocator.c',
|
||||
])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_allocators_sources + gst_allocators_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'allocators': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gst_allocators_cargs = [
|
||||
gst_plugins_base_args,
|
||||
'-DBUILDING_GST_ALLOCATORS',
|
||||
|
|
|
@ -7,6 +7,15 @@ app_mkenum_headers = files([
|
|||
app_headers = app_mkenum_headers + files([ 'app.h', 'app-prelude.h', 'gstappsrc.h', 'gstappsink.h' ])
|
||||
install_headers(app_headers, subdir : 'gstreamer-1.0/gst/app/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: app_sources + app_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'app': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
app_enums = gnome.mkenums_simple('app-enumtypes',
|
||||
sources : app_mkenum_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -66,6 +66,15 @@ audio_headers = audio_mkenum_headers + files([
|
|||
])
|
||||
install_headers(audio_headers, subdir : 'gstreamer-1.0/gst/audio/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: audio_src + audio_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'audio': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
audio_enums = gnome.mkenums_simple('audio-enumtypes',
|
||||
sources : audio_mkenum_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -90,6 +90,15 @@ gl_headers = gir_gl_headers + files([
|
|||
'gstglfuncs.h',
|
||||
])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gl_sources + gl_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'gl': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gl_prototype_headers = files([
|
||||
'glprototypes/all_functions.h',
|
||||
'glprototypes/base.h',
|
||||
|
@ -565,6 +574,16 @@ if need_platform_egl != 'no'
|
|||
'egl/gstglmemoryegl.h',
|
||||
'egl/gstgldisplay_egl_device.h',
|
||||
])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gl_egl_sources + gl_egl_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'gl-egl': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gl_platform_deps += egl_dep
|
||||
glconf.set('GST_GL_HAVE_PLATFORM_EGL', 1)
|
||||
|
||||
|
@ -668,6 +687,7 @@ if need_win_wayland != 'no'
|
|||
'wayland/wayland.h',
|
||||
'wayland/gstgldisplay_wayland.h'
|
||||
])
|
||||
|
||||
glconf.set('GST_GL_HAVE_WINDOW_WAYLAND', 1)
|
||||
gl_winsys_deps += [wayland_client_dep, wayland_cursor_dep, wayland_egl_dep]
|
||||
enabled_gl_winsys += 'wayland'
|
||||
|
@ -707,6 +727,7 @@ if need_win_x11 != 'no'
|
|||
'x11/x11.h',
|
||||
'x11/gstgldisplay_x11.h',
|
||||
])
|
||||
|
||||
glconf.set('GST_GL_HAVE_WINDOW_X11', 1)
|
||||
gl_winsys_deps += [x11_dep, xcb_dep]
|
||||
enabled_gl_winsys += 'x11'
|
||||
|
@ -1187,6 +1208,16 @@ if build_gstgl
|
|||
)
|
||||
gl_x11_gir = []
|
||||
if build_gir
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gl_x11_sources + gl_x11_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'gl-x11': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gir = {
|
||||
'sources' : gl_x11_sources + gl_x11_headers,
|
||||
'namespace' : 'GstGLX11',
|
||||
|
@ -1224,6 +1255,15 @@ if build_gstgl
|
|||
)
|
||||
gl_wayland_gir = []
|
||||
if build_gir
|
||||
doc_sources = []
|
||||
foreach s: gl_wayland_sources + gl_wayland_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'gl-wayland': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gir = {
|
||||
'sources' : gl_wayland_sources + gl_wayland_headers,
|
||||
'namespace' : 'GstGLWayland',
|
||||
|
|
|
@ -36,6 +36,15 @@ pbutils_headers = files([
|
|||
])
|
||||
install_headers(pbutils_headers, subdir : 'gstreamer-1.0/gst/pbutils/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: pbutils_sources + pbutils_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'pbutils': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
pbutils_mkenum_headers = pbutils_headers
|
||||
|
||||
pbutils_enums = gnome.mkenums_simple('pbutils-enumtypes',
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
riff_sources = [
|
||||
riff_sources = files(
|
||||
'riff.c',
|
||||
'riff-media.c',
|
||||
'riff-read.c',
|
||||
]
|
||||
)
|
||||
|
||||
riff_headers = [
|
||||
riff_headers = files(
|
||||
'riff.h',
|
||||
'riff-prelude.h',
|
||||
'riff-ids.h',
|
||||
'riff-media.h',
|
||||
'riff-read.h',
|
||||
]
|
||||
)
|
||||
install_headers(riff_headers, subdir : 'gstreamer-1.0/gst/riff/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: riff_sources + riff_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_c_sources += {
|
||||
'riff': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
riff_deps = [audio_dep, tag_dep]
|
||||
gstriff = library('gstriff-@0@'.format(api_version),
|
||||
riff_sources,
|
||||
|
|
|
@ -24,6 +24,15 @@ rtp_headers = files([
|
|||
])
|
||||
install_headers(rtp_headers, subdir : 'gstreamer-1.0/gst/rtp/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: rtp_sources + rtp_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'rtp': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
rtp_enums = gnome.mkenums_simple('gstrtp-enumtypes',
|
||||
sources : rtp_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -22,6 +22,15 @@ rtsp_headers = files([
|
|||
])
|
||||
install_headers(rtsp_headers, subdir : 'gstreamer-1.0/gst/rtsp/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: rtsp_sources + rtsp_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'rtsp': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
rtsp_enums = gnome.mkenums_simple('gstrtsp-enumtypes',
|
||||
sources : rtsp_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -9,6 +9,16 @@ install_headers(gst_sdp_headers, subdir : 'gstreamer-1.0/gst/sdp/')
|
|||
|
||||
sdp_deps = [rtp_dep, gst_dep, gio_dep, pbutils_dep]
|
||||
gst_sdp_sources = files(['gstsdpmessage.c', 'gstmikey.c'])
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_sdp_sources + gst_sdp_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'sdp': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gstsdp = library('gstsdp-@0@'.format(api_version),
|
||||
gst_sdp_sources,
|
||||
c_args : gst_plugins_base_args + ['-DBUILDING_GST_SDP', '-DG_LOG_DOMAIN="GStreamer-SDP"'],
|
||||
|
|
|
@ -26,6 +26,15 @@ tag_headers = tag_mkenum_headers + files([
|
|||
])
|
||||
install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: tag_sources + tag_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'tag': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
tag_enums = gnome.mkenums_simple('tag-enumtypes',
|
||||
sources : tag_mkenum_headers,
|
||||
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
|
||||
|
|
|
@ -80,6 +80,15 @@ video_headers = files([
|
|||
])
|
||||
install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: video_sources + video_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'video': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
video_mkenum_headers = [
|
||||
'video.h',
|
||||
'video-anc.h',
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
libs_sources = {}
|
||||
# For libraries with no gir, to be documented with hotdoc's C extension
|
||||
libs_c_sources = {}
|
||||
|
||||
subdir('gst')
|
||||
|
|
|
@ -45,43 +45,11 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
docconf = configuration_data()
|
||||
docconf.set('GST_API_VERSION', api_version)
|
||||
configure_file(input : 'gst_api_version.in',
|
||||
output : 'gst_api_version.md',
|
||||
configuration : docconf)
|
||||
libs_doc = []
|
||||
plugins_doc = []
|
||||
excludes = []
|
||||
build_hotdoc = true
|
||||
foreach f: ['gstgdkpixbufplugin.c']
|
||||
|
|
|
@ -45,36 +45,6 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
build_hotdoc = true
|
||||
docconf = configuration_data()
|
||||
docconf.set('GST_API_VERSION', api_version)
|
||||
|
|
|
@ -53,51 +53,45 @@ if get_option('doc').disabled()
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
build_hotdoc = true
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
cdir = meson.current_source_dir()
|
||||
doc_sources = []
|
||||
foreach s: rtsp_server_sources + rtsp_server_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
build_hotdoc = true
|
||||
hotdoc = import('hotdoc')
|
||||
lib_sources = {
|
||||
'rtspserver': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
libs_doc = [hotdoc.generate_doc('gst-rtsp-server',
|
||||
project_version: api_version,
|
||||
gi_c_sources: ['../gst/rtsp-server/*.[hc]'],
|
||||
gi_sources: rtsp_server_gir[0].full_path(),
|
||||
sitemap: 'sitemap.txt',
|
||||
index: 'index.md',
|
||||
gi_index: 'index.md',
|
||||
gi_smart_index: true,
|
||||
gi_order_generated_subpages: true,
|
||||
depends: rtsp_server_gir[0],
|
||||
)]
|
||||
lib_doc_source_file = configure_file(
|
||||
output: 'lib_doc_sources.json',
|
||||
configuration: lib_sources,
|
||||
output_format: 'json')
|
||||
|
||||
lib_doc_gi_source_file = configure_file(
|
||||
output: 'lib_doc_gi_sources.json',
|
||||
configuration: {'rtspserver': rtsp_server_gir[0].full_path()},
|
||||
output_format: 'json')
|
||||
|
||||
lib_hotdoc_config = custom_target(
|
||||
'build-gst-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', lib_doc_gi_source_file,
|
||||
'--gi_c_source_file', lib_doc_source_file,
|
||||
'--source_root', cdir,
|
||||
'--gi_source_root', cdir / '..' / 'gst' / 'rtsp-server',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-lib-configs.json',
|
||||
)
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
|
@ -136,5 +130,3 @@ plugin_hotdoc_configs = custom_target(
|
|||
input: plugins_cache,
|
||||
output: 'hotdoc-configs.json',
|
||||
)
|
||||
|
||||
doc = libs_doc[0]
|
||||
|
|
|
@ -32,6 +32,198 @@ try:
|
|||
except ImportError: # python <3.3
|
||||
from collections import Mapping
|
||||
|
||||
# Some project names need to be amended, to avoid conflicts with plugins.
|
||||
# We also map gst to gstreamer to preserve existing links
|
||||
PROJECT_NAME_MAP = {
|
||||
'gst': 'gstreamer',
|
||||
'app': 'applib',
|
||||
'rtp': 'rtplib',
|
||||
'rtsp': 'rtsplib',
|
||||
'webrtc': 'webrtclib',
|
||||
'mse': 'mselib',
|
||||
'va': 'valib',
|
||||
'vulkan': 'vulkanlib',
|
||||
'rtspserver': 'gst-rtsp-server',
|
||||
'validate': 'gst-devtools',
|
||||
'ges': 'gst-editing-services',
|
||||
'opencv': 'opencvlib',
|
||||
}
|
||||
|
||||
|
||||
def get_c_flags(dep, buildroot, uninstalled=True):
|
||||
env = {}
|
||||
if uninstalled:
|
||||
env['PKG_CONFIG_PATH'] = os.path.join(buildroot, 'meson-uninstalled')
|
||||
res = subprocess.run(['pkg-config', '--cflags', dep], env = env, capture_output=True)
|
||||
|
||||
return [res.stdout.decode().strip()]
|
||||
|
||||
class GstLibsHotdocConfGen:
|
||||
def __init__(self):
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--srcdir', type=P)
|
||||
parser.add_argument('--builddir', type=P)
|
||||
parser.add_argument('--buildroot', type=P)
|
||||
parser.add_argument('--source_root', type=P)
|
||||
parser.add_argument('--gi_source_file', type=P)
|
||||
parser.add_argument('--gi_c_source_file', type=P)
|
||||
parser.add_argument('--gi_source_root', type=P)
|
||||
parser.add_argument('--c_source_file', type=P)
|
||||
parser.add_argument('--project_version')
|
||||
parser.add_argument('--gi_c_source_filters', nargs='*', default=[])
|
||||
parser.add_argument('--c_source_filters', nargs='*', default=[])
|
||||
parser.add_argument('--output', type=P)
|
||||
|
||||
parser.parse_args(namespace=self, args=sys.argv[2:])
|
||||
|
||||
def generate_libs_configs(self):
|
||||
conf_files = []
|
||||
|
||||
with self.gi_c_source_file.open() as fd:
|
||||
gi_c_source_map = json.load(fd)
|
||||
|
||||
with self.gi_source_file.open() as fd:
|
||||
gi_source_map = json.load(fd)
|
||||
|
||||
if self.c_source_file is not None:
|
||||
with self.c_source_file.open() as fd:
|
||||
c_source_map = json.load(fd)
|
||||
else:
|
||||
c_source_map = {}
|
||||
|
||||
for libname in gi_source_map.keys():
|
||||
gi_c_sources = gi_c_source_map[libname].split(os.pathsep)
|
||||
gi_sources = gi_source_map[libname].split(os.pathsep)
|
||||
|
||||
project_name = PROJECT_NAME_MAP.get(libname, libname)
|
||||
|
||||
if project_name == 'audio' and gi_sources[0].endswith('GstBadAudio-1.0.gir'):
|
||||
project_name = 'bad-audio'
|
||||
|
||||
conf_path = self.builddir / f'{project_name}-doc.json'
|
||||
conf_files.append(str(conf_path))
|
||||
|
||||
index_path = os.path.join(self.source_root, 'index.md')
|
||||
if not os.path.exists(index_path):
|
||||
index_path = os.path.join(self.source_root, libname, 'index.md')
|
||||
sitemap_path = os.path.join(self.source_root, libname, 'sitemap.txt')
|
||||
gi_index_path = os.path.join(self.source_root, libname, 'gi-index.md')
|
||||
else:
|
||||
sitemap_path = os.path.join(self.source_root, 'sitemap.txt')
|
||||
gi_index_path = os.path.join(self.source_root, 'gi-index.md')
|
||||
|
||||
assert(os.path.exists(index_path))
|
||||
assert(os.path.exists(sitemap_path))
|
||||
if not os.path.exists(gi_index_path):
|
||||
gi_index_path = index_path
|
||||
|
||||
gi_source_root = os.path.join(self.gi_source_root, libname)
|
||||
if not os.path.exists(gi_source_root):
|
||||
gi_source_root = os.path.join(self.gi_source_root)
|
||||
|
||||
conf = {
|
||||
'sitemap': sitemap_path,
|
||||
'index': index_path,
|
||||
'gi_index': gi_index_path,
|
||||
'output': f'{project_name}-doc',
|
||||
'conf_file': str(conf_path),
|
||||
'project_name': project_name,
|
||||
'project_version': self.project_version,
|
||||
'gi_smart_index': True,
|
||||
'gi_order_generated_subpages': True,
|
||||
'gi_c_sources': gi_c_sources,
|
||||
'gi_c_source_roots': [
|
||||
os.path.abspath(gi_source_root),
|
||||
os.path.abspath(os.path.join(self.srcdir, '..',)),
|
||||
os.path.abspath(os.path.join(self.builddir, '..',)),
|
||||
],
|
||||
'include_paths': [
|
||||
os.path.join(self.builddir),
|
||||
os.path.join(self.srcdir),
|
||||
],
|
||||
'gi_sources': gi_sources,
|
||||
'gi_c_source_filters': [str(s) for s in self.gi_c_source_filters],
|
||||
'extra_assets': os.path.join(self.srcdir, 'images'),
|
||||
}
|
||||
|
||||
with conf_path.open('w') as f:
|
||||
json.dump(conf, f, indent=4)
|
||||
|
||||
for libname in c_source_map.keys():
|
||||
c_sources = c_source_map[libname].split(os.pathsep)
|
||||
|
||||
project_name = PROJECT_NAME_MAP.get(libname, libname)
|
||||
|
||||
conf_path = self.builddir / f'{project_name}-doc.json'
|
||||
conf_files.append(str(conf_path))
|
||||
|
||||
index_path = os.path.join(self.source_root, 'index.md')
|
||||
if not os.path.exists(index_path):
|
||||
index_path = os.path.join(self.source_root, libname, 'index.md')
|
||||
sitemap_path = os.path.join(self.source_root, libname, 'sitemap.txt')
|
||||
c_index_path = os.path.join(self.source_root, libname, 'c-index.md')
|
||||
else:
|
||||
sitemap_path = os.path.join(self.source_root, 'sitemap.txt')
|
||||
c_index_path = os.path.join(self.source_root, 'c-index.md')
|
||||
|
||||
assert(os.path.exists(index_path))
|
||||
assert(os.path.exists(sitemap_path))
|
||||
if not os.path.exists(c_index_path):
|
||||
c_index_path = index_path
|
||||
|
||||
|
||||
try:
|
||||
if libname == 'adaptivedemux':
|
||||
c_flags = get_c_flags(f'gstreamer-base-{self.project_version}', self.buildroot)
|
||||
c_flags += [f'-I{self.srcdir}/../gst-libs']
|
||||
elif libname == 'opencv':
|
||||
c_flags = get_c_flags(f'gstreamer-base-{self.project_version}', self.buildroot)
|
||||
c_flags += get_c_flags(f'gstreamer-video-{self.project_version}', self.buildroot)
|
||||
c_flags += get_c_flags(f'opencv', self.buildroot, uninstalled = True)
|
||||
c_flags += [f'-I{self.srcdir}/../gst-libs']
|
||||
else:
|
||||
c_flags = get_c_flags(f'gstreamer-{libname}-{self.project_version}', self.buildroot)
|
||||
except Exception as e:
|
||||
print (f'Cannot document {libname}')
|
||||
print (e)
|
||||
continue
|
||||
|
||||
c_flags += ['-DGST_USE_UNSTABLE_API']
|
||||
|
||||
if libname == 'opencv':
|
||||
c_flags += ['-x c++']
|
||||
|
||||
conf = {
|
||||
'sitemap': sitemap_path,
|
||||
'index': index_path,
|
||||
'c_index': c_index_path,
|
||||
'output': f'{project_name}-doc',
|
||||
'conf_file': str(conf_path),
|
||||
'project_name': project_name,
|
||||
'project_version': self.project_version,
|
||||
'c_smart_index': True,
|
||||
'c_order_generated_subpages': True,
|
||||
'c_sources': c_sources,
|
||||
'include_paths': [
|
||||
os.path.join(self.builddir),
|
||||
os.path.join(self.srcdir),
|
||||
],
|
||||
'c_source_filters': [str(s) for s in self.c_source_filters],
|
||||
'extra_assets': os.path.join(self.srcdir, 'images'),
|
||||
'extra_c_flags': c_flags
|
||||
}
|
||||
|
||||
with conf_path.open('w') as f:
|
||||
json.dump(conf, f, indent=4)
|
||||
|
||||
|
||||
if self.output is not None:
|
||||
with self.output.open('w') as f:
|
||||
json.dump(conf_files, f, indent=4)
|
||||
|
||||
return conf_files
|
||||
|
||||
|
||||
|
||||
class GstPluginsHotdocConfGen:
|
||||
def __init__(self):
|
||||
|
@ -159,6 +351,10 @@ if __name__ == "__main__":
|
|||
fs = GstPluginsHotdocConfGen().generate_plugins_configs()
|
||||
print(os.pathsep.join(fs))
|
||||
sys.exit(0)
|
||||
elif sys.argv[1] == "hotdoc-lib-config":
|
||||
fs = GstLibsHotdocConfGen().generate_libs_configs()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
cache_filename = sys.argv[1]
|
||||
output_filename = sys.argv[2]
|
||||
|
|
|
@ -44,36 +44,6 @@ gst_plugins_doc_dep = custom_target('build-doc-cache',
|
|||
build_always_stale: true,
|
||||
)
|
||||
|
||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||
if not hotdoc_p.found()
|
||||
message('Hotdoc not found, not building the documentation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
hotdoc_req = '>= 0.11.0'
|
||||
hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
|
||||
if not hotdoc_version.version_compare(hotdoc_req)
|
||||
if get_option('doc').enabled()
|
||||
error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
else
|
||||
message('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
|
||||
subdir_done()
|
||||
endif
|
||||
endif
|
||||
|
||||
hotdoc = import('hotdoc')
|
||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||
foreach extension: required_hotdoc_extensions
|
||||
if not hotdoc.has_extensions(extension)
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but @0@ missing'.format(extension))
|
||||
endif
|
||||
|
||||
message('@0@ extension not found, not building documentation'.format(extension))
|
||||
subdir_done()
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if static_build
|
||||
if get_option('doc').enabled()
|
||||
error('Documentation enabled but not supported when building statically.')
|
||||
|
@ -121,50 +91,79 @@ foreach h: ['gettext.h', 'glib-compat-private.h', 'glib-compat.h',
|
|||
gst_excludes += [join_paths(meson.current_source_dir(), '..', 'gst', h)]
|
||||
endforeach
|
||||
|
||||
libs_doc = [hotdoc.generate_doc('gstreamer',
|
||||
project_version: api_version,
|
||||
gi_c_sources: gst_sources + gst_headers,
|
||||
gi_sources: [gst_gir[0].full_path()],
|
||||
gi_c_source_filters: gst_excludes,
|
||||
sitemap: 'gst/sitemap.txt',
|
||||
index: 'gst/index.md',
|
||||
gi_index: 'gst/gi-index.md',
|
||||
gi_smart_index: true,
|
||||
gi_c_source_roots: [join_paths(meson.current_source_dir(), '../gst/'), ],
|
||||
dependencies: [gst_dep, gmodule_dep],
|
||||
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
|
||||
depends: gst_gir[0],
|
||||
)]
|
||||
cdir = meson.current_source_dir()
|
||||
|
||||
libs = [
|
||||
['base', gst_base_gir, gst_base_dep],
|
||||
['controller', gst_controller_gir, gst_controller_dep,],
|
||||
['net', gst_net_gir, gst_net_dep],
|
||||
['check', gst_check_gir, gst_check_dep],
|
||||
]
|
||||
|
||||
foreach lib: libs
|
||||
name = lib[0]
|
||||
gir = lib[1]
|
||||
deps = [lib[2], gir]
|
||||
libs_doc += [hotdoc.generate_doc(name,
|
||||
project_version: api_version,
|
||||
gi_c_sources: ['../libs/gst/' + name + '/*.[hc]'],
|
||||
gi_c_source_filters: gst_excludes,
|
||||
gi_sources: gir[0].full_path(),
|
||||
gi_c_source_roots: [join_paths(meson.current_source_dir(), '../libs/gst/' + name), ],
|
||||
sitemap: join_paths('libs', name, 'sitemap.txt'),
|
||||
index: join_paths('libs/', name, 'index.md'),
|
||||
gi_index: join_paths('libs/', name, 'index.md'),
|
||||
gi_smart_index: true,
|
||||
gi_order_generated_subpages: true,
|
||||
dependencies: deps,
|
||||
install: false,
|
||||
depends: gir[0],
|
||||
)]
|
||||
doc_sources = []
|
||||
foreach s: gst_sources + gst_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
cdir = meson.current_source_dir()
|
||||
lib_sources = {
|
||||
'gst': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gst_doc_source_file = configure_file(
|
||||
output: 'gst_doc_sources.json',
|
||||
configuration: lib_sources,
|
||||
output_format: 'json')
|
||||
|
||||
gst_doc_gi_source_file = configure_file(
|
||||
output: 'gst_doc_gi_sources.json',
|
||||
configuration: {'gst': gst_gir[0].full_path()},
|
||||
output_format: 'json')
|
||||
|
||||
lib_hotdoc_config = custom_target(
|
||||
'build-gst-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', gst_doc_gi_source_file,
|
||||
'--gi_c_source_file', gst_doc_source_file,
|
||||
'--gi_c_source_filters', gst_excludes,
|
||||
'--source_root', cdir / 'gst',
|
||||
'--gi_source_root', cdir / '..' / 'gst',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-gst-configs.json',
|
||||
)
|
||||
|
||||
libs_doc_source_file = configure_file(
|
||||
output: 'libs_doc_sources.json',
|
||||
configuration: libs_sources,
|
||||
output_format: 'json')
|
||||
|
||||
libs_doc_gi_source_file = configure_file(
|
||||
output: 'libs_doc_gi_sources.json',
|
||||
configuration: {
|
||||
'base': gst_base_gir[0].full_path(),
|
||||
'controller': gst_controller_gir[0].full_path(),
|
||||
'net': gst_net_gir[0].full_path(),
|
||||
'check': gst_check_gir[0].full_path(),
|
||||
},
|
||||
output_format: 'json')
|
||||
|
||||
libs_hotdoc_configs = custom_target(
|
||||
'build-libs-hotdoc-configs',
|
||||
command: [
|
||||
plugins_cache_generator,
|
||||
'hotdoc-lib-config',
|
||||
'--srcdir', cdir,
|
||||
'--builddir', meson.current_build_dir(),
|
||||
'--buildroot', meson.global_build_root(),
|
||||
'--project_version', api_version,
|
||||
'--gi_source_file', libs_doc_gi_source_file,
|
||||
'--gi_c_source_file', libs_doc_source_file,
|
||||
'--gi_c_source_filters', gst_excludes,
|
||||
'--source_root', cdir / 'libs',
|
||||
'--gi_source_root', cdir / '..' / 'libs' / 'gst',
|
||||
'--output', '@OUTPUT@',
|
||||
],
|
||||
output: 'hotdoc-libs-configs.json',
|
||||
)
|
||||
|
||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||
|
||||
|
|
|
@ -152,8 +152,8 @@ gst_headers = files(
|
|||
'math-compat.h',
|
||||
)
|
||||
if host_system == 'darwin'
|
||||
gst_headers += 'gstmacos.h'
|
||||
gst_sources += 'gstmacos.m'
|
||||
gst_headers += files('gstmacos.h')
|
||||
gst_sources += files('gstmacos.m')
|
||||
endif
|
||||
|
||||
install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
|
||||
|
@ -166,7 +166,7 @@ endif
|
|||
|
||||
extra_deps = []
|
||||
if host_system == 'android'
|
||||
gst_sources += 'gstandroid.c'
|
||||
gst_sources += files('gstandroid.c')
|
||||
extra_deps += cc.find_library('log')
|
||||
endif
|
||||
|
||||
|
|
|
@ -38,6 +38,22 @@ gst_base_headers = files(
|
|||
'gsttypefindhelper.h',
|
||||
)
|
||||
|
||||
gst_base_doc_headers = files(
|
||||
'gstbitreader-docs.h',
|
||||
'gstbitwriter-docs.h',
|
||||
'gstbytereader-docs.h',
|
||||
'gstbytewriter-docs.h',
|
||||
)
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_base_sources + gst_base_headers + gst_base_doc_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'base': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gst_base = library('gstbase-@0@'.format(api_version),
|
||||
gst_base_sources,
|
||||
c_args : gst_c_args + ['-DBUILDING_GST_BASE', '-DG_LOG_DOMAIN="GStreamer-Base"'],
|
||||
|
|
|
@ -17,6 +17,15 @@ gst_check_headers = files(
|
|||
)
|
||||
install_headers(gst_check_headers, subdir : 'gstreamer-1.0/gst/check/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_check_sources + gst_check_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'check': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
|
||||
check_cdata = configuration_data()
|
||||
|
||||
|
|
|
@ -26,6 +26,16 @@ gst_controller_headers = controller_mkenum_headers + files(
|
|||
)
|
||||
install_headers(gst_controller_headers, subdir : 'gstreamer-1.0/gst/controller/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_controller_sources + gst_controller_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'controller': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
|
||||
controller_enums = gnome.mkenums_simple('controller-enumtypes',
|
||||
sources : controller_mkenum_headers,
|
||||
header_prefix : '#include <gst/controller/controller-prelude.h>',
|
||||
|
|
|
@ -23,6 +23,15 @@ gst_net_headers = files(
|
|||
)
|
||||
install_headers(gst_net_headers, subdir : 'gstreamer-1.0/gst/net/')
|
||||
|
||||
doc_sources = []
|
||||
foreach s: gst_net_sources + gst_net_headers
|
||||
doc_sources += s.full_path()
|
||||
endforeach
|
||||
|
||||
libs_sources += {
|
||||
'net': pathsep.join(doc_sources)
|
||||
}
|
||||
|
||||
gst_net_gen_sources = []
|
||||
gst_net = library('gstnet-@0@'.format(api_version),
|
||||
gst_net_sources,
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
libs_sources = {}
|
||||
|
||||
subdir('gst')
|
||||
|
|
Loading…
Reference in a new issue