summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/AviFile.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
commite33e19d0587146859d48a134ec9fd94e7b7ba5cd (patch)
tree69d048c8801858d2756ab3a487090a7a1b74bf14 /nGenEx/AviFile.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'nGenEx/AviFile.h')
-rw-r--r--nGenEx/AviFile.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/nGenEx/AviFile.h b/nGenEx/AviFile.h
new file mode 100644
index 0000000..495693a
--- /dev/null
+++ b/nGenEx/AviFile.h
@@ -0,0 +1,63 @@
+/* Project nGenEx
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: nGenEx.lib
+ FILE: AviFile.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ PCX image file loader
+*/
+
+#ifndef AviFile_h
+#define AviFile_h
+
+#include "Text.h"
+#include "Color.h"
+#include "Bitmap.h"
+#include "Geometry.h"
+
+// +--------------------------------------------------------------------+
+
+struct IAVIFile;
+struct IAVIStream;
+
+// +--------------------------------------------------------------------+
+
+class AviFile
+{
+public:
+ static const char* TYPENAME() { return "AviFile"; }
+
+ // open for reading:
+ AviFile(const char* fname);
+
+ // create for writing
+ AviFile(const char* fname, const Rect& rect, int frame_rate=30);
+ ~AviFile();
+
+ HRESULT AddFrame(const Bitmap& bmp);
+ HRESULT GetFrame(double seconds, Bitmap& bmp);
+
+private:
+ Text filename;
+ Rect rect;
+ int fps;
+ bool play;
+
+ IAVIFile* pfile; // created by CreateAvi
+ IAVIStream* ps;
+ IAVIStream* ps_comp; // video stream, when first created
+ DWORD frame_size; // total bytes per frame of video
+ DWORD nframe; // which frame will be added next
+ DWORD nsamp; // which sample will be added next
+ bool iserr; // if true, then no function will do anything
+};
+
+// +--------------------------------------------------------------------+
+
+
+#endif AviFile_h