DecodedFrame class abstract

A decoded frame. Backends may return CPU bytes or GPU handles depending on DecoderConfig.requestGpuOutput.

Constructors

DecodedFrame()

Properties

colorMatrix → YuvColorMatrix
YCbCr→RGB matrix of the readBytes YUV (see YuvColorMatrix for the default-to-bt601 rationale). Ignored for GPU/browser frames.
no setter
gpuHandle → int
Native GPU handle when outputKind is a GPU surface: the ID3D11Texture2D* (d3d11Texture), CVPixelBufferRef (cvPixelBuffer), dmabuf fd, etc., as an integer pointer. 0 when the frame is CPU-resident. The consumer imports this into its own present/upload path; ownership stays with the frame until close. For a D3D11 texture array, see subresourceIndex.
no setter
hashCode → int
The hash code for this object.
no setterinherited
height → int
no setter
isFullRange → bool
Whether the readBytes YUV uses full (JPEG, yuvj*) range rather than the default studio/limited range. Selects the converter's coefficient set.
no setter
outputKind → FrameSourceKind
The output surface kind (mirror of FrameSource on the encode side). Defaults to FrameSourceKind.cpu; a hardware decoder that keeps the frame GPU-resident reports e.g. FrameSourceKind.d3d11Texture here so the consumer imports gpuHandle straight into its present device with no CPU readback. Software decoders leave this cpu and serve readBytes.
no setter
pixelLayout → DecodedPixelLayout
Planar layout of the bytes from readBytes. Defaults to i420; a software decoder that produced 4:2:2 / 4:4:4 / 10-bit output MUST override this so the presenter picks the right converter. Ignored for GPU/browser frames.
no setter
ptsUs → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subresourceIndex → int
Subresource index into a gpuHandle D3D11 texture array (decoders often hand back a pool slot). 0 for single textures / non-D3D11.
no setter
webVideoFrame → Object?
An already-presentable browser frame handle (a WebCodecs VideoFrame, as an opaque Object so this interface stays platform-neutral), or null when the frame is CPU/GPU-plane data (readBytes). The web backend returns the JS VideoFrame here so consumers can present it directly (browser already decoded it to a displayable surface) instead of reading back planes. Consumers that use this MUST close the frame.
no setter
width → int
no setter

Methods

close() → void
Release the decoded frame. Always call when done.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readBytes() → Future<List<int>>
Backend-specific accessor: returns CPU bytes if available. May trigger GPU→CPU readback if the frame is GPU-resident.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited