2 * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file grab_client.h exported symbols from grab_client.c */
11 * handle blocking writes for the grab client fds
13 * - pedantic: close fd if write would block
14 * - sloppy: ignore the data and do not write
15 * - aggressive: write anyway (default)
18 enum grab_mode
{GRAB_SLOPPY
, GRAB_AGGRESSIVE
, GRAB_PEDANTIC
};
20 /** describes one active grab client
22 * \sa filter_callback, filter_node::callbacks
25 /** the file descriptor to send the grabbed stream to */
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 */
31 /** non-zero if the write() to \a fd failed */
33 /** the number of the desired audio format, computed from command line */
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 */
41 /** pointers to the command line options */
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);