Crate libobs_wrapper

Crate libobs_wrapper 

Source
Expand description

This crate contains a high level API wrapper around the OBs C API. To get started, have a look at the examples folder.

For documentation, have a look at the docs.

Also have a look at the libobs-simple crate, which has a lot of source builders for easier source creation. You can also create outputs easily with it.

Re-exports§

pub use libobs as sys;

Modules§

context
OBS Context Management
crash_handler
Contains a default crash handler that is attached by default to the ObsContext. By default this will handle crashes just by printing them out to console, if the dialog-crash-handler feature is disabled. If you want to implement your own crash handler, make sure that you do the least amount of work possible and access as few global variables as you can, as it is quite unstable if libobs has crashed.
data
This module contains every struct related to storing data in OBS. There are two important structs:
display
This module is used to create a OBS display which you can use to preview the output of your recording.
encoders
This module contains video- and audio-encoders. In simple terms, you need a video and audio encoder, so a proper mp4 file can get written to disk (with video and audio). If you are unsure which encoder to use, you might as well take a look at the libobs-simple crate for a output that has all needed encoders attached already.
enums
Contains all important enums for this crate
graphics
Holds a Vec2 vector, mainly used for positioning the ObsDisplay or ObsSceneItems.
logger
This module is used to provide a logger trait, which can be used to implement custom logging for the libobs console output.
runtime
Runtime management for safe OBS API access across threads
scenes
This module is important, as it holds the scene items and scenes themselves. Scenes are essential, as they hold the sources which are then being rendered in the output. You’ll need to add sources to the scenes if you want to have an output that is not black. You can also use the libobs-simple crate to simplify the creation of ObsSourceRefs.
signals
Signals can be emitted by sources attached to a scene. You may implement your own signal manager by using the impl_signal_manager macro, but you’ll need to make sure that you know which signals are emitted and what structure they have.
sources
This module holds everything related to sources. A source renders specific content to the scene, which is then processed by the ObsOutputRef and for example written to a file using encoders.
unsafe_send
Sendable wrapper types for non-Send types
utils

Macros§

impl_obs_drop
impl_signal_manager
Generates a signal manager for OBS objects that can emit signals.
run_with_obs
run_with_obs_impl