Skip to content
Permalink
Browse files
doc: Port to hotdoc
  • Loading branch information
thiblahute committed May 13, 2019
1 parent cf6ed57 commit 27ba8d24ec00c3be458e6acf7c27547ea08ebee6
Showing with 19,530 additions and 17 deletions.
  1. +1 −0 docs/gst_api_version.in
  2. +6 −0 docs/index.md
  3. +5 −0 docs/libs/allocators/index.md
  4. +1 −0 docs/libs/allocators/sitemap.txt
  5. +8 −0 docs/libs/app/index.md
  6. +1 −0 docs/libs/app/sitemap.txt
  7. +6 −0 docs/libs/audio/index.md
  8. +1 −0 docs/libs/audio/sitemap.txt
  9. +1 −0 docs/libs/ext/sitemap.txt
  10. +8 −0 docs/libs/fft/index.md
  11. +1 −0 docs/libs/fft/sitemap.txt
  12. +7 −0 docs/libs/pbutils/index.md
  13. +3 −0 docs/libs/pbutils/sitemap.txt
  14. +5 −0 docs/libs/riff/index.md
  15. +1 −0 docs/libs/riff/sitemap.txt
  16. +5 −0 docs/libs/rtp/index.md
  17. +1 −0 docs/libs/rtp/sitemap.txt
  18. +5 −0 docs/libs/rtsp/index.md
  19. +1 −0 docs/libs/rtsp/sitemap.txt
  20. +6 −0 docs/libs/sdp/index.md
  21. +1 −0 docs/libs/sdp/sitemap.txt
  22. +6 −0 docs/libs/tag/index.md
  23. +1 −0 docs/libs/tag/sitemap.txt
  24. +5 −0 docs/libs/video/index.md
  25. +1 −0 docs/libs/video/sitemap.txt
  26. +173 −0 docs/meson.build
  27. +5 −0 docs/plugins/all_index.md
  28. +19,212 −0 docs/plugins/gst_plugins_cache.json
  29. 0 docs/plugins/index.md
  30. +1 −0 docs/plugins/sitemap.txt
  31. +3 −0 docs/sitemap.txt
  32. +1 −0 docs/version.in
  33. +1 −0 ext/alsa/meson.build
  34. +1 −0 ext/cdparanoia/meson.build
  35. +1 −0 ext/gl/meson.build
  36. +1 −0 ext/libvisual/meson.build
  37. +1 −0 ext/ogg/meson.build
  38. +1 −0 ext/opus/meson.build
  39. +1 −0 ext/pango/meson.build
  40. +3 −3 ext/theora/gsttheoraenc.c
  41. +1 −0 ext/theora/meson.build
  42. +2 −0 ext/vorbis/meson.build
  43. +5 −0 gst-libs/gst/pbutils/encoding-profile.c
  44. +1 −0 gst/adder/meson.build
  45. +2 −0 gst/app/meson.build
  46. +1 −0 gst/audioconvert/meson.build
  47. +1 −0 gst/audiomixer/meson.build
  48. +1 −0 gst/audiorate/meson.build
  49. +1 −0 gst/audioresample/meson.build
  50. +1 −0 gst/audiotestsrc/meson.build
  51. +1 −0 gst/compositor/meson.build
  52. +1 −0 gst/encoding/meson.build
  53. +1 −0 gst/gio/meson.build
  54. +1 −0 gst/pbtypes/meson.build
  55. +1 −0 gst/playback/meson.build
  56. +1 −0 gst/rawparse/meson.build
  57. +1 −0 gst/subparse/meson.build
  58. +1 −0 gst/tcp/meson.build
  59. +1 −0 gst/typefind/meson.build
  60. +1 −0 gst/videoconvert/meson.build
  61. +1 −0 gst/videorate/meson.build
  62. +1 −0 gst/videoscale/meson.build
  63. +1 −0 gst/videotestsrc/meson.build
  64. +1 −0 gst/volume/meson.build
  65. +4 −13 meson.build
  66. +2 −1 meson_options.txt
  67. +1 −0 sys/ximage/meson.build
  68. +1 −0 sys/xvimage/meson.build
@@ -0,0 +1 @@
@GST_API_VERSION@
@@ -0,0 +1,6 @@
---
short-description: GStreamer Base Plugins API reference.
...

# GStreamer Base Plugins

@@ -0,0 +1,5 @@
# Allocators Library

This library should be linked to by getting cflags and libs from
gstreamer-plugins-base-{{ gst_api_version.md }}.pc and adding
-lgstallocators-{{ gst_api_version.md }} to the library flags.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,8 @@
# App Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}pc` and adding
-lgstapp-{{ gst_api_version.md }} to the library flags.

To use it the functionality, insert an `appsrc` or `appsink` element
into a pipeline and call the appropriate functions on the element.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,6 @@
# Audio Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstaudio-{{ gst_api_version.md }}` to the library flags.

@@ -0,0 +1 @@
gi-index
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,8 @@
# FFT Library

