Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vfw.h

00001 /*
00002  * Modified for use with MPlayer, detailed CVS changelog at
00003  * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
00004  * $Id: vfw.h 11593 2005-06-28 18:02:01Z courmisch $
00005  */
00006 
00007 #ifndef __WINE_VFW_H
00008 #define __WINE_VFW_H
00009 //#include "pshpack1.h"
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 #ifndef __WINE_WINGDI_H
00014 
00015 typedef struct __attribute__((__packed__))
00016 {
00017     short    bfType;
00018     long   bfSize;
00019     short    bfReserved1;
00020     short    bfReserved2;
00021     long   bfOffBits;
00022 } BITMAPFILEHEADER;
00023 
00024 #ifndef _BITMAPINFOHEADER_
00025 #define _BITMAPINFOHEADER_
00026 typedef struct __attribute__((__packed__))
00027 {
00028     long        biSize;
00029     long        biWidth;
00030     long        biHeight;
00031     short       biPlanes;
00032     short       biBitCount;
00033     long        biCompression;
00034     long        biSizeImage;
00035     long        biXPelsPerMeter;
00036     long        biYPelsPerMeter;
00037     long        biClrUsed;
00038     long        biClrImportant;
00039 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
00040 typedef struct {
00041         BITMAPINFOHEADER bmiHeader;
00042         int     bmiColors[1];
00043 } BITMAPINFO, *LPBITMAPINFO;
00044 #endif
00045 
00046 #endif
00047 #define VFWAPI  
00048 #define VFWAPIV 
00049 #ifndef __WINE_WINDEF_H
00050 typedef long (__stdcall__ *DRIVERPROC)(long,HDRVR,unsigned int,long,long);
00051 #endif
00052 
00053 
00054 
00055 #ifndef mmioFOURCC
00056 #define mmioFOURCC( ch0, ch1, ch2, ch3 )                                \
00057         ( (long)(unsigned char)(ch0) | ( (long)(unsigned char)(ch1) << 8 ) |            \
00058         ( (long)(unsigned char)(ch2) << 16 ) | ( (long)(unsigned char)(ch3) << 24 ) )
00059 #endif
00060 
00061 #ifndef aviTWOCC
00062 #define aviTWOCC(ch0, ch1) ((short)(unsigned char)(ch0) | ((short)(unsigned char)(ch1) << 8))
00063 #endif
00064 
00065 #define ICTYPE_VIDEO    mmioFOURCC('v', 'i', 'd', 'c')
00066 #define ICTYPE_AUDIO    mmioFOURCC('a', 'u', 'd', 'c')
00067 
00068 
00069 /* Installable Compressor M? */
00070 
00071 /* HIC struct (same layout as Win95 one) */
00072 typedef struct tagWINE_HIC {
00073         long            magic;          /* 00: 'Smag' */
00074         HANDLE  curthread;      /* 04: */
00075         long            type;           /* 08: */
00076         long            handler;        /* 0C: */
00077         HDRVR           hdrv;           /* 10: */
00078         long            driverid;       /* 14:(handled by SendDriverMessage)*/
00079         DRIVERPROC      driverproc;     /* 18:(handled by SendDriverMessage)*/
00080         long            x1;             /* 1c: name? */
00081         short           x2;             /* 20: */
00082         long            x3;             /* 22: */
00083                                         /* 26: */
00084 } WINE_HIC;
00085 
00086 /* error return codes */
00087 #define ICERR_OK                0
00088 #define ICERR_DONTDRAW          1
00089 #define ICERR_NEWPALETTE        2
00090 #define ICERR_GOTOKEYFRAME      3
00091 #define ICERR_STOPDRAWING       4
00092 
00093 #define ICERR_UNSUPPORTED       -1
00094 #define ICERR_BADFORMAT         -2
00095 #define ICERR_MEMORY            -3
00096 #define ICERR_INTERNAL          -4
00097 #define ICERR_BADFLAGS          -5
00098 #define ICERR_BADPARAM          -6
00099 #define ICERR_BADSIZE           -7
00100 #define ICERR_BADHANDLE         -8
00101 #define ICERR_CANTUPDATE        -9
00102 #define ICERR_ABORT             -10
00103 #define ICERR_ERROR             -100
00104 #define ICERR_BADBITDEPTH       -200
00105 #define ICERR_BADIMAGESIZE      -201
00106 
00107 #define ICERR_CUSTOM            -400
00108 
00109 /* ICM Messages */
00110 #define ICM_USER                (DRV_USER+0x0000)
00111 
00112 /* ICM driver message range */
00113 #define ICM_RESERVED_LOW        (DRV_USER+0x1000)
00114 #define ICM_RESERVED_HIGH       (DRV_USER+0x2000)
00115 #define ICM_RESERVED            ICM_RESERVED_LOW
00116 
00117 #define ICM_GETSTATE            (ICM_RESERVED+0)
00118 #define ICM_SETSTATE            (ICM_RESERVED+1)
00119 #define ICM_GETINFO             (ICM_RESERVED+2)
00120 
00121 #define ICM_CONFIGURE           (ICM_RESERVED+10)
00122 #define ICM_ABOUT               (ICM_RESERVED+11)
00123 /* */
00124 
00125 #define ICM_GETDEFAULTQUALITY   (ICM_RESERVED+30)
00126 #define ICM_GETQUALITY          (ICM_RESERVED+31)
00127 #define ICM_SETQUALITY          (ICM_RESERVED+32)
00128 
00129 #define ICM_SET                 (ICM_RESERVED+40)
00130 #define ICM_GET                 (ICM_RESERVED+41)
00131 
00132 /* 2 constant FOURCC codes */
00133 #define ICM_FRAMERATE           mmioFOURCC('F','r','m','R')
00134 #define ICM_KEYFRAMERATE        mmioFOURCC('K','e','y','R')
00135 
00136 #define ICM_COMPRESS_GET_FORMAT         (ICM_USER+4)
00137 #define ICM_COMPRESS_GET_SIZE           (ICM_USER+5)
00138 #define ICM_COMPRESS_QUERY              (ICM_USER+6)
00139 #define ICM_COMPRESS_BEGIN              (ICM_USER+7)
00140 #define ICM_COMPRESS                    (ICM_USER+8)
00141 #define ICM_COMPRESS_END                (ICM_USER+9)
00142 
00143 #define ICM_DECOMPRESS_GET_FORMAT       (ICM_USER+10)
00144 #define ICM_DECOMPRESS_QUERY            (ICM_USER+11)
00145 #define ICM_DECOMPRESS_BEGIN            (ICM_USER+12)
00146 #define ICM_DECOMPRESS                  (ICM_USER+13)
00147 #define ICM_DECOMPRESS_END              (ICM_USER+14)
00148 #define ICM_DECOMPRESS_SET_PALETTE      (ICM_USER+29)
00149 #define ICM_DECOMPRESS_GET_PALETTE      (ICM_USER+30)
00150 
00151 #define ICM_DRAW_QUERY                  (ICM_USER+31)
00152 #define ICM_DRAW_BEGIN                  (ICM_USER+15)
00153 #define ICM_DRAW_GET_PALETTE            (ICM_USER+16)
00154 #define ICM_DRAW_START                  (ICM_USER+18)
00155 #define ICM_DRAW_STOP                   (ICM_USER+19)
00156 #define ICM_DRAW_END                    (ICM_USER+21)
00157 #define ICM_DRAW_GETTIME                (ICM_USER+32)
00158 #define ICM_DRAW                        (ICM_USER+33)
00159 #define ICM_DRAW_WINDOW                 (ICM_USER+34)
00160 #define ICM_DRAW_SETTIME                (ICM_USER+35)
00161 #define ICM_DRAW_REALIZE                (ICM_USER+36)
00162 #define ICM_DRAW_FLUSH                  (ICM_USER+37)
00163 #define ICM_DRAW_RENDERBUFFER           (ICM_USER+38)
00164 
00165 #define ICM_DRAW_START_PLAY             (ICM_USER+39)
00166 #define ICM_DRAW_STOP_PLAY              (ICM_USER+40)
00167 
00168 #define ICM_DRAW_SUGGESTFORMAT          (ICM_USER+50)
00169 #define ICM_DRAW_CHANGEPALETTE          (ICM_USER+51)
00170 
00171 #define ICM_GETBUFFERSWANTED            (ICM_USER+41)
00172 
00173 #define ICM_GETDEFAULTKEYFRAMERATE      (ICM_USER+42)
00174 
00175 #define ICM_DECOMPRESSEX_BEGIN          (ICM_USER+60)
00176 #define ICM_DECOMPRESSEX_QUERY          (ICM_USER+61)
00177 #define ICM_DECOMPRESSEX                (ICM_USER+62)
00178 #define ICM_DECOMPRESSEX_END            (ICM_USER+63)
00179 
00180 #define ICM_COMPRESS_FRAMES_INFO        (ICM_USER+70)
00181 #define ICM_SET_STATUS_PROC             (ICM_USER+72)
00182 
00183 /* structs */
00184 
00185 typedef struct {
00186         long    dwSize;         /* 00: size */
00187         long    fccType;        /* 04: type 'vidc' usually */
00188         long    fccHandler;     /* 08: */
00189         long    dwVersion;      /* 0c: version of compman opening you */
00190         long    dwFlags;        /* 10: LOshort is type specific */
00191         LRESULT dwError;        /* 14: */
00192         void*   pV1Reserved;    /* 18: */
00193         void*   pV2Reserved;    /* 1c: */
00194         long    dnDevNode;      /* 20: */
00195                                 /* 24: */
00196 } ICOPEN,*LPICOPEN;
00197 
00198 #define ICCOMPRESS_KEYFRAME     0x00000001L
00199 
00200 typedef struct {
00201     long                dwFlags;
00202     LPBITMAPINFOHEADER  lpbiOutput;
00203     void*               lpOutput;
00204     LPBITMAPINFOHEADER  lpbiInput;
00205     const void*         lpInput;
00206     long*               lpckid;
00207     long*               lpdwFlags;
00208     long                lFrameNum;
00209     long                dwFrameSize;
00210     long                dwQuality;
00211     LPBITMAPINFOHEADER  lpbiPrev;
00212     void*               lpPrev;
00213 } ICCOMPRESS;
00214 
00215 long VFWAPIV ICCompress(
00216         HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiOutput,void* lpData,
00217         LPBITMAPINFOHEADER lpbiInput,void* lpBits,long* lpckid,
00218         long* lpdwFlags,long lFrameNum,long dwFrameSize,long dwQuality,
00219         LPBITMAPINFOHEADER lpbiPrev,void* lpPrev
00220 );
00221 
00222 
00223 #define ICCompressGetFormat(hic, lpbiInput, lpbiOutput)                 \
00224         ICSendMessage(                                                  \
00225             hic,ICM_COMPRESS_GET_FORMAT,(long)(void*)(lpbiInput),       \
00226             (long)(void*)(lpbiOutput)                                   \
00227         )
00228 
00229 #define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
00230 
00231 #define ICGetDefaultKeyFrameRate(hic,lpint)             \
00232         ICSendMessage(                                  \
00233             hic, ICM_GETDEFAULTKEYFRAMERATE,            \
00234             (long)(void*)(lpint),                       \
00235             0   )               
00236 
00237 #define ICGetDefaultQuality(hic,lpint)                  \
00238         ICSendMessage(                                  \
00239             hic, ICM_GETDEFAULTQUALITY,                 \
00240             (long)(void*)(lpint),                       \
00241             0   )               
00242                 
00243 
00244 #define ICCompressBegin(hic, lpbiInput, lpbiOutput)                     \
00245     ICSendMessage(                                                      \
00246         hic, ICM_COMPRESS_BEGIN, (long)(void*)(lpbiInput),              \
00247         (long)(void*)(lpbiOutput)                                       \
00248     )
00249 
00250 #define ICCompressGetSize(hic, lpbiInput, lpbiOutput)           \
00251     ICSendMessage(                                                      \
00252         hic, ICM_COMPRESS_GET_SIZE, (long)(void*)(lpbiInput),   \
00253         (long)(void*)(lpbiOutput)                                       \
00254     )
00255 
00256 #define ICCompressQuery(hic, lpbiInput, lpbiOutput)             \
00257     ICSendMessage(                                              \
00258         hic, ICM_COMPRESS_QUERY, (long)(void*)(lpbiInput),      \
00259         (long)(void*)(lpbiOutput)                               \
00260     )
00261 
00262 
00263 #define ICCompressEnd(hic) ICSendMessage(hic, ICM_COMPRESS_END, 0, 0)
00264 
00265 /* ICCOMPRESSFRAMES.dwFlags */
00266 #define ICCOMPRESSFRAMES_PADDING        0x00000001
00267 typedef struct {
00268     long               dwFlags;
00269     LPBITMAPINFOHEADER  lpbiOutput;
00270     LPARAM              lOutput;
00271     LPBITMAPINFOHEADER  lpbiInput;
00272     LPARAM              lInput;
00273     long                lStartFrame;
00274     long                lFrameCount;
00275     long                lQuality;
00276     long                lDataRate;
00277     long                lKeyRate;
00278     long               dwRate;
00279     long               dwScale;
00280     long               dwOverheadPerFrame;
00281     long               dwReserved2;
00282     long CALLBACK (*GetData)(LPARAM lInput,long lFrame,void* lpBits,long len);
00283     long CALLBACK (*PutData)(LPARAM lOutput,long lFrame,void* lpBits,long len);
00284 } ICCOMPRESSFRAMES;
00285 
00286 /* Values for wMode of ICOpen() */
00287 #define ICMODE_COMPRESS         1
00288 #define ICMODE_DECOMPRESS       2
00289 #define ICMODE_FASTDECOMPRESS   3
00290 #define ICMODE_QUERY            4
00291 #define ICMODE_FASTCOMPRESS     5
00292 #define ICMODE_DRAW             8
00293 
00294 /* quality flags */
00295 #define ICQUALITY_LOW       0
00296 #define ICQUALITY_HIGH      10000
00297 #define ICQUALITY_DEFAULT   -1
00298 
00299 typedef struct {
00300         long    dwSize;         /* 00: */
00301         long    fccType;        /* 04:compressor type     'vidc' 'audc' */
00302         long    fccHandler;     /* 08:compressor sub-type 'rle ' 'jpeg' 'pcm '*/
00303         long    dwFlags;        /* 0c:flags LOshort is type specific */
00304         long    dwVersion;      /* 10:version of the driver */
00305         long    dwVersionICM;   /* 14:version of the ICM used */
00306         /*
00307          * under Win32, the driver always returns UNICODE strings.
00308          */
00309         WCHAR   szName[16];             /* 18:short name */
00310         WCHAR   szDescription[128];     /* 38:long name */
00311         WCHAR   szDriver[128];          /* 138:driver that contains compressor*/
00312                                         /* 238: */
00313 } ICINFO;
00314 
00315 /* ICINFO.dwFlags */
00316 #define VIDCF_QUALITY           0x0001  /* supports quality */
00317 #define VIDCF_CRUNCH            0x0002  /* supports crunching to a frame size */
00318 #define VIDCF_TEMPORAL          0x0004  /* supports inter-frame compress */
00319 #define VIDCF_COMPRESSFRAMES    0x0008  /* wants the compress all frames message */
00320 #define VIDCF_DRAW              0x0010  /* supports drawing */
00321 #define VIDCF_FASTTEMPORALC     0x0020  /* does not need prev frame on compress */
00322 #define VIDCF_FASTTEMPORALD     0x0080  /* does not need prev frame on decompress */
00323 #define VIDCF_QUALITYTIME       0x0040  /* supports temporal quality */
00324 
00325 #define VIDCF_FASTTEMPORAL      (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
00326 
00327 
00328 /* function shortcuts */
00329 /* ICM_ABOUT */
00330 #define ICMF_ABOUT_QUERY         0x00000001
00331 
00332 #define ICQueryAbout(hic) \
00333         (ICSendMessage(hic,ICM_ABOUT,(long)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
00334 
00335 #define ICAbout(hic, hwnd) ICSendMessage(hic,ICM_ABOUT,(long)(unsigned int)(hwnd),0)
00336 
00337 /* ICM_CONFIGURE */
00338 #define ICMF_CONFIGURE_QUERY    0x00000001
00339 #define ICQueryConfigure(hic) \
00340         (ICSendMessage(hic,ICM_CONFIGURE,(long)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
00341 
00342 #define ICConfigure(hic,hwnd) \
00343         ICSendMessage(hic,ICM_CONFIGURE,(long)(unsigned int)(hwnd),0)
00344 
00345 /* Decompression stuff */
00346 #define ICDECOMPRESS_HURRYUP            0x80000000      /* don't draw just buffer (hurry up!) */
00347 #define ICDECOMPRESS_UPDATE             0x40000000      /* don't draw just update screen */
00348 #define ICDECOMPRESS_PREROL             0x20000000      /* this frame is before real start */
00349 #define ICDECOMPRESS_NULLFRAME          0x10000000      /* repeat last frame */
00350 #define ICDECOMPRESS_NOTKEYFRAME        0x08000000      /* this frame is not a key frame */
00351 
00352 typedef struct {
00353     long                dwFlags;        /* flags (from AVI index...) */
00354     LPBITMAPINFOHEADER  lpbiInput;      /* BITMAPINFO of compressed data */
00355     const void*         lpInput;        /* compressed data */
00356     LPBITMAPINFOHEADER  lpbiOutput;     /* DIB to decompress to */
00357     void*               lpOutput;
00358     long                ckid;           /* ckid from AVI file */
00359 } ICDECOMPRESS;
00360 
00361 typedef struct {
00362     long                dwFlags;
00363     LPBITMAPINFOHEADER lpbiSrc;
00364     const void*         lpSrc;
00365     LPBITMAPINFOHEADER  lpbiDst;
00366     void*               lpDst;
00367 
00368     /* changed for ICM_DECOMPRESSEX */
00369     INT         xDst;       /* destination rectangle */
00370     INT         yDst;
00371     INT         dxDst;
00372     INT         dyDst;
00373 
00374     INT         xSrc;       /* source rectangle */
00375     INT         ySrc;
00376     INT         dxSrc;
00377     INT         dySrc;
00378 } ICDECOMPRESSEX;
00379 
00380 
00381 long VFWAPIV ICDecompress(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
00382 long VFWAPIV ICDecompressEx(HIC hic,long dwFlags,LPBITMAPINFOHEADER lpbiFormat,void* lpData,LPBITMAPINFOHEADER lpbi,void* lpBits);
00383 long VFWAPIV ICUniversalEx(HIC hic,int command,LPBITMAPINFOHEADER lpbiFormat,LPBITMAPINFOHEADER lpbi);
00384 
00385 
00386 #define ICDecompressBegin(hic, lpbiInput, lpbiOutput)   \
00387     ICSendMessage(                                              \
00388         hic, ICM_DECOMPRESS_BEGIN, (long)(void*)(lpbiInput),    \
00389         (long)(void*)(lpbiOutput)                               \
00390     )
00391 
00392 #define ICDecompressBeginEx(hic, lpbiInput, lpbiOutput)         \
00393     ICUniversalEx(                                              \
00394         hic, ICM_DECOMPRESSEX_BEGIN, (lpbiInput),               \
00395         (lpbiOutput)                                            \
00396     )
00397 
00398 #define ICDecompressQuery(hic, lpbiInput, lpbiOutput)           \
00399     ICSendMessage(                                              \
00400         hic,ICM_DECOMPRESS_QUERY, (long)(void*)(lpbiInput),     \
00401         (long) (void*)(lpbiOutput)                              \
00402     )
00403 
00404 #define ICDecompressQueryEx(hic, lpbiInput, lpbiOutput)         \
00405     ICUniversalEx(                                              \
00406         hic,ICM_DECOMPRESSEX_QUERY, (lpbiInput),                \
00407         (lpbiOutput)                                            \
00408     )
00409 
00410 #define ICDecompressGetFormat(hic, lpbiInput, lpbiOutput)               \
00411     ((long)ICSendMessage(                                               \
00412         hic,ICM_DECOMPRESS_GET_FORMAT, (long)(void*)(lpbiInput),        \
00413         (long)(void*)(lpbiOutput)                                       \
00414     ))
00415 
00416 #define ICDecompressGetFormatSize(hic, lpbi)                            \
00417         ICDecompressGetFormat(hic, lpbi, NULL)
00418 
00419 #define ICDecompressGetPalette(hic, lpbiInput, lpbiOutput)              \
00420     ICSendMessage(                                                      \
00421         hic, ICM_DECOMPRESS_GET_PALETTE, (long)(void*)(lpbiInput),      \
00422         (long)(void*)(lpbiOutput)                                       \
00423     )
00424 
00425 #define ICDecompressSetPalette(hic,lpbiPalette) \
00426         ICSendMessage(                          \
00427                 hic,ICM_DECOMPRESS_SET_PALETTE,         \
00428                 (long)(void*)(lpbiPalette),0            \
00429         )
00430 
00431 #define ICDecompressEnd(hic) ICSendMessage(hic, ICM_DECOMPRESS_END, 0, 0)
00432 #define ICDecompressEndEx(hic) ICSendMessage(hic,ICM_DECOMPRESSEX_END, 0, 0)
00433 
00434 #define ICDRAW_QUERY        0x00000001L   /* test for support */
00435 #define ICDRAW_FULLSCREEN   0x00000002L   /* draw to full screen */
00436 #define ICDRAW_HDC          0x00000004L   /* draw to a HDC/HWND */
00437 
00438 
00439 WIN_BOOL        VFWAPI  ICInfo(long fccType, long fccHandler, ICINFO * lpicinfo);
00440 LRESULT VFWAPI  ICGetInfo(HIC hic,ICINFO *picinfo, long cb);
00441 HIC     VFWAPI  ICOpen(long fccType, long fccHandler, UINT wMode);
00442 //HIC   VFWAPI  ICOpenFunction(long fccType, long fccHandler, unsigned int wMode, void* lpfnHandler);
00443 
00444 LRESULT VFWAPI ICClose(HIC hic);
00445 LRESULT VFWAPI ICSendMessage(HIC hic, unsigned int msg, long dw1, long dw2);
00446 //HIC   VFWAPI ICLocate(long fccType, long fccHandler, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut, short wFlags);
00447 
00448 int VFWAPI ICDoSomething(void);
00449 
00450 long    VFWAPIV ICDrawBegin(
00451         HIC                     hic,
00452         long                    dwFlags,/* flags */
00453         HPALETTE                hpal,   /* palette to draw with */
00454         HWND                    hwnd,   /* window to draw to */
00455         HDC                     hdc,    /* HDC to draw to */
00456         INT                     xDst,   /* destination rectangle */
00457         INT                     yDst,
00458         INT                     dxDst,
00459         INT                     dyDst,
00460         LPBITMAPINFOHEADER      lpbi,   /* format of frame to draw */
00461         INT                     xSrc,   /* source rectangle */
00462         INT                     ySrc,
00463         INT                     dxSrc,
00464         INT                     dySrc,
00465         long                    dwRate, /* frames/second = (dwRate/dwScale) */
00466         long                    dwScale
00467 );
00468 
00469 /* as passed to ICM_DRAW_BEGIN (FIXME: correct only for Win32?)  */
00470 typedef struct {
00471         long            dwFlags;
00472         HPALETTE        hpal;
00473         HWND            hwnd;
00474         HDC             hdc;
00475         INT             xDst;
00476         INT             yDst;
00477         INT             dxDst;
00478         INT             dyDst;
00479         LPBITMAPINFOHEADER      lpbi;
00480         INT             xSrc;
00481         INT             ySrc;
00482         INT             dxSrc;
00483         INT             dySrc;
00484         long            dwRate;
00485         long            dwScale;
00486 } ICDRAWBEGIN;
00487 
00488 #define ICDRAW_HURRYUP      0x80000000L   /* don't draw just buffer (hurry up!) */
00489 #define ICDRAW_UPDATE       0x40000000L   /* don't draw just update screen */
00490 #define ICDRAW_PREROLL      0x20000000L   /* this frame is before real start */
00491 #define ICDRAW_NULLFRAME    0x10000000L   /* repeat last frame */
00492 #define ICDRAW_NOTKEYFRAME  0x08000000L   /* this frame is not a key frame */
00493 
00494 typedef struct {
00495         long    dwFlags;
00496         void*   lpFormat;
00497         void*   lpData;
00498         long    cbData;
00499         long    lTime;
00500 } ICDRAW;
00501 
00502 long VFWAPIV ICDraw(HIC hic,long dwFlags,void* lpFormat,void* lpData,long cbData,long lTime);
00503 
00504 
00505 #define AVIGETFRAMEF_BESTDISPLAYFMT     1
00506 
00507 typedef struct _AVISTREAMINFOA {
00508     long        fccType;
00509     long        fccHandler;
00510     long        dwFlags;        /* AVIIF_* */
00511     long        dwCaps;
00512     short       wPriority;
00513     short       wLanguage;
00514     long        dwScale;
00515     long        dwRate;         /* dwRate / dwScale == samples/second */
00516     long        dwStart;
00517     long        dwLength;       /* In units above... */
00518     long        dwInitialFrames;
00519     long        dwSuggestedBufferSize;
00520     long        dwQuality;
00521     long        dwSampleSize;
00522     RECT        rcFrame;
00523     long        dwEditCount;
00524     long        dwFormatChangeCount;
00525     char        szName[64];
00526 } AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
00527 
00528 typedef struct _AVISTREAMINFOW {
00529     long        fccType;
00530     long        fccHandler;
00531     long        dwFlags;
00532     long        dwCaps;
00533     short       wPriority;
00534     short       wLanguage;
00535     long        dwScale;
00536     long        dwRate;         /* dwRate / dwScale == samples/second */
00537     long        dwStart;
00538     long        dwLength;       /* In units above... */
00539     long        dwInitialFrames;
00540     long        dwSuggestedBufferSize;
00541     long        dwQuality;
00542     long        dwSampleSize;
00543     RECT        rcFrame;
00544     long        dwEditCount;
00545     long        dwFormatChangeCount;
00546     short       szName[64];
00547 } AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
00548 DECL_WINELIB_TYPE_AW(AVISTREAMINFO)
00549 DECL_WINELIB_TYPE_AW(LPAVISTREAMINFO)
00550 DECL_WINELIB_TYPE_AW(PAVISTREAMINFO)
00551 
00552 #define AVISTREAMINFO_DISABLED          0x00000001
00553 #define AVISTREAMINFO_FORMATCHANGES     0x00010000
00554 
00555 /* AVIFILEINFO.dwFlags */
00556 #define AVIFILEINFO_HASINDEX            0x00000010
00557 #define AVIFILEINFO_MUSTUSEINDEX        0x00000020
00558 #define AVIFILEINFO_ISINTERLEAVED       0x00000100
00559 #define AVIFILEINFO_WASCAPTUREFILE      0x00010000
00560 #define AVIFILEINFO_COPYRIGHTED         0x00020000
00561 
00562 /* AVIFILEINFO.dwCaps */
00563 #define AVIFILECAPS_CANREAD             0x00000001
00564 #define AVIFILECAPS_CANWRITE            0x00000002
00565 #define AVIFILECAPS_ALLKEYFRAMES        0x00000010
00566 #define AVIFILECAPS_NOCOMPRESSION       0x00000020
00567 
00568 typedef struct _AVIFILEINFOW {
00569     long               dwMaxBytesPerSec;
00570     long               dwFlags;
00571     long               dwCaps;
00572     long               dwStreams;
00573     long               dwSuggestedBufferSize;
00574     long               dwWidth;
00575     long               dwHeight;
00576     long               dwScale;        
00577     long               dwRate;
00578     long               dwLength;
00579     long               dwEditCount;
00580     short               szFileType[64];
00581 } AVIFILEINFOW, * LPAVIFILEINFOW, *PAVIFILEINFOW;
00582 
00583 typedef struct _AVIFILEINFOA {
00584     long               dwMaxBytesPerSec;
00585     long               dwFlags;
00586     long               dwCaps;
00587     long               dwStreams;
00588     long               dwSuggestedBufferSize;
00589     long               dwWidth;
00590     long               dwHeight;
00591     long               dwScale;        
00592     long               dwRate;
00593     long               dwLength;
00594     long               dwEditCount;
00595     char                szFileType[64];
00596 } AVIFILEINFOA, * LPAVIFILEINFOA, *PAVIFILEINFOA;
00597 
00598 DECL_WINELIB_TYPE_AW(AVIFILEINFO)
00599 DECL_WINELIB_TYPE_AW(PAVIFILEINFO)
00600 DECL_WINELIB_TYPE_AW(LPAVIFILEINFO)
00601 
00602 /* AVICOMPRESSOPTIONS.dwFlags. determines presence of fields in below struct */
00603 #define AVICOMPRESSF_INTERLEAVE 0x00000001
00604 #define AVICOMPRESSF_DATARATE   0x00000002
00605 #define AVICOMPRESSF_KEYFRAMES  0x00000004
00606 #define AVICOMPRESSF_VALID      0x00000008
00607 
00608 typedef struct {
00609     long        fccType;                /* stream type, for consistency */
00610     long        fccHandler;             /* compressor */
00611     long        dwKeyFrameEvery;        /* keyframe rate */
00612     long        dwQuality;              /* compress quality 0-10,000 */
00613     long        dwBytesPerSecond;       /* unsigned chars per second */
00614     long        dwFlags;                /* flags... see below */
00615     void*       lpFormat;               /* save format */
00616     long        cbFormat;
00617     void*       lpParms;                /* compressor options */
00618     long        cbParms;
00619     long        dwInterleaveEvery;      /* for non-video streams only */
00620 } AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
00621 
00622 
00623 
00624 typedef struct {
00625     long                cbSize;         // set to sizeof(COMPVARS) before
00626                                         // calling ICCompressorChoose
00627     long                dwFlags;        // see below...
00628     HIC                 hic;            // HIC of chosen compressor
00629     long               fccType; // basically ICTYPE_VIDEO
00630     long               fccHandler;      // handler of chosen compressor or
00631                                         // "" or "DIB "
00632     LPBITMAPINFO        lpbiIn;         // input format
00633     LPBITMAPINFO        lpbiOut;        // output format - will compress to this
00634     void*               lpBitsOut;
00635     void*               lpBitsPrev;
00636     long                lFrame;
00637     long                lKey;           // key frames how often?
00638     long                lDataRate;      // desired data rate KB/Sec
00639     long                lQ;             // desired quality
00640     long                lKeyCount;
00641     void*               lpState;        // state of compressor
00642     long                cbState;        // size of the state
00643 } COMPVARS, *PCOMPVARS;
00644 
00645 // FLAGS for dwFlags element of COMPVARS structure:
00646 
00647 
00648 #define AVIERR_OK               0
00649 #define MAKE_AVIERR(error)      MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+error)
00650 
00651 #define AVIERR_UNSUPPORTED      MAKE_AVIERR(101)
00652 #define AVIERR_BADFORMAT        MAKE_AVIERR(102)
00653 #define AVIERR_MEMORY           MAKE_AVIERR(103)
00654 #define AVIERR_INTERNAL         MAKE_AVIERR(104)
00655 #define AVIERR_BADFLAGS         MAKE_AVIERR(105)
00656 #define AVIERR_BADPARAM         MAKE_AVIERR(106)
00657 #define AVIERR_BADSIZE          MAKE_AVIERR(107)
00658 #define AVIERR_BADHANDLE        MAKE_AVIERR(108)
00659 #define AVIERR_FILEREAD         MAKE_AVIERR(109)
00660 #define AVIERR_FILEWRITE        MAKE_AVIERR(110)
00661 #define AVIERR_FILEOPEN         MAKE_AVIERR(111)
00662 #define AVIERR_COMPRESSOR       MAKE_AVIERR(112)
00663 #define AVIERR_NOCOMPRESSOR     MAKE_AVIERR(113)
00664 #define AVIERR_READONLY         MAKE_AVIERR(114)
00665 #define AVIERR_NODATA           MAKE_AVIERR(115)
00666 #define AVIERR_BUFFERTOOSMALL   MAKE_AVIERR(116)
00667 #define AVIERR_CANTCOMPRESS     MAKE_AVIERR(117)
00668 #define AVIERR_USERABORT        MAKE_AVIERR(198)
00669 #define AVIERR_ERROR            MAKE_AVIERR(199)
00670 
00671 #ifdef __cplusplus
00672 }
00673 #endif
00674 #endif /* __WINE_VFW_H */

Generated on Tue Dec 20 10:14:22 2005 for vlc-0.8.4a by  doxygen 1.4.2