ExternalVideoFrame
- Flutter
更新时间不可用
外部视频帧。
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ExternalVideoFrame {
const ExternalVideoFrame(
{this.type,
this.format,
this.buffer,
this.stride,
this.height,
this.cropLeft,
this.cropTop,
this.cropRight,
this.cropBottom,
this.rotation,
this.timestamp,
this.eglType,
this.textureId,
this.matrix,
this.metadataBuffer,
this.metadataSize,
this.alphaBuffer,
this.fillAlphaBuffer,
this.alphaStitchMode,
this.d3d11Texture2d,
this.textureSliceIndex,
this.colorSpace});
@JsonKey(name: 'type')
final VideoBufferType? type;
@JsonKey(name: 'format')
final VideoPixelFormat? format;
@JsonKey(name: 'buffer', ignore: true)
final Uint8List? buffer;
@JsonKey(name: 'stride')
final int? stride;
@JsonKey(name: 'height')
final int? height;
@JsonKey(name: 'cropLeft')
final int? cropLeft;
@JsonKey(name: 'cropTop')
final int? cropTop;
@JsonKey(name: 'cropRight')
final int? cropRight;
@JsonKey(name: 'cropBottom')
final int? cropBottom;
@JsonKey(name: 'rotation')
final int? rotation;
@JsonKey(name: 'timestamp')
final int? timestamp;
@JsonKey(name: 'eglType')
final EglContextType? eglType;
@JsonKey(name: 'textureId')
final int? textureId;
@JsonKey(name: 'matrix')
final List<double>? matrix;
@JsonKey(name: 'metadataBuffer', ignore: true)
final Uint8List? metadataBuffer;
@JsonKey(name: 'metadataSize')
final int? metadataSize;
@JsonKey(name: 'alphaBuffer', ignore: true)
final Uint8List? alphaBuffer;
@JsonKey(name: 'fillAlphaBuffer')
final bool? fillAlphaBuffer;
@JsonKey(name: 'alphaStitchMode')
final AlphaStitchMode? alphaStitchMode;
@JsonKey(name: 'd3d11Texture2d', readValue: readIntPtr)
final int? d3d11Texture2d;
@JsonKey(name: 'textureSliceIndex')
final int? textureSliceIndex;
@JsonKey(name: 'colorSpace')
final ColorSpace? colorSpace;
factory ExternalVideoFrame.fromJson(Map<String, dynamic> json) =>
_$ExternalVideoFrameFromJson(json);
Map<String, dynamic> toJson() => _$ExternalVideoFrameToJson(this);
}属性
| 参数名 | 描述 |
|---|---|
type | 视频类型。详见 VideoBufferType。 |
format | 像素格式。详见 VideoPixelFormat。 |
buffer | |
stride | |
height | |
eglContext | |
eglType | |
textureId | |
matrix | |
metadataBuffer | |
metadataSize | |
d3d11Texture2d | |
alphaBuffer | |
fillAlphaBuffer | |
alphaStitchMode | 当视频帧中包含 Alpha 通道数据时,设置 |
textureSliceIndex | |
cropLeft | |
cropTop | |
cropRight | |
cropBottom | |
rotation | |
timestamp | |
colorSpace | 视频帧的色彩空间属性,默认情况下会应用 Full Range 和 BT.709 标准配置。你可以根据自定义采集、自定义渲染的业务需求进行自定义设置,详见 VideoColorSpace。 |