docs: generate documentation for libgstopencv

This commit is contained in:
Mathieu Duponchelle 2020-06-21 01:32:29 +02:00 committed by Thibault Saunier
parent da1f6ac0a7
commit 44fe121613
4 changed files with 21 additions and 3 deletions

View file

@ -0,0 +1,7 @@
# Opencv Library
This library should be linked to by getting cflags and libs from
gstreamer-plugins-bad-{{ gst_api_version.md }}.pc and adding
-lgstopencv-{{ gst_api_version.md }} to the library flags.
> NOTE: This library API is considered *unstable*

View file

@ -0,0 +1 @@
c-index

View file

@ -111,6 +111,7 @@ if build_gir
{'name': 'player', 'gir': player_gir, 'lib': gstplayer_dep},
{'name': 'insertbin', 'gir': insertbin_gir, 'lib': gstinsertbin_dep},
{'name': 'codecparsers', 'lib': gstcodecparsers_dep},
{'name': 'opencv', 'lib': gstopencv_dep, 'c_source_patterns': ['*.h', '*.cpp'], 'extra_c_flags': ['-x c++']},
{'name': 'adaptivedemux', 'lib': gstadaptivedemux_dep},
{'name': 'webrtc', 'gir': webrtc_gir, 'lib': gstwebrtc_dep, 'suffix': 'lib'},
{'name': 'audio', 'gir': audio_gir, 'lib': gstbadaudio_dep, 'prefix': 'bad-'},
@ -125,6 +126,13 @@ libs_doc = []
foreach lib_def: libs
name = lib_def['name']
lib = lib_def['lib']
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
if lib_def.has_key('gir')
if has_gi_extension
gir = lib_def['gir']
@ -132,7 +140,7 @@ foreach lib_def: libs
suffix = lib_def.get('suffix', '')
libs_doc += [hotdoc.generate_doc(prefix + name + suffix,
project_version: api_version,
gi_c_sources: [join_paths(root_rel, 'gst-libs/gst', name, '*.[hc]')],
gi_c_sources: c_sources,
gi_sources: gir[0].full_path(),
gi_c_source_filters: excludes,
sitemap: join_paths('libs', name, 'sitemap.txt'),
@ -151,12 +159,12 @@ foreach lib_def: libs
sitemap: join_paths('libs', name, 'sitemap.txt'),
index: join_paths('libs', name, 'index.md'),
project_version: api_version,
c_sources: [join_paths(root_rel, 'gst-libs/gst/', name, '*.[hc]')],
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',
extra_c_flags: ['-DGST_USE_UNSTABLE_API'] + lib_def.get('extra_c_flags', []),
dependencies: lib,
install: false,
)]

View file

@ -33,4 +33,6 @@ if opencv_dep.found()
install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
elif get_option('opencv').enabled()
error('OpenCV support enabled but required dependencies were not found.')
else
gstopencv_dep = disabler()
endif