VideoFrame class

Video frame property settings.

The buffer is a pointer to a pointer. This interface cannot modify the buffer pointer, only the content of the buffer.

Annotations
  • @JsonSerializable.new(explicitToJson: true, includeIfNull: false)

Properties

alphaBuffer → Uint8List?
Alpha channel data output by portrait segmentation algorithm. This data has the same dimensions as the video frame. Each pixel value ranges from 0,255, where 0 represents background and 255 represents foreground (portrait). By setting this parameter, you can render the video background with various effects such as transparency, solid color, image, or video. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are Full Range type; other types may result in incorrect rendering of Alpha data. Make sure that the dimensions of alphaBuffer exactly match the video frame (width × height), otherwise the app may crash.
final
alphaStitchMode → AlphaStitchMode?
When the video frame contains Alpha channel data, sets the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
final
avsyncType → int?
Reserved parameter.
final
colorSpace → ColorSpace?
Color space properties of the video frame. By default, Full Range and BT.709 configuration is applied. You can customize it according to the needs of custom capture and rendering. See VideoColorSpace.
final
hashCode → int
The hash code for this object.
no setterinherited
height → int?
Pixel height of the video.
final
matrix → List<double>?
This parameter applies only to video data in Texture format. A 4x4 transformation matrix input, typically an identity matrix.
final
metadataBuffer → Uint8List?
This parameter applies only to video data in Texture format. It refers to the data buffer of MetaData. Default is NULL.
final
metadataSize → int?
This parameter applies only to video data in Texture format. It refers to the size of MetaData. Default is 0.
final
metaInfo → VideoFrameMetaInfo?
Metadata in the video frame. This parameter requires contacting technical support to use.
final
renderTimeMs → int?
Unix timestamp (in milliseconds) when the video frame is rendered. This timestamp can be used to guide video frame rendering. This parameter is required.
final
rotation → int?
Clockwise rotation angle of this frame before rendering. Supported values are 0, 90, 180, and 270 degrees.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textureId → int?
This parameter applies only to video data in Texture format. Texture ID.
final
type → VideoPixelFormat?
Pixel format. See VideoPixelFormat.
final
uBuffer → Uint8List?
For YUV data, the pointer to the U buffer; for RGBA data, the value is null.
final
uStride → int?
For YUV data, the line stride of the U buffer; for RGBA data, the value is 0. When processing video data, you must handle the offset between each row of pixel data based on this parameter; otherwise, image distortion may occur.
final
vBuffer → Uint8List?
For YUV data, the pointer to the V buffer; for RGBA data, the value is null.
final
vStride → int?
For YUV data, the line stride of the V buffer; for RGBA data, the value is 0. When processing video data, you must handle the offset between each row of pixel data based on this parameter; otherwise, image distortion may occur.
final
width → int?
Pixel width of the video.
final
yBuffer → Uint8List?
For YUV data, the pointer to the Y buffer; for RGBA data, the data buffer.
final
yStride → int?
For YUV data, the line stride of the Y buffer; for RGBA data, the total data length. When processing video data, you must handle the offset between each row of pixel data based on this parameter; otherwise, image distortion may occur.
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