Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / mciavi32 / private_mciavi.h
blob548254c5a4ffb7e3b7b5b4898afd11378a75e608
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 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winuser.h"
29 #include "mmddk.h"
30 #include "digitalv.h"
31 #include "vfw.h"
32 #include "wownt32.h"
33 #include "mciavi.h"
35 struct MMIOPos {
36 DWORD dwOffset;
37 DWORD dwSize;
40 typedef struct {
41 MCIDEVICEID wDevID;
42 int nUseCount; /* Incremented for each shared open */
43 BOOL fShareable; /* TRUE if first open was shareable */
44 WORD wCommandTable; /* custom MCI command table */
45 DWORD dwStatus; /* One of MCI_MODE_XXX */
46 LPWSTR lpFileName;
47 DWORD dwMciTimeFormat; /* current time format */
48 DWORD dwSet; /* what's turned on: video & audio l&r */
49 /* information on the loaded AVI file */
50 HMMIO hFile; /* mmio file handle open as Element */
51 DWORD video_stream_n, audio_stream_n; /* stream #s */
52 MainAVIHeader mah;
53 AVIStreamHeader ash_video;
54 AVIStreamHeader ash_audio;
55 LPBITMAPINFOHEADER inbih;
56 struct MMIOPos* lpVideoIndex;
57 LPWAVEFORMATEX lpWaveFormat;
58 struct MMIOPos* lpAudioIndex;
59 /* computed data from the file */
60 DWORD dwPlayableVideoFrames; /* max number of frames to be played. Takes care of truncated files and audio skew */
61 DWORD dwPlayableAudioBlocks;
62 /* data for the AVI decompressor */
63 HIC hic;
64 LPBITMAPINFOHEADER outbih;
65 LPVOID indata;
66 LPVOID outdata;
67 HBITMAP hbmFrame;
68 /* data for playing the audio part */
69 HANDLE hWave;
70 HANDLE hEvent; /* for synchronization */
71 LONG dwEventCount; /* for synchronization */
72 /* data for play back */
73 HWND hWnd, hWndPaint;
74 DWORD dwCachedFrame; /* buffered frame */
75 DWORD dwCurrVideoFrame; /* video frame to display and current position */
76 DWORD dwToVideoFrame; /* play to */
77 DWORD dwCurrAudioBlock; /* current audio block being played */
78 RECT source, dest;
79 /* data for the background mechanism */
80 CRITICAL_SECTION cs;
81 HANDLE hStopEvent;
82 HANDLE ack_event; /* acknowledge that an async command has started */
83 } WINE_MCIAVI;
85 extern HINSTANCE MCIAVI_hInstance;
87 /* info.c */
88 DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val);
89 DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms);
90 DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms);
91 DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms);
92 DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms);
94 /* mmoutput.c */
95 BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma);
96 DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr);
97 BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma);
98 void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr);
99 LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC);
101 /* mciavi.c */
102 WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID);
103 DWORD MCIAVI_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS);
105 /* wnd.c */
106 BOOL MCIAVI_RegisterClass(void);
107 BOOL MCIAVI_UnregisterClass(void);
108 BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms);
109 DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms);
110 DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms);
111 DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms);
113 #endif /* __WINE_PRIVATE_MCIAVI_H */