Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
framgrab.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/framgrab.h $*
26 * *
27 * Author:: Greg Hjelstrom *
28 * *
29 * $Modtime:: 1/08/01 10:04a $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37
38#if defined(_MSC_VER)
39#pragma once
40#endif
41
42#ifndef FRAMEGRAB_H
43#define FRAMEGRAB_H
44
45#ifndef ALWAYS_H
46#include "always.h"
47#endif
48
49#if defined (_MSC_VER)
50#pragma warning (push, 3) // (gth) system headers complain at warning level 4...
51#endif
52
53#ifndef _WINDOWS_
54#include "windows.h"
55#endif
56
57#ifndef _INC_WINDOWSX
58#include "windowsx.h"
59#endif
60
61#ifndef _INC_VFW
62#include "vfw.h"
63#endif
64
65#if defined (_MSC_VER)
66#pragma warning (pop)
67#endif
68
69// FramGrab.h: interface for the FrameGrabClass class.
70//
72
74{
75public:
76 enum MODE {
79 };
80
81 // depending on which mode you select, it will produce either frames or an AVI.
82 FrameGrabClass(const char *filename, MODE mode, int width, int height, int bitdepth, float framerate );
83
84 virtual ~FrameGrabClass();
85
86 void ConvertGrab(void *BitmapPointer);
87 void Grab(void *BitmapPointer);
88
89 long * GetBuffer() { return Bitmap; }
90 float GetFrameRate() { return FrameRate; }
91
92protected:
93 const char *Filename;
94 float FrameRate;
95
97 long Counter; // used for incrementing filename cunter, etc.
98
99 void GrabAVI(void *BitmapPointer);
100 void GrabRawFrame(void *BitmapPointer);
101
102 // avi settings
103 PAVIFILE AVIFile;
104 long *Bitmap;
105 PAVISTREAM Stream;
106 AVISTREAMINFO AVIStreamInfo;
107 BITMAPINFOHEADER BitmapInfoHeader;
108
109 // general purpose cleanup routine
110 void CleanupAVI();
111
112 // convert the SR image into AVI byte ordering
113 void ConvertFrame(void *BitmapPointer);
114
115};
116
117#endif
void GrabAVI(void *BitmapPointer)
Definition FramGrab.cpp:132
PAVISTREAM Stream
Definition framgrab.h:105
long * Bitmap
Definition framgrab.h:104
float FrameRate
Definition framgrab.h:94
PAVIFILE AVIFile
Definition framgrab.h:103
void ConvertGrab(void *BitmapPointer)
Definition FramGrab.cpp:151
FrameGrabClass(const char *filename, MODE mode, int width, int height, int bitdepth, float framerate)
Definition FramGrab.cpp:32
float GetFrameRate()
Definition framgrab.h:90
AVISTREAMINFO AVIStreamInfo
Definition framgrab.h:106
long * GetBuffer()
Definition framgrab.h:89
void GrabRawFrame(void *BitmapPointer)
Definition FramGrab.cpp:145
void CleanupAVI()
Definition FramGrab.cpp:123
BITMAPINFOHEADER BitmapInfoHeader
Definition framgrab.h:107
virtual ~FrameGrabClass()
Definition FramGrab.cpp:116
void Grab(void *BitmapPointer)
Definition FramGrab.cpp:158
const char * Filename
Definition framgrab.h:93
void ConvertFrame(void *BitmapPointer)
Definition FramGrab.cpp:167