2 * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
19 /** \file grab_client.h exported symbols from grab_client.c */
23 * handle blocking writes for the grab client fds
25 * - pedantic: close fd if write would block
26 * - sloppy: ignore the data and do not write
27 * - aggressive: write anyway (default)
30 enum grab_mode {GRAB_PEDANTIC, GRAB_SLOPPY, GRAB_AGGRESSIVE};
32 /** describes one active grab client
34 * \sa filter_callback, filter_node::callbacks
37 /** the file descriptor to send the grabbed stream to */
39 /** the command line options for this grab client */
40 struct grab_client_args_info *conf;
41 /** pedantic, sloppy, or aggressive, computed from command line */
43 /** non-zero if the write() to \a fd failed */
45 /** the number of the desired audio format, computed from command line */
47 /** the callback data which gets attached to a suitable filter_node */
48 struct filter_callback fcb;
49 /** all grab clients belong either to a filter node or to the inactive list */
50 struct list_head node;
51 /** the number of command line options */
53 /** pointers to the command line options */
57 __malloc struct grab_client *grab_client_new(int fd, int argc, char **argv, int *err);
58 void activate_inactive_grab_clients(int slot, int audio_format_num, struct list_head *filter_list);
59 void activate_grab_client(struct grab_client *gc, struct filter_node *fn);
60 void init_grabbing(void);