3.8 Video frame information


new TRTCVideoFrame(videoFormat, bufferType, data, textureId, length, width, height, timestamp, rotation)

TRTCVideoFrame is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.

Name Type Description
videoFormat TRTCVideoPixelFormat

video pixel format

bufferType TRTCVideoBufferType

video data structure type

data ArrayBuffer

video data when bufferType is TRTCVideoBufferType_Buffer.

textureId Number

video texture ID, i.e., video data when bufferType is TRTCVideoBufferType_Texture, which carries the texture data used for OpenGL rendering.

length Number

video data length in bytes. For I420, length = width * height * 3 / 2; for BGRA32, length = width * height * 4.

width Number

video width. Please enter the width of the video data passed in.

height Number

video height. Please enter the height of the video data passed in.

timestamp Number

video frame timestamp in milliseconds

rotation Number

clockwise rotation angle of video pixels