Enum Class AudioFormat

java.lang.Object
java.lang.Enum<AudioFormat>
org.freedesktop.gstreamer.audio.AudioFormat
All Implemented Interfaces:
Serializable, Comparable<AudioFormat>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum AudioFormat extends Enum<AudioFormat> implements Enumeration
Enum value describing the most common audio formats.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    encoded audio format
    32-bit floating point samples, big endian
    32-bit floating point samples, little endian
    64-bit floating point samples, big endian
    64-bit floating point samples, little endian
    16 bits in 16 bits, signed, big endian
    16 bits in 16 bits, signed, little endian
    18 bits in 24 bits, signed, big endian
    18 bits in 24 bits, signed, little endian
    20 bits in 24 bits, signed, big endian
    20 bits in 24 bits, signed, little endian
    24 bits in 32 bits, signed, big endian
    24 bits in 32 bits, signed, little endian
    24 bits in 24 bits, signed, big endian
    24 bits in 24 bits, signed, little endian
    32 bits in 32 bits, signed, big endian
    32 bits in 32 bits, signed, little endian
    8 bits in 8 bits, signed
    16 bits in 16 bits, unsigned, big endian
    16 bits in 16 bits, unsigned, little endian
    18 bits in 24 bits, unsigned, big endian
    18 bits in 24 bits, unsigned, little endian
    20 bits in 24 bits, unsigned, big endian
    20 bits in 24 bits, unsigned, little endian
    24 bits in 32 bits, unsigned, big endian
    24 bits in 32 bits, unsigned, little endian
    24 bits in 24 bits, unsigned, big endian
    24 bits in 24 bits, unsigned, little endian
    32 bits in 32 bits, unsigned, big endian
    32 bits in 32 bits, unsigned, little endian
    8 bits in 8 bits, unsigned
    unknown or unset audio format
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AudioFormat
    32-bit floating point samples, native endianness
    static final AudioFormat
    64-bit floating point samples, native endianness
    static final AudioFormat
    16 bits in 16 bits, signed, native endianness
    static final AudioFormat
    18 bits in 24 bits, signed, native endianness
    static final AudioFormat
    20 bits in 24 bits, signed, native endianness
    static final AudioFormat
    24 bits in 24 bits, signed, native endianness
    static final AudioFormat
    24 bits in 32 bits, signed, native endianness
    static final AudioFormat
    32 bits in 32 bits, signed, native endianness
    static final AudioFormat
    16 bits in 16 bits, unsigned, native endianness
    static final AudioFormat
    18 bits in 24 bits, unsigned, native endianness
    static final AudioFormat
    20 bits in 24 bits, unsigned, native endianness
    static final AudioFormat
    24 bits in 24 bits, unsigned, native endianness
    static final AudioFormat
    24 bits in 32 bits, unsigned, native endianness
    static final AudioFormat
    32 bits in 32 bits, unsigned, native endianness
  • Method Summary

    Modifier and Type
    Method
    Description
    buildInteger(boolean sign, int endianness, int width, int depth)
    Construct a GstAudioFormat with given parameters.
    static void
    fillSilence(AudioFormatInfo info, @Nullable byte @Nullable [] dest)
    Deprecated.
    Use gst_audio_format_info_fill_silence() instead.
    Convert the format string to its GstAudioFormat.
    Get the GstAudioFormatInfo for this AudioFormat
    static @Nullable Type
    Get the GType of the AudioFormat class.
    int
    Get the numeric value of this enum
    of(int value)
    Create a new AudioFormat for the provided value
    of(MemorySegment address)
    Create a new AudioFormat for the value in the provided memory address.
    Returns a string containing a descriptive name for the GstAudioFormat.
    Returns the enum constant of this class with the specified name.
    static AudioFormat[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNKNOWN

      public static final AudioFormat UNKNOWN
      unknown or unset audio format
    • ENCODED

      public static final AudioFormat ENCODED
      encoded audio format
    • S8

      public static final AudioFormat S8
      8 bits in 8 bits, signed
    • U8

      public static final AudioFormat U8
      8 bits in 8 bits, unsigned
    • S16LE

      public static final AudioFormat S16LE
      16 bits in 16 bits, signed, little endian
    • S16BE

      public static final AudioFormat S16BE
      16 bits in 16 bits, signed, big endian
    • U16LE

      public static final AudioFormat U16LE
      16 bits in 16 bits, unsigned, little endian
    • U16BE

      public static final AudioFormat U16BE
      16 bits in 16 bits, unsigned, big endian
    • S24_32LE

      public static final AudioFormat S24_32LE
      24 bits in 32 bits, signed, little endian
    • S24_32BE

      public static final AudioFormat S24_32BE
      24 bits in 32 bits, signed, big endian
    • U24_32LE

      public static final AudioFormat U24_32LE
      24 bits in 32 bits, unsigned, little endian
    • U24_32BE

      public static final AudioFormat U24_32BE
      24 bits in 32 bits, unsigned, big endian
    • S32LE

      public static final AudioFormat S32LE
      32 bits in 32 bits, signed, little endian
    • S32BE

      public static final AudioFormat S32BE
      32 bits in 32 bits, signed, big endian
    • U32LE

      public static final AudioFormat U32LE
      32 bits in 32 bits, unsigned, little endian
    • U32BE

      public static final AudioFormat U32BE
      32 bits in 32 bits, unsigned, big endian
    • S24LE

      public static final AudioFormat S24LE
      24 bits in 24 bits, signed, little endian
    • S24BE

      public static final AudioFormat S24BE
      24 bits in 24 bits, signed, big endian
    • U24LE

      public static final AudioFormat U24LE
      24 bits in 24 bits, unsigned, little endian
    • U24BE

      public static final AudioFormat U24BE
      24 bits in 24 bits, unsigned, big endian
    • S20LE

      public static final AudioFormat S20LE
      20 bits in 24 bits, signed, little endian
    • S20BE

      public static final AudioFormat S20BE
      20 bits in 24 bits, signed, big endian
    • U20LE

      public static final AudioFormat U20LE
      20 bits in 24 bits, unsigned, little endian
    • U20BE

      public static final AudioFormat U20BE
      20 bits in 24 bits, unsigned, big endian
    • S18LE

      public static final AudioFormat S18LE
      18 bits in 24 bits, signed, little endian
    • S18BE

      public static final AudioFormat S18BE
      18 bits in 24 bits, signed, big endian
    • U18LE

      public static final AudioFormat U18LE
      18 bits in 24 bits, unsigned, little endian
    • U18BE

      public static final AudioFormat U18BE
      18 bits in 24 bits, unsigned, big endian
    • F32LE

      public static final AudioFormat F32LE
      32-bit floating point samples, little endian
    • F32BE

      public static final AudioFormat F32BE
      32-bit floating point samples, big endian
    • F64LE

      public static final AudioFormat F64LE
      64-bit floating point samples, little endian
    • F64BE

      public static final AudioFormat F64BE
      64-bit floating point samples, big endian
  • Field Details

    • S16

      public static final AudioFormat S16
      16 bits in 16 bits, signed, native endianness
    • U16

      public static final AudioFormat U16
      16 bits in 16 bits, unsigned, native endianness
    • S24_32

      public static final AudioFormat S24_32
      24 bits in 32 bits, signed, native endianness
    • U24_32

      public static final AudioFormat U24_32
      24 bits in 32 bits, unsigned, native endianness
    • S32

      public static final AudioFormat S32
      32 bits in 32 bits, signed, native endianness
    • U32

      public static final AudioFormat U32
      32 bits in 32 bits, unsigned, native endianness
    • S24

      public static final AudioFormat S24
      24 bits in 24 bits, signed, native endianness
    • U24

      public static final AudioFormat U24
      24 bits in 24 bits, unsigned, native endianness
    • S20

      public static final AudioFormat S20
      20 bits in 24 bits, signed, native endianness
    • U20

      public static final AudioFormat U20
      20 bits in 24 bits, unsigned, native endianness
    • S18

      public static final AudioFormat S18
      18 bits in 24 bits, signed, native endianness
    • U18

      public static final AudioFormat U18
      18 bits in 24 bits, unsigned, native endianness
    • F32

      public static final AudioFormat F32
      32-bit floating point samples, native endianness
    • F64

      public static final AudioFormat F64
      64-bit floating point samples, native endianness
  • Method Details

    • values

      public static AudioFormat[] 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 AudioFormat 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
    • of

      public static AudioFormat of(int value)
      Create a new AudioFormat for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static AudioFormat of(MemorySegment address)
      Create a new AudioFormat for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the AudioFormat class.
      Returns:
      the GType
    • buildInteger

      public static AudioFormat buildInteger(boolean sign, int endianness, int width, int depth)
      Construct a GstAudioFormat with given parameters.
      Parameters:
      sign - signed or unsigned format
      endianness - G_LITTLE_ENDIAN or G_BIG_ENDIAN
      width - amount of bits used per sample
      depth - amount of used bits in width
      Returns:
      a GstAudioFormat or GST_AUDIO_FORMAT_UNKNOWN when no audio format exists with the given parameters.
    • fillSilence

      @Deprecated public static void fillSilence(AudioFormatInfo info, @Nullable byte @Nullable [] dest)
      Deprecated.
      Use gst_audio_format_info_fill_silence() instead.
      Fill length bytes in dest with silence samples for info.
      Parameters:
      info - a GstAudioFormatInfo
      dest - a destination to fill
    • fromString

      public static AudioFormat fromString(String format)
      Convert the format string to its GstAudioFormat.
      Parameters:
      format - a format string
      Returns:
      the GstAudioFormat for format or GST_AUDIO_FORMAT_UNKNOWN when the string is not a known format.
    • getInfo

      public AudioFormatInfo getInfo()
      Get the GstAudioFormatInfo for this AudioFormat
      Returns:
      The GstAudioFormatInfo for format.
    • toString

      public String toString()

      Returns a string containing a descriptive name for the GstAudioFormat.

      Since 1.26 this can also be used with UNKNOWN, previous versions were printing a critical warning and returned null.

      Overrides:
      toString in class Enum<AudioFormat>
      Returns:
      the name corresponding to this AudioFormat