/* $Revision: 1.1 $  $Date: 2000/01/30 16:14:30 $ */

#include <windows.h>
#include <vfw.h>
#include "mex.h"

typedef struct node
{
	int number;              /* Unique identifier */
	PAVIFILE pfile;          /* File handle */
	PAVISTREAM psCompressed; /* Stream handle */
	struct node *next;
	struct node *previous;
} NodeType;

void aviopen(int nlhs,
                 mxArray *plhs[],
                 int nrhs,
                 const mxArray *prhs[]);

 
void addframe(int nlhs,
                 mxArray *plhs[],
                 int nrhs,
                 const mxArray *prhs[]);

void aviclose(int nlhs,
                 mxArray *plhs[],
                 int nrhs,
                 const mxArray *prhs[]);

void cleanList(void);

void InitNode(void);

int addNodetoList(PAVIFILE,PAVISTREAM);

NodeType *FindNodeInList(int);

void deleteNodeFromList(int);

void exitMex(void);