1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
4 * Digital video MCI Wine Driver
6 * Copyright 1999, 2000 Eric POUECH
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_PRIVATE_MCIAVI_H
24 #define __WINE_PRIVATE_MCIAVI_H
26 #define COM_NO_WINDOWS_H
44 int nUseCount
; /* Incremented for each shared open */
45 BOOL fShareable
; /* TRUE if first open was shareable */
46 WORD wCommandTable
; /* custom MCI command table */
47 volatile DWORD dwStatus
; /* One of MCI_MODE_XXX */
48 MCI_OPEN_PARMSA openParms
;
49 DWORD dwMciTimeFormat
; /* current time format */
50 DWORD dwSet
; /* what's turned on: video & audio l&r */
51 /* information on the loaded AVI file */
52 HMMIO hFile
; /* mmio file handle open as Element */
54 AVIStreamHeader ash_video
;
55 AVIStreamHeader ash_audio
;
56 LPBITMAPINFOHEADER inbih
;
57 struct MMIOPos
* lpVideoIndex
;
58 LPWAVEFORMATEX lpWaveFormat
;
59 struct MMIOPos
* lpAudioIndex
;
60 /* computed data from the file */
61 DWORD dwPlayableVideoFrames
; /* max number of frames to be played. Takes care of truncated files and audio skew */
62 DWORD dwPlayableAudioBlocks
;
63 /* data for the AVI decompressor */
65 LPBITMAPINFOHEADER outbih
;
69 /* data for playing the audio part */
71 HANDLE hEvent
; /* for synchronization */
72 DWORD dwEventCount
; /* for synchronization */
73 /* data for play back */
75 DWORD dwCurrVideoFrame
; /* video frame to display and current position */
76 DWORD dwCurrAudioBlock
; /* current audio block being played */
77 /* data for the background mechanism */
81 extern HINSTANCE MCIAVI_hInstance
;
84 DWORD
MCIAVI_ConvertFrameToTimeFormat(WINE_MCIAVI
* wma
, DWORD val
, LPDWORD lpRet
);
85 DWORD
MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI
* wma
, DWORD val
);
86 DWORD
MCIAVI_mciGetDevCaps(UINT wDevID
, DWORD dwFlags
, LPMCI_GETDEVCAPS_PARMS lpParms
);
87 DWORD
MCIAVI_mciInfo(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_INFO_PARMSA lpParms
);
88 DWORD
MCIAVI_mciSet(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_SET_PARMS lpParms
);
89 DWORD
MCIAVI_mciStatus(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_STATUS_PARMSA lpParms
);
92 BOOL
MCIAVI_GetInfo(WINE_MCIAVI
* wma
);
93 DWORD
MCIAVI_OpenAudio(WINE_MCIAVI
* wma
, unsigned* nHdr
, LPWAVEHDR
* pWaveHdr
);
94 BOOL
MCIAVI_OpenVideo(WINE_MCIAVI
* wma
);
95 void MCIAVI_PlayAudioBlocks(WINE_MCIAVI
* wma
, unsigned nHdr
, LPWAVEHDR waveHdr
);
96 LRESULT
MCIAVI_DrawFrame(WINE_MCIAVI
* wma
);
97 LRESULT
MCIAVI_PaintFrame(WINE_MCIAVI
* wma
, HDC hDC
);
100 WINE_MCIAVI
* MCIAVI_mciGetOpenDev(UINT wDevID
);
103 BOOL
MCIAVI_CreateWindow(WINE_MCIAVI
* wma
, DWORD dwFlags
, LPMCI_DGV_OPEN_PARMSA lpOpenParms
);
104 DWORD
MCIAVI_mciPut(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_PUT_PARMS lpParms
);
105 DWORD
MCIAVI_mciWhere(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_RECT_PARMS lpParms
);
106 DWORD
MCIAVI_mciWindow(UINT wDevID
, DWORD dwFlags
, LPMCI_DGV_WINDOW_PARMSA lpParms
);
108 #endif /* __WINE_PRIVATE_MCIAVI_H */