From 44fe121613557d65cd8970d57799855375343f29 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sun, 21 Jun 2020 01:32:29 +0200 Subject: [PATCH] docs: generate documentation for libgstopencv --- docs/libs/opencv/index.md | 7 +++++++ docs/libs/opencv/sitemap.txt | 1 + docs/meson.build | 14 +++++++++++--- gst-libs/gst/opencv/meson.build | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 docs/libs/opencv/index.md create mode 100644 docs/libs/opencv/sitemap.txt diff --git a/docs/libs/opencv/index.md b/docs/libs/opencv/index.md new file mode 100644 index 0000000..552662b --- /dev/null +++ b/docs/libs/opencv/index.md @@ -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* diff --git a/docs/libs/opencv/sitemap.txt b/docs/libs/opencv/sitemap.txt new file mode 100644 index 0000000..e3577f1 --- /dev/null +++ b/docs/libs/opencv/sitemap.txt @@ -0,0 +1 @@ +c-index diff --git a/docs/meson.build b/docs/meson.build index 94023d5..35a86d0 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -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, )] diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build index f659d57..80b0531 100644 --- a/gst-libs/gst/opencv/meson.build +++ b/gst-libs/gst/opencv/meson.build @@ -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 -- 2.7.4