Class OpusTags

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class OpusTags extends Struct<OpusTags> implements NativeResource

 struct OpusTags {
     char ** user_comments;
     int * comment_lengths;
     int comments;
     char * vendor;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int USER_COMMENTS
      The struct member offsets.
    • COMMENT_LENGTHS

      public static final int COMMENT_LENGTHS
      The struct member offsets.
    • COMMENTS

      public static final int COMMENTS
      The struct member offsets.
    • VENDOR

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

    • OpusTags

      public OpusTags(ByteBuffer container)
      Creates a OpusTags 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<OpusTags>
    • user_comments

      public PointerBuffer user_comments()
      Returns:
      a PointerBuffer view of the data pointed to by the user_comments field.
    • comment_lengths

      public IntBuffer comment_lengths()
      Returns:
      a IntBuffer view of the data pointed to by the comment_lengths field.
    • comments

      public int comments()
      Returns:
      the value of the comments field.
    • vendor

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

      public String vendorString()
      Returns:
      the null-terminated string pointed to by the vendor field.
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static OpusTags.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new OpusTags.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
    • nuser_comments

      public static PointerBuffer nuser_comments(long struct)
      Unsafe version of user_comments.
    • ncomment_lengths

      public static IntBuffer ncomment_lengths(long struct)
      Unsafe version of comment_lengths.
    • ncomments

      public static int ncomments(long struct)
      Unsafe version of comments().
    • nvendor

      public static ByteBuffer nvendor(long struct)
      Unsafe version of vendor().
    • nvendorString

      public static String nvendorString(long struct)
      Unsafe version of vendorString().