The gstfft library is based on
[kissfft](http://sourceforge.net/projects/kissfft) by Mark Borgerding.

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstfft-{{ gst_api_version.md }}` to the library flags.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,7 @@
# Base Utils Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstpbutils-{{ gst_api_version.md }}` to the library
flags.

@@ -0,0 +1,3 @@
gi-index
pbutils.h
encoding-profile.h
@@ -0,0 +1,5 @@
# Riff Media Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstriff-{{ gst_api_version.md }}` to the library flags.
@@ -0,0 +1 @@
c-index
@@ -0,0 +1,5 @@
# RTP Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstrtp-{{ gst_api_version.md }}` to the library flags.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,5 @@
# RTSP Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstrtsp-{{ gst_api_version.md }}` to the library flags.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,6 @@
# SDP Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstsdp-{{ gst_api_version.md }}` to the library flags.

@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,6 @@
# Tag Support Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgsttag-{{ gst_api_version.md }}` to the library flags.

@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,5 @@
# Video Library

This library should be linked to by getting cflags and libs from
`gstreamer-plugins-base-{{ gst_api_version.md }}.pc` and adding
`-lgstvideo-{{ gst_api_version.md }}` to the library flags.
@@ -0,0 +1 @@
gi-index
@@ -0,0 +1,173 @@
build_hotdoc = false

if meson.is_cross_build()
if get_option('doc').enabled()
error('Documentation enabled but building the doc while cross building is not supported yet.')
endif

message('Documentation not built as building it while cross building is not supported yet.')
subdir_done()
endif

required_hotdoc_extensions = ['gi-extension', 'gst-extension']
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(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
required: false)
endif

plugins_cache = join_paths(meson.current_source_dir(), 'plugins', 'gst_plugins_cache.json')
if plugins_cache_generator.found()
plugins_doc_dep = custom_target('base-plugins-doc-cache',
build_by_default: true,
command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
input: plugins,
output: 'gst_plugins_cache.json',
)
else
warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
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 = 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

if not build_gir
if get_option('doc').enabled()
error('Documentation enabled but introspection not built.')
endif

message('Introspection not built, can\'t build the documentation')
subdir_done()
endif

build_hotdoc = true
docconf = configuration_data()
docconf.set('GST_API_VERSION', api_version)

version_entities = configure_file(input : 'version.in',
output : 'gst_api_version.md',
configuration : docconf)

libs_excludes = []
foreach h: ['pbutils-private.h', 'gsttageditingprivate.h', 'id3v2.h',
'kiss_fft_f32.h', 'kiss_fft_f64.h', 'kiss_fftr_f32.h', 'kiss_fftr_f64.h',
'kiss_fftr_s16.h', 'kiss_fftr_s32.h', 'kiss_fft_s16.h', 'kiss_fft_s32.h',
'_kiss_fft_guts_f32.h', '_kiss_fft_guts_f64.h', '_kiss_fft_guts_s16.h',
'_kiss_fft_guts_s16.h', '_kiss_fft_guts_s32.h', '_kiss_fft_guts_s32.h',
'pbutils-marshal.h', 'audio-resampler-private.h', '*orc-dist.*',
'*-neon.h', 'audio-resampler-macros.[ch]', '*-prelude.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],
]

if build_gstgl
libs + [['gl', gl_gir, gstgl_dep]]
endif

libs_doc = []
foreach lib: libs
name = lib[0]
gir = lib[1]
deps = [lib[2], gir]
libs_doc += [hotdoc.generate_doc('gst-plugins-base-' + name,
project_version: api_version,
gi_c_sources: [join_paths('../gst-libs/gst', name, '*.[hc]')],
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,
)]
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('gst-plugins-base-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

plugins_doc = []
sitemap = 'all_index.md\n'

list_plugin_res = run_command(python3, '-c',
'''
import sys
import json
with open("@0@") as f:
print(':'.join(json.load(f).keys()), end='')
'''.format(plugins_cache))

assert(list_plugin_res.returncode() == 0,
'Could not list plugins from @0@\n@1@\n@1@'.format(plugins_cache, list_plugin_res.stdout(), list_plugin_res.stderr()))


foreach plugin_name: list_plugin_res.stdout().split(':')
plugins_doc += [hotdoc.generate_doc(plugin_name,
project_version: api_version,
sitemap: 'plugins/sitemap.txt',
index: 'plugins/index.md',
gst_index: 'plugins/index.md',
gst_smart_index: true,
gst_c_sources: ['../sys/*/*.[ch]',
'../ext/*/*.[ch]',
'../gst/*/*.[ch]',
],
dependencies: [gst_dep, plugins],
gst_order_generated_subpages: true,
gst_cache_file: plugins_cache,
gst_plugin_name: plugin_name,
)]
sitemap += ' @0@-doc.json\n'.format(plugin_name)
endforeach
@@ -0,0 +1,5 @@
---
short-description: Plugins from gst-plugins-base
...

# Plugins

0 comments on commit 27ba8d2

Please sign in to comment.