/****************************************************************************
*
* VfW.H - Video for windows include file for WIN32
*
* Copyright (c) 1991-1995, Microsoft Corp. All rights reserved.
*
* This include files defines interfaces to the following
* video components
*
* COMPMAN - Installable Compression Manager.
* DRAWDIB - Routines for drawing to the display.
* VIDEO - Video Capture Driver Interface
*
* AVIFMT - AVI File Format structure definitions.
* MMREG - FOURCC and other things
*
* AVIFile - Interface for reading AVI Files and AVI Streams
* MCIWND - MCI/AVI window class
* AVICAP - AVI Capture Window class
*
* MSACM - Audio compression manager.
*
* The following symbols control inclusion of various parts of this file:
*
* NOCOMPMAN - dont include COMPMAN
* NODRAWDIB - dont include DRAWDIB
* NOVIDEO - dont include video capture interface
*
* NOAVIFMT - dont include AVI file format structs
* NOMMREG - dont include MMREG
*
* NOAVIFILE - dont include AVIFile interface
* NOMCIWND - dont include AVIWnd class.
* NOAVICAP - dont include AVICap class.
*
* NOMSACM - dont include ACM stuff.
*
****************************************************************************/
#ifndef _INC_VFW
#define _INC_VFW
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
/****************************************************************************
*
* types
*
***************************************************************************/
#define VFWAPI WINAPI
#define VFWAPIV WINAPIV
/****************************************************************************
*
* VideoForWindowsVersion() - returns version of VfW
*
***************************************************************************/
DWORD FAR PASCAL VideoForWindowsVersion(void);
/****************************************************************************
*
* call these to start stop using VfW from your app.
*
***************************************************************************/
LONG VFWAPI InitVFW(void);
LONG VFWAPI TermVFW(void);
#ifdef __cplusplus
} // extern "C"
#endif /* __cplusplus */
/****************************************************************************
*
* do we need MMSYSTEM?
*
****************************************************************************/
#if !defined(_INC_MMSYSTEM) && (!defined(NOVIDEO) || !defined(NOAVICAP))
#include <mmsystem.h>
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
/****************************************************************************/
/* */
/* Macros */
/* */
/* should we define this?? */
/* */
/****************************************************************************/
#ifndef MKFOURCC
#define MKFOURCC( ch0, ch1, ch2, ch3 ) \
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#endif
#if !defined(_INC_MMSYSTEM)
#define mmioFOURCC MKFOURCC
#endif
/****************************************************************************
*
* COMPMAN - Installable Compression Manager.
*
****************************************************************************/
#ifndef NOCOMPMAN
#define ICVERSION 0x0104
DECLARE_HANDLE(HIC); /* Handle to a Installable Compressor */
//
// this code in biCompression means the DIB must be accesed via
// 48 bit pointers! using *ONLY* the selector given.
//
#define BI_1632 0x32333631 // '1632'
#ifndef mmioFOURCC
#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#endif
#ifndef aviTWOCC
#define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
#endif
#ifndef ICTYPE_VIDEO
#define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c')
#define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c')
#endif
#ifndef ICERR_OK
#define ICERR_OK 0L
#define ICERR_DONTDRAW 1L
#define ICERR_NEWPALETTE 2L
#define ICERR_GOTOKEYFRAME 3L
#define ICERR_STOPDRAWING 4L
#define ICERR_UNSUPPORTED -1L
#define ICERR_BADFORMAT -2L
#define ICERR_MEMORY -3L
#define ICERR_INTERNAL -4L
#define ICERR_BADFLAGS -5L
#define ICERR_BADPARAM -6L
#define ICERR_BADSIZE -7L
#define ICERR_BADHANDLE -8L
#define ICERR_CANTUPDATE -9L
#define ICERR_ABORT -10L
#define ICERR_ERROR -100L
#define ICERR_BADBITDEPTH -200L
#define ICERR_BADIMAGESIZE -201L
#define ICERR_CUSTOM -400L // errors less than ICERR_CUSTOM...
#endif
/* Values for dwFlags of ICOpen() */
#ifndef ICMODE_COMPRESS
#define ICMODE_COMPRESS 1
#define ICMODE_DECOMPRESS 2
#define ICMODE_FASTDECOMPRESS 3
#define ICMODE_QUERY 4
#define ICMODE_FASTCOMPRESS 5
#define ICMODE_DRAW 8
#endif
#ifndef _WIN32 // ;Internal
#define ICMODE_INTERNALF_FUNCTION32 0x8000 // ;Internal
#define ICMODE_INTERNALF_MASK 0x8000 // ;Internal
#endif // ;Internal
/* Flags for AVI file index */
#define AVIIF_LIST 0x00000001L
#define AVIIF_TWOCC 0x00000002L
#define AVIIF_KEYFRAME 0x00000010L
/* quality flags */
#define ICQUALITY_LOW 0
#define ICQUALITY_HIGH 10000
#define ICQUALITY_DEFAULT -1
/************************************************************************
************************************************************************/
#define ICM_USER (DRV_USER+0x0000)
#define ICM_RESERVED ICM_RESERVED_LOW
#define ICM_RESERVED_LOW (DRV_USER+0x1000)
#define ICM_RESERVED_HIGH (DRV_USER+0x2000)
/************************************************************************
messages.
************************************************************************/
#define ICM_GETSTATE (ICM_RESERVED+0) // Get compressor state
#define ICM_SETSTATE (ICM_RESERVED+1) // Set compressor state
#define ICM_GETINFO (ICM_RESERVED+2) // Query info about the compressor
#define ICM_CONFIGURE (ICM_RESERVED+10) // show the configure dialog
#define ICM_ABOUT (ICM_RESERVED+11) // show the about box
#define ICM_GETERRORTEXT (ICM_RESERVED+12) // get error text TBD ;Internal
#define ICM_GETFORMATNAME (ICM_RESERVED+20) // get a name for a format ;Internal
#define ICM_ENUMFORMATS (ICM_RESERVED+21) // cycle through formats ;Internal
#define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30) // get the default value for quality
#define ICM_GETQUALITY (ICM_RESERVED+31) // get the current value for quality
#define ICM_SETQUALITY (ICM_RESERVED+32) // set the default value for quality
#define ICM_SET (ICM_RESERVED+40) // Tell the driver something
#define ICM_GET (ICM_RESERVED+41) // Ask the driver something
// Constants for ICM_SET:
#define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
#define ICM_KEYFRAMER
评论0