Table of Contents

Method GetStatsAsync

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

GetStatsAsync(CancellationToken)

Asks OBS Studio for its statistics: the load on the computer, the frame rate, the frames that were skipped, and the traffic of this connection.

public Task<StatsResponse> GetStatsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

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

Returns

Task<StatsResponse>

The statistics at the moment that OBS Studio answered.

Remarks

The statistics move all the time, so the model does not keep them: ask when you need them. The request is made in its turn, after the changes that were asked for before it (see SetEnabledAsync(bool, CancellationToken)).

Exceptions

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).