Tanoda
NatSuite.Recorders.GIFRecorder Class Reference

Animated GIF image recorder. More...

Inheritance diagram for NatSuite.Recorders.GIFRecorder:
NatSuite.Recorders.IMediaRecorder

Public Member Functions

 GIFRecorder (int width, int height, float frameDuration)
 Create a GIF recorder. More...
 
void CommitFrame< T > (T[] pixelBuffer, long timestamp=default)
 Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout. More...
 
void CommitFrame (IntPtr nativeBuffer, long timestamp=default)
 Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout. More...
 
void CommitSamples (float[] sampleBuffer=default, long timestamp=default)
 This recorder does not support committing sample buffers. More...
 
Task< string > FinishWriting ()
 Finish writing and return the path to the recorded media file. More...
 
void CommitFrame< T > (T[] pixelBuffer, long timestamp)
 Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout. More...
 
void CommitFrame (IntPtr nativeBuffer, long timestamp)
 Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout. More...
 
void CommitSamples (float[] sampleBuffer, long timestamp)
 Commit an audio sample buffer for encoding. More...
 
Task< string > FinishWriting ()
 Finish writing and return the path to the recorded media file. More...
 

Public Attributes

int width
 Image size. More...
 
- Public Attributes inherited from NatSuite.Recorders.IMediaRecorder
int width
 Recording frame size. More...
 

Properties

int int height frameSize [get]
 
- Properties inherited from NatSuite.Recorders.IMediaRecorder
int int height frameSize [get]
 

Detailed Description

Animated GIF image recorder.

Definition at line 15 of file GIFRecorder.cs.

Constructor & Destructor Documentation

◆ GIFRecorder()

NatSuite.Recorders.GIFRecorder.GIFRecorder ( int  width,
int  height,
float  frameDuration 
)

Create a GIF recorder.

Parameters
widthImage width.
heightImage height.
frameDurationFrame duration in seconds.

Definition at line 30 of file GIFRecorder.cs.

Member Function Documentation

◆ CommitFrame()

void NatSuite.Recorders.GIFRecorder.CommitFrame ( IntPtr  nativeBuffer,
long  timestamp = default 
)

Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout.

Parameters
nativeBufferPixel buffer in native memory to commit.
timestampNot used.

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 54 of file GIFRecorder.cs.

◆ CommitFrame< T >()

void NatSuite.Recorders.GIFRecorder.CommitFrame< T > ( T[]  pixelBuffer,
long  timestamp = default 
)

Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout.

Parameters
pixelBufferPixel buffer containing video frame to commit.
timestampNot used.

Implements NatSuite.Recorders.IMediaRecorder.

Type Constraints
T :struct 

Definition at line 43 of file GIFRecorder.cs.

◆ CommitSamples()

void NatSuite.Recorders.GIFRecorder.CommitSamples ( float[]  sampleBuffer = default,
long  timestamp = default 
)

This recorder does not support committing sample buffers.

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 62 of file GIFRecorder.cs.

◆ FinishWriting()

Task< string > NatSuite.Recorders.GIFRecorder.FinishWriting ( )

Finish writing and return the path to the recorded media file.

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 69 of file GIFRecorder.cs.

Member Data Documentation

◆ width

int NatSuite.Recorders.GIFRecorder.width

Image size.

Definition at line 22 of file GIFRecorder.cs.

Property Documentation

◆ frameSize

int int height NatSuite.Recorders.GIFRecorder.frameSize
get

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 22 of file GIFRecorder.cs.


The documentation for this class was generated from the following file: