/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

  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. /* Captures uncompressed AVI from game view */
  20. #ifndef INC_C4Video
  21. #define INC_C4Video
  22. #include <C4Surface.h>
  23. // avoid pulling in vfw.h in every file
  24. struct IAVIFile;
  25. struct IAVIStream;
  26. class C4Video
  27. {
  28. public:
  29. C4Video();
  30. ~C4Video();
  31. protected:
  32. bool Active;
  33. IAVIFile * pAviFile;
  34. IAVIStream * pAviStream;
  35. int AviFrame;
  36. double AspectRatio;
  37. int X,Y,Width,Height;
  38. BYTE *Buffer;
  39. int BufferSize;
  40. int InfoSize;
  41. bool Recording;
  42. SURFACE Surface;
  43. int ShowFlash;
  44. public:
  45. void Draw();
  46. void Draw(C4TargetFacet &cgo);
  47. void Resize(int iChange);
  48. bool Start(const char *szFilename);
  49. void Default();
  50. void Init(SURFACE sfcSource, int iWidth=768, int iHeight=576);
  51. void Clear();
  52. bool Start();
  53. bool Stop();
  54. bool Toggle();
  55. void Execute();
  56. bool Reduce();
  57. bool Enlarge();
  58. protected:
  59. bool RecordFrame();
  60. bool AdjustPosition();
  61. };
  62. #endif