winspool/tests: Use 0xdeadbeef as magic value.
[wine.git] / dlls / mciavi32 / private_mciavi.h
blobaadcf6b980c9e2a4ee0cb5aba55f8dac2a89b4a2
1 /*
2 * Digital video MCI Wine Driver
4 * Copyright 1999, 2000 Eric POUECH
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_PRIVATE_MCIAVI_H
22 #define __WINE_PRIVATE_MCIAVI_H
24 #define COM_NO_WINDOWS_H
25 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30 #include "mmddk.h"
31 #include "digitalv.h"
32 #include "vfw.h"
33 #include "wownt32.h"
34 #include "mciavi.h"
36 struct MMIOPos {
37 DWORD dwOffset;
38 DWORD dwSize;
41 typedef struct {
42 MCIDEVICEID wDevID;
43 int nUseCount; /* Incremented for each shared open */
44 BOOL fShareable; /* TRUE if first open was shareable */
45 WORD wCommandTable; /* custom MCI command table */
46 DWORD dwStatus; /* One of MCI_MODE_XXX */
47 LPWSTR lpFileName;
48 DWORD dwMciTimeFormat; /* current time format */
49 DWORD dwSet; /* what's turned on: video & audio l&r */
50 /* information on the loaded AVI file */
51 HMMIO hFile; /* mmio file handle open as Element */
52 DWORD video_stream_n, audio_stream_n; /* stream #s */
53 MainAVIHeader mah;
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 */
64 HIC hic;
65 LPBITMAPINFOHEADER outbih;
66 LPVOID indata;
67 LPVOID outdata;
68 HBITMAP hbmFrame;
69 /* data for playing the audio part */
70 HANDLE hWave;
71 HANDLE hEvent; /* for synchronization */
72 LONG dwEventCount; /* for synchronization */
73 /* data for play back */
74 HWND hWnd, hWndPaint;
75 DWORD dwCachedFrame; /* buffered frame */
76 DWORD dwCurrVideoFrame; /* video frame to display and current position */
77 DWORD dwToVideoFrame; /* play to */
78 DWORD dwCurrAudioBlock; /* current audio block being played */
79 RECT source, dest;
80 /* data for the background mechanism */
81 CRITICAL_SECTION cs;
82 HANDLE hStopEvent;
83 HANDLE ack_event; /* acknowledge that an async command has started */
84 } WINE_MCIAVI;
86 extern HINSTANCE MCIAVI_hInstance;
88 /* info.c */
89 DWORD MCIAVI_ConvertFrameToTimeFormat(WINE_MCIAVI* wma, DWORD val, LPDWORD lpRet);
90 DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val);
91 DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms);
92 DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms);
93 DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms);
94 DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms);
96 /* mmoutput.c */
97 BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma);
98 DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr);
99 BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma);
100 void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr);
101 LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC);
103 /* mciavi.c */
104 WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID);
105 DWORD MCIAVI_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS);
107 /* wnd.c */
108 BOOL MCIAVI_RegisterClass(void);
109 BOOL MCIAVI_UnregisterClass(void);
110 BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms);
111 DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms);
112 DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms);
113 DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms);
115 #endif /* __WINE_PRIVATE_MCIAVI_H */