docs: add doxygen (#1004)
This commit is contained in:
parent
a1e6f441e4
commit
31885434f2
76 changed files with 3375 additions and 221 deletions
2778
docs/Doxyfile
Normal file
2778
docs/Doxyfile
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,4 @@
|
|||
breathe==4.35.0
|
||||
furo==2022.12.7
|
||||
m2r2==0.3.3.post2
|
||||
Sphinx==6.1.3
|
||||
|
|
|
|||
1
docs/source/about/changelog.rst
Normal file
1
docs/source/about/changelog.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
.. mdinclude:: ../../../CHANGELOG.md
|
||||
|
|
@ -1,3 +1 @@
|
|||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/DOCKER_README.md
|
||||
|
||||
.. mdinclude:: ../../../DOCKER_README.md
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
from datetime import datetime
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
|
@ -43,9 +44,11 @@ To use cmake method for obtaining version instead of regex,
|
|||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'breathe', # c++ support for sphinx with doxygen
|
||||
'm2r2', # enable markdown files
|
||||
'sphinx.ext.autosectionlabel',
|
||||
'sphinx.ext.todo', # enable to-do sections
|
||||
'sphinx.ext.graphviz', # enable graphs for breathe
|
||||
'sphinx.ext.viewcode', # add links to view source code
|
||||
'sphinx_copybutton', # add a copy button to code blocks
|
||||
]
|
||||
|
|
@ -82,4 +85,12 @@ html_theme_options = {
|
|||
|
||||
# extension config options
|
||||
autosectionlabel_prefix_document = True # Make sure the target is unique
|
||||
breathe_default_project = 'src'
|
||||
breathe_implementation_filename_extensions = ['.c', '.cc', '.cpp', '.mm']
|
||||
breathe_order_parameters_first = False
|
||||
breathe_projects = dict(
|
||||
src="../build/doxyxml"
|
||||
)
|
||||
todo_include_todos = True
|
||||
|
||||
subprocess.run('doxygen', shell=True, cwd=source_dir)
|
||||
|
|
|
|||
|
|
@ -14,11 +14,16 @@ Test clang-format locally.
|
|||
Sphinx
|
||||
------
|
||||
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for documentation building. Sphinx, along with other
|
||||
required documentation depencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
|
||||
sphinx docs. Installation and setup of python will not be covered here.
|
||||
|
||||
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from
|
||||
`Doxygen downloads <https://www.doxygen.nl/download.html>`_. Ensure that the `doxygen` executable is in your path.
|
||||
|
||||
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
|
||||
|
||||
The config file for Doxygen is `docs/Doxyfile`. This is already included in the repo and should not be modified.
|
||||
|
||||
Test with Sphinx
|
||||
.. code-block:: bash
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
:github_url: https://github.com/LizardByte/Sunshine/tree/nightly/docs/source/index.rst
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
.. include:: toc.rst
|
||||
|
|
|
|||
85
docs/source/source/src.rst
Normal file
85
docs/source/source/src.rst
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
src
|
||||
===
|
||||
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax.
|
||||
Some examples exist in `main.h` and `main.cpp`. In order for documentation within the code to appear in the
|
||||
rendered docs, the definition of the object must be in a header file, although the documentation itself can (and
|
||||
should) be in the source file.
|
||||
|
||||
Example Documentation Blocks
|
||||
----------------------------
|
||||
|
||||
**file.h**
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
// functions
|
||||
int main(int argc, char *argv[]);
|
||||
|
||||
**file.cpp** (with markdown)
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
/**
|
||||
* @brief Main application entry point.
|
||||
* @param argc The number of arguments.
|
||||
* @param argv The arguments.
|
||||
*
|
||||
* EXAMPLES:
|
||||
* ```cpp
|
||||
* main(1, const char* args[] = {"hello", "markdown", nullptr});
|
||||
* ```
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
// do stuff
|
||||
}
|
||||
|
||||
**file.cpp** (with ReStructuredText)
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
/**
|
||||
* @brief Main application entry point.
|
||||
* @param argc The number of arguments.
|
||||
* @param argv The arguments.
|
||||
* @rst
|
||||
* EXAMPLES:
|
||||
*
|
||||
* .. code-block:: cpp
|
||||
* main(1, const char* args[] = {"hello", "rst", nullptr});
|
||||
* @endrst
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
// do stuff
|
||||
}
|
||||
|
||||
Code
|
||||
----
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: src
|
||||
|
||||
src/main
|
||||
src/audio
|
||||
src/cbs
|
||||
src/config
|
||||
src/confighttp
|
||||
src/crypto
|
||||
src/httpcommon
|
||||
src/input
|
||||
src/move_by_copy
|
||||
src/network
|
||||
src/nvhttp
|
||||
src/process
|
||||
src/round_robin
|
||||
src/rtsp
|
||||
src/stream
|
||||
src/sync
|
||||
src/task_pool
|
||||
src/thread_pool
|
||||
src/thread_safe
|
||||
src/upnp
|
||||
src/utility
|
||||
src/uuid
|
||||
src/video
|
||||
src/platform
|
||||
4
docs/source/source/src/audio.rst
Normal file
4
docs/source/source/src/audio.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
audio
|
||||
=====
|
||||
|
||||
.. doxygenfile:: audio.h
|
||||
4
docs/source/source/src/cbs.rst
Normal file
4
docs/source/source/src/cbs.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cbs
|
||||
===
|
||||
|
||||
.. doxygenfile:: cbs.h
|
||||
4
docs/source/source/src/config.rst
Normal file
4
docs/source/source/src/config.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
config
|
||||
======
|
||||
|
||||
.. doxygenfile:: config.h
|
||||
4
docs/source/source/src/confighttp.rst
Normal file
4
docs/source/source/src/confighttp.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
confighttp
|
||||
==========
|
||||
|
||||
.. doxygenfile:: confighttp.h
|
||||
4
docs/source/source/src/crypto.rst
Normal file
4
docs/source/source/src/crypto.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
crypto
|
||||
======
|
||||
|
||||
.. doxygenfile:: crypto.h
|
||||
4
docs/source/source/src/httpcommon.rst
Normal file
4
docs/source/source/src/httpcommon.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
httpcommon
|
||||
==========
|
||||
|
||||
.. doxygenfile:: httpcommon.h
|
||||
4
docs/source/source/src/input.rst
Normal file
4
docs/source/source/src/input.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
input
|
||||
=====
|
||||
|
||||
.. doxygenfile:: input.h
|
||||
4
docs/source/source/src/main.rst
Normal file
4
docs/source/source/src/main.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
main
|
||||
====
|
||||
|
||||
.. doxygenfile:: main.h
|
||||
4
docs/source/source/src/move_by_copy.rst
Normal file
4
docs/source/source/src/move_by_copy.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
move_by_copy
|
||||
============
|
||||
|
||||
.. doxygenfile:: move_by_copy.h
|
||||
4
docs/source/source/src/network.rst
Normal file
4
docs/source/source/src/network.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
network
|
||||
=======
|
||||
|
||||
.. doxygenfile:: network.h
|
||||
4
docs/source/source/src/nvhttp.rst
Normal file
4
docs/source/source/src/nvhttp.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
nvhttp
|
||||
======
|
||||
|
||||
.. doxygenfile:: nvhttp.h
|
||||
10
docs/source/source/src/platform.rst
Normal file
10
docs/source/source/src/platform.rst
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
platform
|
||||
========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
platform/common
|
||||
platform/linux
|
||||
platform/macos
|
||||
platform/windows
|
||||
4
docs/source/source/src/platform/common.rst
Normal file
4
docs/source/source/src/platform/common.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
common
|
||||
======
|
||||
|
||||
.. Todo:: Add common.h
|
||||
12
docs/source/source/src/platform/linux.rst
Normal file
12
docs/source/source/src/platform/linux.rst
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
linux
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
linux/cuda
|
||||
linux/graphics
|
||||
linux/misc
|
||||
linux/vaapi
|
||||
linux/wayland
|
||||
linux/x11grab
|
||||
4
docs/source/source/src/platform/linux/cuda.rst
Normal file
4
docs/source/source/src/platform/linux/cuda.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cuda
|
||||
====
|
||||
|
||||
.. Todo:: Add cuda.h
|
||||
4
docs/source/source/src/platform/linux/graphics.rst
Normal file
4
docs/source/source/src/platform/linux/graphics.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
graphics
|
||||
========
|
||||
|
||||
.. Todo:: Add graphics.h
|
||||
4
docs/source/source/src/platform/linux/misc.rst
Normal file
4
docs/source/source/src/platform/linux/misc.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
misc
|
||||
====
|
||||
|
||||
.. Todo:: Add misc.h
|
||||
4
docs/source/source/src/platform/linux/vaapi.rst
Normal file
4
docs/source/source/src/platform/linux/vaapi.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vaapi
|
||||
=====
|
||||
|
||||
.. Todo:: Add vaapi.h
|
||||
4
docs/source/source/src/platform/linux/wayland.rst
Normal file
4
docs/source/source/src/platform/linux/wayland.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
wayland
|
||||
=======
|
||||
|
||||
.. Todo:: Add wayland.h
|
||||
4
docs/source/source/src/platform/linux/x11grab.rst
Normal file
4
docs/source/source/src/platform/linux/x11grab.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
x11grab
|
||||
=======
|
||||
|
||||
.. Todo:: Add x11grab.h
|
||||
11
docs/source/source/src/platform/macos.rst
Normal file
11
docs/source/source/src/platform/macos.rst
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
macos
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
macos/av_audio
|
||||
macos/av_img_t
|
||||
macos/av_video
|
||||
macos/misc
|
||||
macos/nv12_zero_device
|
||||
4
docs/source/source/src/platform/macos/av_audio.rst
Normal file
4
docs/source/source/src/platform/macos/av_audio.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
av_audio
|
||||
========
|
||||
|
||||
.. Todo:: Add av_audio.h
|
||||
4
docs/source/source/src/platform/macos/av_img_t.rst
Normal file
4
docs/source/source/src/platform/macos/av_img_t.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
av_img_t
|
||||
========
|
||||
|
||||
.. Todo:: Add av_img_t.h
|
||||
4
docs/source/source/src/platform/macos/av_video.rst
Normal file
4
docs/source/source/src/platform/macos/av_video.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
av_video
|
||||
========
|
||||
|
||||
.. Todo:: Add av_video.h
|
||||
4
docs/source/source/src/platform/macos/misc.rst
Normal file
4
docs/source/source/src/platform/macos/misc.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
misc
|
||||
====
|
||||
|
||||
.. Todo:: Add misc.h
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
nv12_zero_device
|
||||
================
|
||||
|
||||
.. Todo:: Add nv12_zero_device.h
|
||||
9
docs/source/source/src/platform/windows.rst
Normal file
9
docs/source/source/src/platform/windows.rst
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
windows
|
||||
=======
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
windows/display
|
||||
windows/misc
|
||||
windows/PolicyConfig
|
||||
4
docs/source/source/src/platform/windows/PolicyConfig.rst
Normal file
4
docs/source/source/src/platform/windows/PolicyConfig.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
PolicyConfig
|
||||
============
|
||||
|
||||
.. Todo:: Add PolicyConfig.h
|
||||
4
docs/source/source/src/platform/windows/display.rst
Normal file
4
docs/source/source/src/platform/windows/display.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
display
|
||||
=======
|
||||
|
||||
.. Todo:: Add display.h
|
||||
4
docs/source/source/src/platform/windows/misc.rst
Normal file
4
docs/source/source/src/platform/windows/misc.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
misc
|
||||
====
|
||||
|
||||
.. Todo:: Add misc.h
|
||||
4
docs/source/source/src/process.rst
Normal file
4
docs/source/source/src/process.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
process
|
||||
=======
|
||||
|
||||
.. doxygenfile:: process.h
|
||||
4
docs/source/source/src/round_robin.rst
Normal file
4
docs/source/source/src/round_robin.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
round_robin
|
||||
===========
|
||||
|
||||
.. doxygenfile:: round_robin.h
|
||||
4
docs/source/source/src/rtsp.rst
Normal file
4
docs/source/source/src/rtsp.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
rtsp
|
||||
====
|
||||
|
||||
.. doxygenfile:: rtsp.h
|
||||
4
docs/source/source/src/stream.rst
Normal file
4
docs/source/source/src/stream.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
stream
|
||||
======
|
||||
|
||||
.. doxygenfile:: stream.h
|
||||
4
docs/source/source/src/sync.rst
Normal file
4
docs/source/source/src/sync.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
sync
|
||||
====
|
||||
|
||||
.. doxygenfile:: sync.h
|
||||
4
docs/source/source/src/task_pool.rst
Normal file
4
docs/source/source/src/task_pool.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
tasl_pool
|
||||
=========
|
||||
|
||||
.. doxygenfile:: task_pool.h
|
||||
4
docs/source/source/src/thread_pool.rst
Normal file
4
docs/source/source/src/thread_pool.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
thread_pool
|
||||
===========
|
||||
|
||||
.. doxygenfile:: thread_pool.h
|
||||
4
docs/source/source/src/thread_safe.rst
Normal file
4
docs/source/source/src/thread_safe.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
thread_safe
|
||||
===========
|
||||
|
||||
.. doxygenfile:: thread_safe.h
|
||||
4
docs/source/source/src/upnp.rst
Normal file
4
docs/source/source/src/upnp.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
upnp
|
||||
====
|
||||
|
||||
.. doxygenfile:: upnp.h
|
||||
4
docs/source/source/src/utility.rst
Normal file
4
docs/source/source/src/utility.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
utility
|
||||
=======
|
||||
|
||||
.. Todo:: Add utility.h
|
||||
4
docs/source/source/src/uuid.rst
Normal file
4
docs/source/source/src/uuid.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
uuid
|
||||
====
|
||||
|
||||
.. doxygenfile:: uuid.h
|
||||
4
docs/source/source/src/video.rst
Normal file
4
docs/source/source/src/video.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
video
|
||||
=====
|
||||
|
||||
.. doxygenfile:: video.h
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
about/usage
|
||||
about/app_examples
|
||||
about/advanced_usage
|
||||
about/changelog
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
|
@ -47,3 +48,9 @@
|
|||
:caption: Legal
|
||||
|
||||
legal/legal
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: source
|
||||
|
||||
source/src
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue