CodecCapability class
One concrete thing a backend can do: a codec, in one direction, via one path, with a known I/O and cost profile. Immutable + cheap to enumerate.
Constructors
-
CodecCapability({required String backendName, required CodecDirection direction, required HwPath hwPath, required bool isHardware, VideoCodec? videoCodec, AudioCodec? audioCodec, Container? container, String? customName, bool zeroCopy = false, Set<
FrameSourceKind> acceptedInputs = const {}, Set<FrameSourceKind> producedOutputs = const {}, int? maxWidth, int? maxHeight, int score = 0, int initCostHint = 0}) -
const
Properties
-
acceptedInputs
→ Set<
FrameSourceKind> -
ENCODE: the FrameSource kinds this path can consume directly.
final
- audioCodec → AudioCodec?
-
final
- backendName → String
-
final
- container → Container?
-
final
- customName → String?
-
Identity of a VideoCodec.custom capability (see the enum docs). The
negotiator only matches a custom capability to a query with the SAME
name.
nullfor the built-in codecs.final - direction → CodecDirection
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hwPath → HwPath
-
The acceleration path this capability runs on.
final
- initCostHint → int
-
Rough one-time open cost in ms (device/session creation). Cheaper wins
ties so a trivial software fallback isn't chosen over an equal HW path
but a heavy HW session isn't chosen over a cheaper equivalent.
final
- isHardware → bool
-
True for any non-software path. Convenience over
hwPath != software.final - maxHeight → int?
-
final
- maxWidth → int?
-
Optional resolution ceiling (encoder/decoder level limits).
final
-
producedOutputs
→ Set<
FrameSourceKind> -
DECODE: the output kinds this path produces (e.g.
{d3d11Texture}for a GPU-resident decoder,{cpu}for a software one). Consumers read this to pick their present path without probing the returned frame.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- score → int
-
Tie-break quality/preference hint; higher = better. Backend-defined.
final
- videoCodec → VideoCodec?
-
Exactly one of these is non-null: a video codec, an audio codec, or —
for CodecDirection.mux/CodecDirection.demux caps — a container.
final
- zeroCopy → bool
-
True when the path keeps frames on the GPU end-to-end (no CPU readback):
a decoder that produces a D3D11 texture the present device can import, or
an encoder that consumes a GPU texture directly.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited