Class OpusEncCallbacks

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

    public class OpusEncCallbacks
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Callback functions for accessing the stream.

    Layout

    
     struct OpusEncCallbacks {
         ope_write_func write();
         ope_close_func close;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • WRITE, CLOSE

        The struct member offsets.
    • Constructor Detail

      • OpusEncCallbacks

        public OpusEncCallbacks​(java.nio.ByteBuffer container)
        Creates a OpusEncCallbacks 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
      • write

        public OPEWriteFunc write()
        callback for writing to the stream
      • close$

        public OPECloseFunc close$()
        callback for closing the stream
      • set

        public OpusEncCallbacks set​(OpusEncCallbacks src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static OpusEncCallbacks malloc()
        Returns a new OpusEncCallbacks instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static OpusEncCallbacks calloc()
        Returns a new OpusEncCallbacks instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static OpusEncCallbacks create()
        Returns a new OpusEncCallbacks instance allocated with BufferUtils.
      • create

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

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

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

        public static OpusEncCallbacks malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new OpusEncCallbacks instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static OpusEncCallbacks calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new OpusEncCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static OpusEncCallbacks.Buffer malloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new OpusEncCallbacks.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static OpusEncCallbacks.Buffer calloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new OpusEncCallbacks.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
      • nwrite

        public static void nwrite​(long struct,
                                  OPEWriteFuncI value)
        Unsafe version of write.
      • nclose$

        public static void nclose$​(long struct,
                                   OPECloseFuncI value)
        Unsafe version of close$.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate