Top Description Inners Fields Constructors Methods
org.lwjgl.util.opus

public Class OpusPictureTag

extends Struct<OpusPictureTag>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

The contents of a METADATA_BLOCK_PICTURE tag.

Layout


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;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
COLORS

The struct member offsets.

public static final int
DATA

The struct member offsets.

public static final int
DATA_LENGTH

The struct member offsets.

public static final int
DEPTH

The struct member offsets.

public static final int
DESCRIPTION

The struct member offsets.

public static final int
FORMAT

The struct member offsets.

public static final int
HEIGHT

The struct member offsets.

public static final int
MIME_TYPE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TYPE

The struct member offsets.

public static final int
WIDTH

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
OpusPictureTag(long address, ByteBuffer container)

public
OpusPictureTag(ByteBuffer container)

Creates a OpusPictureTag instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static OpusPictureTag
calloc()

Returns a new OpusPictureTag instance allocated with memCalloc.

public static OpusPictureTag.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new OpusPictureTag.Buffer instance allocated with memCalloc.

public static OpusPictureTag
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new OpusPictureTag instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static OpusPictureTag.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public int
colors()

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

protected OpusPictureTag
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static OpusPictureTag
create()

Returns a new OpusPictureTag instance allocated with BufferUtils.

public static OpusPictureTag
create(long address)

Returns a new OpusPictureTag instance for the specified memory address.

public static OpusPictureTag.Buffer
create(int
the buffer capacity
capacity
)

Returns a new OpusPictureTag.Buffer instance allocated with BufferUtils.

public static OpusPictureTag.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a OpusPictureTag.Buffer instance at the specified memory.

public static OpusPictureTag
createSafe(long address)

Like create, but returns null if address is NULL.

public static OpusPictureTag.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public ByteBuffer
data()

the binary picture data

public int
data_length()

the length of the picture data in bytes

public int
depth()

the color depth of the picture in bits-per-pixel ( not bits-per-channel)

public ByteBuffer
description()

the description of the picture, in UTF-8

public String
descriptionString()

the description of the picture, in UTF-8

public int
format()

the format of the picture data, if known.

public int
height()

the height of the picture in pixels

public static OpusPictureTag
malloc()

Returns a new OpusPictureTag instance allocated with memAlloc.

public static OpusPictureTag.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new OpusPictureTag.Buffer instance allocated with memAlloc.

public static OpusPictureTag
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new OpusPictureTag instance allocated on the specified MemoryStack.

public static OpusPictureTag.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack.

public ByteBuffer

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.

mime_type
(int
the number of elements in the returned buffer
capacity
)

public static int
ncolors(long struct)

Unsafe version of colors.

public static ByteBuffer
ndata(long struct)

Unsafe version of data.

public static int
ndata_length(long struct)

Unsafe version of data_length.

public static int
ndepth(long struct)

Unsafe version of depth.

public static ByteBuffer
ndescription(long struct)

Unsafe version of description.

public static String
ndescriptionString(long struct)

Unsafe version of descriptionString.

public static int
nformat(long struct)

Unsafe version of format.

public static int
nheight(long struct)

Unsafe version of height.

public static ByteBuffer
nmime_type(long struct, int capacity)

Unsafe version of mime_type.

public static int
ntype(long struct)

Unsafe version of type.

public static int
nwidth(long struct)

Unsafe version of width.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
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
public int
width()

the width of the picture in pixels

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

COLORSback to summary
public static final int COLORS

The struct member offsets.

DATAback to summary
public static final int DATA

The struct member offsets.

DATA_LENGTHback to summary
public static final int DATA_LENGTH

The struct member offsets.

DEPTHback to summary
public static final int DEPTH

The struct member offsets.

DESCRIPTIONback to summary
public static final int DESCRIPTION

The struct member offsets.

FORMATback to summary
public static final int FORMAT

The struct member offsets.

HEIGHTback to summary
public static final int HEIGHT

The struct member offsets.

MIME_TYPEback to summary
public static final int MIME_TYPE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TYPEback to summary
public static final int TYPE

The struct member offsets.

WIDTHback to summary
public static final int WIDTH

The struct member offsets.

Constructor Detail

OpusPictureTagback to summary
protected OpusPictureTag(long address, ByteBuffer container)
OpusPictureTagback to summary
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 Detail

callocback to summary
public static OpusPictureTag calloc()

Returns a new OpusPictureTag instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static OpusPictureTag.Buffer calloc(int capacity)

Returns a new OpusPictureTag.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
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:MemoryStack

the stack from which to allocate

callocback to summary
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:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

colorsback to summary
public int colors()

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

Annotations
@NativeType:opus_uint32
createback to summary
protected OpusPictureTag create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static OpusPictureTag create()

Returns a new OpusPictureTag instance allocated with BufferUtils.

createback to summary
public static OpusPictureTag create(long address)

Returns a new OpusPictureTag instance for the specified memory address.

createback to summary
public static OpusPictureTag.Buffer create(int capacity)

Returns a new OpusPictureTag.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static OpusPictureTag.Buffer create(long address, int capacity)

Create a OpusPictureTag.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static OpusPictureTag createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static OpusPictureTag.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
databack to summary
public ByteBuffer data()

the binary picture data

Annotations
@NativeType:unsigned char *
data_lengthback to summary
public int data_length()

the length of the picture data in bytes

Annotations
@NativeType:opus_uint32
depthback to summary
public int depth()

the color depth of the picture in bits-per-pixel ( not bits-per-channel)

Annotations
@NativeType:opus_uint32
descriptionback to summary
public ByteBuffer description()

the description of the picture, in UTF-8

Annotations
@NativeType:char *
descriptionStringback to summary
public String descriptionString()

the description of the picture, in UTF-8

Annotations
@NativeType:char *
formatback to summary
public int format()

the format of the picture data, if known. One of:

PIC_FORMAT_UNKNOWNPIC_FORMAT_URLPIC_FORMAT_JPEGPIC_FORMAT_PNGPIC_FORMAT_GIF
heightback to summary
public int height()

the height of the picture in pixels

Annotations
@NativeType:opus_uint32
mallocback to summary
public static OpusPictureTag malloc()

Returns a new OpusPictureTag instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static OpusPictureTag.Buffer malloc(int capacity)

Returns a new OpusPictureTag.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static OpusPictureTag malloc(MemoryStack stack)

Returns a new OpusPictureTag instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static OpusPictureTag.Buffer malloc(int capacity, MemoryStack stack)

Returns a new OpusPictureTag.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mime_typeback to summary
public ByteBuffer mime_type(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:ByteBuffer

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.

Annotations
@NativeType:char *
ncolorsback to summary
public static int ncolors(long struct)

Unsafe version of colors.

ndataback to summary
public static ByteBuffer ndata(long struct)

Unsafe version of data.

ndata_lengthback to summary
public static int ndata_length(long struct)

Unsafe version of data_length.

ndepthback to summary
public static int ndepth(long struct)

Unsafe version of depth.

ndescriptionback to summary
public static ByteBuffer ndescription(long struct)

Unsafe version of description.

ndescriptionStringback to summary
public static String ndescriptionString(long struct)

Unsafe version of descriptionString.

nformatback to summary
public static int nformat(long struct)

Unsafe version of format.

nheightback to summary
public static int nheight(long struct)

Unsafe version of height.

nmime_typeback to summary
public static ByteBuffer nmime_type(long struct, int capacity)

Unsafe version of mime_type.

ntypeback to summary
public static int ntype(long struct)

Unsafe version of type.

nwidthback to summary
public static int nwidth(long struct)

Unsafe version of width.

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
typeback to summary
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.

Annotations
@NativeType:opus_int32
widthback to summary
public int width()

the width of the picture in pixels

Annotations
@NativeType:opus_uint32
org.lwjgl.util.opus back to summary

public Class OpusPictureTag.Buffer

extends StructBuffer<OpusPictureTag, OpusPictureTag.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of OpusPictureTag structs.

Field Summary

Modifier and TypeField and Description
private static final OpusPictureTag

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new OpusPictureTag.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the OpusPictureTag#colors field.
colors
()

public ByteBuffer

Returns:

a ByteBuffer view of the data pointed to by the OpusPictureTag#data field.
data
()

public int

Returns:

the value of the OpusPictureTag#data_length field.
data_length
()

public int

Returns:

the value of the OpusPictureTag#depth field.
depth
()

public ByteBuffer

Returns:

a ByteBuffer view of the null-terminated string pointed to by the OpusPictureTag#description field.
description
()

public String

Returns:

the null-terminated string pointed to by the OpusPictureTag#description field.
descriptionString
()

public int

Returns:

the value of the OpusPictureTag#format field.
format
()

protected OpusPictureTag
public int

Returns:

the value of the OpusPictureTag#height field.
height
()

public ByteBuffer

Returns:

a ByteBuffer view of the data pointed to by the OpusPictureTag#mime_type field.
mime_type
(int
the number of elements in the returned buffer
capacity
)

protected OpusPictureTag.Buffer
public int

Returns:

the value of the OpusPictureTag#type field.
type
()

public int

Returns:

the value of the OpusPictureTag#width field.
width
()

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final OpusPictureTag ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new OpusPictureTag.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by OpusPictureTag#SIZEOF, and its mark will be undefined.

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

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

colorsback to summary
public int colors()
Returns:int

the value of the OpusPictureTag#colors field.

Annotations
@NativeType:opus_uint32
databack to summary
public ByteBuffer data()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the OpusPictureTag#data field.

Annotations
@NativeType:unsigned char *
data_lengthback to summary
public int data_length()
Returns:int

the value of the OpusPictureTag#data_length field.

Annotations
@NativeType:opus_uint32
depthback to summary
public int depth()
Returns:int

the value of the OpusPictureTag#depth field.

Annotations
@NativeType:opus_uint32
descriptionback to summary
public ByteBuffer description()
Returns:ByteBuffer

a ByteBuffer view of the null-terminated string pointed to by the OpusPictureTag#description field.

Annotations
@NativeType:char *
descriptionStringback to summary
public String descriptionString()
Returns:String

the null-terminated string pointed to by the OpusPictureTag#description field.

Annotations
@NativeType:char *
formatback to summary
public int format()
Returns:int

the value of the OpusPictureTag#format field.

getElementFactoryback to summary
protected OpusPictureTag getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
heightback to summary
public int height()
Returns:int

the value of the OpusPictureTag#height field.

Annotations
@NativeType:opus_uint32
mime_typeback to summary
public ByteBuffer mime_type(int capacity)
Parameters
capacity:int

the number of elements in the returned buffer

Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the OpusPictureTag#mime_type field.

Annotations
@NativeType:char *
selfback to summary
protected OpusPictureTag.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
typeback to summary
public int type()
Returns:int

the value of the OpusPictureTag#type field.

Annotations
@NativeType:opus_int32
widthback to summary
public int width()
Returns:int

the value of the OpusPictureTag#width field.

Annotations
@NativeType:opus_uint32