class NatML.Recorders.Inputs.TextureInput : ITextureInput
The TextureInput class provides a simple primitive for recording video frames from Texture objects. It works by performing synchronous pixel buffer readbacks from the GPU.
Prefer using AsyncTextureInput when possible because synchronous readbacks have a sizable performance cost.

Creating the Recorder Input

/// <summary>
/// Create a texture input which performs synchronous readbacks.
/// </summary>
/// <param name="recorder">Media recorder to receive video frames.</param>
TextureInput (IMediaRecorder recorder);
The texture input is always created with a recorder which receives any frames committed by the input.

Committing Video Frames

/// <summary>
/// Commit a video frame from a texture.
/// </summary>
/// <param name="texture">Source texture.</param>
/// <param name="timestamp">Frame timestamp in nanoseconds.</param>
void CommitFrame (Texture texture, long timestamp);
Refer to the Committing Video Frames section of the ITextureInput interface for more information.

Disposing the Recorder Input

/// <summary>
/// Stop recorder input and release resources.
/// </summary>
void Dispose ();
Refer to the Disposing the Recorder Input section of the ITextureInput interface for more information.