mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
Add INIT macro and _init method for initializing the GstPollFD.
Original commit message from CVS: * docs/gst/gstreamer-sections.txt: * gst/gstpoll.c: (gst_poll_fd_init): * gst/gstpoll.h: Add INIT macro and _init method for initializing the GstPollFD.
This commit is contained in:
parent
4c31dc7cc4
commit
3ae60c3b9d
4 changed files with 37 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
* gst/gstpoll.c: (gst_poll_fd_init):
|
||||
* gst/gstpoll.h:
|
||||
Add INIT macro and _init method for initializing the GstPollFD.
|
||||
|
||||
2008-02-28 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* plugins/elements/gstfdsink.c: (gst_fd_sink_start),
|
||||
|
|
|
@ -1610,6 +1610,7 @@ gst_rank_get_type
|
|||
GstPoll
|
||||
GstPollFD
|
||||
GstPollMode
|
||||
GST_POLL_FD_INIT
|
||||
gst_poll_add_fd
|
||||
gst_poll_fd_can_read
|
||||
gst_poll_fd_can_write
|
||||
|
@ -1617,6 +1618,7 @@ gst_poll_fd_ctl_read
|
|||
gst_poll_fd_ctl_write
|
||||
gst_poll_fd_has_closed
|
||||
gst_poll_fd_has_error
|
||||
gst_poll_fd_init
|
||||
gst_poll_free
|
||||
gst_poll_get_mode
|
||||
gst_poll_new
|
||||
|
|
|
@ -365,6 +365,22 @@ gst_poll_get_mode (const GstPoll * set)
|
|||
return mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_poll_fd_init:
|
||||
* @fd: a #GstPollFD
|
||||
*
|
||||
* Initializes @fd. Alternatively you can initialize it with
|
||||
* #GST_POLL_FD_INIT.
|
||||
*/
|
||||
void
|
||||
gst_poll_fd_init (GstPollFD * fd)
|
||||
{
|
||||
g_return_if_fail (fd != NULL);
|
||||
|
||||
fd->fd = -1;
|
||||
fd->idx = -1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_poll_add_fd_unlocked (GstPoll * set, GstPollFD * fd)
|
||||
{
|
||||
|
|
|
@ -51,6 +51,16 @@ typedef struct {
|
|||
gint idx;
|
||||
} GstPollFD;
|
||||
|
||||
/**
|
||||
* GST_POLL_FD_INIT:
|
||||
*
|
||||
* A #GstPollFD must be initialized with this macro, before it can be
|
||||
* used. This macro can used be to initialize a variable, but it cannot
|
||||
* be assigned to a variable. In that case you have to use
|
||||
* gst_poll_fd_init().
|
||||
*/
|
||||
#define GST_POLL_FD_INIT { -1, -1 }
|
||||
|
||||
/**
|
||||
* GstPollMode:
|
||||
* @GST_POLL_MODE_AUTO: choose method automatically
|
||||
|
@ -75,6 +85,8 @@ void gst_poll_free (GstPoll *set);
|
|||
void gst_poll_set_mode (GstPoll *set, GstPollMode mode);
|
||||
GstPollMode gst_poll_get_mode (const GstPoll *set);
|
||||
|
||||
void gst_poll_fd_init (GstPollFD *fd);
|
||||
|
||||
gboolean gst_poll_add_fd (GstPoll *set, GstPollFD *fd);
|
||||
gboolean gst_poll_remove_fd (GstPoll *set, GstPollFD *fd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue