/* useropt.h
 *
 * MPEG2AVI
 * --------
 * v0.15    initial release
 *   drafted some simple structures to help manage & pass around
 *   user-options between the main-parser (mpeg2dec.c) and
 *   output routines (store.c, storeavi.c, etc.)
 *
 */

#ifndef _USER_OPTION
#define _USER_OPTION 1

#include<windows.h>
#define CHECKOPT(x)    (x.fValid==TRUE)
#define CLEAROPT(x)    {x.fValid=FALSE;x.data=0;x.data2=0;x.preset=0;x.cbAuxSize=0;x.pAuxData=NULL;}
#define SETOPT(x,y) {x.fValid=TRUE;x.data=y;}
#define GETOPT(x)       (x.data)
#define GETOPTAUX(x)       (x.data2)
#define SETOPTAUX(x,y) {x.fValid=TRUE;x.data2=y;}
struct UserOptionStruct
{
	BOOL fValid; /* is the data field valid? */
	long data;   /* data-field, payload */
	long data2;  /* auxdata field */
	long preset;   /* "default value" if !fValid */
	long cbAuxSize;/* size of auxiliary field */
	LPVOID pAuxData;
};

typedef struct UserOptionStruct tUserOption;

#endif