Enum Class FfmpegMedia.Hardware

java.lang.Object
java.lang.Enum<FfmpegMedia.Hardware>
limn.video.ffmpeg.FfmpegMedia.Hardware
All Implemented Interfaces:
Serializable, Comparable<FfmpegMedia.Hardware>, Constable
Enclosing class:
FfmpegMedia

public static enum FfmpegMedia.Hardware extends Enum<FfmpegMedia.Hardware>
Whether to decode on a platform accelerator, and therefore what shape this container's pictures have.

The choice is the application's because the consequence is: with an accelerator the pictures are VideoFrame.Kind.IO_SURFACE handles, which the GL backend binds without a copy and which every other consumer has to read back through VideoFrame.toPlanar(). That is a real cost for a consumer that only wanted samples, and a real saving for one that is going to draw them.

  • Enum Constant Details

    • PREFER

      public static final FfmpegMedia.Hardware PREFER
      Use one where the platform, the codec and the layout all have it, and decode in software otherwise. The default, and not a promise: FfmpegMedia.isHardwareDecoding() is what actually happened.
    • OFF

      public static final FfmpegMedia.Hardware OFF
      Decode in software. Every picture is then planar samples, which is what a consumer that reads planes and does not want to pay for a read-back should ask for, and what makes a test reproducible across machines whose accelerators differ.
  • Method Details

    • values

      public static FfmpegMedia.Hardware[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FfmpegMedia.Hardware valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null