Tanoda
NatSuite.Recorders.HEVCRecorder Class Reference

HEVC video recorder. More...

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

Public Member Functions

 HEVCRecorder (int width, int height, float frameRate, int sampleRate=0, int channelCount=0, int bitrate=(int)(960 *540 *11.4f), int keyframeInterval=3)
 Create a HEVC recorder. 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...
 
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
 Video 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

HEVC video recorder.

Definition at line 15 of file HEVCRecorder.cs.

Constructor & Destructor Documentation

◆ HEVCRecorder()

NatSuite.Recorders.HEVCRecorder.HEVCRecorder ( int  width,
int  height,
float  frameRate,
int  sampleRate = 0,
int  channelCount = 0,
int  bitrate = (int) (960 * 540 * 11.4f),
int  keyframeInterval = 3 
)

Create a HEVC recorder.

Parameters
widthVideo width.
heightVideo height.
frameRateVideo framerate.
sampleRateAudio sample rate. Pass 0 for no audio.
channelCountAudio channel count. Pass 0 for no audio.
bitrateVideo bitrate in bits per second.
keyframeIntervalKeyframe interval in seconds.

Definition at line 34 of file HEVCRecorder.cs.

Member Function Documentation

◆ CommitFrame()

void NatSuite.Recorders.HEVCRecorder.CommitFrame ( IntPtr  nativeBuffer,
long  timestamp 
)

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

Parameters
nativeBufferPixel buffer in native memory to commit.
timestampFrame timestamp in nanoseconds.

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 59 of file HEVCRecorder.cs.

◆ CommitFrame< T >()

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

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

Parameters
pixelBufferPixel buffer containing video frame to commit.
timestampFrame timestamp in nanoseconds.

Implements NatSuite.Recorders.IMediaRecorder.

Type Constraints
T :struct 

Definition at line 48 of file HEVCRecorder.cs.

◆ CommitSamples()

void NatSuite.Recorders.HEVCRecorder.CommitSamples ( float[]  sampleBuffer,
long  timestamp 
)

Commit an audio sample buffer for encoding.

Parameters
sampleBufferLinear PCM audio sample buffer, interleaved by channel.
timestampSample buffer timestamp in nanoseconds.

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 69 of file HEVCRecorder.cs.

◆ FinishWriting()

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

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

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 77 of file HEVCRecorder.cs.

Member Data Documentation

◆ width

int NatSuite.Recorders.HEVCRecorder.width

Video size.

Definition at line 22 of file HEVCRecorder.cs.

Property Documentation

◆ frameSize

int int height NatSuite.Recorders.HEVCRecorder.frameSize
get

Implements NatSuite.Recorders.IMediaRecorder.

Definition at line 22 of file HEVCRecorder.cs.


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