Re-exports

pub use self::obs_key as obs_key_t;
pub use self::obs_hotkey_registerer_type as obs_hotkey_registerer_t;

Structs

Encoder input frame

Encoder output packet

Sent to source filters via the filter_audio callback to allow filtering of audio data

Audio initialization structure

Access to the argc/argv used to start OBS. What you see is what you get.

Encoder interface

Modal UI definition structure

Modeless UI definition structure

Source audio output structure. Used with obs_source_output_audio to output source audio. Audio is automatically resampled and remixed as necessary.

Source asynchronous video output structure. Used with obs_source_output_video to output asynchronous video. Video is buffered as necessary to play according to timestamps. When used with audio output, audio is synced to video as it is played.

Source definition structure

Video initialization structure

Constants

Debug message to be used mostly by developers.

Use if there’s a problem that can potentially affect the program, but isn’t enough to require termination of the program.

Informative message to be displayed in the log.

Use if a problem occurs that doesn’t affect the program and is recoverable.

< Bilinear low resolution downscale

< RGB/YUV (using texture_rect)

< RGB/YUV (alpha set to 1.0)

< RGB/YUV (repeating)

< RGB/YUV (solid color only)

< no scaling, maximum size only

< scales to inner rectangle

< scales to outer rectangle

< stretch (ignores base scale)

< The encoder provides an audio codec

< The encoder provides a video codec

@brief A simple cubic fader for controlling audio levels

@brief A fader compliant to IEC 60-268-18

@brief Logarithmic fader

@brief A simple peak meter measuring the maximum of all samples.

@brief An accurate peak meter measure the maximum of inter-samples.

< Channels: FL, FR, LFE

< Channels: FL, FR, FC, RC

< Channels: FL, FR, FC, LFE, RC

< Channels: FL, FR, FC, LFE, RL, RR

< Channels: FL, FR, FC, LFE, RL, RR, SL, SR

< Unknown setting, fallback is stereo.

Statics

Functions

Draws a 2D sprite

Helper function to simplify effect usage. Use with a while loop that contains drawing functions. Automatically handles techniques, passes, and unloading.

sets the viewport to current swap chain size

sets default screen-sized orthographic mode

sets default screen-sized perspective mode

Gets a pointer to the context-specific object associated with the texture. For example, for GL, this is a GLuint*. For D3D11, ID3D11Texture2D*.

special-case function (GL only) - specifies whether the texture is a GL_TEXTURE_RECTANGLE type, which doesn’t use normalized texture coordinates, doesn’t support mipmapping, and requires address clamping

Add a path to search libobs data files in. @param path Full path to directory to look in. The string is copied.

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.

Creates an audio encoder context

Requests modeless UI to be created. Returns immediately.

Adds a draw callback for this display context

Adds a new window display linked to the main render pipeline. This creates a new swap chain which updates every frame.

Destroys a display context

Removes a draw callback for this display context

Changes the size of this display

Duplicates an encoder packet

Returns true if encoder is active, false otherwise

Adds/releases a reference to an encoder. When the last reference is released, the encoder is destroyed.

Returns the audio output context used with this encoder, or NULL if not a audio context

Gets the default settings for an encoder type

Returns the codec of the encoder

Gets extra data (headers) associated with this context

For video encoders, returns the height of the encoded image

For audio encoders, returns the sample rate of the audio

Returns the current settings for this encoder

Returns the type of an encoder

For video encoders, returns the width of the encoded image

Returns whether encoder is paused

Returns the property list of an existing encoder, if any. Free with obs_properties_destroy

For video encoders, returns true if pre-encode scaling is enabled

Sets the audio output context to be used with this encoder

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.

Sets the scaled resolution for a video encoder. Set width and height to 0 to disable scaling. If the encoder is active, this function will trigger a warning, and do nothing.

Sets the video output context to be used with this encoder

Updates the settings of the encoder context. Usually used for changing bitrate while active

Returns the video output context used with this encoder, or NULL if not a video context

Helper function for entering the OBS graphics context

Enumerates all available encoder types.

Enumerates encoders

Enumerates all available filter source types.

Enumerates all available inputs source types.

Enumerates all loaded modules

Enumerates all available output types.

Enumerates outputs

Enumerates scenes

Enumerates all available service types.

Enumerates encoders

