Table of Contents

Class IpMultiCameraDevice

Namespace
Huddly.Sdk.Devices
Assembly
Huddly.Sdk.dll
public class IpMultiCameraDevice : IIpDevice, IDevice, IImageSettings, IPtz, IFramingModeControl, IFramingZoneControl, IFeatureControl, IMultiCameraDevice, IDisposable
Inheritance
IpMultiCameraDevice
Implements
Inherited Members

Constructors

IpMultiCameraDevice(ICameraGrpcClient, IPAddress, PhysicalAddress, string, string, ILoggerFactory?)

public IpMultiCameraDevice(ICameraGrpcClient client, IPAddress ipAddress, PhysicalAddress macAddress, string id, string serial, ILoggerFactory? loggerFactory = null)

Parameters

client ICameraGrpcClient
ipAddress IPAddress
macAddress PhysicalAddress
id string
serial string
loggerFactory ILoggerFactory

Properties

Client

public ICameraGrpcClient Client { get; init; }

Property Value

ICameraGrpcClient

ConnectionState

Device ConnectionState

Once a device disconnects, it will not reconnect to the same instance.

public ConnectionState ConnectionState { get; }

Property Value

ConnectionState

ConnectionType

Device ConnectionType

public ConnectionType ConnectionType { get; }

Property Value

ConnectionType

FirmwareChecker

Get an IFirmwareChecker used for getting info on the latest available firmware release, and parsing information from firmware files that are relevant for the device.

public IFirmwareChecker FirmwareChecker { get; init; }

Property Value

IFirmwareChecker

Id

Unique device identifier.

public string Id { get; init; }

Property Value

string

IpAddress

public IPAddress IpAddress { get; init; }

Property Value

IPAddress

LastActivity

UTC timestamp that records the last device activity.

public DateTime LastActivity { get; }

Property Value

DateTime

MacAddress

public PhysicalAddress MacAddress { get; init; }

Property Value

PhysicalAddress

Manufacturer

Device Manufacturer

public Manufacturer Manufacturer { get; }

Property Value

Manufacturer

Model

Device Model

public DeviceModel Model { get; }

Property Value

DeviceModel

Serial

Device Serial

public string Serial { get; init; }

Property Value

string

Methods

AddFeatureOption(FeatureOption, CancellationToken)

Add a FeatureOption to the device

public Task<Result> AddFeatureOption(FeatureOption feature, CancellationToken ct = default)

Parameters

feature FeatureOption

FeatureOption to add

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EraseLog(CancellationToken)

Erase device logs

