fix crashes reported by Debian Cylab Mayhem Team
[swftools.git] / avi2swf / videoreader.h
blob9392d8ca7165ddd9ae9375ac5f58c39ec25e1dcc
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 samplerate;
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 void (*close) (struct _videoreader_t*);
31 } videoreader_t;
34 #endif