/* mediastreamer2 library - modular sound and video processing and streaming Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org) 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-1307, USA. */ #ifndef msfilter_h #define msfilter_h #include "mscommon.h" #include "msqueue.h" #include "allfilters.h" /** * @file msfilter.h * @brief mediastreamer2 msfilter.h include file * * This file provide the API needed to create, link, * unlink, find and destroy filter. * * It also provides definitions if you wish to implement * your own filters. * */ /** * @defgroup mediastreamer2_filter Filter API - manage mediastreamer2 filters. * @ingroup mediastreamer2_api * @{ */ /** * Structure for filter's methods (init, preprocess, process, postprocess, uninit). * @var MSFilterFunc */ typedef void (*MSFilterFunc)(struct _MSFilter *f); /** * Structure for filter's methods used to set filter's options. * @var MSFilterMethodFunc */ typedef int (*MSFilterMethodFunc)(struct _MSFilter *f, void *arg); /** * Structure for filter's methods used as a callback to notify events. * @var MSFilterNotifyFunc */ typedef void (*MSFilterNotifyFunc)(void *userdata, struct _MSFilter *f, unsigned int id, void *arg); struct _MSFilterMethod{ int id; MSFilterMethodFunc method; }; /** * Structure for holding filter's methods to set filter's options. * @var MSFilterMethod */ typedef struct _MSFilterMethod MSFilterMethod; enum _MSFilterCategory{ MS_FILTER_OTHER, MS_FILTER_ENCODER, MS_FILTER_DECODER }; /** * Structure to describe filter's category. *
 *     MS_FILTER_OTHER
 *     MS_FILTER_ENCODER
 *     MS_FILTER_DECODER
 * 
* @var MSFilterCategory */ typedef enum _MSFilterCategory MSFilterCategory; enum _MSFilterFlags{ MS_FILTER_IS_PUMP = 1 }; typedef enum _MSFilterFlags MSFilterFlags; struct _MSFilterStats{ const char *name; /*lock) #define ms_filter_unlock(f) ms_mutex_unlock(&(f)->lock) void ms_filter_unregister_all(void); #ifdef __cplusplus } #endif #include "msinterfaces.h" /* used by awk script in Makefile.am to generate alldescs.c */ #define MS_FILTER_DESC_EXPORT(desc) #endif