Enumerates all source types (inputs, filters, transitions, etc).

Enumerates all input sources

Enumerates all available transition source types.

Requests modal UI to be displayed. Returns when user is complete.

@brief Attach the fader to a source @param fader pointer to the fader object @param source pointer to the source object @return true on success

@brief Create a fader @param type the type of the fader @return pointer to the fader object

@brief Destroy a fader @param fader pointer to the fader object

@brief Detach the fader from the currently attached source @param fader pointer to the fader object

@brief Get the current fader dB value @param fader pointer to the fader object @return current fader dB value

@brief Get the current fader deflection @param fader pointer to the fader object @return current fader deflection

@brief Get the current fader multiplier value @param fader pointer to the fader object @return current fader multiplier

@brief Set the fader dB value @param fader pointer to the fader object @param db new dB value @return true if value was set without clamping

@brief Set the fader value from deflection @param fader pointer to the fader object @param def new deflection @return true if value was set without clamping

@brief Set the fader value from multiplier @param fader pointer to the fader object @return true if the value was set without clamping

If the source is a filter, returns the parent source of the filter. Only guaranteed to be valid inside of the video_render, filter_audio, filter_video, and filter_remove callbacks.

If the source is a filter, returns the target source of the filter. Only guaranteed to be valid inside of the video_render, filter_audio, filter_video, and filter_remove callbacks.

Find a core libobs data file @param path name of the base file @return A string containing the full path to the file. Use bfree after use.

Returns the location of a plugin module data file.

Finds all modules within the search paths added by obs_add_module_path.

Gets the main audio output handler for this OBS context

Gets the current audio settings, returns false if no audio

Returns a commonly used base effect

Get the argc/argv used to start OBS

Gets an encoder by its name.

Returns the codec of an encoder by the id

Returns the property list, if any. Free with obs_properties_destroy

Returns the type of an encoder by the id

@return the current locale

Returns the last main output texture. This can return NULL if the texture is unavailable.

Gets the master user volume

Returns the module author(s)

Returns the module binary path

Returns the module data path

Returns the module description

Returns the module file name

Returns the module full name

Gets an output by its name.

Returns output capability flags

Returns the property list, if any. Free with obs_properties_destroy

Gets the primary output source for a channel and increments the reference counter for that source. Use obs_source_release to release.

Returns the primary obs procedure handler

Returns the profiler name store (see util/profiler.h) used by OBS, which is either a name store passed to obs_startup, an internal name store, or NULL in case obs_initialized() returns false.

Gets an service by its name.

Returns the property list, if any. Free with obs_properties_destroy

Returns the primary obs signal handler

Gets a source by its name.

Gets the default settings for a source type

Returns capability flags of a source type

Returns the property list, if any. Free with obs_properties_destroy

@return The current core version

@return The current core version string

Gets the main video output handler for this OBS context

Gets the current video settings, returns false if no video

Gets the group from its source, or NULL if not a group

Initializes the module, which calls its obs_module_load export. If the module is already loaded, then this function does nothing and returns successful.

@return true if the main OBS context has been initialized

Returns whether the source has custom properties or not

Helper function for leaving the OBS graphics context

Automatically loads all modules from module paths (convenience function)

Loads a source from settings data

Loads sources from a data array

Logs loaded modules

Returns the path of a plugin module config file (whether it exists or not)

Helper function for using default module locale

Opens a plugin module directly from a specific path.

Returns whether the output is active

Adds/releases a reference to an output. When the last reference is released, the output is destroyed.

Returns the audio media context associated with this output

Begins data capture from media/encoders.

Returns whether data capture can begin with the specified flags

Specifies whether the output can be paused

Creates an output.

Gets the default settings for an output type

Ends data capture from media/encoders

Forces the output to stop. Usually only used with delay.

If delay is active, gets the currently active delay value, in seconds.

Returns the current audio encoder associated with this output

Gets the currently set delay value, in seconds.

Returns output capability flags

For video outputs, returns the height of the encoded image

Gets the current audio mixer for non-encoded outputs

Gets the current audio mixes (mask) for a non-encoded multi-track output

Returns the procedure handler for an output

Gets the current service associated with this output.

Returns the signal handler for an output

Returns the current video encoder associated with this output

For video outputs, returns the width of the encoded image

Initializes encoders (if any)

