2001-02-14 21:49:22 +00:00
|
|
|
/*
|
|
|
|
* Digital video MCI Wine Driver
|
|
|
|
*
|
|
|
|
* Copyright 1999, 2000 Eric POUECH
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2001-02-14 21:49:22 +00:00
|
|
|
*/
|
|
|
|
|
2002-10-17 16:43:42 +00:00
|
|
|
#ifndef __WINE_PRIVATE_MCIAVI_H
|
|
|
|
#define __WINE_PRIVATE_MCIAVI_H
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
2001-02-14 21:49:22 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "mmddk.h"
|
|
|
|
#include "digitalv.h"
|
|
|
|
#include "vfw.h"
|
2002-10-17 16:43:42 +00:00
|
|
|
#include "wownt32.h"
|
2001-02-14 21:49:22 +00:00
|
|
|
#include "mciavi.h"
|
|
|
|
|
|
|
|
struct MMIOPos {
|
|
|
|
DWORD dwOffset;
|
|
|
|
DWORD dwSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-09 22:26:25 +00:00
|
|
|
MCIDEVICEID wDevID;
|
2001-02-14 21:49:22 +00:00
|
|
|
int nUseCount; /* Incremented for each shared open */
|
2002-10-31 02:23:43 +00:00
|
|
|
BOOL fShareable; /* TRUE if first open was shareable */
|
2001-02-14 21:49:22 +00:00
|
|
|
WORD wCommandTable; /* custom MCI command table */
|
2005-02-09 22:26:25 +00:00
|
|
|
DWORD dwStatus; /* One of MCI_MODE_XXX */
|
|
|
|
LPWSTR lpFileName;
|
2001-02-14 21:49:22 +00:00
|
|
|
DWORD dwMciTimeFormat; /* current time format */
|
|
|
|
DWORD dwSet; /* what's turned on: video & audio l&r */
|
|
|
|
/* information on the loaded AVI file */
|
|
|
|
HMMIO hFile; /* mmio file handle open as Element */
|
2004-01-05 21:13:58 +00:00
|
|
|
DWORD video_stream_n, audio_stream_n; /* stream #s */
|
2001-02-14 21:49:22 +00:00
|
|
|
MainAVIHeader mah;
|
|
|
|
AVIStreamHeader ash_video;
|
|
|
|
AVIStreamHeader ash_audio;
|
|
|
|
LPBITMAPINFOHEADER inbih;
|
|
|
|
struct MMIOPos* lpVideoIndex;
|
|
|
|
LPWAVEFORMATEX lpWaveFormat;
|
|
|
|
struct MMIOPos* lpAudioIndex;
|
|
|
|
/* computed data from the file */
|
|
|
|
DWORD dwPlayableVideoFrames; /* max number of frames to be played. Takes care of truncated files and audio skew */
|
|
|
|
DWORD dwPlayableAudioBlocks;
|
|
|
|
/* data for the AVI decompressor */
|
|
|
|
HIC hic;
|
|
|
|
LPBITMAPINFOHEADER outbih;
|
|
|
|
LPVOID indata;
|
2002-05-31 23:06:46 +00:00
|
|
|
LPVOID outdata;
|
2001-02-14 21:49:22 +00:00
|
|
|
HBITMAP hbmFrame;
|
|
|
|
/* data for playing the audio part */
|
|
|
|
HANDLE hWave;
|
|
|
|
HANDLE hEvent; /* for synchronization */
|
2005-07-13 11:59:15 +00:00
|
|
|
LONG dwEventCount; /* for synchronization */
|
2001-02-14 21:49:22 +00:00
|
|
|
/* data for play back */
|
2003-12-31 19:00:03 +00:00
|
|
|
HWND hWnd, hWndPaint;
|
2004-03-01 23:38:25 +00:00
|
|
|
DWORD dwCachedFrame; /* buffered frame */
|
2001-02-14 21:49:22 +00:00
|
|
|
DWORD dwCurrVideoFrame; /* video frame to display and current position */
|
2004-03-19 19:15:03 +00:00
|
|
|
DWORD dwToVideoFrame; /* play to */
|
2001-02-14 21:49:22 +00:00
|
|
|
DWORD dwCurrAudioBlock; /* current audio block being played */
|
2004-01-01 00:48:01 +00:00
|
|
|
RECT source, dest;
|
2001-02-14 21:49:22 +00:00
|
|
|
/* data for the background mechanism */
|
|
|
|
CRITICAL_SECTION cs;
|
2004-03-01 23:38:25 +00:00
|
|
|
HANDLE hStopEvent;
|
2005-12-22 16:15:33 +00:00
|
|
|
HANDLE ack_event; /* acknowledge that an async command has started */
|
2001-02-14 21:49:22 +00:00
|
|
|
} WINE_MCIAVI;
|
|
|
|
|
|
|
|
extern HINSTANCE MCIAVI_hInstance;
|
|
|
|
|
|
|
|
/* info.c */
|
|
|
|
DWORD MCIAVI_ConvertFrameToTimeFormat(WINE_MCIAVI* wma, DWORD val, LPDWORD lpRet);
|
|
|
|
DWORD MCIAVI_ConvertTimeFormatToFrame(WINE_MCIAVI* wma, DWORD val);
|
|
|
|
DWORD MCIAVI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms);
|
2005-02-09 22:26:25 +00:00
|
|
|
DWORD MCIAVI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_DGV_INFO_PARMSW lpParms);
|
2001-02-14 21:49:22 +00:00
|
|
|
DWORD MCIAVI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SET_PARMS lpParms);
|
2005-02-09 22:26:25 +00:00
|
|
|
DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSW lpParms);
|
2001-02-14 21:49:22 +00:00
|
|
|
|
|
|
|
/* mmoutput.c */
|
|
|
|
BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma);
|
|
|
|
DWORD MCIAVI_OpenAudio(WINE_MCIAVI* wma, unsigned* nHdr, LPWAVEHDR* pWaveHdr);
|
|
|
|
BOOL MCIAVI_OpenVideo(WINE_MCIAVI* wma);
|
|
|
|
void MCIAVI_PlayAudioBlocks(WINE_MCIAVI* wma, unsigned nHdr, LPWAVEHDR waveHdr);
|
|
|
|
LRESULT MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC);
|
|
|
|
|
|
|
|
/* mciavi.c */
|
|
|
|
WINE_MCIAVI* MCIAVI_mciGetOpenDev(UINT wDevID);
|
2004-01-01 00:48:01 +00:00
|
|
|
DWORD MCIAVI_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS);
|
2001-02-14 21:49:22 +00:00
|
|
|
|
2004-01-06 20:39:48 +00:00
|
|
|
/* wnd.c */
|
|
|
|
BOOL MCIAVI_RegisterClass(void);
|
|
|
|
BOOL MCIAVI_UnregisterClass(void);
|
2005-02-09 22:26:25 +00:00
|
|
|
BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms);
|
2001-02-14 21:49:22 +00:00
|
|
|
DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms);
|
|
|
|
DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms);
|
2005-02-09 22:26:25 +00:00
|
|
|
DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms);
|
2002-09-06 19:41:17 +00:00
|
|
|
|
2002-10-17 16:43:42 +00:00
|
|
|
#endif /* __WINE_PRIVATE_MCIAVI_H */
|