CI: Update docs to Sphinx v3, fix warnings
Sphinx 3 adds a number of C and C++ friendly directives, making documenting our code much easier.
This commit is contained in:
parent
60e94a2899
commit
ff555dd2b0
11
.github/workflows/docs.yml
vendored
11
.github/workflows/docs.yml
vendored
@ -36,10 +36,15 @@ jobs:
|
||||
SCOPY="copyright = '([A-Za-z0-9, ]+)'"
|
||||
RCOPY="copyright = '2017-$(date +"%Y"), Hugh Bailey'"
|
||||
sed -i -E -e "s/${SVER}/${RVER}/g" -e "s/${SREL}/${RREL}/g" -e "s/${SCOPY}/${RCOPY}/g" docs/sphinx/conf.py
|
||||
- uses: ammaraskar/sphinx-action@master
|
||||
- uses: totaldebug/sphinx-publish-action@1.2.0
|
||||
with:
|
||||
docs-folder: "docs/sphinx/"
|
||||
sphinx_src: 'docs/sphinx'
|
||||
build_only: True
|
||||
target_branch: 'master'
|
||||
target_path: '../home/_build'
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OBS Studio Documentation (HTML)
|
||||
path: docs/sphinx/_build/html/
|
||||
path: |
|
||||
${{ runner.temp }}/_github_home/_build
|
||||
!${{ runner.temp }}/_github_home/_build/.doctrees
|
||||
|
@ -32,7 +32,7 @@ for:
|
||||
Twitch, and another for YouTube to allow the ability to log in and use
|
||||
their APIs to do things such as get the RTMP servers or control the
|
||||
channel.
|
||||
|
||||
|
||||
*(Author's note: the service API is incomplete as of this writing)*
|
||||
|
||||
|
||||
|
@ -202,3 +202,4 @@ extlinks = {
|
||||
}
|
||||
extlinks_detect_hardcoded_links = True
|
||||
|
||||
autosectionlabel_prefix_document = True
|
||||
|
@ -22,7 +22,7 @@ is the dedicated header for implementing encoders
|
||||
Encoder Definition Structure (obs_encoder_info)
|
||||
-----------------------------------------------
|
||||
|
||||
.. type:: struct obs_encoder_info
|
||||
.. struct:: obs_encoder_info
|
||||
|
||||
Encoder definition structure.
|
||||
|
||||
@ -163,7 +163,7 @@ Encoder Definition Structure (obs_encoder_info)
|
||||
Encoder Packet Structure (encoder_packet)
|
||||
-----------------------------------------
|
||||
|
||||
.. type:: struct encoder_packet
|
||||
.. struct:: encoder_packet
|
||||
|
||||
Encoder packet structure.
|
||||
|
||||
@ -239,7 +239,7 @@ Encoder Packet Structure (encoder_packet)
|
||||
Raw Frame Data Structure (encoder_frame)
|
||||
----------------------------------------
|
||||
|
||||
.. type:: struct encoder_frame
|
||||
.. struct:: encoder_frame
|
||||
|
||||
Raw frame data structure.
|
||||
|
||||
@ -283,7 +283,7 @@ General Encoder Functions
|
||||
.. function:: obs_encoder_t *obs_video_encoder_create(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data)
|
||||
|
||||
Creates a video encoder with the specified settings.
|
||||
|
||||
|
||||
The "encoder" context is used for encoding video/audio data. Use
|
||||
obs_encoder_release to release it.
|
||||
|
||||
@ -302,7 +302,7 @@ General Encoder Functions
|
||||
.. function:: obs_encoder_t *obs_audio_encoder_create(const char *id, const char *name, obs_data_t *settings, size_t mixer_idx, obs_data_t *hotkey_data)
|
||||
|
||||
Creates an audio encoder with the specified settings.
|
||||
|
||||
|
||||
The "encoder" context is used for encoding video/audio data. Use
|
||||
:c:func:`obs_encoder_release()` to release it.
|
||||
|
||||
@ -428,7 +428,7 @@ General Encoder Functions
|
||||
Sets the preferred video format for a video encoder. If the encoder can use
|
||||
the format specified, it will force a conversion to that format if the
|
||||
obs output format does not match the preferred format.
|
||||
|
||||
|
||||
If the format is set to VIDEO_FORMAT_NONE, will revert to the default
|
||||
functionality of converting only when absolutely necessary.
|
||||
|
||||
|
@ -11,7 +11,7 @@ The OBS Studio frontend API is the API specific to OBS Studio itself.
|
||||
Structures/Enumerations
|
||||
-----------------------
|
||||
|
||||
.. type:: enum obs_frontend_event
|
||||
.. enum:: obs_frontend_event
|
||||
|
||||
Specifies a front-end event. Can be one of the following values:
|
||||
|
||||
@ -179,7 +179,7 @@ Structures/Enumerations
|
||||
Triggered when the virtual camera is stopped.
|
||||
|
||||
|
||||
.. type:: struct obs_frontend_source_list
|
||||
.. struct:: obs_frontend_source_list
|
||||
|
||||
- DARRAY(obs_source_t*) **sources**
|
||||
|
||||
@ -199,19 +199,19 @@ Structures/Enumerations
|
||||
|
||||
obs_frontend_source_list_free(&scenes);
|
||||
|
||||
.. type:: typedef void (*obs_frontend_cb)(void *private_data)
|
||||
.. type:: void (*obs_frontend_cb)(void *private_data)
|
||||
|
||||
Frontend tool menu callback
|
||||
|
||||
.. type:: typedef void (*obs_frontend_event_cb)(enum obs_frontend_event event, void *private_data)
|
||||
.. type:: void (*obs_frontend_event_cb)(enum obs_frontend_event event, void *private_data)
|
||||
|
||||
Frontend event callback
|
||||
|
||||
.. type:: typedef void (*obs_frontend_save_cb)(obs_data_t *save_data, bool saving, void *private_data)
|
||||
.. type:: void (*obs_frontend_save_cb)(obs_data_t *save_data, bool saving, void *private_data)
|
||||
|
||||
Frontend save/load callback
|
||||
|
||||
.. type:: typedef bool (*obs_frontend_translate_ui_cb)(const char *text, const char **out)
|
||||
.. type:: bool (*obs_frontend_translate_ui_cb)(const char *text, const char **out)
|
||||
|
||||
Translation callback
|
||||
|
||||
|
@ -142,7 +142,7 @@ Signals are used for all event-based callbacks.
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: typedef void (*signal_callback_t)(void *data, calldata_t *cd)
|
||||
.. type:: void (*signal_callback_t)(void *data, calldata_t *cd)
|
||||
|
||||
Signal callback.
|
||||
|
||||
@ -243,7 +243,7 @@ direct access to declarations or callback pointers.
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: typedef void (*proc_handler_proc_t)(void *data, calldata_t *cd)
|
||||
.. type:: void (*proc_handler_proc_t)(void *data, calldata_t *cd)
|
||||
|
||||
Procedure handler callback.
|
||||
|
||||
|
@ -7,7 +7,7 @@ Provides a helper structure for conversion to quaternions.
|
||||
|
||||
#include <graphics/axisang.h>
|
||||
|
||||
.. type:: struct axisang
|
||||
.. struct:: axisang
|
||||
.. member:: float axisang.x
|
||||
|
||||
X axis
|
||||
|
@ -9,15 +9,15 @@ HLSL format.
|
||||
|
||||
#include <graphics/graphics.h>
|
||||
|
||||
.. type:: typedef struct gs_effect gs_effect_t
|
||||
.. type:: struct gs_effect gs_effect_t
|
||||
|
||||
Effect object.
|
||||
|
||||
.. type:: typedef struct gs_effect_technique gs_technique_t
|
||||
.. type:: struct gs_effect_technique gs_technique_t
|
||||
|
||||
Technique object.
|
||||
|
||||
.. type:: typedef struct gs_effect_param gs_eparam_t
|
||||
.. type:: struct gs_effect_param gs_eparam_t
|
||||
|
||||
Effect parameter object.
|
||||
|
||||
|
@ -9,7 +9,7 @@ Core Graphics API
|
||||
Graphics Enumerations
|
||||
---------------------
|
||||
|
||||
.. type:: enum gs_draw_mode
|
||||
.. enum:: gs_draw_mode
|
||||
|
||||
Draw mode. Can be one of the following values:
|
||||
|
||||
@ -19,7 +19,7 @@ Graphics Enumerations
|
||||
- GS_TRIS - Draws individual triangles
|
||||
- GS_TRISTRIP - Draws a triangle strip
|
||||
|
||||
.. type:: enum gs_color_format
|
||||
.. enum:: gs_color_format
|
||||
|
||||
Color format. Can be one of the following values:
|
||||
|
||||
@ -47,7 +47,7 @@ Graphics Enumerations
|
||||
- GS_BGRA_UNORM - BGRA, 8 bits per channel, no SRGB aliasing
|
||||
- GS_RG16 - RG, 16 bits per channel
|
||||
|
||||
.. type:: enum gs_color_space
|
||||
.. enum:: gs_color_space
|
||||
|
||||
Color space. Can be one of the following values:
|
||||
|
||||
@ -56,7 +56,7 @@ Graphics Enumerations
|
||||
- GS_CS_709_EXTENDED - Canvas, Mac EDR (HDR)
|
||||
- GS_CS_709_SCRGB - 1.0 = 80 nits, Windows/Linux HDR
|
||||
|
||||
.. type:: enum gs_zstencil_format
|
||||
.. enum:: gs_zstencil_format
|
||||
|
||||
Z-Stencil buffer format. Can be one of the following values:
|
||||
|
||||
@ -66,14 +66,14 @@ Graphics Enumerations
|
||||
- GS_Z32F - 32 bit floating point Z buffer
|
||||
- GS_Z32F_S8X24 - 32 bit floating point Z buffer, 8 bit stencil
|
||||
|
||||
.. type:: enum gs_index_type
|
||||
.. enum:: gs_index_type
|
||||
|
||||
Index buffer type. Can be one of the following values:
|
||||
|
||||
- GS_UNSIGNED_SHORT - 16 bit index
|
||||
- GS_UNSIGNED_LONG - 32 bit index
|
||||
|
||||
.. type:: enum gs_cull_mode
|
||||
.. enum:: gs_cull_mode
|
||||
|
||||
Cull mode. Can be one of the following values:
|
||||
|
||||
@ -81,7 +81,7 @@ Graphics Enumerations
|
||||
- GS_FRONT - Cull front faces
|
||||
- GS_NEITHER - Cull neither
|
||||
|
||||
.. type:: enum gs_blend_type
|
||||
.. enum:: gs_blend_type
|
||||
|
||||
Blend type. Can be one of the following values:
|
||||
|
||||
@ -97,7 +97,7 @@ Graphics Enumerations
|
||||
- GS_BLEND_INVDSTALPHA
|
||||
- GS_BLEND_SRCALPHASAT
|
||||
|
||||
.. type:: enum gs_depth_test
|
||||
.. enum:: gs_depth_test
|
||||
|
||||
Depth test type. Can be one of the following values:
|
||||
|
||||
@ -110,7 +110,7 @@ Graphics Enumerations
|
||||
- GS_NOTEQUAL
|
||||
- GS_ALWAYS
|
||||
|
||||
.. type:: enum gs_stencil_side
|
||||
.. enum:: gs_stencil_side
|
||||
|
||||
Stencil side. Can be one of the following values:
|
||||
|
||||
@ -118,7 +118,7 @@ Graphics Enumerations
|
||||
- GS_STENCIL_BACK
|
||||
- GS_STENCIL_BOTH
|
||||
|
||||
.. type:: enum gs_stencil_op_type
|
||||
.. enum:: gs_stencil_op_type
|
||||
|
||||
Stencil operation type. Can be one of the following values:
|
||||
|
||||
@ -129,7 +129,7 @@ Graphics Enumerations
|
||||
- GS_DECR
|
||||
- GS_INVERT
|
||||
|
||||
.. type:: enum gs_cube_sides
|
||||
.. enum:: gs_cube_sides
|
||||
|
||||
Cubemap side. Can be one of the following values:
|
||||
|
||||
@ -140,7 +140,7 @@ Graphics Enumerations
|
||||
- GS_POSITIVE_Z
|
||||
- GS_NEGATIVE_Z
|
||||
|
||||
.. type:: enum gs_sample_filter
|
||||
.. enum:: gs_sample_filter
|
||||
|
||||
Sample filter type. Can be one of the following values:
|
||||
|
||||
@ -154,7 +154,7 @@ Graphics Enumerations
|
||||
- GS_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR
|
||||
- GS_FILTER_MIN_MAG_LINEAR_MIP_POINT
|
||||
|
||||
.. type:: enum gs_address_mode
|
||||
.. enum:: gs_address_mode
|
||||
|
||||
Address mode. Can be one of the following values:
|
||||
|
||||
@ -164,7 +164,7 @@ Graphics Enumerations
|
||||
- GS_ADDRESS_BORDER
|
||||
- GS_ADDRESS_MIRRORONCE
|
||||
|
||||
.. type:: enum gs_texture_type
|
||||
.. enum:: gs_texture_type
|
||||
|
||||
Texture type. Can be one of the following values:
|
||||
|
||||
@ -176,7 +176,7 @@ Graphics Enumerations
|
||||
Graphics Structures
|
||||
-------------------
|
||||
|
||||
.. type:: struct gs_monitor_info
|
||||
.. struct:: gs_monitor_info
|
||||
.. member:: int gs_monitor_info.rotation_degrees
|
||||
.. member:: long gs_monitor_info.x
|
||||
.. member:: long gs_monitor_info.y
|
||||
@ -185,13 +185,13 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_tvertarray
|
||||
.. struct:: gs_tvertarray
|
||||
.. member:: size_t gs_tvertarray.width
|
||||
.. member:: void *gs_tvertarray.array
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_vb_data
|
||||
.. struct:: gs_vb_data
|
||||
.. member:: size_t gs_vb_data.num
|
||||
.. member:: struct vec3 *gs_vb_data.points
|
||||
.. member:: struct vec3 *gs_vb_data.normals
|
||||
@ -202,7 +202,7 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_sampler_info
|
||||
.. struct:: gs_sampler_info
|
||||
.. member:: enum gs_sample_filter gs_sampler_info.filter
|
||||
.. member:: enum gs_address_mode gs_sampler_info.address_u
|
||||
.. member:: enum gs_address_mode gs_sampler_info.address_v
|
||||
@ -212,7 +212,7 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_display_mode
|
||||
.. struct:: gs_display_mode
|
||||
.. member:: uint32_t gs_display_mode.width
|
||||
.. member:: uint32_t gs_display_mode.height
|
||||
.. member:: uint32_t gs_display_mode.bits
|
||||
@ -220,7 +220,7 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_rect
|
||||
.. struct:: gs_rect
|
||||
.. member:: int gs_rect.x
|
||||
.. member:: int gs_rect.y
|
||||
.. member:: int gs_rect.cx
|
||||
@ -228,7 +228,7 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_window
|
||||
.. struct:: gs_window
|
||||
|
||||
A window structure. This structure is used with a native widget.
|
||||
|
||||
@ -247,7 +247,7 @@ Graphics Structures
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct gs_init_data
|
||||
.. struct:: gs_init_data
|
||||
|
||||
Swap chain initialization data.
|
||||
|
||||
@ -1038,7 +1038,7 @@ Texture Functions
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum gs_dmabuf_flags
|
||||
.. enum:: gs_dmabuf_flags
|
||||
|
||||
DMA-BUF capabilities:
|
||||
|
||||
@ -1574,16 +1574,16 @@ Render Helper Functions
|
||||
Graphics Types
|
||||
--------------
|
||||
|
||||
.. type:: typedef struct gs_duplicator gs_duplicator_t
|
||||
.. type:: typedef struct gs_texture gs_texture_t
|
||||
.. type:: typedef struct gs_stage_surface gs_stagesurf_t
|
||||
.. type:: typedef struct gs_zstencil_buffer gs_zstencil_t
|
||||
.. type:: typedef struct gs_vertex_buffer gs_vertbuffer_t
|
||||
.. type:: typedef struct gs_index_buffer gs_indexbuffer_t
|
||||
.. type:: typedef struct gs_sampler_state gs_samplerstate_t
|
||||
.. type:: typedef struct gs_swap_chain gs_swapchain_t
|
||||
.. type:: typedef struct gs_texture_render gs_texrender_t
|
||||
.. type:: typedef struct gs_shader gs_shader_t
|
||||
.. type:: typedef struct gs_shader_param gs_sparam_t
|
||||
.. type:: typedef struct gs_device gs_device_t
|
||||
.. type:: typedef struct graphics_subsystem graphics_t
|
||||
.. type:: struct gs_duplicator gs_duplicator_t
|
||||
.. type:: struct gs_texture gs_texture_t
|
||||
.. type:: struct gs_stage_surface gs_stagesurf_t
|
||||
.. type:: struct gs_zstencil_buffer gs_zstencil_t
|
||||
.. type:: struct gs_vertex_buffer gs_vertbuffer_t
|
||||
.. type:: struct gs_index_buffer gs_indexbuffer_t
|
||||
.. type:: struct gs_sampler_state gs_samplerstate_t
|
||||
.. type:: struct gs_swap_chain gs_swapchain_t
|
||||
.. type:: struct gs_texture_render gs_texrender_t
|
||||
.. type:: struct gs_shader gs_shader_t
|
||||
.. type:: struct gs_shader_param gs_sparam_t
|
||||
.. type:: struct gs_device gs_device_t
|
||||
.. type:: struct graphics_subsystem graphics_t
|
||||
|
@ -10,7 +10,7 @@ animated gif files.
|
||||
|
||||
#include <graphics/image-file.h>
|
||||
|
||||
.. type:: struct gs_image_file
|
||||
.. struct:: gs_image_file
|
||||
|
||||
Image file structure
|
||||
|
||||
@ -18,7 +18,7 @@ animated gif files.
|
||||
|
||||
Texture
|
||||
|
||||
.. type:: typedef struct gs_image_file gs_image_file_t
|
||||
.. type:: struct gs_image_file gs_image_file_t
|
||||
|
||||
Image file type
|
||||
|
||||
|
@ -7,11 +7,11 @@ Extra Math Functions/Macros
|
||||
|
||||
Helper functions/macros for graphics math.
|
||||
|
||||
.. function:: RAD(val)
|
||||
.. :c:macro:: RAD(val)
|
||||
|
||||
Macro that converts a floating point degrees value to radians.
|
||||
|
||||
.. function:: DEG(val)
|
||||
.. :c:macro:: DEG(val)
|
||||
|
||||
Macro that converts a floating point radians value to degrees.
|
||||
|
||||
|
@ -5,7 +5,7 @@ Matrix
|
||||
|
||||
#include <graphics/matrix4.h>
|
||||
|
||||
.. type:: struct matrix4
|
||||
.. struct:: matrix4
|
||||
|
||||
Matrix structure
|
||||
|
||||
|
@ -5,7 +5,7 @@ Quaternion
|
||||
|
||||
#include <graphics/quat.h>
|
||||
|
||||
.. type:: struct quat
|
||||
.. struct:: quat
|
||||
|
||||
Two component quaternion structure.
|
||||
|
||||
@ -107,7 +107,7 @@ Quaternion
|
||||
:param dst: Destination
|
||||
:param v: Quaternion being subtracted from
|
||||
:param f: Floating point being subtracted
|
||||
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void quat_mulf(struct quat *dst, const struct quat *v, float f)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <graphics/vec2.h>
|
||||
|
||||
.. type:: struct vec2
|
||||
.. struct:: vec2
|
||||
|
||||
Two component vector structure.
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
:param dst: Destination
|
||||
:param v: Vector being subtracted from
|
||||
:param f: Floating point being subtracted
|
||||
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void vec2_mulf(struct vec2 *dst, const struct vec2 *v, float f)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <graphics/vec3.h>
|
||||
|
||||
.. type:: struct vec3
|
||||
.. struct:: vec3
|
||||
|
||||
Two component vector structure.
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
:param dst: Destination
|
||||
:param v: Vector being subtracted from
|
||||
:param f: Floating point being subtracted
|
||||
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void vec3_mulf(struct vec3 *dst, const struct vec3 *v, float f)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <graphics/vec4.h>
|
||||
|
||||
.. type:: struct vec4
|
||||
.. struct:: vec4
|
||||
|
||||
Two component vector structure.
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
:param dst: Destination
|
||||
:param v: Vector being subtracted from
|
||||
:param f: Floating point being subtracted
|
||||
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void vec4_mulf(struct vec4 *dst, const struct vec4 *v, float f)
|
||||
|
@ -15,7 +15,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum video_format
|
||||
.. enum:: video_format
|
||||
|
||||
Video format. Can be one of the following values:
|
||||
|
||||
@ -50,7 +50,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum video_trc
|
||||
.. enum:: video_trc
|
||||
|
||||
Transfer characteristics. Can be one of the following values:
|
||||
|
||||
@ -61,7 +61,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum video_colorspace
|
||||
.. enum:: video_colorspace
|
||||
|
||||
YUV color space. Can be one of the following values:
|
||||
|
||||
@ -74,7 +74,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum video_range_type
|
||||
.. enum:: video_range_type
|
||||
|
||||
YUV color range.
|
||||
|
||||
@ -84,7 +84,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct video_data
|
||||
.. struct:: video_data
|
||||
|
||||
Video frame structure.
|
||||
|
||||
@ -94,7 +94,7 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct video_output_info
|
||||
.. struct:: video_output_info
|
||||
|
||||
Video output handler information
|
||||
|
||||
@ -237,7 +237,7 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum audio_format
|
||||
.. enum:: audio_format
|
||||
|
||||
Audio format. Can be one of the following values:
|
||||
|
||||
@ -253,7 +253,7 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: enum speaker_layout
|
||||
.. enum:: speaker_layout
|
||||
|
||||
Speaker layout. Can be one of the following values:
|
||||
|
||||
@ -268,7 +268,7 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct audio_data
|
||||
.. struct:: audio_data
|
||||
|
||||
Audio data structure.
|
||||
|
||||
@ -278,12 +278,12 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct audio_output_data
|
||||
.. struct:: audio_output_data
|
||||
.. member:: float *audio_output_data.data[MAX_AUDIO_CHANNELS]
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct audio_output_info
|
||||
.. struct:: audio_output_info
|
||||
.. member:: const char *audio_output_info.name
|
||||
.. member:: uint32_t audio_output_info.samples_per_sec
|
||||
.. member:: enum audio_format audio_output_info.format
|
||||
@ -293,14 +293,14 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct audio_convert_info
|
||||
.. struct:: audio_convert_info
|
||||
.. member:: uint32_t audio_convert_info.samples_per_sec
|
||||
.. member:: enum audio_format audio_convert_info.format
|
||||
.. member:: enum speaker_layout audio_convert_info.speakers
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: typedef bool (*audio_input_callback_t)(void *param, uint64_t start_ts, uint64_t end_ts, uint64_t *new_ts, uint32_t active_mixers, struct audio_output_data *mixes)
|
||||
.. type:: bool (*audio_input_callback_t)(void *param, uint64_t start_ts, uint64_t end_ts, uint64_t *new_ts, uint32_t active_mixers, struct audio_output_data *mixes)
|
||||
|
||||
Audio input callback (typically used internally).
|
||||
|
||||
@ -378,7 +378,7 @@ Audio Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: typedef void (*audio_output_callback_t)(void *param, size_t mix_idx, struct audio_data *data)
|
||||
.. type:: void (*audio_output_callback_t)(void *param, size_t mix_idx, struct audio_data *data)
|
||||
|
||||
Audio output callback. Typically used internally.
|
||||
|
||||
@ -460,11 +460,11 @@ Resampler
|
||||
|
||||
FFmpeg wrapper to resample audio.
|
||||
|
||||
.. type:: typedef struct audio_resampler audio_resampler_t
|
||||
.. type:: struct audio_resampler audio_resampler_t
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct resample_info
|
||||
.. struct:: resample_info
|
||||
.. member:: uint32_t resample_info.samples_per_sec
|
||||
.. member:: enum audio_format resample_info.format
|
||||
.. member:: enum speaker_layout resample_info.speakers
|
||||
@ -498,5 +498,5 @@ FFmpeg wrapper to resample audio.
|
||||
:param out_frames: Pointer to receive converted audio frame count
|
||||
:param ts_offset: Pointer to receive timestamp offset (in
|
||||
nanoseconds)
|
||||
:param const input: Input frames to convert
|
||||
:param input: Input frames to convert
|
||||
:param in_frames: Input frame count
|
||||
|
@ -39,7 +39,7 @@ Logging Levels
|
||||
Logging Functions
|
||||
-----------------
|
||||
|
||||
.. type:: typedef void (*log_handler_t)(int lvl, const char *msg, va_list args, void *p)
|
||||
.. type:: void (*log_handler_t)(int lvl, const char *msg, va_list args, void *p)
|
||||
|
||||
Logging callback.
|
||||
|
||||
|
@ -12,7 +12,7 @@ as data is pushed to the front or back.
|
||||
Circular Buffer Structure (struct circlebuf)
|
||||
--------------------------------------------
|
||||
|
||||
.. type:: struct circlebuf
|
||||
.. struct:: circlebuf
|
||||
.. member:: void *circlebuf.data
|
||||
.. member:: size_t circlebuf.size
|
||||
.. member:: size_t circlebuf.start_pos
|
||||
|
@ -7,11 +7,11 @@ Dynamically resizing arrays (a C equivalent to std::vector).
|
||||
|
||||
#include <util/darray.h>
|
||||
|
||||
.. type:: struct darray
|
||||
.. struct:: darray
|
||||
|
||||
The base dynamic array structure.
|
||||
|
||||
.. type:: DARRAY(type)
|
||||
.. :c:macro:: DARRAY(type)
|
||||
|
||||
Macro for a dynamic array based upon an actual type. Use this with
|
||||
da_* macros.
|
||||
|
@ -12,7 +12,7 @@ std::string).
|
||||
Dynamic String Structure (struct dstr)
|
||||
--------------------------------------
|
||||
|
||||
.. type:: struct dstr
|
||||
.. struct:: dstr
|
||||
.. member:: char *dstr.array
|
||||
.. member:: size_t dstr.len
|
||||
.. member:: size_t dstr.capacity
|
||||
|
@ -249,11 +249,11 @@ Other Path/File Functions
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: typedef struct os_dir os_dir_t
|
||||
.. type:: struct os_dir os_dir_t
|
||||
|
||||
A directory object.
|
||||
|
||||
.. type:: struct os_dirent
|
||||
.. struct:: os_dirent
|
||||
|
||||
A directory entry record.
|
||||
|
||||
@ -285,10 +285,10 @@ Other Path/File Functions
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct os_globent
|
||||
.. struct:: os_globent
|
||||
|
||||
A glob entry.
|
||||
|
||||
|
||||
.. member:: char *os_globent.path
|
||||
|
||||
The full path to the glob entry.
|
||||
@ -297,7 +297,7 @@ Other Path/File Functions
|
||||
|
||||
*true* if the glob entry is a directory, *false* otherwise.
|
||||
|
||||
.. type:: struct os_glob_info
|
||||
.. struct:: os_glob_info
|
||||
|
||||
A glob object.
|
||||
|
||||
@ -309,7 +309,7 @@ Other Path/File Functions
|
||||
|
||||
Array of glob entries.
|
||||
|
||||
.. type:: typedef struct os_glob_info os_glob_t
|
||||
.. type:: struct os_glob_info os_glob_t
|
||||
|
||||
---------------------
|
||||
|
||||
@ -394,8 +394,8 @@ Sleep-Inhibition Functions
|
||||
These functions/types are used to inhibit the computer from going to
|
||||
sleep.
|
||||
|
||||
.. type:: struct os_inhibit_info
|
||||
.. type:: typedef struct os_inhibit_info os_inhibit_t
|
||||
.. struct:: os_inhibit_info
|
||||
.. type:: struct os_inhibit_info os_inhibit_t
|
||||
|
||||
---------------------
|
||||
|
||||
@ -447,7 +447,7 @@ Other Functions
|
||||
|
||||
---------------------
|
||||
|
||||
.. type:: struct os_proc_memory_usage
|
||||
.. struct:: os_proc_memory_usage
|
||||
|
||||
Memory usage structure.
|
||||
|
||||
@ -459,7 +459,7 @@ Other Functions
|
||||
|
||||
Virtual size.
|
||||
|
||||
.. type:: typedef struct os_proc_memory_usage os_proc_memory_usage_t
|
||||
.. type:: struct os_proc_memory_usage os_proc_memory_usage_t
|
||||
|
||||
---------------------
|
||||
|
||||
|
@ -4,10 +4,10 @@ Profiler
|
||||
The profiler is used to get information about program performance and
|
||||
efficiency.
|
||||
|
||||
.. type:: typedef struct profiler_snapshot profiler_snapshot_t
|
||||
.. type:: typedef struct profiler_snapshot_entry profiler_snapshot_entry_t
|
||||
.. type:: typedef struct profiler_name_store profiler_name_store_t
|
||||
.. type:: typedef struct profiler_time_entry profiler_time_entry_t
|
||||
.. type:: struct profiler_snapshot profiler_snapshot_t
|
||||
.. type:: struct profiler_snapshot_entry profiler_snapshot_entry_t
|
||||
.. type:: struct profiler_name_store profiler_name_store_t
|
||||
.. type:: struct profiler_time_entry profiler_time_entry_t
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
@ -17,7 +17,7 @@ efficiency.
|
||||
Profiler Structures
|
||||
-------------------
|
||||
|
||||
.. type:: struct profiler_time_entry
|
||||
.. struct:: profiler_time_entry
|
||||
.. member:: uint64_t profiler_time_entry.time_delta
|
||||
.. member:: uint64_t profiler_time_entry.count
|
||||
|
||||
@ -180,7 +180,7 @@ Profiler Data Access Functions
|
||||
|
||||
----------------------
|
||||
|
||||
.. type:: typedef bool (*profiler_entry_enum_func)(void *context, profiler_snapshot_entry_t *entry)
|
||||
.. type:: bool (*profiler_entry_enum_func)(void *context, profiler_snapshot_entry_t *entry)
|
||||
|
||||
Profiler snapshot entry numeration callback
|
||||
|
||||
@ -200,7 +200,7 @@ Profiler Data Access Functions
|
||||
|
||||
----------------------
|
||||
|
||||
.. type:: typedef bool (*profiler_name_filter_func)(void *data, const char *name, bool *remove)
|
||||
.. type:: bool (*profiler_name_filter_func)(void *data, const char *name, bool *remove)
|
||||
|
||||
Callback used to determine what profile nodes are removed/filtered.
|
||||
|
||||
|
@ -11,7 +11,7 @@ various reading/writing to/from different inputs/outputs)
|
||||
Serializer Structure (struct serializer)
|
||||
----------------------------------------
|
||||
|
||||
.. type:: struct serializer
|
||||
.. struct:: serializer
|
||||
.. member:: void *serializer.data
|
||||
.. member:: size_t (*serializer.read)(void *, void *, size_t)
|
||||
.. member:: size_t (*serializer.write)(void *, const void *, size_t)
|
||||
@ -102,9 +102,11 @@ Provides an output serializer used with dynamic arrays.
|
||||
Array Output Serializer Structure (struct array_output_data)
|
||||
------------------------------------------------------------
|
||||
|
||||
.. type:: struct array_output_data
|
||||
.. struct:: array_output_data
|
||||
|
||||
.. member:: DARRAY(uint8_t) array_output_data.bytes
|
||||
.. code:: cpp
|
||||
|
||||
DARRAY(uint8_t) array_output_data.bytes
|
||||
|
||||
Array Output Serializer Functions
|
||||
---------------------------------
|
||||
|
@ -4,6 +4,8 @@ Text Lookup Interface
|
||||
Used for storing and looking up localized strings. Uses an ini-file
|
||||
like file format for localization lookup.
|
||||
|
||||
.. struct:: text_lookup
|
||||
|
||||
.. type:: struct text_lookup lookup_t
|
||||
|
||||
.. code:: cpp
|
||||
|
@ -19,14 +19,14 @@ Module Macros
|
||||
|
||||
These macros are used within custom plugin modules.
|
||||
|
||||
.. function:: OBS_DECLARE_MODULE()
|
||||
.. macro:: OBS_DECLARE_MODULE()
|
||||
|
||||
Declares a libobs module. Exports important core module functions
|
||||
related to the module itself, OBS version, etc.
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: OBS_MODULE_USE_DEFAULT_LOCALE(module_name, default_locale)
|
||||
.. macro:: OBS_MODULE_USE_DEFAULT_LOCALE(module_name, default_locale)
|
||||
|
||||
Helper macro that uses the standard ini file format for localization.
|
||||
Automatically initializes and destroys localization data, and
|
||||
@ -47,7 +47,7 @@ to communicate with libobs and front-ends.
|
||||
Required: Called when the module is loaded. Implement this function
|
||||
to load all the sources/encoders/outputs/services for your module, or
|
||||
anything else that may need loading.
|
||||
|
||||
|
||||
:return: Return true to continue loading the module, otherwise
|
||||
false to indicate failure and unload the module
|
||||
|
||||
@ -81,7 +81,7 @@ to communicate with libobs and front-ends.
|
||||
.. function:: const char *obs_module_name(void)
|
||||
|
||||
(Optional)
|
||||
|
||||
|
||||
:return: The full name of the module
|
||||
|
||||
---------------------
|
||||
@ -109,7 +109,7 @@ These functions are externs that are usable throughout the module.
|
||||
.. function:: bool obs_module_get_string(const char *lookup_string, const char **translated_string)
|
||||
|
||||
Helper function for looking up locale.
|
||||
|
||||
|
||||
:return: *true* if text found, otherwise *false*
|
||||
|
||||
---------------------
|
||||
@ -124,7 +124,7 @@ These functions are externs that are usable throughout the module.
|
||||
|
||||
Returns the location to a module data file associated with the
|
||||
current module. Free with :c:func:`bfree()` when complete.
|
||||
|
||||
|
||||
Equivalent to:
|
||||
|
||||
.. code:: cpp
|
||||
@ -138,7 +138,7 @@ These functions are externs that are usable throughout the module.
|
||||
Returns the location to a module config file associated with the
|
||||
current module. Free with :c:func:`bfree()` when complete. Will
|
||||
return NULL if configuration directory is not set.
|
||||
|
||||
|
||||
Equivalent to:
|
||||
|
||||
.. code:: cpp
|
||||
@ -157,14 +157,14 @@ plugin modules.
|
||||
.. function:: int obs_open_module(obs_module_t **module, const char *path, const char *data_path)
|
||||
|
||||
Opens a plugin module directly from a specific path.
|
||||
|
||||
|
||||
If the module already exists then the function will return successful, and
|
||||
the module parameter will be given the pointer to the existing
|
||||
module.
|
||||
|
||||
|
||||
This does not initialize the module, it only loads the module image. To
|
||||
initialize the module, call :c:func:`obs_init_module()`.
|
||||
|
||||
|
||||
:param module: The pointer to the created module
|
||||
:param path: Specifies the path to the module library file. If the
|
||||
extension is not specified, it will use the extension
|
||||
@ -182,7 +182,7 @@ plugin modules.
|
||||
.. function:: bool obs_init_module(obs_module_t *module)
|
||||
|
||||
Initializes the module, which calls its obs_module_load export.
|
||||
|
||||
|
||||
:return: *true* if the module was loaded successfully
|
||||
|
||||
---------------------
|
||||
@ -234,7 +234,7 @@ plugin modules.
|
||||
Adds a module search path to be used with obs_find_modules. If the search
|
||||
path strings contain %module%, that text will be replaced with the module
|
||||
name when used.
|
||||
|
||||
|
||||
:param bin: Specifies the module's binary directory search path
|
||||
:param data: Specifies the module's data directory search path
|
||||
|
||||
@ -336,11 +336,11 @@ plugin modules.
|
||||
.. function:: char *obs_find_module_file(obs_module_t *module, const char *file)
|
||||
|
||||
Returns the location of a plugin module data file.
|
||||
|
||||
|
||||
Note: Modules should use obs_module_file function defined in obs-module.h
|
||||
as a more elegant means of getting their files without having to
|
||||
specify the module parameter.
|
||||
|
||||
|
||||
:param module: The module associated with the file to locate
|
||||
:param file: The file to locate
|
||||
:return: Path string, or NULL if not found. Use bfree to free string
|
||||
@ -350,11 +350,11 @@ plugin modules.
|
||||
.. function:: char *obs_module_get_config_path(obs_module_t *module, const char *file)
|
||||
|
||||
Returns the path of a plugin module config file (whether it exists or not).
|
||||
|
||||
|
||||
Note: Modules should use obs_module_config_path function defined in
|
||||
obs-module.h as a more elegant means of getting their files without
|
||||
having to specify the module parameter.
|
||||
|
||||
|
||||
:param module: The module associated with the path
|
||||
:param file: The file to get a path to
|
||||
:return: Path string, or NULL if not found. Use bfree to free string
|
||||
|
@ -23,7 +23,7 @@ for implementing outputs
|
||||
Output Definition Structure (obs_output_info)
|
||||
---------------------------------------------
|
||||
|
||||
.. type:: struct obs_output_info
|
||||
.. struct:: obs_output_info
|
||||
|
||||
Output definition structure.
|
||||
|
||||
@ -316,7 +316,7 @@ General Output Functions
|
||||
.. function:: obs_output_t *obs_output_create(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data)
|
||||
|
||||
Creates an output with the specified settings.
|
||||
|
||||
|
||||
The "output" context is used for anything related to outputting the
|
||||
final video/audio mix (E.g. streaming or recording). Use
|
||||
obs_output_release to release it.
|
||||
@ -403,7 +403,7 @@ General Output Functions
|
||||
.. function:: void obs_output_set_delay(obs_output_t *output, uint32_t delay_sec, uint32_t flags)
|
||||
|
||||
Sets the current output delay, in seconds (if the output supports delay)
|
||||
|
||||
|
||||
If delay is currently active, it will set the delay value, but will not
|
||||
affect the current delay, it will only affect the next time the output is
|
||||
activated.
|
||||
@ -603,7 +603,7 @@ General Output Functions
|
||||
|
||||
Sets the preferred scaled resolution for this output. Set width and height
|
||||
to 0 to disable scaling.
|
||||
|
||||
|
||||
If this output uses an encoder, it will call obs_encoder_set_scaled_size on
|
||||
the encoder before the stream is started. If the encoder is already active,
|
||||
then this function will trigger a warning and do nothing.
|
||||
@ -677,48 +677,48 @@ Functions used by outputs
|
||||
|
||||
enum video_format {
|
||||
VIDEO_FORMAT_NONE,
|
||||
|
||||
|
||||
/* planar 4:2:0 formats */
|
||||
VIDEO_FORMAT_I420, /* three-plane */
|
||||
VIDEO_FORMAT_NV12, /* two-plane, luma and packed chroma */
|
||||
|
||||
|
||||
/* packed 4:2:2 formats */
|
||||
VIDEO_FORMAT_YVYU,
|
||||
VIDEO_FORMAT_YUY2, /* YUYV */
|
||||
VIDEO_FORMAT_UYVY,
|
||||
|
||||
|
||||
/* packed uncompressed formats */
|
||||
VIDEO_FORMAT_RGBA,
|
||||
VIDEO_FORMAT_BGRA,
|
||||
VIDEO_FORMAT_BGRX,
|
||||
VIDEO_FORMAT_Y800, /* grayscale */
|
||||
|
||||
|
||||
/* planar 4:4:4 */
|
||||
VIDEO_FORMAT_I444,
|
||||
|
||||
|
||||
/* more packed uncompressed formats */
|
||||
VIDEO_FORMAT_BGR3,
|
||||
|
||||
|
||||
/* planar 4:2:2 */
|
||||
VIDEO_FORMAT_I422,
|
||||
|
||||
|
||||
/* planar 4:2:0 with alpha */
|
||||
VIDEO_FORMAT_I40A,
|
||||
|
||||
|
||||
/* planar 4:2:2 with alpha */
|
||||
VIDEO_FORMAT_I42A,
|
||||
|
||||
|
||||
/* planar 4:4:4 with alpha */
|
||||
VIDEO_FORMAT_YUVA,
|
||||
|
||||
|
||||
/* packed 4:4:4 with alpha */
|
||||
VIDEO_FORMAT_AYUV,
|
||||
|
||||
|
||||
/* planar 4:2:0 format, 10 bpp */
|
||||
VIDEO_FORMAT_I010, /* three-plane */
|
||||
VIDEO_FORMAT_P010, /* two-plane, luma and packed chroma */
|
||||
};
|
||||
|
||||
|
||||
enum video_colorspace {
|
||||
VIDEO_CS_DEFAULT,
|
||||
VIDEO_CS_601,
|
||||
@ -727,13 +727,13 @@ Functions used by outputs
|
||||
VIDEO_CS_2100_PQ,
|
||||
VIDEO_CS_2100_HLG,
|
||||
};
|
||||
|
||||
|
||||
enum video_range_type {
|
||||
VIDEO_RANGE_DEFAULT,
|
||||
VIDEO_RANGE_PARTIAL,
|
||||
VIDEO_RANGE_FULL
|
||||
};
|
||||
|
||||
|
||||
struct video_scale_info {
|
||||
enum video_format format;
|
||||
uint32_t width;
|
||||
@ -755,18 +755,18 @@ Functions used by outputs
|
||||
|
||||
enum audio_format {
|
||||
AUDIO_FORMAT_UNKNOWN,
|
||||
|
||||
|
||||
AUDIO_FORMAT_U8BIT,
|
||||
AUDIO_FORMAT_16BIT,
|
||||
AUDIO_FORMAT_32BIT,
|
||||
AUDIO_FORMAT_FLOAT,
|
||||
|
||||
|
||||
AUDIO_FORMAT_U8BIT_PLANAR,
|
||||
AUDIO_FORMAT_16BIT_PLANAR,
|
||||
AUDIO_FORMAT_32BIT_PLANAR,
|
||||
AUDIO_FORMAT_FLOAT_PLANAR,
|
||||
};
|
||||
|
||||
|
||||
enum speaker_layout {
|
||||
SPEAKERS_UNKNOWN,
|
||||
SPEAKERS_MONO,
|
||||
@ -780,7 +780,7 @@ Functions used by outputs
|
||||
SPEAKERS_7POINT1_SURROUND,
|
||||
SPEAKERS_SURROUND,
|
||||
};
|
||||
|
||||
|
||||
struct audio_convert_info {
|
||||
uint32_t samples_per_sec;
|
||||
enum audio_format format;
|
||||
|
@ -20,7 +20,7 @@ specific transforms and/or filtering
|
||||
Scene Item Transform Structure (obs_transform_info)
|
||||
---------------------------------------------------
|
||||
|
||||
.. type:: struct obs_transform_info
|
||||
.. struct:: obs_transform_info
|
||||
|
||||
Scene item transform structure.
|
||||
|
||||
@ -80,7 +80,7 @@ Scene Item Transform Structure (obs_transform_info)
|
||||
Scene Item Crop Structure (obs_sceneitem_crop)
|
||||
----------------------------------------------
|
||||
|
||||
.. type:: struct obs_sceneitem_crop
|
||||
.. struct:: obs_sceneitem_crop
|
||||
|
||||
Scene item crop structure.
|
||||
|
||||
@ -104,7 +104,7 @@ Scene Item Crop Structure (obs_sceneitem_crop)
|
||||
Scene Item Order Info Structure (\*obs_sceneitem_order_info)
|
||||
------------------------------------------------------------
|
||||
|
||||
.. type:: struct obs_sceneitem_order_info
|
||||
.. struct:: obs_sceneitem_order_info
|
||||
|
||||
Scene item order info structure.
|
||||
|
||||
@ -343,7 +343,7 @@ Scene Item Functions
|
||||
---------------------
|
||||
|
||||
.. function:: obs_data_t *obs_scene_save_transform_states(obs_scene_t *scene, bool all_items)
|
||||
.. function:: void obs_scene_load_transform_states(oconst char *states)
|
||||
.. function:: void obs_scene_load_transform_states(const char *states)
|
||||
|
||||
Saves all the transformation states for the sceneitms in scene. When all_items is false, it
|
||||
will only save selected items
|
||||
|
@ -26,7 +26,7 @@ is the dedicated header for implementing services.
|
||||
Service Definition Structure
|
||||
----------------------------
|
||||
|
||||
.. type:: struct obs_service_info
|
||||
.. struct:: obs_service_info
|
||||
|
||||
Service definition structure.
|
||||
|
||||
@ -172,7 +172,7 @@ General Service Functions
|
||||
.. function:: obs_service_t *obs_service_create(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data)
|
||||
|
||||
Creates a service with the specified settings.
|
||||
|
||||
|
||||
The "service" context is used for encoding video/audio data. Use
|
||||
obs_service_release to release it.
|
||||
|
||||
@ -291,7 +291,7 @@ General Service Functions
|
||||
.. function:: void obs_service_apply_encoder_settings(obs_service_t *service, obs_data_t *video_encoder_settings, obs_data_t *audio_encoder_settings)
|
||||
|
||||
Applies service-specific video encoder settings.
|
||||
|
||||
|
||||
:param video_encoder_settings: Video encoder settings. Can be *NULL*
|
||||
:param audio_encoder_settings: Audio encoder settings. Can be *NULL*
|
||||
|
||||
|
@ -23,7 +23,7 @@ dedicated header for implementing sources.
|
||||
Source Definition Structure (obs_source_info)
|
||||
---------------------------------------------
|
||||
|
||||
.. type:: struct obs_source_info
|
||||
.. struct:: obs_source_info
|
||||
|
||||
Source definition structure.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user