ExternalVideoFrame class
外部视频帧。
- Annotations
-
- @JsonSerializable.new(explicitToJson: true, includeIfNull: false)
Properties
- alphaBuffer → Uint8List?
-
采用人像分割算法输出的 Alpha 通道数据。该数据跟视频帧的尺寸一致,每个像素点的取值范围为
0,255,其中 0 代表背景;255 代表前景(人像)。 你可以通过设置该参数,实现将视频背景自渲染为各种效果,例如:透明、纯色、图片、视频等。 在自定义视频渲染场景下,需确保传入的视频帧和 alphaBuffer 均为 Full Range 类型;其他类型可能导致 Alpha 数据渲染不正常。final - alphaStitchMode → AlphaStitchMode?
-
当视频帧中包含 Alpha 通道数据时,设置 alphaBuffer 和视频帧的相对位置。详见 AlphaStitchMode 。
final
- buffer → Uint8List?
-
视频缓冲区。
final
- colorSpace → ColorSpace?
-
视频帧的色彩空间属性,默认情况下会应用 Full Range 和 BT.709 标准配置。你可以根据自定义采集、自定义渲染的业务需求进行自定义设置,详见 VideoColorSpace。
final
- cropBottom → int?
-
该参数仅适用于原始视频数据。
final
- cropLeft → int?
-
该参数仅适用于原始视频数据。
final
- cropRight → int?
-
该参数仅适用于原始视频数据。
final
- cropTop → int?
-
该参数仅适用于原始视频数据。
final
- d3d11Texture2d → int?
-
该参数仅适用于 Windows Texture 格式的视频数据。表示一个指向 ID3D11Texture2D 类型对象的指针,该类型对象被视频帧所使用。
final
- eglType → EglContextType?
-
该参数仅适用于 Texture 格式的视频数据。指该视频帧的 Texture ID。
final
- fillAlphaBuffer → bool?
-
对于 BGRA 或 RGBA 格式的视频数据,你可以任选一种方式设置 Alpha 通道数据:
通过将该参数设置为 true 自动填写。
通过 alphaBuffer 参数设置。 该参数仅适用于 BGRA 或 RGBA 格式的视频数据。设置是否提取视频帧中的 Alpha 通道数据并自动填入到 alphaBuffer 中: true :提取并填充 Alpha 通道数据。 false :(默认)不提取填充 Alpha 通道数据。
final
- format → VideoPixelFormat?
-
像素格式。详见 VideoPixelFormat 。
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
- rotation → int?
-
原始数据相关字段。指定是否对传入的视频组做顺时针旋转操作,可选值为 0, 90, 180, 270。默认为 0。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stride → int?
-
传入视频帧的行间距,单位为像素而不是字节。对于 Texture,该值指的是 Texture 的宽度。
final
- textureId → int?
-
该参数仅适用于 Texture 格式的视频数据。为一个输入的 4x4 变换矩阵,典型值为一个单位矩阵。
final
- textureSliceIndex → int?
-
该参数仅适用于 Windows Texture 格式的视频数据。表示在 ID3D11Texture2D 数组中,被视频帧使用的某一个 ID3D11Texture2D 纹理对象的索引。
final
- timestamp → int?
-
传入的视频帧的时间戳,以毫秒为单位。不正确的时间戳会导致丢帧或者音视频不同步。
final
- type → VideoBufferType?
-
视频类型。详见 VideoBufferType 。
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