From: kramm Date: Wed, 31 Mar 2004 13:08:27 +0000 (+0000) Subject: moved out from v2swf.c X-Git-Tag: stable_core_1~25 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=6e989ddbb49ea026f08cdd43af7784c43bb9ffd6;p=swftools.git moved out from v2swf.c --- diff --git a/avi2swf/videoreader.h b/avi2swf/videoreader.h new file mode 100644 index 0000000..b994844 --- /dev/null +++ b/avi2swf/videoreader.h @@ -0,0 +1,32 @@ +#ifndef __videoreader_t__ +#define __videoreader_t__ + +#define videoreader_getsamples(v, buffer, num) ((v)->getsamples((v),(buffer),(num))) +#define videoreader_getimage(v, buffer) ((v)->getimage((v),(buffer))) +#define videoreader_eof(v) ((v)->eof(v)) +#define videoreader_setparameter(v,name,value) ((v)->setparameter((v),(name),(value))) +#define videoreader_close(v) ((v)->close(v)) + +typedef struct _videoreader_t +{ + void*internal; + + /* video */ + int width; + int height; + double fps; + + /* audio */ + int channels; + int rate; + + void (*setparameter) (struct _videoreader_t*, char*name, char*value); + int (*getsamples) (struct _videoreader_t*, void*buffer, int num); + int (*getimage) (struct _videoreader_t*, void*buffer); // buffer must hold width*height*4 bytes + bool (*eof) (struct _videoreader_t*); + void (*close) (struct _videoreader_t*); + +} videoreader_t; + + +#endif