Class ObsSource
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
A scene or an input of OBS Studio: something that has a name and a UUID, and that scene items can show.
public abstract class ObsSource : INotifyPropertyChanged
- Inheritance
-
ObsSource
- Implements
- Derived
- Inherited Members
Remarks
An object keeps its identity for as long as it exists, also across renames and reconnects: the UUID is what identifies it, the name is a label that can change. A reference to an object that was removed stays valid, and says so in State.
The properties can be read from any thread. Each one is the value of the last step that the model made; INotifyPropertyChanged tells when a value changed, and is raised outside the model, in order (see NotificationContext).
Properties
- Filters
Gets the filters of the scene or input, from the first (index 0) to the last.
- Name
Gets the name of the object: the current name, which changes when the object is renamed.
- State
Gets what OBS Studio has done with the object: it is Live, or it was removed and is Detached (still alive for the scene items that use it), or it is Gone.
- Uuid
Gets the UUID of the object. Scenes and inputs share one namespace of UUIDs, and a UUID is never used again.
Methods
- CreateFilterAsync(string, string, object?, CancellationToken)
Adds a filter to the scene or the input (on top of its filters), and returns it when the model shows it.
- GetActivityAsync(CancellationToken)
Asks OBS Studio whether the scene or the input is on the air, and whether it is shown anywhere.
- GetSceneItems()
Gets every scene item that shows this scene or input, in every scene (a scene that OBS Studio keeps alive after its removal included), as they are at the moment that you ask.
- GetScreenshotAsync(string, int?, int?, int?, CancellationToken)
Asks OBS Studio for a screenshot of the scene or the input, as it is rendered at the moment.
- OpenProjectorAsync(int?, string?, CancellationToken)
Opens a projector of the scene or the input on a monitor or in a window of OBS Studio, and returns when OBS Studio has answered.
- SaveScreenshotAsync(string, string, int?, int?, int?, CancellationToken)
Has OBS Studio write a screenshot of the scene or the input to a file, and returns when the file is written.
- ToString()
Returns a string that represents the current object.
- TriggerHotkeyAsync(string, CancellationToken)
Triggers a hotkey that this scene or input has (
libobs.muteof an input, for example), as if the key was pressed and released, and returns when OBS Studio has answered.
Events
- PropertyChanged
Occurs when a property value changes.