TRTCVideoFrame

TRTCVideoFrame

视频帧数据

Constructor

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

Parameters:
Name Type Description
videoFormat TRTCVideoPixelFormat required

视频帧的格式

bufferType TRTCVideoBufferType required

视频数据结构类型

data ArrayBuffer required

视频数据,字段 bufferType 是 LiteAVVideoBufferType_Buffer 时生效

textureId Number required

视频纹理ID,字段bufferType是LiteAVVideoBufferType_Texture时生效

length Number required

视频数据的长度,单位是字节,对于i420而言, length = width * height * 3 / 2,对于BGRA32而言, length = width * height * 4

width Number required

画面的宽度

height Number required

画面的高度

timestamp Number required

时间戳,单位ms

rotation Number required

画面旋转角度