VideoFrame class
视频帧的属性设置。
缓冲区给出的是指向指针的指针,该接口不能修改缓冲区的指针,只能修改缓冲区的内容。
- Annotations
-
- @JsonSerializable.new(explicitToJson: true, includeIfNull: false)
Properties
- alphaBuffer → Uint8List?
-
采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为
0,255,其中 0 代表背景;255 代表前景(人像)。 你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。 请务必确保 alphaBuffer 跟视频帧的尺寸 (width × height) 完全一致,否则可能会导致 App 崩溃。final - alphaStitchMode → AlphaStitchMode?
-
当视频帧中包含 Alpha 通道数据时,设置 alphaBuffer 和视频帧的相对位置。详见 AlphaStitchMode 。
final
- avsyncType → int?
-
保留参数。
final
- colorSpace → ColorSpace?
-
视频帧的色彩空间属性,默认情况下会应用 Full Range 和 BT.709 标准配置。你可以根据自定义采集、自定义渲染的业务需求进行自定义设置,详见 VideoColorSpace。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int?
-
视频像素高度。
final
-
matrix
→ List<
double> ? -
该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
final
- metadataBuffer → Uint8List?
-
该参数仅适用于 Texture 格式的视频数据。指 MetaData 的数据缓冲区,默认值为 NULL 。
final
- metadataSize → int?
-
该参数仅适用于 Texture 格式的视频数据。指 MetaData 的大小,默认值为 0 。
final
- metaInfo → VideoFrameMetaInfo?
-
视频帧中的元信息。该参数需要联系技术支持使用。
final
- renderTimeMs → int?
-
视频帧被渲染时的 Unix 时间戳(毫秒)。该时间戳可用于指导渲染视频帧。该参数为必填。
final
- rotation → int?
-
在渲染视频前设置该帧的顺时针旋转角度,目前支持 0 度、90 度、180 度,和 270 度。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textureId → int?
-
该参数仅适用于 Texture 格式的视频数据。Texture ID。
final
- type → VideoPixelFormat?
-
像素格式。详见 VideoPixelFormat 。
final
- uBuffer → Uint8List?
-
对 YUV 数据,表示 U 缓冲区的指针;对 RGBA 数据,值为空。
final
- uStride → int?
-
对 YUV 数据,表示 U 缓冲区的行跨度;对 RGBA 数据,值为 0。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
final
- vBuffer → Uint8List?
-
对 YUV 数据,表示 V 缓冲区的指针;对 RGBA 数据,值为空。
final
- vStride → int?
-
对 YUV 数据,表示 V 缓冲区的行跨度;对 RGBA 数据,值为 0。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
final
- width → int?
-
视频像素宽度。
final
- yBuffer → Uint8List?
-
对 YUV 数据,表示 Y 缓冲区的指针;对 RGBA 数据,表示数据缓冲区。
final
- yStride → int?
-
对 YUV 数据,表示 Y 缓冲区的行跨度;对 RGBA 数据,表示总的数据长度。 在处理视频数据时,需根据该参数处理每行像素数据之间的偏移量,否则可能导致图像失真。
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited