vfw.h revision 4b9d6701570cb98fd36e209314239d104ec584d3
/*
* Copyright (C) the Wine project
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef __WINE_VFW_H
#define __WINE_VFW_H
#include <mmsystem.h>
#include <mmreg.h>
#include <msacm.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*****************************************************************************
* Predeclare the interfaces
*/
typedef struct IAVIStream *PAVISTREAM;
typedef struct IAVIEditStream *PAVIEDITSTREAM;
/* Installable Compressor Manager */
#define ICVERSION 0x0104
/* error return codes */
#define ICERR_OK 0
#define ICERR_DONTDRAW 1
#define ICERR_NEWPALETTE 2
#define ICERR_GOTOKEYFRAME 3
#define ICERR_STOPDRAWING 4
#define ICERR_UNSUPPORTED -1
#define ICERR_BADFORMAT -2
#define ICERR_MEMORY -3
#define ICERR_INTERNAL -4
#define ICERR_BADFLAGS -5
#define ICERR_BADPARAM -6
#define ICERR_BADSIZE -7
#define ICERR_BADHANDLE -8
#define ICERR_CANTUPDATE -9
#define ICERR_ABORT -10
#define ICERR_ERROR -100
#define ICERR_BADBITDEPTH -200
#define ICERR_BADIMAGESIZE -201
#define ICERR_CUSTOM -400
/* ICM Messages */
/* ICM driver message range */
#define ICM_RESERVED ICM_RESERVED_LOW
#define ICM_GETSTATE (ICM_RESERVED+0)
/* */
/* 2 constant FOURCC codes */
#ifndef comptypeDIB
#endif
/* 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 {
/* 24: */
#define ICCOMPRESS_KEYFRAME 0x00000001L
typedef struct {
} ICCOMPRESS;
);
)
)
)
)
/* ICCOMPRESSFRAMES.dwFlags */
#define ICCOMPRESSFRAMES_PADDING 0x00000001
typedef struct {
typedef struct {
/* messages for Status callback */
#define ICSTATUS_START 0
#define ICSTATUS_STATUS 1
#define ICSTATUS_END 2
#define ICSTATUS_ERROR 3
#define ICSTATUS_YIELD 4
/* FIXME: some X11 libs define Status as int... */
/* LONG (CALLBACK *zStatus)(LPARAM lParam, UINT message, LONG l); */
/* Values for wMode of ICOpen() */
#define ICMODE_COMPRESS 1
#define ICMODE_DECOMPRESS 2
#define ICMODE_FASTDECOMPRESS 3
#define ICMODE_QUERY 4
#define ICMODE_FASTCOMPRESS 5
#define ICMODE_DRAW 8
/* quality flags */
#define ICQUALITY_LOW 0
#define ICQUALITY_HIGH 10000
#define ICQUALITY_DEFAULT -1
typedef struct {
/*
* under Win32, the driver always returns UNICODE strings.
*/
/* 238: */
} ICINFO;
/* ICINFO.dwFlags */
/* function shortcuts */
/* ICM_ABOUT */
#define ICMF_ABOUT_QUERY 0x00000001
#define ICQueryAbout(hic) \
/* ICM_CONFIGURE */
#define ICMF_CONFIGURE_QUERY 0x00000001
#define ICQueryConfigure(hic) \
/* Decompression stuff */
typedef struct {
} ICDECOMPRESS;
typedef struct {
/* changed for ICM_DECOMPRESSEX */
DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,LPVOID lpData,LPBITMAPINFOHEADER lpbi,LPVOID lpBits);
)
)
((LONG)ICSendMessage( \
))
)
)
{
}
int xDst,
int yDst,
int dxDst,
int dyDst)
{
}
int xDst,
int yDst,
int dxDst,
int dyDst)
{
}
#define ICDecompressExEnd(hic) \
#ifdef WINE_STRICT_PROTOTYPES
#else
#endif
HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, WORD wFlags);
HIC VFWAPI ICGetDisplayFormat(HIC hic, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, int BitDepth, int dx, int dy);
/* Values for wFlags of ICInstall() */
#define ICINSTALL_UNICODE 0x8000
#define ICINSTALL_FUNCTION 0x0001
#define ICINSTALL_DRIVER 0x0002
#define ICINSTALL_HDRV 0x0004
#define ICINSTALL_DRIVERW 0x8002
#define ICGetStateSize(hic) \
{
return dwICValue;
}
{
return dwICValue;
}
/* As passed to ICM_DRAW_SUGGESTFORMAT */
typedef struct {
typedef struct {
int iStart;
int iLen;
} ICPALETTE;
);
/* as passed to ICM_DRAW_BEGIN */
typedef struct {
} ICDRAWBEGIN;
typedef struct {
} ICDRAW;
{
}
#define ICDrawStart(hic) \
#define ICDrawStop(hic) \
#define ICDrawStopPlay(hic) \
ICSendMessage(hic, ICM_DRAW_REALIZE, (DWORD_PTR)(UINT_PTR)(HDC)(hdc), (DWORD_PTR)(BOOL)(fBackground))
#define ICDrawFlush(hic) \
#define ICDrawRenderBuffer(hic) \
{
/* FIXME: see comment in ICSETSTATUSPROC definition */
}
typedef struct {
#define ICMF_COMPVARS_VALID 0x00000001
#define ICMF_CHOOSE_KEYFRAME 0x0001
#define ICMF_CHOOSE_DATARATE 0x0002
#define ICMF_CHOOSE_PREVIEW 0x0004
#define ICMF_CHOOSE_ALLCOMPRESSORS 0x0008
/********************* AVIFILE function declarations *************************/
#ifndef mmioFOURCC
#endif
#ifndef aviTWOCC
#endif
#define streamtypeANY 0UL
/* Basic chunk types */
/* Chunk id to use for extra chunks for padding. */
/* AVIFileHdr.dwFlags */
#define AVIF_MUSTUSEINDEX 0x00000020
#define AVIF_ISINTERLEAVED 0x00000100
#define AVIF_WASCAPTUREFILE 0x00010000
#define AVIF_COPYRIGHTED 0x00020000
#define AVI_HEADERSIZE 2048
typedef struct _MainAVIHeader
{
/* AVIStreamHeader.dwFlags */
#define AVISF_DISABLED 0x00000001
#define AVISF_VIDEO_PALCHANGES 0x00010000
typedef struct {
/* AVIINDEXENTRY.dwFlags */
#define AVIIF_TWOCC 0x00000002
#define AVIIF_FIRSTPART 0x00000020
#define AVIIF_LASTPART 0x00000040
#define AVIIF_COMPUSE 0x0FFF0000
typedef struct _AVIINDEXENTRY {
typedef struct _AVIPALCHANGE {
} AVIPALCHANGE;
#define AVIGETFRAMEF_BESTDISPLAYFMT 1
typedef struct _AVISTREAMINFOA {
typedef struct _AVISTREAMINFOW {
#define AVISTREAMINFO_DISABLED 0x00000001
#define AVISTREAMINFO_FORMATCHANGES 0x00010000
/* AVIFILEINFO.dwFlags */
#define AVIFILEINFO_HASINDEX 0x00000010
#define AVIFILEINFO_MUSTUSEINDEX 0x00000020
#define AVIFILEINFO_ISINTERLEAVED 0x00000100
#define AVIFILEINFO_TRUSTCKTYPE 0x00000800
#define AVIFILEINFO_WASCAPTUREFILE 0x00010000
#define AVIFILEINFO_COPYRIGHTED 0x00020000
/* AVIFILEINFO.dwCaps */
#define AVIFILECAPS_CANREAD 0x00000001
#define AVIFILECAPS_CANWRITE 0x00000002
#define AVIFILECAPS_ALLKEYFRAMES 0x00000010
#define AVIFILECAPS_NOCOMPRESSION 0x00000020
typedef struct _AVIFILEINFOW {
typedef struct _AVIFILEINFOA {
/* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
#define AVICOMPRESSF_INTERLEAVE 0x00000001
#define AVICOMPRESSF_DATARATE 0x00000002
#define AVICOMPRESSF_KEYFRAMES 0x00000004
#define AVICOMPRESSF_VALID 0x00000008
typedef struct {
#include <ole2.h>
/*****************************************************************************
* IAVIStream interface
*/
#define INTERFACE IAVIStream
{
/*** IUnknown methods ***/
/*** IAVIStream methods ***/
STDMETHOD(Read)(THIS_ LONG lStart, LONG lSamples, LPVOID lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples) PURE;
STDMETHOD(Write)(THIS_ LONG lStart, LONG lSamples, LPVOID lpBuffer, LONG cbBuffer, DWORD dwFlags, LONG *plSampWritten, LONG *plBytesWritten) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IAVIStream methods ***/
#endif
#define AVISTREAMREAD_CONVENIENT (-1L)
HRESULT WINAPI AVIStreamRead(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,LONG *bytesread,LONG *samplesread);
HRESULT WINAPI AVIStreamWrite(PAVISTREAM iface,LONG start,LONG samples,LPVOID buffer,LONG buffersize,DWORD flags,LONG *sampwritten,LONG *byteswritten);
HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*ppsCompressed,PAVISTREAM ppsSource,AVICOMPRESSOPTIONS *lpOptions,CLSID*pclsidHandler);
#define AVIFileClose(pavi) \
#define AVIStreamClose(pavi) \
#define AVIStreamEnd(pavi) \
#define AVIStreamEndTime(pavi) \
#define AVIStreamLengthTime(pavi) \
#define AVIStreamStartTime(pavi) \
/*****************************************************************************
* IAVIStreaming interface
*/
#define INTERFACE IAVIStreaming
{
/*** IUnknown methods ***/
/*** IAVIStreaming methods ***/
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IAVIStreaming methods ***/
#endif
/*****************************************************************************
* IAVIEditStream interface
*/
#define INTERFACE IAVIEditStream
{
/*** IUnknown methods ***/
/*** IAVIEditStream methods ***/
STDMETHOD(Paste)(IAVIEditStream*iface,LONG*plStart,LONG*plLength,PAVISTREAM pSource,LONG lStart,LONG lEnd) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IAVIEditStream methods ***/
#endif
/*****************************************************************************
* IAVIFile interface
*/
/* In Win32 this interface uses UNICODE only */
{
/*** IUnknown methods ***/
/*** IAVIFile methods ***/
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IAVIFile methods ***/
#endif
void WINAPI AVIFileInit(void);
void WINAPI AVIFileExit(void);
/*****************************************************************************
* IGetFrame interface
*/
{
/*** IUnknown methods ***/
/*** IGetFrame methods ***/
STDMETHOD(SetFormat)(THIS_ LPBITMAPINFOHEADER lpbi, LPVOID lpBits, INT x, INT y, INT dx, INT dy) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
/*** IGetFrame methods ***/
#endif
#ifdef OFN_READONLY
#endif
#define AVIERR_OK 0
#define MCIWNDOPENF_NEW 0x0001
#define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
#define MCIWNDF_NOPLAYBAR 0x0002
#define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
#define MCIWNDF_NOMENU 0x0008
#define MCIWNDF_SHOWNAME 0x0010
#define MCIWNDF_SHOWPOS 0x0020
#define MCIWNDF_SHOWMODE 0x0040
#define MCIWNDF_SHOWALL 0x0070
#define MCIWNDF_NOTIFYMODE 0x0100
#define MCIWNDF_NOTIFYPOS 0x0200
#define MCIWNDF_NOTIFYSIZE 0x0400
#define MCIWNDF_NOTIFYERROR 0x1000
#define MCIWNDF_NOTIFYALL 0x1F00
#define MCIWNDF_NOTIFYANSI 0x0080
#define MCIWNDF_NOTIFYMEDIAA 0x0880
#define MCIWNDF_NOTIFYMEDIAW 0x0800
#define MCIWNDF_RECORD 0x2000
#define MCIWNDF_NOERRORDLG 0x4000
#define MCIWNDF_NOOPEN 0x8000
#ifdef __cplusplus
#define MCIWndSM ::SendMessage
#else
#define MCIWndSM SendMessage
#endif
#define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
#define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
#define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
#define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
#define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
#define MCIWndGetActiveTimer(hWnd) \
#define MCIWndGetInactiveTimer(hWnd) \
#define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
#define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
#define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
#define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
#define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
#define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
#define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
#define MCIWND_START -1
#define MCIWND_END -2
/********************************************
* DrawDib declarations
*/
typedef struct
{
} DRAWDIBTIME, *LPDRAWDIBTIME;
/* 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
#define DDF_PREROLL DDF_DONTDRAW
#define DDF_SAME_DIB DDF_SAME_DRAW
#define DDF_SAME_SIZE DDF_SAME_DRAW
/* display profiling */
#define PD_CAN_DRAW_DIB 0x0001
#define PD_CAN_STRETCHDIB 0x0002
#define PD_STRETCHDIB_1_1_OK 0x0004
#define PD_STRETCHDIB_1_2_OK 0x0008
#define PD_STRETCHDIB_1_N_OK 0x0010
#define DV_ERR_OK (0)
#define DV_ERR_BASE (1)
#define DV_ERR_NONSPECIFIC (DV_ERR_BASE)
#ifndef MM_DRVM_OPEN
#define MM_DRVM_OPEN 0x3D0
#define MM_DRVM_CLOSE 0x3D1
#define MM_DRVM_DATA 0x3D2
#define MM_DRVM_ERROR 0x3D3
#define DV_VM_OPEN MM_DRVM_OPEN
#define DV_VM_CLOSE MM_DRVM_CLOSE
#define DV_VM_DATA MM_DRVM_DATA
#define DV_VM_ERROR MM_DRVM_ERROR
#endif
typedef struct videohdr_tag {
#define VHDR_DONE 0x00000001
#define VHDR_PREPARED 0x00000002
#define VHDR_INQUEUE 0x00000004
#define VHDR_KEYFRAME 0x00000008
typedef struct channel_caps_tag {
#define VCAPS_OVERLAY 0x00000001
#define VCAPS_SRC_CAN_CLIP 0x00000002
#define VCAPS_DST_CAN_CLIP 0x00000004
#define VCAPS_CAN_SCALE 0x00000008
#define VIDEO_EXTERNALIN 0x0001
#define VIDEO_EXTERNALOUT 0x0002
#define VIDEO_IN 0x0004
#define VIDEO_OUT 0x0008
#define VIDEO_DLG_QUERY 0x0010
#define VIDEO_CONFIGURE_QUERY 0x8000
#define VIDEO_CONFIGURE_SET 0x1000
#define VIDEO_CONFIGURE_GET 0x2000
#define VIDEO_CONFIGURE_QUERYSIZE 0x0001
#define VIDEO_CONFIGURE_CURRENT 0x0010
#define VIDEO_CONFIGURE_NOMINAL 0x0020
#define VIDEO_CONFIGURE_MIN 0x0040
#define VIDEO_CONFIGURE_MAX 0x0080
#define DVM_USER 0x4000
#define DVM_CONFIGURE_START 0x1000
#define DVM_CONFIGURE_END 0x1FFF
#define WM_CAP_START WM_USER
#define WM_CAP_UNICODE_END WM_CAP_PAL_SAVEW
#define WM_CAP_END WM_CAP_UNICODE_END
typedef struct tagCapDriverCaps {
typedef struct tagCapStatus {
typedef struct tagCaptureParms {
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __WINE_VFW_H */