1 #ifndef __videoreader_t__
2 #define __videoreader_t__
4 #define videoreader_getsamples(v, buffer, num) ((v)->getsamples((v),(buffer),(num)))
5 #define videoreader_getimage(v, buffer) ((v)->getimage((v),(buffer)))
6 #define videoreader_eof(v) ((v)->eof(v))
7 #define videoreader_setparameter(v,name,value) ((v)->setparameter((v),(name),(value)))
8 #define videoreader_close(v) ((v)->close(v))
10 typedef struct _videoreader_t
23 void (*setparameter) (struct _videoreader_t*, char*name, char*value);
24 int (*getsamples) (struct _videoreader_t*, void*buffer, int num);
25 int (*getimage) (struct _videoreader_t*, void*buffer); // buffer must hold width*height*4 bytes
26 bool (*eof) (struct _videoreader_t*);
27 void (*close) (struct _videoreader_t*);