source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/avifmt.h@ 1167

Last change on this file since 1167 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.7 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#include <winapifamily.h>
7
8/* The contents of this file is duplicated in vfw.h */
9#ifndef _INC_AVIFMT
10#define _INC_AVIFMT 100
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
17
18#ifndef mmioFOURCC
19#define mmioFOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24))
20#endif
21
22#ifndef aviTWOCC
23#define aviTWOCC(ch0, ch1) ((WORD) (BYTE) (ch0) | ((WORD) (BYTE) (ch1) << 8))
24#endif
25
26 typedef WORD TWOCC;
27
28#define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
29#define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
30#define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
31#define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
32#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
33#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
34#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
35#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
36
37#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
38#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
39
40#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
41
42#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
43#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
44#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
45#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
46
47#define cktypeDIBbits aviTWOCC('d', 'b')
48#define cktypeDIBcompressed aviTWOCC('d', 'c')
49#define cktypePALchange aviTWOCC('p', 'c')
50#define cktypeWAVEbytes aviTWOCC('w', 'b')
51
52#define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
53
54#define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
55#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + (FromHex(HIBYTE(LOWORD(fcc))))))
56
57#define TWOCCFromFOURCC(fcc) HIWORD(fcc)
58
59#define ToHex(n) ((BYTE) (((n) > 9) ? ((n) - 10 + 'A') : ((n) + '0')))
60#define MAKEAVICKID(tcc, stream) MAKELONG((ToHex((stream) & 0xf) << 8) | (ToHex(((stream) & 0xf0) >> 4)), tcc)
61
62#define AVIF_HASINDEX 0x00000010
63#define AVIF_MUSTUSEINDEX 0x00000020
64#define AVIF_ISINTERLEAVED 0x00000100
65#define AVIF_TRUSTCKTYPE 0x00000800
66#define AVIF_WASCAPTUREFILE 0x00010000
67#define AVIF_COPYRIGHTED 0x00020000
68
69#define AVI_HEADERSIZE 2048
70
71 typedef struct {
72 DWORD dwMicroSecPerFrame;
73 DWORD dwMaxBytesPerSec;
74 DWORD dwPaddingGranularity;
75 DWORD dwFlags;
76 DWORD dwTotalFrames;
77 DWORD dwInitialFrames;
78 DWORD dwStreams;
79 DWORD dwSuggestedBufferSize;
80 DWORD dwWidth;
81 DWORD dwHeight;
82 DWORD dwReserved[4];
83 } MainAVIHeader;
84#define AVISF_DISABLED 0x00000001
85
86#define AVISF_VIDEO_PALCHANGES 0x00010000
87
88 typedef struct {
89 FOURCC fccType;
90 FOURCC fccHandler;
91 DWORD dwFlags;
92 WORD wPriority;
93 WORD wLanguage;
94 DWORD dwInitialFrames;
95 DWORD dwScale;
96 DWORD dwRate;
97 DWORD dwStart;
98 DWORD dwLength;
99 DWORD dwSuggestedBufferSize;
100 DWORD dwQuality;
101 DWORD dwSampleSize;
102 RECT rcFrame;
103 } AVIStreamHeader;
104#define AVIIF_LIST __MSABI_LONG(0x00000001)
105#define AVIIF_KEYFRAME __MSABI_LONG(0x00000010)
106#define AVIIF_FIRSTPART __MSABI_LONG(0x00000020)
107#define AVIIF_LASTPART __MSABI_LONG(0x00000040)
108#define AVIIF_MIDPART (AVIIF_LASTPART|AVIIF_FIRSTPART)
109
110#define AVIIF_NOTIME __MSABI_LONG(0x00000100)
111#define AVIIF_COMPUSE __MSABI_LONG(0x0fff0000)
112
113 typedef struct {
114 DWORD ckid;
115 DWORD dwFlags;
116 DWORD dwChunkOffset;
117 DWORD dwChunkLength;
118 } AVIINDEXENTRY;
119
120 typedef struct {
121 BYTE bFirstEntry;
122 BYTE bNumEntries;
123 WORD wFlags;
124 PALETTEENTRY peNew[];
125 } AVIPALCHANGE;
126#endif
127
128#ifdef __cplusplus
129}
130#endif
131#endif
Note: See TracBrowser for help on using the repository browser.