VideoFrame class

Configurations of the video frame.

Note that the buffer provides a pointer to a pointer. This interface cannot modify the pointer of the buffer, but it can modify the content of the buffer.

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

Properties

alphaBuffer Uint8List?
The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from 0,255, where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering. Make sure that alphaBuffer is exactly the same size as the video frame (width × height), otherwise it may cause the app to crash.
final
alphaStitchMode AlphaStitchMode?
When the video frame contains alpha channel data, it represents the relative position of alphaBuffer and the video frame. See AlphaStitchMode.
final
avsyncType int?
Reserved for future use.
final
colorSpace → ColorSpace?
By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
The height of the video, in pixels.
final
matrix List<double>?
This parameter only applies to video data in Texture format. Incoming 4 × 4 transformational matrix. The typical value is a unit matrix.
final
metadataBuffer Uint8List?
This parameter only applies to video data in Texture format. The MetaData buffer. The default value is NULL.
final
metadataSize int?
This parameter only applies to video data in Texture format. The MetaData size. The default value is 0.
final
metaInfo → VideoFrameMetaInfo?
The meta information in the video frame. To use this parameter, contact.
final
renderTimeMs int?
The Unix timestamp (ms) when the video frame is rendered. This timestamp can be used to guide the rendering of the video frame. This parameter is required.
final
rotation int?
The clockwise rotation of the video frame before rendering. Supported values include 0, 90, 180, and 270 degrees.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textureId int?
This parameter only applies to video data in Texture format. Texture ID.
final
type VideoPixelFormat?
The pixel format. See VideoPixelFormat.
final
uBuffer Uint8List?
For YUV data, the pointer to the U buffer; for RGBA data, the value is 0.
final
uStride int?
For YUV data, the line span of the U buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
final
vBuffer Uint8List?
For YUV data, the pointer to the V buffer; for RGBA data, the value is 0.
final
vStride int?
For YUV data, the line span of the V buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
final
width int?
The width of the video, in pixels.
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 span of the Y buffer; for RGBA data, the total data length. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
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