Class MapInfo

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.MapInfo
All Implemented Interfaces:
Proxy
Direct Known Subclasses:
BufferMapInfo, MemoryMapInfo

@Generated("org.javagi.JavaGI") public class MapInfo extends ProxyInstance

A structure containing the result of a map operation such as gst_memory_map(). It contains the data and size.

GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using gst_buffer_unmap() or gst_memory_unmap(). Instead, GstBufferMapInfo and GstMemoryMapInfo can be used in that case.

  • Constructor Details

    • MapInfo

      public MapInfo(MemorySegment address)
      Create a MapInfo proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MapInfo

      public MapInfo(Arena arena)
      Allocate a new MapInfo.
      Parameters:
      arena - to control the memory allocation scope
    • MapInfo

      public MapInfo()
      Allocate a new MapInfo. The memory is allocated with Arena.ofAuto().
    • MapInfo

      public MapInfo(Memory memory, int flags, byte[] data, long size, long maxsize, MemorySegment[] userData, Arena arena)
      Allocate a new MapInfo with the fields set to the provided values.
      Parameters:
      memory - value for the field memory
      flags - value for the field flags
      data - value for the field data
      size - value for the field size
      maxsize - value for the field maxsize
      userData - value for the field userData
      arena - to control the memory allocation scope
    • MapInfo

      public MapInfo(Memory memory, int flags, byte[] data, long size, long maxsize, MemorySegment[] userData)
      Allocate a new MapInfo with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      memory - value for the field memory
      flags - value for the field flags
      data - value for the field data
      size - value for the field size
      maxsize - value for the field maxsize
      userData - value for the field userData
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readMemory

      public Memory readMemory()
      Read the value of the field memory.
      Returns:
      The value of the field memory
    • writeMemory

      public void writeMemory(Memory memory)
      Write a value in the field memory.
      Parameters:
      memory - The new value for the field memory
    • readFlags

      public int readFlags()
      Read the value of the field flags.
      Returns:
      The value of the field flags
    • writeFlags

      public void writeFlags(int flags)
      Write a value in the field flags.
      Parameters:
      flags - The new value for the field flags
    • readData

      public @Nullable byte @Nullable [] readData()
      Read the value of the field data.
      Returns:
      The value of the field data
    • writeData

      public void writeData(@Nullable byte @Nullable [] data, Arena _arena)
      Write a value in the field data.
      Parameters:
      data - The new value for the field data
      _arena - to control the memory allocation scope
    • readSize

      public long readSize()
      Read the value of the field size.
      Returns:
      The value of the field size
    • writeSize

      public void writeSize(long size)
      Write a value in the field size.
      Parameters:
      size - The new value for the field size
    • readMaxsize

      public long readMaxsize()
      Read the value of the field maxsize.
      Returns:
      The value of the field maxsize
    • writeMaxsize

      public void writeMaxsize(long maxsize)
      Write a value in the field maxsize.
      Parameters:
      maxsize - The new value for the field maxsize
    • readUserData

      public @Nullable MemorySegment @Nullable [] readUserData()
      Read the value of the field user_data.
      Returns:
      The value of the field user_data
    • writeUserData

      public void writeUserData(@Nullable MemorySegment @Nullable [] userData, Arena _arena)
      Write a value in the field user_data.
      Parameters:
      userData - The new value for the field user_data