docs: Port to hotdoc

This commit is contained in:
Thibault Saunier 2018-10-22 11:29:24 +02:00
parent abf6be1d7a
commit 5b039416db
16 changed files with 554 additions and 35 deletions

1
.gitignore vendored
View file

@ -68,3 +68,4 @@ stamp-h.in
/tests/test-reuse
/po
/build

View file

@ -1,5 +1,3 @@
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
if BUILD_EXAMPLES
SUBDIRS_EXAMPLES = examples
else
@ -16,16 +14,14 @@ SUBDIRS = \
gst \
common \
pkgconfig \
docs \
$(SUBDIRS_EXAMPLES) \
$(SUBDIRS_TESTS)
DIST_SUBDIRS = gst common pkgconfig docs examples tests
DIST_SUBDIRS = gst common pkgconfig examples tests
EXTRA_DIST = \
ChangeLog autogen.sh depcomp \
AUTHORS COPYING NEWS README RELEASE REQUIREMENTS \
docs/design/gst-rtp-server-design \
gst-rtsp-server.doap \
$(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/$(PACKAGE_TARNAME)-*" ) \
meson_options.txt

View file

@ -131,10 +131,6 @@ AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
dnl check for gobject-introspection
GOBJECT_INTROSPECTION_CHECK([1.31.1])
dnl check for documentation tools
AG_GST_DOCBOOK_CHECK
GTK_DOC_CHECK([1.12])
dnl *** checks for libraries ***
dnl check for pthreads
@ -352,9 +348,6 @@ tests/check/Makefile
pkgconfig/Makefile
pkgconfig/gstreamer-rtsp-server.pc
pkgconfig/gstreamer-rtsp-server-uninstalled.pc
docs/Makefile
docs/version.entities
docs/libs/Makefile
])
AC_OUTPUT

View file

@ -1,20 +0,0 @@
if ENABLE_GTK_DOC
DOCS_SUBDIRS = libs
else
DOCS_SUBDIRS =
endif
SUBDIRS = $(DOCS_SUBDIRS)
DIST_SUBDIRS = libs
EXTRA_DIST = \
version.entities.in
upload:
@if test "x$(SUBDIRS)" != x; then \
for a in $(SUBDIRS); do \
cd $$a; \
make upload; \
cd ..; \
done; \
fi

452
docs/gst_plugins_cache.json Normal file
View file

@ -0,0 +1,452 @@
{
"rtspclientsink": {
"description": "RTSP client sink element",
"elements": {
"rtspclientsink": {
"author": "Jan Schmidt <jan@centricular.com>",
"description": "Send data over the network via RTSP RECORD(RFC 2326)",
"hierarchy": [
"GstRTSPClientSink",
"GstBin",
"GstElement",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"klass": "Sink/Network",
"long-name": "RTSP RECORD client",
"name": "rtspclientsink",
"pad-templates": {
"sink_%%u": {
"caps": "ANY",
"direction": "sink",
"presence": "request"
},
"stream_%%u": {
"caps": "ANY",
"direction": "sink",
"presence": "request"
}
},
"properties": {
"async-handling": {
"blurb": "The bin will handle Asynchronous state changes",
"construct": false,
"construct-only": false,
"default": "false",
"type-name": "gboolean",
"writable": true
},
"debug": {
"blurb": "Dump request and response messages to stdout",
"construct": false,
"construct-only": false,
"default": "false",
"type-name": "gboolean",
"writable": true
},
"do-rtsp-keep-alive": {
"blurb": "Send RTSP keep alive packets, disable for old incompatible server.",
"construct": false,
"construct-only": false,
"default": "true",
"type-name": "gboolean",
"writable": true
},
"latency": {
"blurb": "Amount of ms to buffer",
"construct": false,
"construct-only": false,
"default": "2000",
"max": "-1",
"min": "0",
"type-name": "guint",
"writable": true
},
"location": {
"blurb": "Location of the RTSP url to read",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"message-forward": {
"blurb": "Forwards all children messages",
"construct": false,
"construct-only": false,
"default": "false",
"type-name": "gboolean",
"writable": true
},
"multicast-iface": {
"blurb": "The network interface on which to join the multicast group",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"name": {
"blurb": "The name of the object",
"construct": true,
"construct-only": false,
"default": "rtspclientsink0",
"hotdoc-fixed-default": true,
"type-name": "gchararray",
"writable": true
},
"ntp-time-source": {
"blurb": "NTP time source for RTCP packets",
"construct": false,
"construct-only": false,
"default": "ntp (0)",
"enum": true,
"type-name": "GstRTSPClientSinkNtpTimeSource",
"values": [
{
"desc": "NTP time based on realtime clock",
"name": "ntp",
"value": "0"
},
{
"desc": "UNIX time based on realtime clock",
"name": "unix",
"value": "1"
},
{
"desc": "Running time based on pipeline clock",
"name": "running-time",
"value": "2"
},
{
"desc": "Pipeline clock time",
"name": "clock-time",
"value": "3"
}
],
"writable": true
},
"parent": {
"blurb": "The parent of the object",
"construct": false,
"construct-only": false,
"type-name": "GstObject",
"writable": true
},
"port-range": {
"blurb": "Client port range that can be used to receive RTCP data, eg. 3000-3005 (NULL = no restrictions)",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"profiles": {
"blurb": "Allowed RTSP profiles",
"construct": false,
"construct-only": false,
"default": "avp",
"type-name": "GstRTSPProfile",
"values": [
{
"desc": "GST_RTSP_PROFILE_UNKNOWN",
"name": "unknown",
"value": "0x00000000"
},
{
"desc": "GST_RTSP_PROFILE_AVP",
"name": "avp",
"value": "0x00000001"
},
{
"desc": "GST_RTSP_PROFILE_SAVP",
"name": "savp",
"value": "0x00000002"
},
{
"desc": "GST_RTSP_PROFILE_AVPF",
"name": "avpf",
"value": "0x00000004"
},
{
"desc": "GST_RTSP_PROFILE_SAVPF",
"name": "savpf",
"value": "0x00000008"
}
],
"writable": true
},
"protocols": {
"blurb": "Allowed lower transport protocols",
"construct": false,
"construct-only": false,
"default": "tcp+udp-mcast+udp",
"type-name": "GstRTSPLowerTrans",
"values": [
{
"desc": "GST_RTSP_LOWER_TRANS_UNKNOWN",
"name": "unknown",
"value": "0x00000000"
},
{
"desc": "GST_RTSP_LOWER_TRANS_UDP",
"name": "udp",
"value": "0x00000001"
},
{
"desc": "GST_RTSP_LOWER_TRANS_UDP_MCAST",
"name": "udp-mcast",
"value": "0x00000002"
},
{
"desc": "GST_RTSP_LOWER_TRANS_TCP",
"name": "tcp",
"value": "0x00000004"
},
{
"desc": "GST_RTSP_LOWER_TRANS_HTTP",
"name": "http",
"value": "0x00000010"
},
{
"desc": "GST_RTSP_LOWER_TRANS_TLS",
"name": "tls",
"value": "0x00000020"
}
],
"writable": true
},
"proxy": {
"blurb": "Proxy settings for HTTP tunneling. Format: [http://][user:passwd@]host[:port]",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"proxy-id": {
"blurb": "HTTP proxy URI user id for authentication",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"proxy-pw": {
"blurb": "HTTP proxy URI user password for authentication",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"retry": {
"blurb": "Max number of retries when allocating RTP ports.",
"construct": false,
"construct-only": false,
"default": "20",
"max": "65535",
"min": "0",
"type-name": "guint",
"writable": true
},
"rtp-blocksize": {
"blurb": "RTP package size to suggest to server (0 = disabled)",
"construct": false,
"construct-only": false,
"default": "0",
"max": "65536",
"min": "0",
"type-name": "guint",
"writable": true
},
"rtx-time": {
"blurb": "Amount of ms to buffer for retransmission. 0 disables retransmission",
"construct": false,
"construct-only": false,
"default": "500",
"max": "-1",
"min": "0",
"type-name": "guint",
"writable": true
},
"sdes": {
"blurb": "The SDES items of this session",
"construct": false,
"construct-only": false,
"type-name": "GstStructure",
"writable": true
},
"tcp-timeout": {
"blurb": "Fail after timeout microseconds on TCP connections (0 = disabled)",
"construct": false,
"construct-only": false,
"default": "20000000",
"max": "18446744073709551615",
"min": "0",
"type-name": "guint64",
"writable": true
},
"timeout": {
"blurb": "Retry TCP transport after UDP timeout microseconds (0 = disabled)",
"construct": false,
"construct-only": false,
"default": "5000000",
"max": "18446744073709551615",
"min": "0",
"type-name": "guint64",
"writable": true
},
"tls-database": {
"blurb": "TLS database with anchor certificate authorities used to validate the server certificate",
"construct": false,
"construct-only": false,
"type-name": "GTlsDatabase",
"writable": true
},
"tls-interaction": {
"blurb": "A GTlsInteraction object to prompt the user for password or certificate",
"construct": false,
"construct-only": false,
"type-name": "GTlsInteraction",
"writable": true
},
"tls-validation-flags": {
"blurb": "TLS certificate validation flags used to validate the server certificate",
"construct": false,
"construct-only": false,
"default": "validate-all",
"type-name": "GTlsCertificateFlags",
"values": [
{
"desc": "G_TLS_CERTIFICATE_UNKNOWN_CA",
"name": "unknown-ca",
"value": "0x00000001"
},
{
"desc": "G_TLS_CERTIFICATE_BAD_IDENTITY",
"name": "bad-identity",
"value": "0x00000002"
},
{
"desc": "G_TLS_CERTIFICATE_NOT_ACTIVATED",
"name": "not-activated",
"value": "0x00000004"
},
{
"desc": "G_TLS_CERTIFICATE_EXPIRED",
"name": "expired",
"value": "0x00000008"
},
{
"desc": "G_TLS_CERTIFICATE_REVOKED",
"name": "revoked",
"value": "0x00000010"
},
{
"desc": "G_TLS_CERTIFICATE_INSECURE",
"name": "insecure",
"value": "0x00000020"
},
{
"desc": "G_TLS_CERTIFICATE_GENERIC_ERROR",
"name": "generic-error",
"value": "0x00000040"
},
{
"desc": "G_TLS_CERTIFICATE_VALIDATE_ALL",
"name": "validate-all",
"value": "0x0000007f"
}
],
"writable": true
},
"udp-buffer-size": {
"blurb": "Size of the kernel UDP receive buffer in bytes, 0=default",
"construct": false,
"construct-only": false,
"default": "524288",
"max": "2147483647",
"min": "0",
"type-name": "gint",
"writable": true
},
"udp-reconnect": {
"blurb": "Reconnect to the server if RTSP connection is closed when doing UDP",
"construct": false,
"construct-only": false,
"default": "true",
"type-name": "gboolean",
"writable": true
},
"user-agent": {
"blurb": "The User-Agent string to send to the server",
"construct": false,
"construct-only": false,
"default": "GStreamer/1.15.0.1",
"type-name": "gchararray",
"writable": true
},
"user-id": {
"blurb": "RTSP location URI user id for authentication",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
},
"user-pw": {
"blurb": "RTSP location URI user password for authentication",
"construct": false,
"construct-only": false,
"default": "NULL",
"type-name": "gchararray",
"writable": true
}
},
"rank": "none",
"signals": {
"accept-certificate": {
"args": [
"GTlsConnection",
"GTlsCertificate",
"GTlsCertificateFlags"
],
"retval": "gboolean"
},
"handle-request": {
"args": [
"gpointer",
"gpointer"
],
"retval": "void"
},
"new-manager": {
"args": [
"GstElement"
],
"retval": "void"
},
"new-payloader": {
"args": [
"GstElement"
],
"retval": "void"
},
"request-rtcp-key": {
"args": [
"guint"
],
"retval": "GstCaps"
}
}
}
},
"filename": "libgstrtspclientsink.so",
"license": "LGPL",
"package": "GStreamer RTSP Server Library git",
"source": "gst-rtsp-server",
"url": "Unknown package origin"
}
}

1
docs/index.md Normal file
View file

@ -0,0 +1 @@
# GStreamer RTSP Server

87
docs/meson.build Normal file
View file

@ -0,0 +1,87 @@
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 the docmentation 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
required_hotdoc_extensions += ['gst-extension']
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(), 'gst_plugins_cache.json')
if plugins_cache_generator.found()
plugins_doc_dep = custom_target('rtsp-server-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
hotdoc = import('hotdoc')
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,
)]
plugins_doc = [hotdoc.generate_doc('rtspclientsink',
project_version: api_version,
sitemap: 'plugin-sitemap.txt',
index: 'plugin-index.md',
gst_index: 'plugin-index.md',
gst_c_sources: ['../gst/rtsp-sink/*.[ch]'],
gst_dl_sources: [rtspsink.full_path()],
gst_smart_index: true,
dependencies: gst_rtsp_server_deps + [rtspsink],
gst_cache_file: plugins_cache,
gst_plugin_name: 'rtspclientsink',
)]
doc = libs_doc[0]

1
docs/plugin-index.md Normal file
View file

@ -0,0 +1 @@
# rtspclientsink

1
docs/plugin-sitemap.txt Normal file
View file

@ -0,0 +1 @@
gst-index

2
docs/sitemap.md Normal file
View file

@ -0,0 +1,2 @@
gi-index
gst-index

1
docs/sitemap.txt Normal file
View file

@ -0,0 +1 @@
gi-index

View file

@ -1,2 +0,0 @@
<!ENTITY GST_API_VERSION "@GST_API_VERSION@">
<!ENTITY GST_VERSION "@VERSION@">

View file

@ -79,6 +79,7 @@ if build_gir
install : true,
extra_args : gst_gir_extra_args,
includes : ['Gst-1.0', 'GstRtsp-1.0', 'GstNet-1.0'],
sources_top_dir: meson.current_source_dir(),
dependencies : gst_rtsp_server_deps,
)
rtsp_server_gen_sources += [rtsp_server_gir]

View file

@ -11,3 +11,4 @@ rtspsink = library('gstrtspclientsink',
install : true,
install_dir : plugins_install_dir)
pkgconfig.generate(rtspsink, install_dir : plugins_pkgconfig_install_dir)
plugins += [rtspsink]

View file

@ -1,6 +1,6 @@
project('gst-rtsp-server', 'c',
version : '1.17.0.1',
meson_version : '>= 0.47',
meson_version : '>= 0.48',
default_options : ['warning_level=1', 'buildtype=debugoptimized'])
gst_version = meson.project_version()
@ -187,6 +187,7 @@ if get_option('default_library') == 'shared'
plugins_pkgconfig_install_dir = disabler()
endif
plugins = []
subdir('gst')
if not get_option('tests').disabled()
subdir('tests')
@ -195,3 +196,4 @@ if not get_option('examples').disabled()
subdir('examples')
endif
subdir('pkgconfig')
subdir('docs')

View file

@ -21,3 +21,5 @@ option('package-name', type : 'string', yield : true,
option('package-origin', type : 'string',
value : 'Unknown package origin', yield : true,
description : 'package origin URL to use in plugins')
option('doc', type : 'feature', value : 'auto', yield: true,
description: 'Enable documentation.')