Table of Contents

Class ObsFilter

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

A filter of a scene or an input of OBS Studio: something that is applied to what the source shows or plays (a color correction, a noise gate).

public sealed class ObsFilter : INotifyPropertyChanged
Inheritance
ObsFilter
Implements
Inherited Members

Remarks

OBS Studio gives a filter no UUID: a filter is found by its Name within its Source, and the name can change. An object stays the same object for as long as the filter exists, also when the filter is renamed or moved to another position.

The properties can be read from any thread, and INotifyPropertyChanged tells when a value changed (see ObsSource). A reference to a filter that was removed stays valid: IsRemoved is true. The filters of a source that OBS Studio removed and keeps alive (Detached) stay in the model and can still be changed; those of a source that was destroyed (Gone) are removed with it.

The settings of a filter are not in the model: OBS Studio does not announce a change of them, so a value that the model kept would go out of date without a sign. Ask for them with GetSettingsAsync(CancellationToken) when you need them, and change them with SetSettingsAsync(object, bool, CancellationToken).

Properties

Index

Gets the position of the filter in its source: 0 is the first, which is applied first. The positions of the filters of a source are 0, 1, 2, and so on.

IsEnabled

Gets whether the filter is enabled. The value is current: OBS Studio announces every change of it.

IsRemoved

Gets whether the filter was removed from its source (or the source was destroyed).

Kind

Gets the kind of the filter, as OBS Studio calls it: for example color_filter_v2 or noise_gate_filter.

Name

Gets the name of the filter: the current name, which changes when the filter is renamed. It is unique within its source.

Source

Gets the scene or the input that the filter is on.

Methods

GetSettingsAsync(CancellationToken)

Asks OBS Studio for the settings of the filter.

RemoveAsync(CancellationToken)

Removes the filter from its source, and returns when the model shows it.

RenameAsync(string, CancellationToken)

Gives the filter another name, and returns when the model shows it.

SetEnabledAsync(bool, CancellationToken)

Enables or disables the filter, and returns when the model shows it.

SetIndexAsync(int, CancellationToken)

Moves the filter to a position among the filters of its source, and returns when the model shows it.

SetSettingsAsync(object, bool, CancellationToken)

Changes the settings of the filter, and returns when OBS Studio has made the change.

ToString()

Returns a string that represents the current object.

ToggleEnabledAsync(CancellationToken)

Enables the filter when it is disabled, and disables it when it is enabled, and returns when the model shows it.

Events

PropertyChanged

Occurs when a property value changes.