Package org.freedesktop.gstreamer.gst
Class MapInfo
java.lang.Object
io.github.jwharm.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
ConstructorDescriptionMapInfo()
Allocate a new MapInfo.Allocate a new MapInfo.MapInfo
(MemorySegment address) Create a MapInfo proxy instance for the provided memory address.MapInfo
(Memory memory, Set<MapFlags> flags, byte[] data, long size, long maxsize, MemorySegment[] userData) Allocate a new MapInfo with the fields set to the provided values.MapInfo
(Memory memory, Set<MapFlags> 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 MemoryLayout
The memory layout of the native struct.byte[]
readData()
Read the value of the fielddata
.Read the value of the fieldflags
.long
Read the value of the fieldmaxsize
.Read the value of the fieldmemory
.long
readSize()
Read the value of the fieldsize
.Read the value of the fielduser_data
.void
Write a value in the fielddata
.void
writeFlags
(Set<MapFlags> flags) Write a value in the fieldflags
.void
writeMaxsize
(long maxsize) Write a value in the fieldmaxsize
.void
writeMemory
(Memory memory) Write a value in the fieldmemory
.void
writeSize
(long size) Write a value in the fieldsize
.void
writeUserData
(MemorySegment[] userData, Arena _arena) Write a value in the fielduser_data
.Methods inherited from class io.github.jwharm.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, Set<MapFlags> 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 fieldmemory
flags
- value for the fieldflags
data
- value for the fielddata
size
- value for the fieldsize
maxsize
- value for the fieldmaxsize
userData
- value for the fielduserData
arena
- to control the memory allocation scope
-
MapInfo
public MapInfo(Memory memory, Set<MapFlags> 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 fieldmemory
flags
- value for the fieldflags
data
- value for the fielddata
size
- value for the fieldsize
maxsize
- value for the fieldmaxsize
userData
- 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
-
writeFlags
-
readData
public byte[] 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
_arena
- to control the memory allocation scope
-