pub struct Config<'a> { /* private fields */ }
Expand description
API functions related to OBS configuration.
Implementations§
source§impl<'a> Config<'a>
impl<'a> Config<'a>
sourcepub async fn get_persistent_data(
&self,
realm: Realm,
slot_name: &str
) -> Result<Value>
pub async fn get_persistent_data( &self, realm: Realm, slot_name: &str ) -> Result<Value>
Gets the value of a “slot” from the selected persistent data realm.
sourcepub async fn set_persistent_data(
&self,
data: SetPersistentData<'_>
) -> Result<()>
pub async fn set_persistent_data( &self, data: SetPersistentData<'_> ) -> Result<()>
Sets the value of a “slot” from the selected persistent data realm.
sourcepub async fn video_settings(&self) -> Result<VideoSettings>
pub async fn video_settings(&self) -> Result<VideoSettings>
Gets the current video settings.
Note: To get the true FPS value, divide the FPS numerator by the FPS denominator.
Example: 60000/1001
.
sourcepub async fn set_video_settings(&self, settings: SetVideoSettings) -> Result<()>
pub async fn set_video_settings(&self, settings: SetVideoSettings) -> Result<()>
Sets the current video settings.
Note: Fields must be specified in pairs. For example, you cannot set only
SetVideoSettings::base_width
without needing to specify
SetVideoSettings::base_height
.
sourcepub async fn stream_service_settings<T>(
&self
) -> Result<StreamServiceSettings<T>>where
T: DeserializeOwned,
pub async fn stream_service_settings<T>(
&self
) -> Result<StreamServiceSettings<T>>where
T: DeserializeOwned,
Gets the current stream service settings (stream destination).
sourcepub async fn set_stream_service_settings<T>(
&self,
type: &'a str,
settings: &T
) -> Result<()>where
T: Serialize,
pub async fn set_stream_service_settings<T>(
&self,
type: &'a str,
settings: &T
) -> Result<()>where
T: Serialize,
Sets the current stream service settings (stream destination).
Note: Simple RTMP settings can be set with type rtmp_custom
and the settings fields
server
and key
.
sourcepub async fn record_directory(&self) -> Result<String>
pub async fn record_directory(&self) -> Result<String>
Gets the current directory that the record output is set to.
sourcepub async fn set_record_directory(&self, directory: &'a str) -> Result<()>
pub async fn set_record_directory(&self, directory: &'a str) -> Result<()>
Sets the current directory that the record output writes files to.