Expand description
OBS Context Management
This module provides the core functionality for interacting with libobs.
The primary type is ObsContext
, which serves as the main entry point for
all OBS operations.
§Overview
The ObsContext
represents an initialized OBS environment and provides methods to:
- Initialize the OBS runtime
- Create and manage scenes
- Create and manage outputs (recording, streaming)
- Access and configure video/audio settings
- Download and bootstrap OBS binaries at runtime
§Thread Safety
OBS operations must be performed on a single thread. The ObsContext
handles
this requirement by creating a dedicated thread for OBS operations and providing
a thread-safe interface to interact with it.
§Examples
Creating a basic OBS context:
use libobs_wrapper::context::ObsContext;
let context = ObsContext::builder().start().await?;
For more examples refer to the examples directory in the repository.
Structs§
- ObsContext
- Interface to the OBS context. Only one context can exist across all threads and any attempt to create a new context while there is an existing one will error.