Commit a1491dea authored by Bradley Baetz's avatar Bradley Baetz Committed by Alexandre Julliard

Implemented a large number of the msvideo dll routines.

parent 19cef6ca
*.glue.c
*.spec.c
*.spec.glue.s
Makefile
......
......@@ -8,7 +8,10 @@ ALTNAMES = msvideo
IMPORTS = winmm
C_SRCS = \
msvideo_main.c
msvideo_main.c \
drawdib.c
GLUE = msvideo_main.c
@MAKE_DLL_RULES@
......
......@@ -10,16 +10,16 @@ import winmm.dll
3 stdcall DrawDibBegin(long long long long ptr long long long) DrawDibBegin
4 stub DrawDibChangePalette
5 stdcall DrawDibClose(long) DrawDibClose
6 stub DrawDibDraw
7 stub DrawDibEnd
6 stdcall DrawDibDraw(long long long long long long ptr ptr long long long long long) DrawDibDraw
7 stdcall DrawDibEnd(long) DrawDibEnd
8 stub DrawDibGetBuffer
9 stub DrawDibGetPalette
9 stdcall DrawDibGetPalette(long) DrawDibGetPalette
10 stdcall DrawDibOpen() DrawDibOpen
11 stub DrawDibProfileDisplay
12 stdcall DrawDibRealize(long long long) DrawDibRealize
13 stdcall DrawDibSetPalette(long long) DrawDibSetPalette
14 stub DrawDibStart
15 stub DrawDibStop
14 stdcall DrawDibStart(long long) DrawDibStart
15 stdcall DrawDibStop(long) DrawDibStop
16 stub DrawDibTime
17 stub GetOpenFileNamePreview
18 stub GetOpenFileNamePreviewA
......
......@@ -26,36 +26,36 @@ type win16
52 stub VIDEOSTREAMALLOCHDRANDBUFFER
53 stub VIDEOSTREAMFREEHDRANDBUFFER
60 stub VIDEOMESSAGE
102 stub DRAWDIBOPEN
103 stub DRAWDIBCLOSE
104 stub DRAWDIBBEGIN
105 stub DRAWDIBEND
106 stub DRAWDIBDRAW
108 stub DRAWDIBGETPALETTE
110 stub DRAWDIBSETPALETTE
102 pascal16 DrawDibOpen() DrawDibOpen16
103 pascal16 DrawDibClose(word) DrawDibClose16
104 pascal16 DrawDibBegin(word word s_word s_word ptr s_word s_word word) DrawDibBegin16
105 pascal16 DrawDibEnd(word) DrawDibEnd16
106 pascal16 DrawDibDraw(word word s_word s_word s_word s_word ptr ptr s_word s_word s_word s_word word) DrawDibDraw16
108 pascal16 DrawDibGetPalette(word) DrawDibGetPalette16
110 pascal16 DrawDibSetPalette(word word) DrawDibSetPalette16
111 stub DRAWDIBCHANGEPALETTE
112 stub DRAWDIBREALIZE
112 pascal16 DrawDibRealize(word word word) DrawDibRealize16
113 stub DRAWDIBTIME
114 stub DRAWDIBPROFILEDISPLAY
115 stub STRETCHDIB
118 stub DRAWDIBSTART
119 stub DRAWDIBSTOP
118 pascal16 DrawDibStart(word long) DrawDibStart16
119 pascal16 DrawDibStop(word) DrawDibStop16
120 stub DRAWDIBGETBUFFER
200 stub ICINFO
200 pascal16 ICInfo(long long segptr) ICInfo16
201 stub ICINSTALL
202 stub ICREMOVE
203 stub ICOPEN
204 stub ICCLOSE
205 stub ICSENDMESSAGE
206 stub ICOPENFUNCTION
207 stub _ICMESSAGE
212 stub ICGETINFO
213 stub ICLOCATE
224 stub _ICCOMPRESS
230 stub _ICDECOMPRESS
232 stub _ICDRAWBEGIN
234 stub _ICDRAW
239 stub ICGETDISPLAYFORMAT
203 pascal16 ICOpen(long long word) ICOpen16
204 pascal ICClose(word) ICClose16
205 pascal ICSendMessage(word word long long) ICSendMessage16
206 pascal16 ICOpenFunction(long long word segptr) ICOpenFunction16
207 pascal _ICMessage() ICMessage16
212 pascal ICGetInfo(word segptr long) ICGetInfo16
213 pascal16 ICLocate(long long ptr ptr word) ICLocate16
224 cdecl _ICCompress(word long segptr segptr segptr segptr segptr segptr long long long segptr segptr) ICCompress16
230 cdecl _ICDecompress(word long segptr segptr segptr segptr) ICDecompress16
232 cdecl _ICDrawBegin(word long word word word s_word s_word s_word s_word segptr s_word s_word s_word s_word long long) ICDrawBegin16
234 cdecl _ICDraw(word long segptr segptr long long) ICDraw16
239 pascal16 ICGetDisplayFormat(word ptr ptr s_word s_word s_word) ICGetDisplayFormat16
240 stub ICIMAGECOMPRESS
241 stub ICIMAGEDECOMPRESS
242 stub ICCOMPRESSORCHOOSE
......
......@@ -10,13 +10,9 @@
#define VFWAPI WINAPI
#define VFWAPIV WINAPIV
typedef HANDLE16 HDRAWDIB16;
typedef HANDLE HDRAWDIB;
BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, HDC hdc, INT dxDest, INT dyDest, LPBITMAPINFOHEADER lpbi, INT dxSrc, INT dySrc, UINT wFlags);
BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
HDRAWDIB VFWAPI DrawDibOpen(void);
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCSTR szFile);
HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile);
#define MCIWndCreate WINELIB_NAME_AW(MCIWndCreate)
......@@ -42,7 +38,7 @@ typedef struct IAVIStream IAVIStream,*PAVISTREAM;
typedef struct IAVIFile IAVIFile,*PAVIFILE;
typedef struct IGetFrame IGetFrame,*PGETFRAME;
/* Installable Compressor M? */
/* Installable Compressor Manager */
DECLARE_HANDLE(HIC);
......@@ -162,6 +158,11 @@ typedef struct tagWINE_HIC {
/* structs */
/* NOTE: Only the 16 bit structs are packed. Structs that are packed anyway
* have not been changed. If a structure is later extended, you may need to create
* two versions of it.
*/
typedef struct {
DWORD dwSize; /* 00: size */
DWORD fccType; /* 04: type 'vidc' usually */
......@@ -278,6 +279,25 @@ typedef struct {
/* 238: */
} ICINFO;
#include "pshpack1.h"
typedef struct {
DWORD dwSize;
DWORD fccType;
DWORD fccHandler;
DWORD dwFlags;
DWORD dwVersion;
DWORD dwVersionICM;
/*
* under Win16, normal chars are used
*/
CHAR szName[16];
CHAR szDescription[128];
CHAR szDriver[128];
} ICINFO16;
#include "poppack.h"
/* ICINFO.dwFlags */
#define VIDCF_QUALITY 0x0001 /* supports quality */
#define VIDCF_CRUNCH 0x0002 /* supports crunching to a frame size */
......@@ -343,8 +363,29 @@ typedef struct {
INT dySrc;
} ICDECOMPRESSEX;
DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
#include "pshpack1.h"
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiSrc;
LPVOID lpSrc;
LPBITMAPINFOHEADER lpbiDst;
LPVOID lpDst;
INT16 xDst; /* destination rectangle */
INT16 yDst;
INT16 dxDst;
INT16 dyDst;
INT16 xSrc; /* source rectangle */
INT16 ySrc;
INT16 dxSrc;
INT16 dySrc;
} ICDECOMPRESSEX16;
#include "poppack.h"
DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
#define ICDecompressBegin(hic, lpbiInput, lpbiOutput) \
ICSendMessage( \
......@@ -389,11 +430,37 @@ DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,L
BOOL VFWAPI ICInfo(DWORD fccType, DWORD fccHandler, ICINFO * lpicinfo);
LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo, DWORD cb);
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode);
HIC16 VFWAPI ICOpen16(DWORD fccType, DWORD fccHangler, UINT16 wMode);
HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler);
LRESULT VFWAPI ICClose(HIC hic);
LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD dw1, DWORD dw2);
LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD dw1, DWORD dw2);
HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
HIC16 VFWAPI ICLocate16(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
/* As passed to ICM_DRAW_SUGGESTFORMAT */
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiIn;
LPBITMAPINFOHEADER lpbiSuggest;
INT dxSrc;
INT dySrc;
INT dxDst;
INT dyDst;
HIC hicDecompressor;
} ICDRAWSUGGEST;
typedef struct {
DWORD dwFlags;
LPBITMAPINFOHEADER lpbiIn;
LPBITMAPINFOHEADER lpbiSuggest;
INT16 dxSrc;
INT16 dySrc;
INT16 dxDst;
INT16 dyDst;
HIC16 hicDecompressor;
} ICDRAWSUGGEST16;
DWORD VFWAPIV ICDrawBegin(
HIC hic,
......@@ -414,7 +481,26 @@ DWORD VFWAPIV ICDrawBegin(
DWORD dwScale
);
/* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?) */
DWORD VFWAPIV ICDrawBegin16(
HIC16 hic,
DWORD dwFlags,/* flags */
HPALETTE16 hpal, /* palette to draw with */
HWND16 hwnd, /* window to draw to */
HDC16 hdc, /* HDC to draw to */
INT16 xDst, /* destination rectangle */
INT16 yDst,
INT16 dxDst,
INT16 dyDst,
LPBITMAPINFOHEADER lpbi, /* format of frame to draw */
INT16 xSrc, /* source rectangle */
INT16 ySrc,
INT16 dxSrc,
INT16 dySrc,
DWORD dwRate, /* frames/second = (dwRate/dwScale) */
DWORD dwScale
);
/* as passed to ICM_DRAW_BEGIN */
typedef struct {
DWORD dwFlags;
HPALETTE hpal;
......@@ -433,6 +519,28 @@ typedef struct {
DWORD dwScale;
} ICDRAWBEGIN;
#include "pshpack1.h"
typedef struct {
DWORD dwFlags;
HPALETTE16 hpal;
HWND16 hwnd;
HDC16 hdc;
INT16 xDst;
INT16 yDst;
INT16 dxDst;
INT16 dyDst;
LPBITMAPINFOHEADER lpbi;
INT16 xSrc;
INT16 ySrc;
INT16 dxSrc;
INT16 dySrc;
DWORD dwRate;
DWORD dwScale;
} ICDRAWBEGIN16;
#include "poppack.h"
#define ICDRAW_HURRYUP 0x80000000L /* don't draw just buffer (hurry up!) */
#define ICDRAW_UPDATE 0x40000000L /* don't draw just update screen */
#define ICDRAW_PREROLL 0x20000000L /* this frame is before real start */
......@@ -815,5 +923,55 @@ ICOM_DEFINE(IGetFrame,IUnknown)
#define AVIERR_USERABORT MAKE_AVIERR(198)
#define AVIERR_ERROR MAKE_AVIERR(199)
/********************************************
* DrawDib declarations
*/
HDRAWDIB VFWAPI DrawDibOpen( void );
UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground);
BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
HDC hdc,
INT dxDst,
INT dyDst,
LPBITMAPINFOHEADER lpbi,
INT dxSrc,
INT dySrc,
UINT wFlags);
BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd,
HDC hdc,
INT xDst,
INT yDst,
INT dxDst,
INT dyDst,
LPBITMAPINFOHEADER lpbi,
LPVOID lpBits,
INT xSrc,
INT ySrc,
INT dxSrc,
INT dySrc,
UINT wFlags);
/* DrawDibDraw flags */
#define DDF_UPDATE 0x0002
#define DDF_SAME_HDC 0x0004
#define DDF_SAME_DRAW 0x0008
#define DDF_DONTDRAW 0x0010
#define DDF_ANIMATE 0x0020
#define DDF_BUFFER 0x0040
#define DDF_JUSTDRAWIT 0x0080
#define DDF_FULLSCREEN 0x0100
#define DDF_BACKGROUNDPAL 0x0200
#define DDF_NOTKEYFRAME 0x0400
#define DDF_HURRYUP 0x0800
#define DDF_HALFTONE 0x1000
BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal);
HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd);
BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd);
BOOL VFWAPI DrawDibClose(HDRAWDIB hdd);
#endif /* __WINE_VFW_H */
%long
DWORD
LONG
LRESULT
%ptr
LPBITMAPINFOHEADER
LPDWORD
LPVOID
%word
BOOL16
INT16
HDC16
HDRAWDIB16
HIC16
HPALETTE16
HWND16
UINT16
WORD
%segptr
ICINFO16 *
FARPROC16
......@@ -3,10 +3,10 @@
BOOL
DWORD
HDC
HDRAWDIB
HIC
HINSTANCE
HPALETTE
HDRAWDIB
HWND
INT
LONG
......
......@@ -220,8 +220,8 @@ static int DRIVER_MapMsg16To32(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
}
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
......@@ -286,8 +286,8 @@ static int DRIVER_UnMapMsg16To32(WORD wMsg, DWORD lParam1, DWORD lParam2)
ret = 0;
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
......@@ -396,8 +396,8 @@ static int DRIVER_MapMsg32To16(WORD wMsg, DWORD* lParam1, DWORD* lParam2)
}
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
......@@ -466,8 +466,8 @@ static int DRIVER_UnMapMsg32To16(WORD wMsg, DWORD lParam1, DWORD lParam2)
ret = 0;
break;
default:
if (wMsg >= 0x800 && wMsg < 0x900) {
/* FIXME: another hack to handle MCI messages...
if ((wMsg >= 0x800 && wMsg < 0x900) || (wMsg >= 0x4000 && wMsg < 0x4100 )) {
/* FIXME: another hack to handle MCI and ICM messages...
* should find a *NICE* way to integrate DRIVER_ and
* MCI_ mapping/unmapping functions
*/
......@@ -617,7 +617,6 @@ static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam, BOOL bCallFr
lpDrv->lpNextItem = lpNewDrv;
lpNewDrv->lpPrevItem = lpDrv;
}
/* Now just open a new instance of a driver on this module */
if (bCallFrom32) {
lpNewDrv->dwDriverID = SendDriverMessage((HDRVR)lpNewDrv, DRV_OPEN, 0L, lParam);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment