Class OpusPictureTag

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class OpusPictureTag
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    The contents of a METADATA_BLOCK_PICTURE tag.

    Layout

    
     struct OpusPictureTag {
         opus_int32 type();
         char * mime_type(int);
         char * description();
         opus_uint32 width();
         opus_uint32 height();
         opus_uint32 depth();
         opus_uint32 colors();
         opus_uint32 data_length();
         unsigned char * data();
         int format();
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OpusPictureTag.Buffer
      An array of OpusPictureTag structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int COLORS
      DATA
      DATA_LENGTH
      DEPTH
      DESCRIPTION
      FORMAT
      HEIGHT
      MIME_TYPE
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int TYPE
      WIDTH
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      OpusPictureTag​(java.nio.ByteBuffer container)
      Creates a OpusPictureTag instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, MIME_TYPE, DESCRIPTION, WIDTH, HEIGHT, DEPTH, COLORS, DATA_LENGTH, DATA, FORMAT

        The struct member offsets.
    • Constructor Detail

      • OpusPictureTag

        public OpusPictureTag​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • type

        public int type()
        the picture type according to the ID3v2 APIC frame:
        1. Other
        2. 32x32 pixels 'file icon' (PNG only)
        3. Other file icon
        4. Cover (front)
        5. Cover (back)
        6. Leaflet page
        7. Media (e.g. label side of CD)
        8. Lead artist/lead performer/soloist
        9. Artist/performer
        10. Conductor
        11. Band/Orchestra
        12. Composer
        13. Lyricist/text writer
        14. Recording Location
        15. During recording
        16. During performance
        17. Movie/video screen capture
        18. A bright colored fish
        19. Illustration
        20. Band/artist logotype
        21. Publisher/Studio logotype

        Others are reserved and should not be used. There may only be one each of picture type 1 and 2 in a file.

      • mime_type

        public java.nio.ByteBuffer mime_type​(int capacity)
        Parameters:
        capacity - the number of elements in the returned buffer
        Returns:
        the MIME type of the picture, in printable ASCII characters 0x20-0x7E.

        The MIME type may also be "-->" to signify that the data part is a URL pointing to the picture instead of the picture data itself. In this case, a terminating NUL is appended to the URL string in #data, but #data_length is set to the length of the string excluding that terminating NUL.

      • description, descriptionString

        public java.nio.ByteBuffer description()
        
        public java.lang.String descriptionString()
        
        the description of the picture, in UTF-8
      • width

        public int width()
        the width of the picture in pixels
      • height

        public int height()
        the height of the picture in pixels
      • depth

        public int depth()
        the color depth of the picture in bits-per-pixel ( not bits-per-channel)
      • colors

        public int colors()
        for indexed-color pictures (e.g., GIF), the number of colors used, or 0 for non-indexed pictures.
      • data_length

        public int data_length()
        the length of the picture data in bytes
      • data

        public java.nio.ByteBuffer data()
        the binary picture data
      • 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

        @Nullable
        public static 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​(long address,
                                                   int capacity)
        Create a OpusPictureTag.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

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

        public static OpusPictureTag malloc​(org.lwjgl.system.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​(org.lwjgl.system.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,
                                                   org.lwjgl.system.MemoryStack stack)
        Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

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

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

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

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

        public static java.lang.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 java.nio.ByteBuffer ndata​(long struct)
        Unsafe version of data.
      • nformat

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