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.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.Poll.setControllable).
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.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.Poll.setControllable).
New file descriptors are added to the set using gst.poll.Poll.addFd, and removed using gst.poll.Poll.removeFd. Controlling which file descriptors should be waited for to become readable and/or writable are done using gst.poll.Poll.fdCtlRead, gst.poll.Poll.fdCtlWrite and gst.poll.Poll.fdCtlPri.
Use gst.poll.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.Poll.restart and gst.poll.Poll.setFlushing.
Once the file descriptor set has been waited for, one can use gst.poll.Poll.fdHasClosed to see if the file descriptor has been closed, gst.poll.Poll.fdHasError to see if it has generated an error, gst.poll.Poll.fdCanRead to see if it is possible to read from the file descriptor, and gst.poll.Poll.fdCanWrite to see if it is possible to write to it.