Table of Contents

Method GetSettingsAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

GetSettingsAsync(CancellationToken)

Asks OBS Studio for the settings of the filter.

public Task<JsonElement> GetSettingsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token that ends the wait. A request that was not sent yet is not sent.

Returns

Task<JsonElement>

The settings: a JSON object with the values that were set, as OBS Studio says them ({"gamma":0.5} for a color correction filter). It is a snapshot of the moment of the answer.

Remarks

The settings of a filter are not kept in the model, as those of an input are: OBS Studio does not announce a change of them (the protocol has an event for it, SourceFilterSettingsChanged, and OBS Studio 33.0.0 did not send it for any filter in a test: libobs tells of the updates of public sources only, and a filter is a private source), so what the model kept would go out of date without a sign. This asks OBS Studio, in its turn, after the changes that were asked for before it, so it shows a change that you made with SetSettingsAsync(object, bool, CancellationToken).

OBS Studio says the settings that were set, and leaves out the ones that still have the default of the filter kind: ask GetDefaultFilterSettingsAsync(string, CancellationToken) for the defaults of a kind. A filter that has no settings set has an empty object.

Exceptions

ObsRemovedException

The filter was removed, or its source was destroyed.

ObsNotConnectedException

There is no connection to OBS Studio.

ObsNotReadyException

OBS Studio is changing its scene collection, or did so after the call.

TimeoutException

OBS Studio did not answer in time (WriteTimeout).

ObsResponseException

OBS Studio refused the request.