From 5a13c2785b4abae476a4205fe3272ee263c06d2d Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Wed, 28 May 2003 04:26:02 +0000 Subject: adding parameters api CVS patchset: 4966 CVS date: 2003/05/28 04:26:02 --- src/xine-engine/post.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index ebdb74288..71339584c 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.h,v 1.6 2003/05/20 13:50:57 mroi Exp $ + * $Id: post.h,v 1.7 2003/05/28 04:26:36 miguelfreitas Exp $ * * post plugin definitions * @@ -157,4 +157,23 @@ struct post_audio_port_s { * port functions can be replaced with own implementations */ post_audio_port_t *post_intercept_audio_port(post_plugin_t *post, xine_audio_port_t *port); + +/* macros to create parameter descriptors */ + +#define START_PARAM_DESCR( param_t ) \ +static param_t __temp_s; \ +static xine_post_api_parameter_t __temp_p[] = { + +#define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \ +{ param_type, "##var", sizeof(__temp_s.var), \ + (char *)&__temp_s.var-(char *)&__temp_s, enumv, min, max, readonly, descr }, + +#define END_PARAM_DESCR( name ) \ + { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \ +}; \ +static xine_post_api_descr_t name = { \ + sizeof( __temp_s ), \ + __temp_p \ +}; + #endif -- cgit v1.2.3