Class Poll

java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.Poll
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public class Poll extends ProxyInstance
A GstPoll keeps track of file descriptors much like fd_set (used with select ()) or a struct pollfd array (used with poll ()). Once created with gst_poll_new(), the set can be used to wait for file descriptors to be readable and/or writable. It is possible to make this wait be controlled by specifying true for the controllable flag when creating the set (or later calling gst_poll_set_controllable()).

New file descriptors are added to the set using gst_poll_add_fd(), and removed using gst_poll_remove_fd(). Controlling which file descriptors should be waited for to become readable and/or writable are done using gst_poll_fd_ctl_read(), gst_poll_fd_ctl_write() and gst_poll_fd_ctl_pri().

Use gst_poll_wait() to wait for the file descriptors to actually become readable and/or writable, or to timeout if no file descriptor is available in time. The wait can be controlled by calling gst_poll_restart() and gst_poll_set_flushing().

Once the file descriptor set has been waited for, one can use gst_poll_fd_has_closed() to see if the file descriptor has been closed, gst_poll_fd_has_error() to see if it has generated an error, gst_poll_fd_can_read() to see if it is possible to read from the file descriptor, and gst_poll_fd_can_write() to see if it is possible to write to it.