added boolean again.
[swftools.git] / avi2swf / videoreader.h
blob73799a2a0cdcf735e89234f6ecf29b008830e08e
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
12 void*internal;
14 /* video */
15 int width;
16 int height;
17 double fps;
19 /* audio */
20 int channels;
21 int rate;
23 /* progress */
24 int frame;
26 void (*setparameter) (struct _videoreader_t*, char*name, char*value);
27 int (*getsamples) (struct _videoreader_t*, void*buffer, int num);
28 int (*getimage) (struct _videoreader_t*, void*buffer); // buffer must hold width*height*4 bytes
29 bool (*eof) (struct _videoreader_t*);
30 void (*close) (struct _videoreader_t*);
32 } videoreader_t;
35 #endif