From f56dd36be2f8ad7a08e371adfc75aac3cbfe5cfa Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 18 Jul 2020 23:39:57 +0900 Subject: [PATCH] docs fix --- .readthedocs.yml | 2 +- docs/{source => }/Examples.rst | 0 docs/Makefile | 20 ------------------- docs/{source => }/RTP.rst | 12 ++++++------ docs/{source => }/SIP.rst | 0 docs/{source => }/VoIP.rst | 0 docs/{source => }/conf.py | 9 ++++++--- docs/{source => }/index.rst | 0 docs/make.bat | 35 ---------------------------------- 9 files changed, 13 insertions(+), 65 deletions(-) rename docs/{source => }/Examples.rst (100%) delete mode 100644 docs/Makefile rename docs/{source => }/RTP.rst (92%) rename docs/{source => }/SIP.rst (100%) rename docs/{source => }/VoIP.rst (100%) rename docs/{source => }/conf.py (94%) rename docs/{source => }/index.rst (100%) delete mode 100644 docs/make.bat diff --git a/.readthedocs.yml b/.readthedocs.yml index c8c1184..f39e9d9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,7 +7,7 @@ version: 2 # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: docs/source/conf.py + configuration: docs/conf.py # Optionally set the version of Python and requirements required to build your docs diff --git a/docs/source/Examples.rst b/docs/Examples.rst similarity index 100% rename from docs/source/Examples.rst rename to docs/Examples.rst diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/RTP.rst b/docs/RTP.rst similarity index 92% rename from docs/source/RTP.rst rename to docs/RTP.rst index d11b1c4..3e4aa58 100644 --- a/docs/source/RTP.rst +++ b/docs/RTP.rst @@ -109,7 +109,7 @@ RTP.\ **RTPPacketManager**\ () This rebuilds the ByteIO if packets are sent out of order. Setting the argument *reset* to true will wipe all data in the ByteIO and insert in the data in the argument *data* at the position in the argument *offset*. **write**\ (offset, data) - Writes the data in the argument *data* to the ByteIO at the position in the argument *offset*. RTP data comes with a timestamp that is passed as the offset in this case. This makes it so a whole left by delayed packets can be filled later. If a packet with a timestamp sooner than any other timestamp received, it will rebuild the ByteIO with the new data. If this new position is over 100,000 bytes before the earliest byte, the ByteIO is completely wiped and starts over. This is to prevent Overflow errors. + Writes the data in the argument *data* to the ByteIO at the position in the argument *offset*. RTP data comes with a timestamp that is passed as the offset in this case. This makes it so a hole left by delayed packets can be filled later. If a packet with a timestamp sooner than any other timestamp received, it will rebuild the ByteIO with the new data. If this new position is over 100,000 bytes before the earliest byte, the ByteIO is completely wiped and starts over. This is to prevent Overflow errors. .. _RTPMessage: @@ -163,7 +163,7 @@ RTP.\ **RTPMessage**\ (data, assoc) This method returns a string representation of the RTP packet excluding the payload. **parse**\ (data) - This method is called by the initialization of the class. It determins the RTP version, whether the packet has padding, has a header extension, and other information about the backet. + This method is called by the initialization of the class. It determines the RTP version, whether the packet has padding, has a header extension, and other information about the backet. .. _RTPClient: @@ -178,11 +178,11 @@ The RTPClient is used to send and receive RTP packets and encode/decode the audi The *inIP* argument is used to receive incoming RTP message. - The *inPort* argument is the port RTPClient will bind to to receive incoming RTP messages. + The *inPort* argument is the port RTPClient will bind to, to receive incoming RTP packets. - The *outIP* argument is used to transmit RTP messages. + The *outIP* argument is used to transmit RTP packets. - The *outPort* argument is used to transmit RTP messages. + The *outPort* argument is used to transmit RTP packets. The *sendrecv* argument describes how the RTPClient should act. Please reference `TransmitType` for more details. @@ -204,7 +204,7 @@ The RTPClient is used to send and receive RTP packets and encode/decode the audi This method is called by RTPClient.start() and is responsible for transmitting RTP packets. **This should not be called by the** :term:`user`. **parsePacket**\ (packet) - This method is called by the recv() thread. It convertes the argument *packet* into a :ref:`RTPMessage`, then sends it to the proper parse function depending on the :ref:`PayloadType`. + This method is called by the recv() thread. It converts the argument *packet* into a :ref:`RTPMessage`, then sends it to the proper parse function depending on the :ref:`PayloadType`. **encodePacket**\ (payload) This method is called by the trans() thread. It encoded the argument *payload* into the prefered codec. Currently, PCMU is the hardcoded prefered codec. The trans() thread will use the payload to create the RTP packet before transmitting. diff --git a/docs/source/SIP.rst b/docs/SIP.rst similarity index 100% rename from docs/source/SIP.rst rename to docs/SIP.rst diff --git a/docs/source/VoIP.rst b/docs/VoIP.rst similarity index 100% rename from docs/source/VoIP.rst rename to docs/VoIP.rst diff --git a/docs/source/conf.py b/docs/conf.py similarity index 94% rename from docs/source/conf.py rename to docs/conf.py index 31d79d1..c7fa7aa 100644 --- a/docs/source/conf.py +++ b/docs/conf.py @@ -1,3 +1,5 @@ +import sphinx_rtd_theme + # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full @@ -24,14 +26,15 @@ # The full version, including alpha/beta/rc tags release = '0.5.0 Beta' -master_doc = 'index' +master_doc = 'index.html' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ +extensions = [ + "sphinx_rtd_theme" ] # Add any paths that contain templates here, relative to this directory. @@ -48,7 +51,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' #pygments_style = 'sphinx' diff --git a/docs/source/index.rst b/docs/index.rst similarity index 100% rename from docs/source/index.rst rename to docs/index.rst diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 9534b01..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd