NatCorder
Search…
ITextureInput
interface NatSuite.Recorders.ITextureInput
This interface provides a flexible primitive for committing video frames from Texture objects. It enables CameraInput to commit video frames from game cameras, and can also be used to provide highly-optimized recording for specific platforms and graphics API's.

Committing Video Frames

1
/// <summary>
2
/// Commit a video frame from a texture.
3
/// </summary>
4
/// <param name="texture">Source texture.</param>
5
/// <param name="timestamp">Frame timestamp in nanoseconds.</param>
6
void CommitFrame (Texture texture, long timestamp);
Copied!
This method commits a video frame from the texture to the recorder. The texture input will perform a pixel buffer readback from the GPU, then send the pixel buffer to the recorder. Different implementations of this interface might provide very different performance and memory characteristics.
The input texture does not have to be the same size as the recorder, but any differences might result in stretching in the recorded media.

Disposing the Recorder Input

1
/// <summary>
2
/// Stop recorder input and release resources.
3
/// </summary>
4
void Dispose ();
Copied!
Once you are done recording, make sure to dispose the recorder input. Any resources will be disposed.
Do not use the input after the Dispose method has been called.
Last modified 6mo ago