compress filter: Fix parsing of the amplification string.
[paraslash.git] / grab_client.h
1 /*
2 * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file grab_client.h exported symbols from grab_client.c */
8
9 #include "config.h"
10 /**
11 * handle blocking writes for the grab client fds
12 *
13 * - pedantic: close fd if write would block
14 * - sloppy: ignore the data and do not write
15 * - aggressive: write anyway (default)
16 *
17 */
18 enum grab_mode {GRAB_SLOPPY, GRAB_AGGRESSIVE, GRAB_PEDANTIC};
19
20 /** describes one active grab client
21 *
22 * \sa filter_callback, filter_node::callbacks
23 */
24 struct grab_client {
25 /** the file descriptor to send the grabbed stream to */
26 int fd;
27 /** the command line options for this grab client */
28 struct grab_client_args_info *conf;
29 /** pedantic, sloppy, or aggressive, computed from command line */
30 enum grab_mode mode;
31 /** non-zero if the write() to \a fd failed */
32 int error;
33 /** the number of the desired audio format, computed from command line */
34 int audio_format_num;
35 /** the callback data which gets attached to a suitable filter_node */
36 struct filter_callback fcb;
37 /** all grab clients belong either to a filter node or to the inactive list */
38 struct list_head node;
39 /** the number of command line options */
40 int argc;
41 /** pointers to the command line options */
42 char **argv;
43 };
44
45 __malloc struct grab_client *grab_client_new(int fd, char *line, int *err);
46 void activate_inactive_grab_clients(int slot_num, int audio_format_num,
47 struct filter_chain *fc);
48 void activate_grab_client(struct grab_client *gc, struct filter_node *fn);
49 void init_grabbing(void);