Module data

Module data 

Source
Expand description

This module contains every struct related to storing data in OBS. There are two important structs:

  1. ObsData
  • This struct holds a mutable reference to a ObsData, so you can set a string, ints and similar
  • You can convert this ObsData object to a immutable reference
  • Cloning this ObsData struct is very memory intensive, as the ObsData will completely clone every member of this data.
  1. ImmutableObsData
  • This structs holds, as the name might suggest, an immutable reference to ObsData.
  • The data inside this struct can not be changed and is intended for read-only.
  • You can turn this ImmutableObsData into a writable ObsData struct again, but this will internally clone the data and not affect the ImmutableObsData itself.

Modules§

audio
object
output
properties
This module is used to handle properties in OBS. Properties essentially tell you what settings for example a output accepts, by using the ´get_properties´ method on the according struct. This lets you get all properties at runtime, rather than having to rely on preset values, which can be useful if you want to let the user adust specific system dependent settings on for example an encoder.
video

Structs§

ImmutableObsData
Immutable wrapper around obs_data_t to be prevent modification and to be used in creation of other objects.
ObsData
Contains obs_data and its related strings. Note that this struct prevents string pointers from being freed by keeping them owned. Cloning ObsData is blocking and will create a new ObsData instance. Recommended is to use ObsData::full_clone() instead.
ObsDataUpdater
This struct is used to update the ObsData in bulk, rather than having to call the set_string methods all the time. This reduces the load to the runtime, as only one closure has to run on the OBS runtime once, rather than multiple operations requiring multiple closures to be run on the OBs runtime. Important: Make sure to call apply() after setting the values.

Enums§

ObsDataChange

Traits§

ObsDataGetters
ObsDataPointers
ObsDataSetters
ObsObjectBuilder
Trait for building OBS objects. This can range from building audio encoders to building scenes, every ObsObject has the same underlying properties:
ObsObjectUpdater
A trait that is used to represent any struct than can update an OBS object. This can be for example a ´WindowSourceUpdater´, which updates the settings of the WindowSourceRef, when the update method is called.
StringEnum
Should be implemented for any enum that can be represented as a String.