Pauses the output (if the functionality is allowed by the output

Returns whether output is paused

Returns the property list of an existing output, if any. Free with obs_properties_destroy

Optionally sets the audio conversion info. Used only for raw output

Sets the current audio encoder associated with this output, required for encoded outputs.

Sets the current output delay, in seconds (if the output supports delay).

Pass a string of the last output error, for UI use

Sets the current audio/video media contexts associated with this output, required for non-encoded outputs. Can be null.

Sets the current audio mixer for non-encoded outputs

Sets the current audio mixes (mask) for a non-encoded multi-track output

Sets the preferred scaled resolution for this output. Set width and height to 0 to disable scaling.

Sets the reconnect settings. Set retry_count to 0 to disable reconnecting.

Sets the current service associated with this output.

Optionally sets the video conversion info. Used only for raw output

Sets the current video encoder associated with this output, required for encoded outputs

Signals that the output has stopped itself.

Starts the output.

Stops the output.

Updates the settings for this output context

Returns the video media context associated with this output

Notifies modules that all modules have been loaded. This function should be called after all modules have been loaded.

Adds a font selection property.

Adds a ‘path’ property. Can be a directory or a file.

Applies settings to the properties by calling all the necessary modification callbacks

Remove a property from a properties list.

Registers a modal UI definition to the current obs context. This should be used in obs_module_load.

Registers a modeless UI definition to the current obs context. This should be used in obs_module_load.

Remove a path from libobs core data paths. @param path The path to compare to currently set paths. It does not need to be the same pointer, but the path string must match an entry fully. @return Whether or not the path was successfully removed. If false, the path could not be found.

Renders the last main output texture

Renders the last main output texture ignoring background color

Renders the main view

Sets base audio output format/channels/samples/etc

Sets base video output base resolution/fps/format.

Saves a source to settings data

Saves sources to a data array

Adds/creates a new scene item for a source

Creates a scene.

Duplicates a scene.

Enumerates sources within a scene

Determines whether a source is within a scene

Gets the scene from its source, or NULL if not a scene

Gets the scene’s source context

Gets private front-end settings data. This data is saved/loaded automatically. Returns an incremented reference.

Gets the scene parent associated with the scene item.

Gets the source of a scene item.

Removes a scene item.

Adds/releases a reference to a service. When the last reference is released, the service is destroyed.

Applies service-specific video encoder settings.

Gets the default settings for a service

Returns the stream key (if any) for this service context

Returns the password (if any) for this service context

Returns the current settings for this service

Gets the service type

Returns the URL for this service context

Returns the username (if any) for this service context

Returns the property list of an existing service context, if any. Free with obs_properties_destroy

Updates the settings of the service context

Sets things up for calls to obs_get_cmdline_args. Called only once at startup and safely copies argv/argc from main(). Subsequent calls do nothing.

Sets a new locale to use for modules. This will call obs_module_set_locale for each module with the new locale.

Sets the master user volume

Sets the primary output source for a channel.

Releases all data associated with OBS and terminates the OBS context

Returns true if active, false if not

Adds an active child source. Must be called by parent sources on child sources when the child is added and active. This ensures that the source is properly activated if the parent is active.

Adds/releases a reference to a source. When the last reference is released, the source is destroyed.

Creates a source of the specified type with the specified settings.

Decrements the ‘active’ reference counter to indicate that the source is no longer fully active. If the reference counter is set to 0, will call the ‘deactivate’ callback

Decrements the ‘showing’ reference counter to indicate that the source is no longer being shown somewhere. If the reference counter is set to 0, will call the ‘hide’ callback

Used to directly render a non-async source without any filter processing

Helper function to draw sprites for a source (synchronous video).

Helper function to set the color matrix information when drawing the source.

Enumerates active child sources used by this source

Enumerates the entire active child source tree used by this source

Enumerates filters assigned to the source

Adds a filter to the source (which is used whenever the source is used)

Removes a filter from the source

Modifies the order of a specific filter

Gets audio mixer flags

Gets the balance value for a stereo audio source

Gets the base height for a source (not taking in to account filtering)

Gets the base width for a source (not taking in to account filtering)

Returns the translated display name of a source

Gets a filter of a source by its display name.

Gets source flags.

Gets the current async video frame

Gets the height of a source (if it has video)

Gets the source identifier

Gets the name of a source

Returns capability flags of a source

Gets private front-end settings data. This data is saved/loaded automatically. Returns an incremented reference.

Returns the procedure handler for a source

Gets the settings string for a source

Returns the signal handler for a source

Gets the audio sync offset (in nanoseconds) for a source

Gets the source type

Gets the user volume for a source that has audio output

Gets the width of a source (if it has video)

Increments the ‘active’ reference counter to indicate that the source is fully active. If the reference counter was 0, will call the ‘activate’ callback.

Increments the ‘showing’ reference counter to indicate that the source is being shown somewhere. If the reference counter was 0, will call the ‘show’ callback.

Send a load signal to sources

Outputs audio data (always asynchronous)

Outputs asynchronous video data. Set to NULL to deactivate the texture

Preloads asynchronous video data to allow instantaneous playback

Default RGB filter handler for generic effect filters. Processes the filter chain and renders them to texture if needed, then the filter is drawn with

Draws the filter with a specific technique.

Returns the properties list for a specific existing source. Free with obs_properties_destroy

Releases the current async video frame

Notifies all references that the source should be released

Removes an active child source. Must be called by parent sources on child sources when the child is removed or inactive. This ensures that the source is properly deactivated if the parent is no longer active.

Returns true if the source should be released

Send a save signal to sources

Sends a got-focus or lost-focus event to a source

Sends a key up/down event to a source

Sends a mouse down/up event to a source

Sends a mouse move event to a source.

Sends a mouse wheel event to a source

Used to decouple audio from video so that audio doesn’t attempt to sync up with video. I.E. Audio acts independently. Only works when in unbuffered mode.

Sets audio mixer flags. These flags are used to specify which mixers the source’s audio should be applied to.

Sets the balance value for a stereo audio source

Sets the default source flags.

Sets source flags. Note that these are different from the main output flags. These are generally things that can be set by the source or user, while the output flags are more used to determine capabilities of a source.

Sets the name of a source

Sets the audio sync offset (in nanoseconds) for a source

Sets the user volume for a source that has audio output

Shows any preloaded video data

Returns true if currently displayed somewhere (active or not), false if not

Skips the filter if the filter is invalid and cannot be rendered

Updates settings for this source

Signal an update to any currently used properties via ‘update_properties’

Renders a video source.

Initializes OBS

Enables fixed transitions (videos or specific types of transitions that are of fixed duration and linearly interpolated

Directly renders its sub-source instead of to texture. Returns false if no longer transitioning

Returns true if video is active, false otherwise

Creates a video encoder context

Creates a view context.

Destroys this view context

Gets the source currently in use for this view context

Renders the sources of this view context

Sets the source to be used for this view context.

@brief Attach the volume meter to a source @param volmeter pointer to the volume meter object @param source pointer to the source object @return true on success

@brief Create a volume meter @param type the mapping type to use for the volume meter @return pointer to the volume meter object

@brief Destroy a volume meter @param volmeter pointer to the volmeter object

@brief Detach the volume meter from the currently attached source @param volmeter pointer to the volume meter object

@brief Get the number of channels which are configured for this source. @param volmeter pointer to the volume meter object

@brief Get the update interval currently used for the volume meter @param volmeter pointer to the volume meter object @return update interval in ms

@brief Set the peak meter type for the volume meter @param volmeter pointer to the volume meter object @param peak_meter_type set if true-peak needs to be measured.

@brief Set the update interval for the volume meter @param volmeter pointer to the volume meter object @param ms update interval in ms

Calls a function in a procedure handler. Returns false if the named procedure is not found.

Type Definitions

Used with obs_source_process_filter to specify whether the filter should render the source directly with the specified effect, or whether it should render it to a texture

Used with scene items to indicate the type of bounds to use for scene items. Mostly determines how the image will be scaled within those bounds, or whether to use bounds at all.

Specifies the encoder type

@brief Fader types

Used for changing the order of items (for example, filters in a source, or items in a scene)

@brief Peak meter types

Callback for when a button property is clicked. If the properties need to be refreshed due to changes to the property layout, return true, otherwise return false.

Optional callback for when a property is modified. If the properties need to be refreshed due to changes to the property layout, return true, otherwise return false.

The speaker layout describes where the speakers are located in the room. For OBS it dictates:

Unions