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

public Class OGGPacket

extends Struct<OGGPacket>
Class Inheritance
Annotations
@NativeType:struct ogg_packet
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Layout


struct ogg_packet {
    unsigned char * packet;
    long bytes;
    long b_o_s;
    long e_o_s;
    ogg_int64_t granulepos;
    ogg_int64_t packetno;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
OGGPacket.Buffer

An array of OGGPacket structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
B_O_S

The struct member offsets.

public static final int
BYTES

The struct member offsets.

public static final int
E_O_S

The struct member offsets.

public static final int
GRANULEPOS

The struct member offsets.

public static final int
PACKET

The struct member offsets.

public static final int
PACKETNO

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
OGGPacket(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the value of the b_o_s field.
b_o_s
()

public long

Returns:

the value of the bytes field.
bytes
()

protected OGGPacket
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 OGGPacket
create(long address)

Returns a new OGGPacket instance for the specified memory address.

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

Create a OGGPacket.Buffer instance at the specified memory.

public static OGGPacket
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public long

Returns:

the value of the e_o_s field.
e_o_s
()

public long

Returns:

the value of the granulepos field.
granulepos
()

public static long
nb_o_s(long struct)

Unsafe version of b_o_s.

public static long
nbytes(long struct)

Unsafe version of bytes.

public static long
ne_o_s(long struct)

Unsafe version of e_o_s.

public static long
ngranulepos(long struct)

Unsafe version of granulepos.

public static ByteBuffer
npacket(long struct)

Unsafe version of packet.

public static long
npacketno(long struct)

Unsafe version of packetno.

public ByteBuffer

Returns:

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

public long
packetno()

sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec (which is in a separate abstraction layer) also knows about the gap

public int
sizeof()

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

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

B_O_Sback to summary
public static final int B_O_S

The struct member offsets.

BYTESback to summary
public static final int BYTES

The struct member offsets.

E_O_Sback to summary
public static final int E_O_S

The struct member offsets.

GRANULEPOSback to summary
public static final int GRANULEPOS

The struct member offsets.

PACKETback to summary
public static final int PACKET

The struct member offsets.

PACKETNOback to summary
public static final int PACKETNO

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

OGGPacketback to summary
protected OGGPacket(long address, ByteBuffer container)
OGGPacketback to summary
public OGGPacket(ByteBuffer container)

Creates a OGGPacket 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

b_o_sback to summary
public long b_o_s()
Returns:long

the value of the b_o_s field.

bytesback to summary
public long bytes()
Returns:long

the value of the bytes field.

createback to summary
protected OGGPacket 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 OGGPacket create(long address)

Returns a new OGGPacket instance for the specified memory address.

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

Create a OGGPacket.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static OGGPacket createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
e_o_sback to summary
public long e_o_s()
Returns:long

the value of the e_o_s field.

granuleposback to summary
public long granulepos()
Returns:long

the value of the granulepos field.

Annotations
@NativeType:ogg_int64_t
nb_o_sback to summary
public static long nb_o_s(long struct)

Unsafe version of b_o_s.

nbytesback to summary
public static long nbytes(long struct)

Unsafe version of bytes.

ne_o_sback to summary
public static long ne_o_s(long struct)

Unsafe version of e_o_s.

ngranuleposback to summary
public static long ngranulepos(long struct)

Unsafe version of granulepos.

npacketback to summary
public static ByteBuffer npacket(long struct)

Unsafe version of packet.

npacketnoback to summary
public static long npacketno(long struct)

Unsafe version of packetno.

packetback to summary
public ByteBuffer packet()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the packet field.

Annotations
@NativeType:unsigned char *
packetnoback to summary
public long packetno()

sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec (which is in a separate abstraction layer) also knows about the gap

Annotations
@NativeType:ogg_int64_t
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
org.lwjgl.util.opus back to summary

public Class OGGPacket.Buffer

extends StructBuffer<OGGPacket, OGGPacket.Buffer>
Class Inheritance

An array of OGGPacket structs.

Field Summary

Modifier and TypeField and Description
private static final OGGPacket

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new OGGPacket.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 long

Returns:

the value of the b_o_s field.
b_o_s
()

public long

Returns:

the value of the bytes field.
bytes
()

public long

Returns:

the value of the e_o_s field.
e_o_s
()

protected OGGPacket
public long

Returns:

the value of the granulepos field.
granulepos
()

public ByteBuffer

Returns:

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

public long

Returns:

the value of the OGGPacket#packetno field.
packetno
()

protected OGGPacket.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final OGGPacket ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new OGGPacket.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 OGGPacket#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

b_o_sback to summary
public long b_o_s()
Returns:long

the value of the b_o_s field.

bytesback to summary
public long bytes()
Returns:long

the value of the bytes field.

e_o_sback to summary
public long e_o_s()
Returns:long

the value of the e_o_s field.

getElementFactoryback to summary
protected OGGPacket getElementFactory()

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

Annotations
@Override
granuleposback to summary
public long granulepos()
Returns:long

the value of the granulepos field.

Annotations
@NativeType:ogg_int64_t
packetback to summary
public ByteBuffer packet()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the packet field.

Annotations
@NativeType:unsigned char *
packetnoback to summary
public long packetno()
Returns:long

the value of the OGGPacket#packetno field.

Annotations
@NativeType:ogg_int64_t
selfback to summary
protected OGGPacket.Buffer self()

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

Annotations
@Override