CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

MCIMOVIE.H (1793B)


      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 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 #ifndef _MCIMOVIE_H_
     17 #define _MCIMOVIE_H_
     18 
     19 #include "function.h"
     20 
     21 #ifdef MCIMPEG
     22 #include <windows.h>
     23 #include <windowsx.h>
     24 #include <mmsystem.h>
     25 #include <digitalv.h>
     26 #include "watcom.h"
     27 
     28 class MCIMovie
     29 	{
     30 	public:
     31 		MCIMovie(HWND mainWindow);
     32 		~MCIMovie();
     33 
     34 		bool Open(const char* name, const char* device);
     35 		bool Play(HWND window);
     36 		bool Pause(void);
     37 		bool Close(void);
     38 
     39 		LONG GetWidth(void)
     40 			{return ((mDeviceID) ? mWidth : 0);}
     41 
     42 		LONG GetHeight(void)
     43 			{return ((mDeviceID) ? mHeight : 0);}
     44 
     45 	protected:
     46 		HWND mMainWindow; // Application window
     47 		HWND mMCIWindow; // Callback window
     48 		char *mName;
     49 		UINT mDeviceID;
     50 		MCI_OPEN_PARMS mOpenParm;
     51 		MCI_PLAY_PARMS mPlayParm;
     52 
     53 		// Video stream dimension
     54 		LONG mWidth, mHeight;
     55 
     56 	private:
     57 		bool SizeDestination(void);
     58 		bool AttachWindow(HWND window);
     59 
     60 		static int mRegistered;
     61 		static WNDCLASS mWndClass;
     62 		static HINSTANCE mInstance;
     63 	};
     64 
     65 #endif // MCIMPEG
     66 #endif // _MCIMOVIE_H_