Enum Class Codec

java.lang.Object
java.lang.Enum<Codec>
moe.kyokobot.libdave.Codec
All Implemented Interfaces:
Serializable, Comparable<Codec>, Constable

public enum Codec extends Enum<Codec>
Enumeration of supported audio and video codecs.

These values correspond to the codec identifiers used in the DAVE protocol.

  • Enum Constant Details

    • UNKNOWN

      public static final Codec UNKNOWN
      Unknown or unspecified codec.
    • OPUS

      public static final Codec OPUS
      Opus audio.
    • VP8

      public static final Codec VP8
      VP8 video.
    • VP9

      public static final Codec VP9
      VP9 video.
    • H264

      public static final Codec H264
      H.264 (AVC) video.
    • H265

      public static final Codec H265
      H.265 (HEVC) video.
    • AV1

      public static final Codec AV1
      AV1 video.
  • Method Details

    • values

      public static Codec[] 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 Codec 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
    • getValue

      public int getValue()
      Gets the integer value of the codec.
      Returns:
      The codec value.
    • fromValue

      public static Codec fromValue(int value)
      Retrieves the Codec enum from its integer value.
      Parameters:
      value - The integer value.
      Returns:
      The corresponding Codec.
      Throws:
      IllegalArgumentException - if the value is unknown.