moved out from v2swf.c
authorkramm <kramm>
Wed, 31 Mar 2004 13:08:27 +0000 (13:08 +0000)
committerkramm <kramm>
Wed, 31 Mar 2004 13:08:27 +0000 (13:08 +0000)
avi2swf/videoreader.h [new file with mode: 0644]

diff --git a/avi2swf/videoreader.h b/avi2swf/videoreader.h
new file mode 100644 (file)
index 0000000..b994844
--- /dev/null
@@ -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