Enum Class Format

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

@Generated("org.javagi.JavaGI") public enum Format extends Enum<Format> implements Enumeration
Standard predefined formats
  • Enum Constant Details

    • UNDEFINED

      public static final Format UNDEFINED
      undefined format
    • DEFAULT

      public static final Format DEFAULT
      the default format of the pad/element. This can be samples for raw audio, frames/fields for raw video (some, but not all, elements support this; use GSTFORMATTIME if you don't have a good reason to query for samples/frames)
    • BYTES

      public static final Format BYTES
      bytes
    • TIME

      public static final Format TIME
      time in nanoseconds
    • BUFFERS

      public static final Format BUFFERS
      buffers (few, if any, elements implement this as of May 2009)
    • PERCENT

      public static final Format PERCENT
      percentage of stream (few, if any, elements implement this as of May 2009)
  • Method Details

    • values

      public static Format[] 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 Format 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 Format of(int value)
      Create a new Format 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 Format of(MemorySegment address)
      Create a new Format 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 Format class.
      Returns:
      the GType
    • getByNick

      public static Format getByNick(String nick)
      Return the format registered with the given nick.
      Parameters:
      nick - The nick of the format
      Returns:
      The format with nick or GST_FORMAT_UNDEFINED if the format was not registered.
    • iterateDefinitions

      public static Iterator iterateDefinitions()
      Iterate all the registered formats. The format definition is read only.
      Returns:
      a GstIterator of GstFormatDefinition.
    • register

      public static Format register(String nick, String description)
      Create a new GstFormat based on the nick or return an already registered format with that nick.
      Parameters:
      nick - The nick of the new format
      description - The description of the new format
      Returns:

      A new GstFormat or an already registered format with the same nick.

      MT safe.

    • getDetails

      public @Nullable FormatDefinition getDetails()
      Get details about the given format.
      Returns:

      The GstFormatDefinition for this Format or null on failure.

      MT safe.

    • getName

      public @Nullable String getName()
      Get a printable name for the given format. Do not modify or free.
      Returns:
      a reference to the static name of the format or null if the format is unknown.
    • toQuark

      public Quark toQuark()
      Get the unique quark for the given format.
      Returns:
      the quark associated with the format or 0 if the format is unknown.