VideoFrame

最近更新时间:2022-09-20 05:17:40

Public 属性
VIDEO_PIXEL_FORMATtype
intwidth
intheight
intyStride
intuStride
intvStride
uint8_t *yBuffer
uint8_t *uBuffer
uint8_t *vBuffer
introtation
int64_trenderTimeMs
intavsync_type

详细描述

外部视频帧的信息 视频帧的格式为 YUV420。缓冲区给出的是指向指针的指针,但接口使用者不能修改缓冲区的指针,只能修改缓冲区的内容。

类成员变量说明

type

VIDEO_PIXEL_FORMAT ar::media::base::VideoFrame::type

频帧像素格式,详见 VIDEO_PIXEL_FORMAT

width

int ar::media::base::VideoFrame::width

视频帧宽度 (pixel)

height

int ar::media::base::VideoFrame::height

视频帧高度 (pixel)

yStride

int ar::media::base::VideoFrame::yStride

YUV 数据中的 Y 缓冲区的行跨度

uStride

int ar::media::base::VideoFrame::uStride

YUV 数据中的 U 缓冲区的行跨度

vStride

int ar::media::base::VideoFrame::vStride

YUV 数据中的 V 缓冲区的行跨度

rotation

int ar::media::base::VideoFrame::rotation

在渲染视频前设置该帧的顺时针旋转角度

目前支持 0 度、90 度、180 度,和 270 度

renderTimeMs

int64_t ar::media::base::VideoFrame::renderTimeMs

外部音频帧的时间戳。

  • 该参数为必填
  • 你可以使用该时间戳还原音频帧顺序;在有视频的场景中(包含使用外部视频源的场景),该参数可以帮助实现音视频同步。

avsync_type

int ar::media::base::VideoFrame::avsync_type

保留字段