PageRenderTime 59ms CodeModel.GetById 14ms app.highlight 40ms RepoModel.GetById 1ms app.codeStats 0ms

/src/platform/C4Video.h

https://bitbucket.org/randrian/openclonk2
C Header | 68 lines | 42 code | 6 blank | 20 comment | 0 complexity | bd5a039334517f91e8fd03efd82536aa MD5 | raw file
Possible License(s): WTFPL, 0BSD, LGPL-2.1, CC-BY-3.0
 1/*
 2 * OpenClonk, http://www.openclonk.org
 3 *
 4 * Copyright (c) 1998-2000  Matthes Bender
 5 * Copyright (c) 2005  G?nther Brammer
 6 * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
 7 *
 8 * Portions might be copyrighted by other authors who have contributed
 9 * to OpenClonk.
10 *
11 * Permission to use, copy, modify, and/or distribute this software for any
12 * purpose with or without fee is hereby granted, provided that the above
13 * copyright notice and this permission notice appear in all copies.
14 * See isc_license.txt for full license and disclaimer.
15 *
16 * "Clonk" is a registered trademark of Matthes Bender.
17 * See clonk_trademark_license.txt for full license.
18 */
19
20/* Captures uncompressed AVI from game view */
21
22#ifndef INC_C4Video
23#define INC_C4Video
24
25#include <C4Surface.h>
26
27// avoid pulling in vfw.h in every file
28struct IAVIFile;
29struct IAVIStream;
30
31class C4Video
32	{
33	public:
34		C4Video();
35		~C4Video();
36	protected:
37		bool Active;
38		IAVIFile *  pAviFile;
39		IAVIStream * pAviStream;
40		int AviFrame;
41		double AspectRatio;
42		int X,Y,Width,Height;
43		BYTE *Buffer;
44		int BufferSize;
45		int InfoSize;
46		bool Recording;
47		SURFACE Surface;
48		int ShowFlash;
49	public:
50		void Draw();
51		void Draw(C4TargetFacet &cgo);
52		void Resize(int iChange);
53		bool Start(const char *szFilename);
54		void Default();
55		void Init(SURFACE sfcSource, int iWidth=768, int iHeight=576);
56		void Clear();
57		bool Start();
58		bool Stop();
59		bool Toggle();
60		void Execute();
61		bool Reduce();
62		bool Enlarge();
63	protected:
64		bool RecordFrame();
65		bool AdjustPosition();
66	};
67
68#endif