|
Packit Service |
963350 |
/* GStreamer
|
|
Packit Service |
963350 |
* Copyright (C) 1999 Erik Walthinsen <omega@cse.ogi.edu>
|
|
Packit Service |
963350 |
* Copyright (C) 2004 Wim Taymans <wim.taymans@gmail.com>
|
|
Packit Service |
963350 |
* Copyright (C) 2007 Peter Kjellerstedt <pkj@axis.com>
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* gstpoll.h: File descriptor set
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
963350 |
* modify it under the terms of the GNU Library General Public
|
|
Packit Service |
963350 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
963350 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
963350 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
963350 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
963350 |
* Library General Public License for more details.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* You should have received a copy of the GNU Library General Public
|
|
Packit Service |
963350 |
* License along with this library; if not, write to the
|
|
Packit Service |
963350 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit Service |
963350 |
* Boston, MA 02110-1301, USA.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#ifndef __GST_POLL_H__
|
|
Packit Service |
963350 |
#define __GST_POLL_H__
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <glib.h>
|
|
Packit Service |
963350 |
#include <glib-object.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <gst/gstclock.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_BEGIN_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GstPoll:
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* A set of file/network descriptors.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
typedef struct _GstPoll GstPoll;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GstPollFD:
|
|
Packit Service |
963350 |
* @fd: a file descriptor
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* A file descriptor object.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
typedef struct {
|
|
Packit Service |
963350 |
int fd;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/*< private >*/
|
|
Packit Service |
963350 |
gint idx;
|
|
Packit Service |
963350 |
} GstPollFD;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GST_POLL_FD_INIT:
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* A #GstPollFD must be initialized with this macro, before it can be
|
|
Packit Service |
963350 |
* used. This macro can used be to initialize a variable, but it cannot
|
|
Packit Service |
963350 |
* be assigned to a variable. In that case you have to use
|
|
Packit Service |
963350 |
* gst_poll_fd_init().
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
#define GST_POLL_FD_INIT { -1, -1 }
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
GstPoll* gst_poll_new (gboolean controllable) G_GNUC_MALLOC;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
GstPoll* gst_poll_new_timer (void) G_GNUC_MALLOC;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_free (GstPoll *set);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_get_read_gpollfd (GstPoll *set, GPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_fd_init (GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_add_fd (GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_remove_fd (GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_ctl_write (GstPoll *set, GstPollFD *fd, gboolean active);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_ctl_read (GstPoll *set, GstPollFD *fd, gboolean active);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_fd_ignored (GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_has_closed (const GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_has_error (const GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_can_read (const GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_fd_can_write (const GstPoll *set, GstPollFD *fd);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gint gst_poll_wait (GstPoll *set, GstClockTime timeout);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_set_controllable (GstPoll *set, gboolean controllable);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_restart (GstPoll *set);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_poll_set_flushing (GstPoll *set, gboolean flushing);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_write_control (GstPoll *set);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_poll_read_control (GstPoll *set) G_GNUC_WARN_UNUSED_RESULT;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_END_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#endif /* __GST_POLL_H__ */
|