Package org.lwjgl.util.opus
Class OpusPictureTag
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.opus.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.NativeResourceThe contents of aMETADATA_BLOCK_PICTUREtag.Layout
struct OpusPictureTag { opus_int32type(); char *mime_type(int); char *description(); opus_uint32width(); opus_uint32height(); opus_uint32depth(); opus_uint32colors(); opus_uint32data_length(); unsigned char *data(); intformat(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpusPictureTag.BufferAn array ofOpusPictureTagstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOLORS
DATA
DATA_LENGTH
DEPTH
DESCRIPTION
FORMAT
HEIGHT
MIME_TYPEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
WIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description OpusPictureTag(java.nio.ByteBuffer container)Creates aOpusPictureTaginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OpusPictureTagcalloc()Returns a newOpusPictureTaginstance allocated withmemCalloc.static OpusPictureTag.Buffercalloc(int capacity)Returns a newOpusPictureTag.Bufferinstance allocated withmemCalloc.static OpusPictureTag.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpusPictureTag.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static OpusPictureTagcalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpusPictureTaginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcolors()for indexed-color pictures (e.g., GIF), the number of colors used, or 0 for non-indexed pictures.static OpusPictureTagcreate()Returns a newOpusPictureTaginstance allocated withBufferUtils.static OpusPictureTag.Buffercreate(int capacity)Returns a newOpusPictureTag.Bufferinstance allocated withBufferUtils.static OpusPictureTagcreate(long address)Returns a newOpusPictureTaginstance for the specified memory address.static OpusPictureTag.Buffercreate(long address, int capacity)Create aOpusPictureTag.Bufferinstance at the specified memory.static OpusPictureTagcreateSafe(long address)static OpusPictureTag.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdata()the binary picture dataintdata_length()the length of the picture data in bytesintdepth()the color depth of the picture in bits-per-pixel ( not bits-per-channel)java.nio.ByteBufferdescription()the description of the picture, in UTF-8java.lang.StringdescriptionString()the description of the picture, in UTF-8intformat()the format of the picture data, if known.intheight()the height of the picture in pixelsstatic OpusPictureTagmalloc()Returns a newOpusPictureTaginstance allocated withmemAlloc.static OpusPictureTag.Buffermalloc(int capacity)Returns a newOpusPictureTag.Bufferinstance allocated withmemAlloc.static OpusPictureTag.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newOpusPictureTag.Bufferinstance allocated on the specifiedMemoryStack.static OpusPictureTagmalloc(org.lwjgl.system.MemoryStack stack)Returns a newOpusPictureTaginstance allocated on the specifiedMemoryStack.java.nio.ByteBuffermime_type(int capacity)static intncolors(long struct)Unsafe version ofcolors().static java.nio.ByteBufferndata(long struct)Unsafe version ofdata.static intndata_length(long struct)Unsafe version ofdata_length().static intndepth(long struct)Unsafe version ofdepth().static java.nio.ByteBufferndescription(long struct)Unsafe version ofdescription().static java.lang.StringndescriptionString(long struct)Unsafe version ofdescriptionString().static intnformat(long struct)Unsafe version offormat().static intnheight(long struct)Unsafe version ofheight().static java.nio.ByteBuffernmime_type(long struct, int capacity)Unsafe version ofmime_type.static intntype(long struct)Unsafe version oftype().static intnwidth(long struct)Unsafe version ofwidth().intsizeof()inttype()the picture type according to the ID3v2 APIC frame: Other 32x32 pixels 'file icon' (PNG only) Other file icon Cover (front) Cover (back) Leaflet page Media (e.g.intwidth()the width of the picture in pixels
-
-
-
Constructor Detail
-
OpusPictureTag
public OpusPictureTag(java.nio.ByteBuffer container)
Creates aOpusPictureTaginstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
the picture type according to the ID3v2 APIC frame:- Other
- 32x32 pixels 'file icon' (PNG only)
- Other file icon
- Cover (front)
- Cover (back)
- Leaflet page
- Media (e.g. label side of CD)
- Lead artist/lead performer/soloist
- Artist/performer
- Conductor
- Band/Orchestra
- Composer
- Lyricist/text writer
- Recording Location
- During recording
- During performance
- Movie/video screen capture
- A bright colored fish
- Illustration
- Band/artist logotype
- 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 terminatingNULis appended to the URL string in#data, but#data_lengthis set to the length of the string excluding that terminatingNUL.
-
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
-
format
public int format()
the format of the picture data, if known. One of:PIC_FORMAT_UNKNOWNPIC_FORMAT_URLPIC_FORMAT_JPEGPIC_FORMAT_PNGPIC_FORMAT_GIF
-
malloc
public static OpusPictureTag malloc()
Returns a newOpusPictureTaginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static OpusPictureTag calloc()
Returns a newOpusPictureTaginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static OpusPictureTag create()
Returns a newOpusPictureTaginstance allocated withBufferUtils.
-
create
public static OpusPictureTag create(long address)
Returns a newOpusPictureTaginstance for the specified memory address.
-
createSafe
@Nullable public static OpusPictureTag createSafe(long address)
-
malloc
public static OpusPictureTag.Buffer malloc(int capacity)
Returns a newOpusPictureTag.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static OpusPictureTag.Buffer calloc(int capacity)
Returns a newOpusPictureTag.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static OpusPictureTag.Buffer create(int capacity)
Returns a newOpusPictureTag.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static OpusPictureTag.Buffer create(long address, int capacity)
Create aOpusPictureTag.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static OpusPictureTag.Buffer createSafe(long address, int capacity)
-
malloc
public static OpusPictureTag malloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpusPictureTaginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static OpusPictureTag calloc(org.lwjgl.system.MemoryStack stack)
Returns a newOpusPictureTaginstance allocated on the specifiedMemoryStackand 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 newOpusPictureTag.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static OpusPictureTag.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newOpusPictureTag.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nmime_type
public static java.nio.ByteBuffer nmime_type(long struct, int capacity)Unsafe version ofmime_type.
-
ndescription
public static java.nio.ByteBuffer ndescription(long struct)
Unsafe version ofdescription().
-
ndescriptionString
public static java.lang.String ndescriptionString(long struct)
Unsafe version ofdescriptionString().
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static int nheight(long struct)
Unsafe version ofheight().
-
ndepth
public static int ndepth(long struct)
Unsafe version ofdepth().
-
ncolors
public static int ncolors(long struct)
Unsafe version ofcolors().
-
ndata_length
public static int ndata_length(long struct)
Unsafe version ofdata_length().
-
ndata
public static java.nio.ByteBuffer ndata(long struct)
Unsafe version ofdata.
-
nformat
public static int nformat(long struct)
Unsafe version offormat().
-
-