Comment on page
GLESTextureInput
class NatML.Recorders.Inputs.GLESTextureInput : TextureInput
The
GLESTextureInput
class provides a simple primitive for recording video frames from Texture
objects on Android OpenGL ES3. It works by performing asynchronous pixel buffer readbacks from the GPU using Android's native graphics infrastructure. As such, it has much better recording performance:
CPU frame time while recording with standard camera input.

CPU frame time while recording with camera input backed by GLESTextureInput.
This texture input is can only be used on Android when rendering with OpenGL ES3.
/// <summary>
/// Create a GLES texture input.
/// </summary>
/// <param name="recorder">Media recorder to receive video frames.</param>
GLESTextureInput (IMediaRecorder recorder);
The texture input is always created with a
recorder
which receives any frames committed by the input./// <summary>
/// Texture input frame size.
/// </summary>
(int width, int height) frameSize { get; }
/// <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);
/// <summary>
/// Stop recorder input and release resources.
/// </summary>
void Dispose ();
Last modified 1yr ago