Package org.freedesktop.gstreamer.gst
Class PollFD
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.PollFD
-
Constructor Summary
ConstructorDescriptionPollFD()
Allocate a new PollFD.PollFD
(int fd, int idx) Allocate a new PollFD with the fields set to the provided values.Allocate a new PollFD with the fields set to the provided values.Allocate a new PollFD.PollFD
(MemorySegment address) Create a PollFD proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.void
init()
Initializes this PollFD.int
readFd()
Read the value of the fieldfd
.int
readIdx()
Read the value of the fieldidx
.void
writeFd
(int fd) Write a value in the fieldfd
.void
writeIdx
(int idx) Write a value in the fieldidx
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
PollFD
Create a PollFD proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
PollFD
Allocate a new PollFD.- Parameters:
arena
- to control the memory allocation scope
-
PollFD
public PollFD()Allocate a new PollFD. The memory is allocated withArena.ofAuto()
. -
PollFD
Allocate a new PollFD with the fields set to the provided values.- Parameters:
fd
- value for the fieldfd
idx
- value for the fieldidx
arena
- to control the memory allocation scope
-
PollFD
public PollFD(int fd, int idx) Allocate a new PollFD with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
fd
- value for the fieldfd
idx
- value for the fieldidx
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readFd
public int readFd()Read the value of the fieldfd
.- Returns:
- The value of the field
fd
-
writeFd
public void writeFd(int fd) Write a value in the fieldfd
.- Parameters:
fd
- The new value for the fieldfd
-
readIdx
public int readIdx()Read the value of the fieldidx
.- Returns:
- The value of the field
idx
-
writeIdx
public void writeIdx(int idx) Write a value in the fieldidx
.- Parameters:
idx
- The new value for the fieldidx
-
init
public void init()Initializes this PollFD. Alternatively you can initialize it withGST_POLL_FD_INIT
.
-