Class ExrCompressInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExrCompressInfo extends Struct<ExrCompressInfo> implements NativeResource
struct ExrCompressInfo {
    void const * src;
    size_t src_size;
    void * dst;
    size_t dst_capacity;
    size_t * out_size;
    uint32_t compression;
    int32_t compression_level;
    int32_t width;
    int32_t num_lines;
    uint32_t num_channels;
    ExrChannelInfo const * channels;
    ExrMemoryPool scratch;
}
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SRC

      public static final int SRC
      The struct member offsets.
    • SRC_SIZE

      public static final int SRC_SIZE
      The struct member offsets.
    • DST

      public static final int DST
      The struct member offsets.
    • DST_CAPACITY

      public static final int DST_CAPACITY
      The struct member offsets.
    • OUT_SIZE

      public static final int OUT_SIZE
      The struct member offsets.
    • COMPRESSION

      public static final int COMPRESSION
      The struct member offsets.
    • COMPRESSION_LEVEL

      public static final int COMPRESSION_LEVEL
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • NUM_LINES

      public static final int NUM_LINES
      The struct member offsets.
    • NUM_CHANNELS

      public static final int NUM_CHANNELS
      The struct member offsets.
    • CHANNELS

      public static final int CHANNELS
      The struct member offsets.
    • SCRATCH

      public static final int SCRATCH
      The struct member offsets.
  • Constructor Details

    • ExrCompressInfo

      public ExrCompressInfo(ByteBuffer container)
      Creates a ExrCompressInfo 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ExrCompressInfo>
    • src

      @NativeType("void const *") public ByteBuffer src()
      Returns:
      a ByteBuffer view of the data pointed to by the src field.
    • src_size

      @NativeType("size_t") public long src_size()
      Returns:
      the value of the src_size field.
    • dst

      @NativeType("void *") public ByteBuffer dst()
      Returns:
      a ByteBuffer view of the data pointed to by the dst field.
    • dst_capacity

      @NativeType("size_t") public long dst_capacity()
      Returns:
      the value of the dst_capacity field.
    • out_size

      @NativeType("size_t *") public PointerBuffer out_size()
      Returns:
      a PointerBuffer view of the data pointed to by the out_size field.
    • compression

      @NativeType("uint32_t") public int compression()
      Returns:
      the value of the compression field.
    • compression_level

      @NativeType("int32_t") public int compression_level()
      Returns:
      the value of the compression_level field.
    • width

      @NativeType("int32_t") public int width()
      Returns:
      the value of the width field.
    • num_lines

      @NativeType("int32_t") public int num_lines()
      Returns:
      the value of the num_lines field.
    • num_channels

      @NativeType("uint32_t") public int num_channels()
      Returns:
      the value of the num_channels field.
    • channels

      @NativeType("ExrChannelInfo const *") public ExrChannelInfo.Buffer channels()
      Returns:
      a ExrChannelInfo.Buffer view of the struct array pointed to by the channels field.
    • scratch

      @NativeType("ExrMemoryPool") public long scratch()
      Returns:
      the value of the scratch field.
    • src

      public ExrCompressInfo src(@NativeType("void const *") ByteBuffer value)
      Sets the address of the specified ByteBuffer to the src field.
    • dst

      public ExrCompressInfo dst(@NativeType("void *") ByteBuffer value)
      Sets the address of the specified ByteBuffer to the dst field.
    • out_size

      public ExrCompressInfo out_size(@NativeType("size_t *") PointerBuffer value)
      Sets the address of the specified PointerBuffer to the out_size field.
    • compression

      public ExrCompressInfo compression(@NativeType("uint32_t") int value)
      Sets the specified value to the compression field.
    • compression_level

      public ExrCompressInfo compression_level(@NativeType("int32_t") int value)
      Sets the specified value to the compression_level field.
    • width

      public ExrCompressInfo width(@NativeType("int32_t") int value)
      Sets the specified value to the width field.
    • num_lines

      public ExrCompressInfo num_lines(@NativeType("int32_t") int value)
      Sets the specified value to the num_lines field.
    • channels

      public ExrCompressInfo channels(@NativeType("ExrChannelInfo const *") ExrChannelInfo.Buffer value)
      Sets the address of the specified ExrChannelInfo.Buffer to the channels field.
    • scratch

      public ExrCompressInfo scratch(@NativeType("ExrMemoryPool") long value)
      Sets the specified value to the scratch field.
    • set

      public ExrCompressInfo set(ByteBuffer src, ByteBuffer dst, PointerBuffer out_size, int compression, int compression_level, int width, int num_lines, ExrChannelInfo.Buffer channels, long scratch)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

      public static ExrCompressInfo.Buffer malloc(int capacity)
      Returns a new ExrCompressInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static ExrCompressInfo.Buffer calloc(int capacity)
      Returns a new ExrCompressInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ExrCompressInfo.Buffer create(int capacity)
      Returns a new ExrCompressInfo.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

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

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

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

      public static ExrCompressInfo.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ExrCompressInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsrc

      public static ByteBuffer nsrc(long struct)
      Unsafe version of src.
    • nsrc_size

      public static long nsrc_size(long struct)
      Unsafe version of src_size().
    • ndst

      public static ByteBuffer ndst(long struct)
      Unsafe version of dst.
    • ndst_capacity

      public static long ndst_capacity(long struct)
      Unsafe version of dst_capacity().
    • nout_size

      public static PointerBuffer nout_size(long struct)
      Unsafe version of out_size.
    • ncompression

      public static int ncompression(long struct)
      Unsafe version of compression().
    • ncompression_level

      public static int ncompression_level(long struct)
      Unsafe version of compression_level().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nnum_lines

      public static int nnum_lines(long struct)
      Unsafe version of num_lines().
    • nnum_channels

      public static int nnum_channels(long struct)
      Unsafe version of num_channels().
    • nchannels

      public static ExrChannelInfo.Buffer nchannels(long struct)
      Unsafe version of channels().
    • nscratch

      public static long nscratch(long struct)
      Unsafe version of scratch().
    • nsrc

      public static void nsrc(long struct, ByteBuffer value)
      Unsafe version of src.
    • nsrc_size

      public static void nsrc_size(long struct, long value)
      Sets the specified value to the src_size field of the specified struct.
    • ndst

      public static void ndst(long struct, ByteBuffer value)
      Unsafe version of dst.
    • ndst_capacity

      public static void ndst_capacity(long struct, long value)
      Sets the specified value to the dst_capacity field of the specified struct.
    • nout_size

      public static void nout_size(long struct, PointerBuffer value)
      Unsafe version of out_size.
    • ncompression

      public static void ncompression(long struct, int value)
      Unsafe version of compression.
    • ncompression_level

      public static void ncompression_level(long struct, int value)
      Unsafe version of compression_level.
    • nwidth

      public static void nwidth(long struct, int value)
      Unsafe version of width.
    • nnum_lines

      public static void nnum_lines(long struct, int value)
      Unsafe version of num_lines.
    • nnum_channels

      public static void nnum_channels(long struct, int value)
      Sets the specified value to the num_channels field of the specified struct.
    • nchannels

      public static void nchannels(long struct, ExrChannelInfo.Buffer value)
      Unsafe version of channels.
    • nscratch

      public static void nscratch(long struct, long value)
      Unsafe version of scratch.
    • validate

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