MCIMOVIE.H 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. ** Command & Conquer Red Alert(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. #ifndef _MCIMOVIE_H_
  19. #define _MCIMOVIE_H_
  20. #include "function.h"
  21. #ifdef MCIMPEG
  22. #include <windows.h>
  23. #include <windowsx.h>
  24. #include <mmsystem.h>
  25. #include <digitalv.h>
  26. #include "watcom.h"
  27. class MCIMovie
  28. {
  29. public:
  30. MCIMovie(HWND mainWindow);
  31. ~MCIMovie();
  32. bool Open(const char* name, const char* device);
  33. bool Play(HWND window);
  34. bool Pause(void);
  35. bool Close(void);
  36. LONG GetWidth(void)
  37. {return ((mDeviceID) ? mWidth : 0);}
  38. LONG GetHeight(void)
  39. {return ((mDeviceID) ? mHeight : 0);}
  40. protected:
  41. HWND mMainWindow; // Application window
  42. HWND mMCIWindow; // Callback window
  43. char *mName;
  44. UINT mDeviceID;
  45. MCI_OPEN_PARMS mOpenParm;
  46. MCI_PLAY_PARMS mPlayParm;
  47. // Video stream dimension
  48. LONG mWidth, mHeight;
  49. private:
  50. bool SizeDestination(void);
  51. bool AttachWindow(HWND window);
  52. static int mRegistered;
  53. static WNDCLASS mWndClass;
  54. static HINSTANCE mInstance;
  55. };
  56. #endif // MCIMPEG
  57. #endif // _MCIMOVIE_H_