MCIMOVIE.H 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. #ifndef _MCIMOVIE_H_
  15. #define _MCIMOVIE_H_
  16. #include "function.h"
  17. #ifdef MCIMPEG
  18. #include <windows.h>
  19. #include <windowsx.h>
  20. #include <mmsystem.h>
  21. #include <digitalv.h>
  22. #include "watcom.h"
  23. class MCIMovie
  24. {
  25. public:
  26. MCIMovie(HWND mainWindow);
  27. ~MCIMovie();
  28. bool Open(const char* name, const char* device);
  29. bool Play(HWND window);
  30. bool Pause(void);
  31. bool Close(void);
  32. LONG GetWidth(void)
  33. {return ((mDeviceID) ? mWidth : 0);}
  34. LONG GetHeight(void)
  35. {return ((mDeviceID) ? mHeight : 0);}
  36. protected:
  37. HWND mMainWindow; // Application window
  38. HWND mMCIWindow; // Callback window
  39. char *mName;
  40. UINT mDeviceID;
  41. MCI_OPEN_PARMS mOpenParm;
  42. MCI_PLAY_PARMS mPlayParm;
  43. // Video stream dimension
  44. LONG mWidth, mHeight;
  45. private:
  46. bool SizeDestination(void);
  47. bool AttachWindow(HWND window);
  48. static int mRegistered;
  49. static WNDCLASS mWndClass;
  50. static HINSTANCE mInstance;
  51. };
  52. #endif // MCIMPEG
  53. #endif // _MCIMOVIE_H_