mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
poll: add method to get a GPollFD
This commit is contained in:
parent
22fa4470e2
commit
35d10af06d
4 changed files with 25 additions and 0 deletions
|
@ -1898,6 +1898,7 @@ gst_poll_fd_init
|
||||||
gst_poll_free
|
gst_poll_free
|
||||||
gst_poll_new
|
gst_poll_new
|
||||||
gst_poll_new_timer
|
gst_poll_new_timer
|
||||||
|
gst_poll_get_read_gpollfd
|
||||||
gst_poll_remove_fd
|
gst_poll_remove_fd
|
||||||
gst_poll_restart
|
gst_poll_restart
|
||||||
gst_poll_set_controllable
|
gst_poll_set_controllable
|
||||||
|
|
|
@ -666,6 +666,27 @@ gst_poll_free (GstPoll * set)
|
||||||
g_slice_free (GstPoll, set);
|
g_slice_free (GstPoll, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_poll_get_read_gpollfd:
|
||||||
|
* @set: a #GstPoll
|
||||||
|
* @fd: a #GPollFD
|
||||||
|
*
|
||||||
|
* Get a GPollFD for the reading part of the control socket. This is useful when
|
||||||
|
* integrating with a GSource and GMainLoop.
|
||||||
|
*
|
||||||
|
* Since: 0.10.32
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_poll_get_read_gpollfd (GstPoll * set, GPollFD * fd)
|
||||||
|
{
|
||||||
|
g_return_if_fail (set != NULL);
|
||||||
|
g_return_if_fail (fd != NULL);
|
||||||
|
|
||||||
|
fd->fd = set->control_read_fd.fd;
|
||||||
|
fd->events = G_IO_IN | G_IO_HUP | G_IO_ERR;
|
||||||
|
fd->revents = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_poll_fd_init:
|
* gst_poll_fd_init:
|
||||||
* @fd: a #GstPollFD
|
* @fd: a #GstPollFD
|
||||||
|
|
|
@ -67,6 +67,8 @@ GstPoll* gst_poll_new (gboolean controllable);
|
||||||
GstPoll* gst_poll_new_timer (void);
|
GstPoll* gst_poll_new_timer (void);
|
||||||
void gst_poll_free (GstPoll *set);
|
void gst_poll_free (GstPoll *set);
|
||||||
|
|
||||||
|
void gst_poll_get_read_gpollfd (GstPoll *set, GPollFD *fd);
|
||||||
|
|
||||||
void gst_poll_fd_init (GstPollFD *fd);
|
void gst_poll_fd_init (GstPollFD *fd);
|
||||||
|
|
||||||
gboolean gst_poll_add_fd (GstPoll *set, GstPollFD *fd);
|
gboolean gst_poll_add_fd (GstPoll *set, GstPollFD *fd);
|
||||||
|
|
|
@ -788,6 +788,7 @@ EXPORTS
|
||||||
gst_poll_fd_ignored
|
gst_poll_fd_ignored
|
||||||
gst_poll_fd_init
|
gst_poll_fd_init
|
||||||
gst_poll_free
|
gst_poll_free
|
||||||
|
gst_poll_get_read_gpollfd
|
||||||
gst_poll_new
|
gst_poll_new
|
||||||
gst_poll_new_timer
|
gst_poll_new_timer
|
||||||
gst_poll_read_control
|
gst_poll_read_control
|
||||||
|
|
Loading…
Reference in a new issue