downloadFromHardware

The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.

The source frame is untouched and both frames are closed independently. A frame that is not hardware (FrameInfo.isHardware false) is refused rather than copied, because reaching the download on one means the caller's bookkeeping is wrong.

Return

a new owned software frame with the same timestamps and stream identity

Throws

on a non-hardware source or when the transfer fails

The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.

The source frame is untouched and both frames are closed independently. A frame that is not hardware (FrameInfo.isHardware false) is refused rather than copied, because reaching the download on one means the caller's bookkeeping is wrong.

Return

a new owned software frame with the same timestamps and stream identity

Throws

on a non-hardware source or when the transfer fails

The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.

The source frame is untouched and both frames are closed independently. A frame that is not hardware (FrameInfo.isHardware false) is refused rather than copied, because reaching the download on one means the caller's bookkeeping is wrong.

Return

a new owned software frame with the same timestamps and stream identity

Throws

on a non-hardware source or when the transfer fails

The software download of a hardware frame: copies the pixels out of GPU memory into a new ordinary frame and carries the presentation properties (pts, colour, rotation side data) with them. It is the fallback made explicit: a renderer that cannot take the hardware surface calls this once per frame and pays the copy knowingly, and can report that it did.

The source frame is untouched and both frames are closed independently. A frame that is not hardware (FrameInfo.isHardware false) is refused rather than copied, because reaching the download on one means the caller's bookkeeping is wrong.

Return

a new owned software frame with the same timestamps and stream identity

Throws

on a non-hardware source or when the transfer fails

Refused, because no hardware frame exists on this backend: the wasm decoder is software by construction, so every frame here is already the software one this would produce.

It used to answer with a copy, which contradicts the shared contract that a non-hardware source is refused rather than copied. A caller reaching this has bookkeeping that is wrong somewhere else, and telling them so is the point.