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