NatDevice
Search…
⌃K

CameraOutput

abstract class NatML.Devices.Outputs.CameraOutput : IDisposable
The CameraOutput is an abstract base class for defining media device outputs that consume CameraImage instances.

Updating with New Images

/// <summary>
/// Update the output with a new camera image.
/// </summary>
/// <param name="cameraImage">Camera image.</param>
abstract void Update (CameraImage cameraImage);
The audio output is updated with the Update method. The output will then consume the data within the CameraImage, performing any necessary computations and transformations.

Disposing the Output

/// <summary>
/// Dispose the camera output and release resources.
/// </summary>
virtual void Dispose ();
The Dispose method performs a cleanup and releases any resources held by the output.
Always remember to dispose outputs to prevent resource leaks.

Implicit Delegate Conversion

/// <summary>
/// Implicitly convert the output to a camera image delegate.
/// </summary>
static implicit operator Action<CameraImage> (CameraOutput output);
The CameraOutput class defines an implicit conversion to an Action<CameraImage>, allowing the output to be passed directly to CameraDevice.StartRunning.