Class OGGPacket

  • All Implemented Interfaces:
    org.lwjgl.system.Pointer

    public class OGGPacket
    extends org.lwjgl.system.Struct

    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 Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OGGPacket.Buffer
      An array of OGGPacket 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 B_O_S
      BYTES
      E_O_S
      GRANULEPOS
      PACKET
      PACKETNO
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      • Fields inherited from interface org.lwjgl.system.Pointer

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

      Constructors 
      Constructor Description
      OGGPacket​(java.nio.ByteBuffer container)
      Creates a OGGPacket instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long b_o_s()  
      long bytes()  
      static OGGPacket create​(long address)
      Returns a new OGGPacket instance for the specified memory address.
      static OGGPacket.Buffer create​(long address, int capacity)
      Create a OGGPacket.Buffer instance at the specified memory.
      static OGGPacket createSafe​(long address)
      Like create, but returns null if address is NULL.
      static OGGPacket.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      long e_o_s()  
      long granulepos()  
      static long nb_o_s​(long struct)
      Unsafe version of b_o_s().
      static long nbytes​(long struct)
      Unsafe version of bytes().
      static long ne_o_s​(long struct)
      Unsafe version of e_o_s().
      static long ngranulepos​(long struct)
      Unsafe version of granulepos().
      static java.nio.ByteBuffer npacket​(long struct)
      Unsafe version of packet.
      static long npacketno​(long struct)
      Unsafe version of packetno().
      java.nio.ByteBuffer packet()  
      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
      int sizeof()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PACKET, BYTES, B_O_S, E_O_S, GRANULEPOS, PACKETNO

        The struct member offsets.
    • Constructor Detail

      • OGGPacket

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

      • sizeof

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

        public java.nio.ByteBuffer packet()
        Returns:
        a ByteBuffer view of the data pointed to by the packet field.
      • bytes

        public long bytes()
        Returns:
        the value of the bytes field.
      • b_o_s

        public long b_o_s()
        Returns:
        the value of the b_o_s field.
      • e_o_s

        public long e_o_s()
        Returns:
        the value of the e_o_s field.
      • granulepos

        public long granulepos()
        Returns:
        the value of the granulepos field.
      • packetno

        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
      • create

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

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

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

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

        public static java.nio.ByteBuffer npacket​(long struct)
        Unsafe version of packet.
      • nbytes

        public static long nbytes​(long struct)
        Unsafe version of bytes().
      • nb_o_s

        public static long nb_o_s​(long struct)
        Unsafe version of b_o_s().
      • ne_o_s

        public static long ne_o_s​(long struct)
        Unsafe version of e_o_s().
      • ngranulepos

        public static long ngranulepos​(long struct)
        Unsafe version of granulepos().
      • npacketno

        public static long npacketno​(long struct)
        Unsafe version of packetno().