Class OpusPictureTag

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class OpusPictureTag extends Struct<OpusPictureTag> implements NativeResource

 struct OpusPictureTag {
     opus_int32 type;
     char * mime_type;
     char * description;
     opus_uint32 width;
     opus_uint32 height;
     opus_uint32 depth;
     opus_uint32 colors;
     opus_uint32 data_length;
     unsigned char * data;
     int format;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • MIME_TYPE

      public static final int MIME_TYPE
      The struct member offsets.
    • DESCRIPTION

      public static final int DESCRIPTION
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • DEPTH

      public static final int DEPTH
      The struct member offsets.
    • COLORS

      public static final int COLORS
      The struct member offsets.
    • DATA_LENGTH

      public static final int DATA_LENGTH
      The struct member offsets.
    • DATA

      public static final int DATA
      The struct member offsets.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
  • Constructor Details

    • OpusPictureTag

      public OpusPictureTag(ByteBuffer container)
      Creates a OpusPictureTag instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<OpusPictureTag>
    • type

      public int type()
      Returns:
      the value of the type field.
    • mime_type

      public ByteBuffer mime_type(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the mime_type field.
    • description

      public ByteBuffer description()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the description field.
    • descriptionString

      public String descriptionString()
      Returns:
      the null-terminated string pointed to by the description field.
    • width

      public int width()
      Returns:
      the value of the width field.
    • height

      public int height()
      Returns:
      the value of the height field.
    • depth

      public int depth()
      Returns:
      the value of the depth field.
    • colors

      public int colors()
      Returns:
      the value of the colors field.
    • data_length

      public int data_length()
      Returns:
      the value of the data_length field.
    • data

      public ByteBuffer data()
      Returns:
      a ByteBuffer view of the data pointed to by the data field.
    • format

      public int format()
      Returns:
      the value of the format field.
    • malloc

      public static OpusPictureTag malloc()
      Returns a new OpusPictureTag instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static OpusPictureTag calloc()
      Returns a new OpusPictureTag instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static OpusPictureTag create()
      Returns a new OpusPictureTag instance allocated with BufferUtils.
    • create

      public static OpusPictureTag create(long address)
      Returns a new OpusPictureTag instance for the specified memory address.
    • createSafe

      public static @Nullable OpusPictureTag createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static OpusPictureTag.Buffer malloc(int capacity)
      Returns a new OpusPictureTag.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static OpusPictureTag.Buffer calloc(int capacity)
      Returns a new OpusPictureTag.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OpusPictureTag.Buffer create(int capacity)
      Returns a new OpusPictureTag.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OpusPictureTag.Buffer create(long address, int capacity)
      Create a OpusPictureTag.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable OpusPictureTag.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static OpusPictureTag malloc(MemoryStack stack)
      Returns a new OpusPictureTag instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static OpusPictureTag calloc(MemoryStack stack)
      Returns a new OpusPictureTag instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static OpusPictureTag.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static OpusPictureTag.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nmime_type

      public static ByteBuffer nmime_type(long struct, int capacity)
      Unsafe version of mime_type.
    • ndescription

      public static ByteBuffer ndescription(long struct)
      Unsafe version of description().
    • ndescriptionString

      public static String ndescriptionString(long struct)
      Unsafe version of descriptionString().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static int nheight(long struct)
      Unsafe version of height().
    • ndepth

      public static int ndepth(long struct)
      Unsafe version of depth().
    • ncolors

      public static int ncolors(long struct)
      Unsafe version of colors().
    • ndata_length

      public static int ndata_length(long struct)
      Unsafe version of data_length().
    • ndata

      public static ByteBuffer ndata(long struct)
      Unsafe version of data.
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().