Method AddVideoFrame
AddVideoFrame(RenderTexture, MediaTime)
Encodes a Texture and adds it to the video stream.
Declaration
void AddVideoFrame(RenderTexture frame, MediaTime time)
Parameters
Type | Name | Description |
---|---|---|
RenderTexture | frame | The texture to encode. |
MediaTime | time | The timestamp of the current frame. |
AddVideoFrame(NativeArray<byte>, MediaTime)
Encodes an array of bytes and adds it to the video stream.
Declaration
void AddVideoFrame(NativeArray<byte> bytes, MediaTime time)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<byte> | bytes | The array of bytes to encode. |
MediaTime | time | The timestamp of the current frame. |
Remarks
The encoder interprets the format of the array based on the texture format in IEncoderSettings passed to the OpenStream method.