pub fn encode_capable(dev: &GpuDevice, codec: VideoCodec) -> boolExpand description
Whether an AV1 encoder can actually be constructed for this device — the
authoritative, build-aware capability check. It runs the same
select_encoder dispatch a per-chunk worker uses, pinned to the device’s
vendor + index, so true means a worker leased to this GPU will encode
rather than hard-fail. Used to drop AV1-incapable cards (e.g. a pre-Ada
NVIDIA that decodes via NVDEC but has no AV1 encode silicon) from the
multi-GPU encode pool, so a mixed-vendor host encodes on the capable cards
instead of aborting when a chunk leases to an incapable one.
The probe constructs + immediately drops a real encoder, so the verdict is
cached per GPU index (queried once per process).
Whether dev can encode codec in hardware — probed by actually building
the encoder the worker would use (vendor-pinned to this GPU) and seeing if
init succeeds. Cached per (gpu_index, codec) since a GPU may encode H.264
but not AV1 (e.g. NVIDIA Ampere consumer: H.264/H.265 yes, AV1 no). A GPU
that fails is dropped from the encode pool for that codec but stays usable
for decode.