X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=grab_client.h;h=75ba4c9183c58ab40ef910650136f2ebc38bad47;hp=8cc0a20331b3ea781d671a2b64fdcdcb1fb306e4;hb=d96c06ff93493c125b9f4d36655e77d7029ca309;hpb=c6a9d624a8e7334b08dbd0acf8c7df016044cb9e diff --git a/grab_client.h b/grab_client.h index 8cc0a203..75ba4c91 100644 --- a/grab_client.h +++ b/grab_client.h @@ -1,60 +1,10 @@ /* * Copyright (C) 2006 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file grab_client.h exported symbols from grab_client.c */ -#include "config.h" -/** - * handle blocking writes for the grab client fds - * - * - pedantic: close fd if write would block - * - sloppy: ignore the data and do not write - * - aggressive: write anyway (default) - * - */ -enum grab_mode {GRAB_SLOPPY, GRAB_AGGRESSIVE, GRAB_PEDANTIC}; - -/** describes one active grab client - * - * \sa filter_callback, filter_node::callbacks - */ -struct grab_client { -/** the file descriptor to send the grabbed stream to */ - int fd; -/** the command line options for this grab client */ - struct grab_client_args_info *conf; -/** pedantic, sloppy, or aggressive, computed from command line */ - enum grab_mode mode; -/** non-zero if the write() to \a fd failed */ - int error; -/** the number of the desired audio format, computed from command line */ - int audio_format_num; -/** the callback data which gets attached to a suitable filter_node */ - struct filter_callback fcb; -/** all grab clients belong either to a filter node or to the inactive list */ - struct list_head node; -/** the number of command line options */ - int argc; -/** pointers to the command line options */ - char **argv; -}; - -__malloc struct grab_client *grab_client_new(int fd, int argc, char **argv, int *err); -void activate_inactive_grab_clients(int slot, int audio_format_num, struct list_head *filter_list); -void activate_grab_client(struct grab_client *gc, struct filter_node *fn); -void init_grabbing(void); +int grab_client_new(int fd, int argc, char **argv); +void activate_grab_clients(void);