public Task<Result> EraseLog(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

GetBrightness(CancellationToken)

Get the device brightness setting value

public Task<Result<double>> GetBrightness(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<double>>

A result with the current brightness normalized to the range [-1.0, 1.0]

GetConnectedCameras(CancellationToken)

public Task<Result<IList<CameraStatus>>> GetConnectedCameras(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<IList<CameraStatus>>>

GetDetector(DetectorOptions?, CancellationToken)

Get an IDetector used for subscribing to detections

public Task<Result<IDetector>> GetDetector(DetectorOptions? options = null, CancellationToken ct = default)

Parameters

options DetectorOptions
ct CancellationToken

Returns

Task<Result<IDetector>>

GetDeviceFeatureStatus(CancellationToken)

Get the current state of the supported features of the device based on its runtime state

public Task<Result<DeviceFeatureStatus>> GetDeviceFeatureStatus(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<DeviceFeatureStatus>>

The current state of supported features in the device's present state

Remarks

Returns the features that are currently available given the device's current state and mode. Some features may be disabled or unavailable depending on the active framing mode, configuration, or other runtime conditions. This is dynamic and can change as the device state changes. Use this method to determine which features can be used in the current context.

GetFaceBasedExposure(CancellationToken)

Get the device FaceBasedExposure setting value

public Task<Result<Toggle>> GetFaceBasedExposure(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<Toggle>>

A Toggle Result

GetFeatureOptions(CancellationToken)

Get device FeatureOptions

public Task<Result<IList<FeatureOption>>> GetFeatureOptions(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<IList<FeatureOption>>>

A result with the current device feature options

GetFirmwareParser()

Obsolete: Use FirmwareChecker instead

[Obsolete("Use FirmwareChecker instead. Method will be removed in SDK version 3.")]
public IFirmwareParser GetFirmwareParser()

Returns

IFirmwareParser

GetFirmwareUpgrader(string, CancellationToken)

Get a IFirmwareUpgrader used for upgrading the device

public Task<IFirmwareUpgrader> GetFirmwareUpgrader(string firmwarePath, CancellationToken ct = default)

Parameters

firmwarePath string

File path to a valid device firmware.

ct CancellationToken

Returns

Task<IFirmwareUpgrader>

Remarks

GetFirmwareVersion(CancellationToken)

Get the firmware version of the device

public Task<Result<FirmwareVersion>> GetFirmwareVersion(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<FirmwareVersion>>

A result containing the current version of the device

GetFramingMode(CancellationToken)

Get the current framing mode of the camera

public Task<Result<FramingMode>> GetFramingMode(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<FramingMode>>

A FramingValue Result.

GetFramingSubscriber(FramingSubscriberOptions, CancellationToken)

Get an IFramingSubscriber used for subscribing to device framing (PTZ) changes

public Task<Result<IFramingSubscriber>> GetFramingSubscriber(FramingSubscriberOptions options, CancellationToken ct = default)

Parameters

options FramingSubscriberOptions
ct CancellationToken

Returns

Task<Result<IFramingSubscriber>>

A cancellation token

GetFramingZone(CancellationToken)

Get a FramingZone with width and depth values for the framing zone

public Task<Result<FramingZone>> GetFramingZone(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<FramingZone>>

GetFramingZonePeopleDetectionResults(CancellationToken)

[Obsolete("Use GetFramingZonePersonDetections instead. Method will be removed in SDK version 3.")]
public Task<Result<IList<FramingZonePersonDetectionResult>>> GetFramingZonePeopleDetectionResults(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<IList<FramingZonePersonDetectionResult>>>

GetFramingZonePersonDetections(CancellationToken)

Get stream of FramingZonePersonDetections that are detected within the framing zone

public IAsyncEnumerable<IList<FramingZonePersonDetection>> GetFramingZonePersonDetections(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

IAsyncEnumerable<IList<FramingZonePersonDetection>>

A stream of framing zone detections

Exceptions

NotSupportedException

When API call is unsupported

ExclusiveLockException

When device is locked for firmware update

OperationCanceledException

When operation is canceled

RpcException

When a device or USB proxy RPC call fails

Exception

On device internal or unexpected SDK errors

GetFramingZoneToggle(CancellationToken)

Get the current Framing Zone on/off toggle value

public Task<Result<Toggle>> GetFramingZoneToggle(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<Toggle>>

Result containing a toggle indicating if the feature is on or off

GetFwVersion(CancellationToken)

Obsolete: Use GetFirmwareVersion instead

[Obsolete("Use GetFirmwareVersion instead. Method will be removed in SDK version 3.")]
public Task<Result<SemVersion>> GetFwVersion(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<SemVersion>>

GetLatestFirmwareReleaseInfo(FirmwareChannel, CancellationToken)

Obsolete: Use FirmwareChecker instead

[Obsolete("Use FirmwareChecker.GetLatestFirmwareReleaseInfo() instead. Method will be removed in SDK version 3.")]
public Task<Result<FirmwareInfo>> GetLatestFirmwareReleaseInfo(FirmwareChannel channel = FirmwareChannel.Stable, CancellationToken ct = default)

Parameters

channel FirmwareChannel
ct CancellationToken

Returns

Task<Result<FirmwareInfo>>

GetLog(Stream, CancellationToken)

Get device logs.

public Task<Result> GetLog(Stream outputStream, CancellationToken ct = default)

Parameters

outputStream Stream

A stream to write the logs to

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

GetName(CancellationToken)

Get device name

public Task<Result<string>> GetName(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<string>>

A result containing the device name

GetPan(CancellationToken)

Get the pan value of the device

The value is normalized in the range [-1.0, 1.0].

public Task<Result<double>> GetPan(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<double>>

A result with the current Pan value of the device.

GetPerspectiveCorrection(CancellationToken)

Get the device perspective correction mode

public Task<Result<PerspectiveCorrection>> GetPerspectiveCorrection(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<PerspectiveCorrection>>

A result with the current perspective correction mode

GetPtz(CancellationToken)

Obsolete: Use the individual set methods for pan, tilt and zoom instead

[Obsolete("Use the individual get methods for pan, tilt and zoom instead. Method will be removed in SDK version 3.")]
public Task<Result<Ptz>> GetPtz(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<Ptz>>

GetSaturation(CancellationToken)

Get the device saturation setting value

public Task<Result<double>> GetSaturation(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<double>>

A result with the current value normalized to the range [-1.0, 1.0]

GetStreamStatus(CancellationToken)

Get current stream status (stream name, active?, size)

public Task<Result<StreamStatusContainer>> GetStreamStatus(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result<StreamStatusContainer>>

A Stream status result

GetSupportedFeatures(CancellationToken)

Get supported features of the device based on its firmware version

public Task<Result<SupportedFeatures>> GetSupportedFeatures(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<SupportedFeatures>>

The features supported by the device firmware

Remarks

Returns the features that the device firmware supports. This is determined by the firmware version and represents the full capability set of the device. It is recommended to call this method on device connection to understand the device's capabilities.

GetTilt(CancellationToken)

Get the tilt value of the device

The value is normalized in the range [-1.0, 1.0].

public Task<Result<double>> GetTilt(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<double>>

A result with the current Tilt value of the device.

GetTime(CancellationToken)

Get the device internal time

public Task<Result<DateTime>> GetTime(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<DateTime>>

A result with the device internal time

GetUptime(CancellationToken)

Get the device uptime

public Task<Result<TimeSpan>> GetUptime(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<TimeSpan>>

A result indicating how long the device has been up

GetXu(Guid, uint, CancellationToken)

public Task<Result<byte[]>> GetXu(Guid id, uint control, CancellationToken ct = default)

Parameters

id Guid
control uint
ct CancellationToken

Returns

Task<Result<byte[]>>

GetZoom(CancellationToken)

Get the zoom values of the device

The value is normalized in the range [0.0, 1.0].

public Task<Result<double>> GetZoom(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<double>>

A result with the current Zoom value of the device.

IsFramingZoneEnabled(CancellationToken)

[Obsolete("Use GetFramingZoneState instead. Method will be removed in SDK version 3.")]
public Task<Result<bool>> IsFramingZoneEnabled(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result<bool>>

IsGreaterThanCurrentVersion(FirmwareInfo, CancellationToken)

Obsolete: Use GetFirmwareVersion in combination with FirmwareChecker instead

[Obsolete("Use GetFirmwareVersion().CompareTo() instead. Method will be removed in SDK version 3.")]
public Task<Result<bool>> IsGreaterThanCurrentVersion(FirmwareInfo firmwareInfo, CancellationToken ct = default)

Parameters

firmwareInfo FirmwareInfo
ct CancellationToken

Returns

Task<Result<bool>>

PersistCurrentImageSettings(CancellationToken)

Persist the current brightness and saturation values in the active camera storage slot

public Task<Result> PersistCurrentImageSettings(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

PersistCurrentPtz(CancellationToken)

Persist the current PTZ values in the active camera storage slot

public Task<Result> PersistCurrentPtz(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

Reboot(CancellationToken)

Reboot the device.

public Task<Result> Reboot(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

Remarks

After calling this method successfully, the device instance will disconnect. To communicate with the device after it has booted, use the new IDevice instance emitted in the DeviceConnected event

ReportAudioOutputLevel(int, double[], CancellationToken)

Report the current host audio output level to the device

public Task<Result> ReportAudioOutputLevel(int sampleRate, double[] samples, CancellationToken ct = default)

Parameters

sampleRate int

Approximate sample rate, in samples per second

samples double[]

Output level samples, in the normalized range [0.0, 1.0]

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

RestorePersistentImageSettings(CancellationToken)

Restore the brightness and saturation values from the active camera storage slot

public Task<Result> RestorePersistentImageSettings(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

RestorePersistentPtz(CancellationToken)

Restore PTZ values from active camera storage slot

public Task<Result> RestorePersistentPtz(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetBrightness(double, CancellationToken)

Set the device brightness setting value. To persist the set value, call PersistCurrentImageSettings(CancellationToken).

public Task<Result> SetBrightness(double value, CancellationToken ct = default)

Parameters

value double

The new value, in the range [-1.0, 1.0]

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetFaceBasedExposure(Toggle, CancellationToken)

Set and persist the device FaceBasedExposure setting value

public Task<Result> SetFaceBasedExposure(Toggle value, CancellationToken ct = default)

Parameters

value Toggle

The new value. For accepted values, query GetSupportedFeatures(CancellationToken)

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetFramingMode(FramingMode, CancellationToken)

Set device framing mode

public Task<Result> SetFramingMode(FramingMode value, CancellationToken ct = default)

Parameters

value FramingMode

The new value. For accepted values, query GetSupportedFeatures(CancellationToken)

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

SetFramingZone(FramingZone, CancellationToken)

Set the device FramingZone width and depth values

public Task<Result> SetFramingZone(FramingZone value, CancellationToken ct = default)

Parameters

value FramingZone

The new value

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetFramingZoneToggle(Toggle, CancellationToken)

Set the current Framing Zone on/off toggle value

public Task<Result> SetFramingZoneToggle(Toggle toggle, CancellationToken ct = default)

Parameters

toggle Toggle

A toggle value to turn the feature on or off

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result

SetPan(double, CancellationToken)

Set the device pan value

public Task<Result> SetPan(double value, CancellationToken ct = default)

Parameters

value double

The new Pan value, in the range [-1.0, 1.0]

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetPerspectiveCorrection(PerspectiveCorrection, CancellationToken)

Set device perspective correction mode

[Obsolete("Not supported. PerspectiveCorrection is always on for Crew/L1/S1 firmware >= 1.8.11.")]
public Task<Result> SetPerspectiveCorrection(PerspectiveCorrection value, CancellationToken ct = default)

Parameters

value PerspectiveCorrection

The new value

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetPtz(double?, double?, double?, CancellationToken)

Obsolete: Use the individual set methods for pan, tilt and zoom instead

[Obsolete("Use the individual set methods for pan, tilt and zoom instead. Method will be removed in SDK version 3.")]
public Task<Result> SetPtz(double? panValue = null, double? tiltValue = null, double? zoomValue = null, CancellationToken ct = default)

Parameters

panValue double?
tiltValue double?
zoomValue double?
ct CancellationToken

Returns

Task<Result>

SetSaturation(double, CancellationToken)

Set the device saturation setting value. To persist the set value, call PersistCurrentImageSettings(CancellationToken).

public Task<Result> SetSaturation(double value, CancellationToken ct = default)

Parameters

value double

The new value, in the range [-1.0, 1.0]

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetTilt(double, CancellationToken)

Set the device tilt value

public Task<Result> SetTilt(double value, CancellationToken ct = default)

Parameters

value double

The new Tilt value, in the range [-1.0, 1.0]

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SetTime(DateTime, CancellationToken)

Set the device internal time

public Task<Result> SetTime(DateTime value, CancellationToken ct = default)

Parameters

value DateTime

The new value

ct CancellationToken

Returns

Task<Result>

A result indicating success or failure

SetXu(Guid, uint, byte[], CancellationToken)

public Task<Result> SetXu(Guid id, uint control, byte[] payload, CancellationToken ct = default)

Parameters

id Guid
control uint
payload byte[]
ct CancellationToken

Returns

Task<Result>

SetZoom(double, CancellationToken)

Set the device zoom value

public Task<Result> SetZoom(double value, CancellationToken ct = default)

Parameters

value double

The new Zoom value, in the range [0.0, 1.0]

ct CancellationToken

A cancellation token

Returns

Task<Result>

A result indicating success or failure

SubscribeToStreamStatusChange(CancellationToken)

Subscribe to get continuous stream status when a stream opens/closes

Example use:

try
{
    await foreach (var streamStatus in device.SubscribeToStreamStatusChange(ct))
    {
        Console.WriteLine($"Received stream status: {streamStatus}");
    }
}
catch (Exception ex)
{
    Console.WriteLine($"Error receiving stream statuses: {ex.Message}");
}

public IAsyncEnumerable<StreamStatusContainer> SubscribeToStreamStatusChange(CancellationToken ct = default)

Parameters

ct CancellationToken

A cancellation token

Returns

IAsyncEnumerable<StreamStatusContainer>

A stream of call status events

Exceptions

NotSupportedException

When API call is unsupported

ExclusiveLockException

When device is locked for firmware update

OperationCanceledException

When operation is canceled

RpcException

When a device or USB proxy RPC call fails

Exception

On device internal or unexpected SDK errors

ToggleFramingZone(Toggle, CancellationToken)

[Obsolete("Use SetFramingZoneState instead. Method will be removed in SDK version 3.")]
public Task<Result> ToggleFramingZone(Toggle toggle, CancellationToken ct = default)

Parameters

toggle Toggle
ct CancellationToken

Returns

Task<Result>