Package org.freedesktop.gstreamer.gst
Class MapInfo
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.MapInfo
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
BufferMapInfo,MemoryMapInfo
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 Summary
ConstructorsConstructorDescriptionMapInfo()Allocate a new MapInfo.Allocate a new MapInfo.MapInfo(MemorySegment address) Create a MapInfo proxy instance for the provided memory address.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.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. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.@org.jspecify.annotations.Nullable byte @Nullable []readData()Read the value of the fielddata.intRead the value of the fieldflags.longRead the value of the fieldmaxsize.Read the value of the fieldmemory.longreadSize()Read the value of the fieldsize.@Nullable MemorySegment @Nullable []Read the value of the fielduser_data.voidWrite a value in the fielddata.voidwriteFlags(int flags) Write a value in the fieldflags.voidwriteMaxsize(long maxsize) Write a value in the fieldmaxsize.voidwriteMemory(Memory memory) Write a value in the fieldmemory.voidwriteSize(long size) Write a value in the fieldsize.voidwriteUserData(@Nullable MemorySegment @Nullable [] userData, Arena _arena) Write a value in the fielduser_data.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
MapInfo
Create a MapInfo proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
MapInfo
Allocate a new MapInfo.- Parameters:
arena- to control the memory allocation scope
-
MapInfo
public MapInfo()Allocate a new MapInfo. The memory is allocated withArena.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 fieldmemoryflags- value for the fieldflagsdata- value for the fielddatasize- value for the fieldsizemaxsize- value for the fieldmaxsizeuserData- value for the fielduserDataarena- 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 withArena.ofAuto().- Parameters:
memory- value for the fieldmemoryflags- value for the fieldflagsdata- value for the fielddatasize- value for the fieldsizemaxsize- value for the fieldmaxsizeuserData- value for the fielduserData
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readMemory
Read the value of the fieldmemory.- Returns:
- The value of the field
memory
-
writeMemory
Write a value in the fieldmemory.- Parameters:
memory- The new value for the fieldmemory
-
readFlags
public int readFlags()Read the value of the fieldflags.- Returns:
- The value of the field
flags
-
writeFlags
public void writeFlags(int flags) Write a value in the fieldflags.- Parameters:
flags- The new value for the fieldflags
-
readData
public @org.jspecify.annotations.Nullable byte @Nullable [] readData()Read the value of the fielddata.- Returns:
- The value of the field
data
-
writeData
Write a value in the fielddata.- Parameters:
data- The new value for the fielddata_arena- to control the memory allocation scope
-
readSize
public long readSize()Read the value of the fieldsize.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(long size) Write a value in the fieldsize.- Parameters:
size- The new value for the fieldsize
-
readMaxsize
public long readMaxsize()Read the value of the fieldmaxsize.- Returns:
- The value of the field
maxsize
-
writeMaxsize
public void writeMaxsize(long maxsize) Write a value in the fieldmaxsize.- Parameters:
maxsize- The new value for the fieldmaxsize
-
readUserData
Read the value of the fielduser_data.- Returns:
- The value of the field
user_data
-
writeUserData
Write a value in the fielduser_data.- Parameters:
userData- The new value for the fielduser_data
-