annotate loader/qtx/qtxsdk/components.h @ 8266:2de1fa441839

fixes, updates
author arpi
date Sun, 24 Nov 2002 21:25:00 +0000
parents 2cb0e0e83e95
children 75a09ccb1a18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
1 // Basic types:
e331fefb520e some more...
arpi
parents: 2797
diff changeset
2
e331fefb520e some more...
arpi
parents: 2797
diff changeset
3 typedef char * Ptr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
4 typedef Ptr * Handle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
5 typedef long Size;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
6 typedef unsigned char Boolean;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
7 typedef unsigned char Str31[32];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
8 typedef long Fixed;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
9
e331fefb520e some more...
arpi
parents: 2797
diff changeset
10 typedef long OSErr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
11 typedef int OSType;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
12
2501
alex
parents:
diff changeset
13 typedef long ComponentResult;
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
14 typedef unsigned char UInt8;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
15 typedef signed char SInt8;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
16 typedef unsigned short UInt16;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
17 typedef signed short SInt16;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
18 typedef unsigned long UInt32;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
19 typedef signed long SInt32;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
20
e331fefb520e some more...
arpi
parents: 2797
diff changeset
21 #define FOUR_CHAR_CODE(x) ((unsigned long)(x)) /* otherwise compiler will complain about values with high bit set */
2501
alex
parents:
diff changeset
22
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
23 // codec private shit:
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
24 typedef void *GlobalsPtr;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
25 typedef void **Globals;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
26
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
27 //==================== COMPONENTS ===========================
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
28
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
29 struct __attribute__((__packed__)) ComponentParameters {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
30 UInt8 flags; /* call modifiers: sync/async, deferred, immed, etc */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
31 UInt8 paramSize; /* size in bytes of actual parameters passed to this call */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
32 short what; /* routine selector, negative for Component management calls */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
33 long params[1]; /* actual parameters for the indicated routine */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
34 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
35 typedef struct ComponentParameters ComponentParameters;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
36
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
37
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
38 struct __attribute__((__packed__)) ComponentDescription {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
39 OSType componentType; /* A unique 4-byte code indentifying the command set */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
40 OSType componentSubType; /* Particular flavor of this instance */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
41 OSType componentManufacturer; /* Vendor indentification */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
42 unsigned long componentFlags; /* 8 each for Component,Type,SubType,Manuf/revision */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
43 unsigned long componentFlagsMask; /* Mask for specifying which flags to consider in search, zero during registration */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
44 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
45 typedef struct ComponentDescription ComponentDescription;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
46
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
47
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
48 struct __attribute__((__packed__)) ResourceSpec {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
49 OSType resType; /* 4-byte code */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
50 short resID; /* */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
51 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
52 typedef struct ResourceSpec ResourceSpec;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
53
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
54
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
55 struct __attribute__((__packed__)) ComponentResource {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
56 ComponentDescription cd; /* Registration parameters */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
57 ResourceSpec component; /* resource where Component code is found */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
58 ResourceSpec componentName; /* name string resource */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
59 ResourceSpec componentInfo; /* info string resource */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
60 ResourceSpec componentIcon; /* icon resource */
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
61 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
62 typedef struct ComponentResource ComponentResource;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
63 typedef ComponentResource * ComponentResourcePtr;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
64 typedef ComponentResourcePtr * ComponentResourceHandle;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
65
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
66
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
67 struct __attribute__((__packed__)) ComponentRecord {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
68 long data[1];
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
69 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
70 typedef struct ComponentRecord ComponentRecord;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
71 typedef ComponentRecord * Component;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
72
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
73
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
74 struct __attribute__((__packed__)) ComponentInstanceRecord {
2797
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
75 long data[1];
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
76 };
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
77 typedef struct ComponentInstanceRecord ComponentInstanceRecord;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
78
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
79 typedef ComponentInstanceRecord * ComponentInstance;
4c9966c2b2ed updated
arpi
parents: 2776
diff changeset
80
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
81 // ========================= QUICKDRAW =========================
e331fefb520e some more...
arpi
parents: 2797
diff changeset
82
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
83 struct __attribute__((__packed__)) Rect {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
84 short top;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
85 short left;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
86 short bottom;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
87 short right;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
88 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
89 typedef struct Rect Rect;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
90 typedef Rect * RectPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
91
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
92 struct __attribute__((__packed__)) RGBColor {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
93 unsigned short red; /*magnitude of red component*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
94 unsigned short green; /*magnitude of green component*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
95 unsigned short blue; /*magnitude of blue component*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
96 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
97 typedef struct RGBColor RGBColor;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
98 typedef RGBColor * RGBColorPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
99 typedef RGBColorPtr * RGBColorHdl;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
100
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
101 struct __attribute__((__packed__)) ColorSpec {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
102 short value; /*index or other value*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
103 RGBColor rgb; /*true color*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
104 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
105 typedef struct ColorSpec ColorSpec;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
106 typedef ColorSpec * ColorSpecPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
107 typedef ColorSpec CSpecArray[1];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
108
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
109 struct __attribute__((__packed__)) ColorTable {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
110 long ctSeed; /*unique identifier for table*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
111 short ctFlags; /*high bit: 0 = PixMap; 1 = device*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
112 short ctSize; /*number of entries in CTTable*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
113 CSpecArray ctTable; /*array [0..0] of ColorSpec*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
114 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
115 typedef struct ColorTable ColorTable;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
116 typedef ColorTable * CTabPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
117 typedef CTabPtr * CTabHandle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
118
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
119 struct __attribute__((__packed__)) MatrixRecord {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
120 Fixed matrix[3][3];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
121 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
122 typedef struct MatrixRecord MatrixRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
123 typedef MatrixRecord * MatrixRecordPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
124
e331fefb520e some more...
arpi
parents: 2797
diff changeset
125 typedef long ImageSequence;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
126 typedef OSType CodecType;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
127 typedef unsigned short CodecFlags;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
128 typedef unsigned long CodecQ;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
129
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
130 struct __attribute__((__packed__)) ImageDescription {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
131 long idSize; /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
132 CodecType cType; /* what kind of codec compressed this data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
133 long resvd1; /* reserved for Apple use */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
134 short resvd2; /* reserved for Apple use */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
135 short dataRefIndex; /* set to zero */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
136 short version; /* which version is this data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
137 short revisionLevel; /* what version of that codec did this */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
138 long vendor; /* whose codec compressed this data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
139 CodecQ temporalQuality; /* what was the temporal quality factor */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
140 CodecQ spatialQuality; /* what was the spatial quality factor */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
141 short width; /* how many pixels wide is this data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
142 short height; /* how many pixels high is this data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
143 Fixed hRes; /* horizontal resolution */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
144 Fixed vRes; /* vertical resolution */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
145 long dataSize; /* if known, the size of data for this image descriptor */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
146 short frameCount; /* number of frames this description applies to */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
147 Str31 name; /* name of codec ( in case not installed ) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
148 short depth; /* what depth is this data (1-32) or ( 33-40 grayscale ) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
149 short clutID; /* clut id or if 0 clut follows or -1 if no clut */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
150 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
151 typedef struct ImageDescription ImageDescription;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
152 typedef ImageDescription * ImageDescriptionPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
153 typedef ImageDescriptionPtr * ImageDescriptionHandle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
154
e331fefb520e some more...
arpi
parents: 2797
diff changeset
155 /* values for PixMap.pixelFormat*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
156 enum {
e331fefb520e some more...
arpi
parents: 2797
diff changeset
157 k16LE555PixelFormat = FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
158 k16LE5551PixelFormat = FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
159 k16BE565PixelFormat = FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
160 k16LE565PixelFormat = FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
161 k24BGRPixelFormat = FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
162 k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
163 k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
164 k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
165 kYUVSPixelFormat = FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
166 kYUVUPixelFormat = FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
167 kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
168 kYUV411PixelFormat = FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
169 kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
170 kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
171 kYUV211PixelFormat = FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
172 k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
173 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
174
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
175 struct __attribute__((__packed__)) PixMapExtension {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
176 long extSize; /*size of struct, duh!*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
177 unsigned long pmBits; /*pixmap attributes bitfield*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
178 void * pmGD; /*this is a GDHandle*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
179 long pmSeed;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
180 Fixed gammaLevel; /*pixmap gammalevel*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
181 Fixed requestedGammaLevel;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
182 unsigned long reserved2;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
183 long longRowBytes; /*used when rowBytes > 16382*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
184 unsigned long signature;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
185 Handle baseAddrHandle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
186 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
187 typedef struct PixMapExtension PixMapExtension;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
188
e331fefb520e some more...
arpi
parents: 2797
diff changeset
189 typedef PixMapExtension * PixMapExtPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
190 typedef PixMapExtPtr * PixMapExtHandle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
191
e331fefb520e some more...
arpi
parents: 2797
diff changeset
192
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
193 struct __attribute__((__packed__)) PixMap {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
194 Ptr baseAddr; /*pointer to pixels*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
195 short rowBytes; /*offset to next line*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
196 Rect bounds; /*encloses bitmap*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
197 short pmVersion; /*pixMap version number*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
198 short packType; /*defines packing format*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
199 long packSize; /*length of pixel data*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
200 Fixed hRes; /*horiz. resolution (ppi)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
201 Fixed vRes; /*vert. resolution (ppi)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
202 short pixelType; /*defines pixel type*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
203 short pixelSize; /*# bits in pixel*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
204 short cmpCount; /*# components in pixel*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
205 short cmpSize; /*# bits per component*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
206 OSType pixelFormat; /*fourCharCode representation*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
207 CTabHandle pmTable; /*color map for this pixMap*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
208 PixMapExtHandle pmExt; /*Handle to pixMap extension*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
209 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
210 typedef struct PixMap PixMap;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
211 typedef PixMap * PixMapPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
212 typedef PixMapPtr * PixMapHandle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
213
e331fefb520e some more...
arpi
parents: 2797
diff changeset
214
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
215 struct __attribute__((__packed__)) BitMap {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
216 Ptr baseAddr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
217 short rowBytes;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
218 Rect bounds;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
219 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
220 typedef struct BitMap BitMap;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
221 typedef BitMap * BitMapPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
222 typedef BitMapPtr * BitMapHandle;
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
223 typedef struct OpaqueRgnHandle* RgnHandle;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
224
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
225 struct Pattern {
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
226 UInt8 pat[8];
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
227 };
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
228 typedef struct Pattern Pattern;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
229 typedef unsigned char Style;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
230 typedef Style StyleField;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
231 struct __attribute__((__packed__)) Point {
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
232 short v;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
233 short h;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
234 };
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
235 typedef struct Point Point;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
236 struct __attribute__((__packed__)) GrafPort {
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
237 short device;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
238 BitMap portBits;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
239 Rect portRect;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
240 RgnHandle visRgn;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
241 RgnHandle clipRgn;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
242 Pattern bkPat;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
243 Pattern fillPat;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
244 Point pnLoc;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
245 Point pnSize;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
246 short pnMode;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
247 Pattern pnPat;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
248 short pnVis;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
249 short txFont;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
250 StyleField txFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
251 UInt8 txFlags; /* QuickTime uses second 8 bits of StyleField for txFlags */
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
252 short txMode;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
253 short txSize;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
254 Fixed spExtra;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
255 long fgColor;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
256 long bkColor;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
257 short colrBit;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
258 short patStretch;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
259 Handle picSave;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
260 Handle rgnSave;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
261 Handle polySave;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
262 /*QDProcsPtr*/void* grafProcs;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
263 };
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
264 typedef struct GrafPort GrafPort;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
265 typedef GrafPort *GWorldPtr;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
266 typedef GWorldPtr *GWorldHandle;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
267 #define anyCodec ((CodecComponent)0)
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
268 enum {
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
269 /* transfer modes */
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
270 srcCopy = 0, /*the 16 transfer modes*/
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
271 srcOr = 1,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
272 srcXor = 2,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
273 srcBic = 3,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
274 notSrcCopy = 4,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
275 notSrcOr = 5,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
276 notSrcXor = 6,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
277 notSrcBic = 7,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
278 patCopy = 8,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
279 patOr = 9,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
280 patXor = 10,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
281 patBic = 11,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
282 notPatCopy = 12,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
283 notPatOr = 13,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
284 notPatXor = 14,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
285 notPatBic = 15, /* Special Text Transfer Mode */
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
286 grayishTextOr = 49,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
287 hilitetransfermode = 50,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
288 hilite = 50, /* Arithmetic transfer modes */
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
289 blend = 32,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
290 addPin = 33,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
291 addOver = 34,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
292 subPin = 35,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
293 addMax = 37,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
294 adMax = 37,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
295 subOver = 38,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
296 adMin = 39,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
297 ditherCopy = 64, /* Transparent mode constant */
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
298 transparent = 36
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
299 };
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
300
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
301 typedef unsigned long GWorldFlags;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
302
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
303
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
304
e331fefb520e some more...
arpi
parents: 2797
diff changeset
305 // ============================== CODECS ===========================
e331fefb520e some more...
arpi
parents: 2797
diff changeset
306
e331fefb520e some more...
arpi
parents: 2797
diff changeset
307 typedef Component CompressorComponent;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
308 typedef Component DecompressorComponent;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
309 typedef Component CodecComponent;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
310
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
311 enum {
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
312 codecLosslessQuality = 0x00000400,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
313 codecMaxQuality = 0x000003FF,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
314 codecMinQuality = 0x00000000,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
315 codecLowQuality = 0x00000100,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
316 codecNormalQuality = 0x00000200,
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
317 codecHighQuality = 0x00000300
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
318 };
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
319
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
320
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
321
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
322 // callbacks:
e331fefb520e some more...
arpi
parents: 2797
diff changeset
323 typedef void* ImageCodecDrawBandCompleteUPP;
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
324 typedef long long ICMProgressProcRecord;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
325 typedef long long ICMCompletionProcRecord;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
326 typedef long long ICMDataProcRecord;
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
327 typedef void* ICMFrameTimePtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
328 typedef void* CDSequenceDataSourcePtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
329 typedef void* ICMFrameTimeInfoPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
330
e331fefb520e some more...
arpi
parents: 2797
diff changeset
331 // graphics port
e331fefb520e some more...
arpi
parents: 2797
diff changeset
332 typedef struct OpaqueGrafPtr* GrafPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
333 typedef GrafPtr CGrafPtr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
334
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
335
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
336 /* codec capabilities flags */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
337 enum {
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
338 codecCanScale = 1L << 0,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
339 // 1
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
340 codecCanMask = 1L << 1,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
341 // 2
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
342 codecCanMatte = 1L << 2,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
343 // 4
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
344 codecCanTransform = 1L << 3,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
345 // 8
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
346 codecCanTransferMode = 1L << 4,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
347 // 10
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
348 codecCanCopyPrev = 1L << 5,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
349 // 20
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
350 codecCanSpool = 1L << 6,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
351 // 40
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
352 codecCanClipVertical = 1L << 7,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
353 // 80
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
354 codecCanClipRectangular = 1L << 8,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
355 // 100
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
356 codecCanRemapColor = 1L << 9,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
357 // 200
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
358 codecCanFastDither = 1L << 10,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
359 // 400
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
360 codecCanSrcExtract = 1L << 11,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
361 // 800
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
362 codecCanCopyPrevComp = 1L << 12,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
363 // 1000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
364 codecCanAsync = 1L << 13,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
365 // 2000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
366 codecCanMakeMask = 1L << 14,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
367 // 4000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
368 codecCanShift = 1L << 15,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
369 // 8000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
370 codecCanAsyncWhen = 1L << 16,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
371 // 10000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
372 codecCanShieldCursor = 1L << 17,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
373 // 20000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
374 codecCanManagePrevBuffer = 1L << 18,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
375 // 40000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
376 codecHasVolatileBuffer = 1L << 19, // 80000 /* codec requires redraw after window movement */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
377 codecWantsRegionMask = 1L << 20,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
378 // 100000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
379 codecImageBufferIsOnScreen = 1L << 21, // 200000 /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
380 codecWantsDestinationPixels = 1L << 22,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
381 // 400000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
382 codecWantsSpecialScaling = 1L << 23,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
383 // 800000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
384 codecHandlesInputs = 1L << 24,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
385 // 1000000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
386 codecCanDoIndirectSurface = 1L << 25, /* codec can handle indirect surface (GDI) */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
387 codecIsSequenceSensitive = 1L << 26,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
388 codecRequiresOffscreen = 1L << 27,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
389 codecRequiresMaskBits = 1L << 28,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
390 codecCanRemapResolution = 1L << 29,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
391 codecIsDirectToScreenOnly = 1L << 30, /* codec can only decompress data to the screen */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
392 codecCanLockSurface = 1L << 31 /* codec can lock destination surface, icm doesn't lock for you */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
393 };
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
394
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
395 /* codec capabilities flags2 */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
396 enum {
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
397 codecUsesOverlaySurface = 1L << 0, /* codec uses overlay surface */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
398 codecImageBufferIsOverlaySurface = 1L << 1, /* codec image buffer is overlay surface, the bits in the buffer are on the screen */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
399 codecSrcMustBeImageBuffer = 1L << 2, /* codec can only source data from an image buffer */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
400 codecImageBufferIsInAGPMemory = 1L << 4, /* codec image buffer is in AGP space, byte writes are OK */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
401 codecImageBufferIsInPCIMemory = 1L << 5 /* codec image buffer is across a PCI bus; byte writes are bad */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
402 };
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
403
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
404 /* codec condition flags */
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
405 // FFD = 13 = 8+4+1
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
406 enum {
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
407 codecConditionFirstBand = 1L << 0,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
408 // 1
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
409 codecConditionLastBand = 1L << 1,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
410 // 2
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
411 codecConditionFirstFrame = 1L << 2,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
412 // 4
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
413 codecConditionNewDepth = 1L << 3,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
414 // 8
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
415 codecConditionNewTransform = 1L << 4,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
416 // 10
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
417 codecConditionNewSrcRect = 1L << 5,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
418 // 20
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
419 codecConditionNewMask = 1L << 6,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
420 // 40
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
421 codecConditionNewMatte = 1L << 7,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
422 // 80
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
423 codecConditionNewTransferMode = 1L << 8,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
424 // 100
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
425 codecConditionNewClut = 1L << 9,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
426 // 200
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
427 codecConditionNewAccuracy = 1L << 10,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
428 // 400
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
429 codecConditionNewDestination = 1L << 11,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
430 // 800
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
431 codecConditionFirstScreen = 1L << 12,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
432 // 1000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
433 codecConditionDoCursor = 1L << 13,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
434 // 2000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
435 codecConditionCatchUpDiff = 1L << 14,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
436 // 4000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
437 codecConditionMaskMayBeChanged = 1L << 15,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
438 // 8000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
439 codecConditionToBuffer = 1L << 16,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
440 // 10000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
441 codecConditionCodecChangedMask = 1L << 31
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
442 // 20000
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
443 };
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
444
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
445
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
446
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
447 struct __attribute__((__packed__)) CodecCapabilities {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
448 long flags;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
449 short wantedPixelSize;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
450 short extendWidth;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
451 short extendHeight;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
452 short bandMin;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
453 short bandInc;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
454 short pad;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
455 unsigned long time;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
456 long flags2; /* field new in QuickTime 4.0 */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
457 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
458 typedef struct CodecCapabilities CodecCapabilities;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
459
e331fefb520e some more...
arpi
parents: 2797
diff changeset
460 struct __attribute__((__packed__)) CodecDecompressParams {
e331fefb520e some more...
arpi
parents: 2797
diff changeset
461 ImageSequence sequenceID; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
462 ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
463 Ptr data;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
464 long bufferSize;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
465
e331fefb520e some more...
arpi
parents: 2797
diff changeset
466 long frameNumber;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
467 long startLine;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
468 long stopLine;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
469 long conditionFlags;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
470
e331fefb520e some more...
arpi
parents: 2797
diff changeset
471 CodecFlags callerFlags;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
472 // short
e331fefb520e some more...
arpi
parents: 2797
diff changeset
473 CodecCapabilities * capabilities; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
474 ICMProgressProcRecord progressProcRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
475 ICMCompletionProcRecord completionProcRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
476
e331fefb520e some more...
arpi
parents: 2797
diff changeset
477 ICMDataProcRecord dataProcRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
478 CGrafPtr port; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
479 PixMap dstPixMap; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
480 BitMapPtr maskBits;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
481 PixMapPtr mattePixMap;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
482 Rect srcRect; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
483 MatrixRecord * matrix; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
484 CodecQ accuracy; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
485 short transferMode; /* predecompress,banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
486 ICMFrameTimePtr frameTime; /* banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
487 long reserved[1];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
488
e331fefb520e some more...
arpi
parents: 2797
diff changeset
489 /* The following fields only exist for QuickTime 2.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
490 SInt8 matrixFlags; /* high bit set if 2x resize */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
491 SInt8 matrixType;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
492 Rect dstRect; /* only valid for simple transforms */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
493
e331fefb520e some more...
arpi
parents: 2797
diff changeset
494 /* The following fields only exist for QuickTime 2.1 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
495 UInt16 majorSourceChangeSeed;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
496 UInt16 minorSourceChangeSeed;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
497 CDSequenceDataSourcePtr sourceData;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
498
e331fefb520e some more...
arpi
parents: 2797
diff changeset
499 RgnHandle maskRegion;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
500
e331fefb520e some more...
arpi
parents: 2797
diff changeset
501 /* The following fields only exist for QuickTime 2.5 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
502 OSType ** wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
503
e331fefb520e some more...
arpi
parents: 2797
diff changeset
504 long screenFloodMethod;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
505 long screenFloodValue;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
506 short preferredOffscreenPixelSize;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
507
e331fefb520e some more...
arpi
parents: 2797
diff changeset
508 /* The following fields only exist for QuickTime 3.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
509 ICMFrameTimeInfoPtr syncFrameTime; /* banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
510 Boolean needUpdateOnTimeChange; /* banddecompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
511 Boolean enableBlackLining;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
512 Boolean needUpdateOnSourceChange; /* band decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
513 Boolean pad;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
514
e331fefb520e some more...
arpi
parents: 2797
diff changeset
515 long unused;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
516
e331fefb520e some more...
arpi
parents: 2797
diff changeset
517 CGrafPtr finalDestinationPort;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
518
e331fefb520e some more...
arpi
parents: 2797
diff changeset
519 long requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
520 long requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
521
e331fefb520e some more...
arpi
parents: 2797
diff changeset
522 /* The following fields only exist for QuickTime 4.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
523 Rect displayableAreaOfRequestedBuffer; /* set in predecompress*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
524 Boolean requestedSingleField;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
525 Boolean needUpdateOnNextIdle;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
526 Boolean pad2[2];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
527 Fixed bufferGammaLevel;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
528
e331fefb520e some more...
arpi
parents: 2797
diff changeset
529 /* The following fields only exist for QuickTime 5.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
530 UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
531 OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
532 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
533 typedef struct CodecDecompressParams CodecDecompressParams;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
534
e331fefb520e some more...
arpi
parents: 2797
diff changeset
535
e331fefb520e some more...
arpi
parents: 2797
diff changeset
536
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
537 struct __attribute__((__packed__)) ImageSubCodecDecompressCapabilities {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
538 long recordSize; /* sizeof(ImageSubCodecDecompressCapabilities)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
539 long decompressRecordSize; /* size of your codec's decompress record*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
540 Boolean canAsync; /* default true*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
541 UInt8 pad0;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
542
e331fefb520e some more...
arpi
parents: 2797
diff changeset
543 /* The following fields only exist for QuickTime 4.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
544 UInt16 suggestedQueueSize;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
545 Boolean canProvideTrigger;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
546
e331fefb520e some more...
arpi
parents: 2797
diff changeset
547 /* The following fields only exist for QuickTime 5.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
548 Boolean subCodecFlushesScreen; /* only used on Mac OS X*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
549 Boolean subCodecCallsDrawBandComplete;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
550 UInt8 pad2[1];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
551
e331fefb520e some more...
arpi
parents: 2797
diff changeset
552 /* The following fields only exist for QuickTime 5.1 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
553 Boolean isChildCodec; /* set by base codec before calling Initialize*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
554 UInt8 pad3[3];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
555 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
556 typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
557
e331fefb520e some more...
arpi
parents: 2797
diff changeset
558
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
559 struct __attribute__((__packed__)) ImageSubCodecDecompressRecord {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
560 Ptr baseAddr;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
561 long rowBytes;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
562 Ptr codecData;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
563 ICMProgressProcRecord progressProcRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
564 ICMDataProcRecord dataProcRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
565 void * userDecompressRecord; /* pointer to codec-specific per-band data*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
566 UInt8 frameType;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
567 Boolean inhibitMP; /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.)*/
e331fefb520e some more...
arpi
parents: 2797
diff changeset
568 UInt8 pad[2];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
569 long priv[2];
e331fefb520e some more...
arpi
parents: 2797
diff changeset
570
e331fefb520e some more...
arpi
parents: 2797
diff changeset
571 /* The following fields only exist for QuickTime 5.0 and greater */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
572 ImageCodecDrawBandCompleteUPP drawBandCompleteUPP; /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
573 void * drawBandCompleteRefCon; /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
574 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
575 typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
576
e331fefb520e some more...
arpi
parents: 2797
diff changeset
577
e331fefb520e some more...
arpi
parents: 2797
diff changeset
578 /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
579 enum {
e331fefb520e some more...
arpi
parents: 2797
diff changeset
580 codecInfoDoes1 = (1L << 0), /* codec can work with 1-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
581 codecInfoDoes2 = (1L << 1), /* codec can work with 2-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
582 codecInfoDoes4 = (1L << 2), /* codec can work with 4-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
583 codecInfoDoes8 = (1L << 3), /* codec can work with 8-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
584 codecInfoDoes16 = (1L << 4), /* codec can work with 16-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
585 codecInfoDoes32 = (1L << 5), /* codec can work with 32-bit pixels */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
586 codecInfoDoesDither = (1L << 6), /* codec can do ditherMode */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
587 codecInfoDoesStretch = (1L << 7), /* codec can stretch to arbitrary sizes */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
588 codecInfoDoesShrink = (1L << 8), /* codec can shrink to arbitrary sizes */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
589 codecInfoDoesMask = (1L << 9), /* codec can mask to clipping regions */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
590 codecInfoDoesTemporal = (1L << 10), /* codec can handle temporal redundancy */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
591 codecInfoDoesDouble = (1L << 11), /* codec can stretch to double size exactly */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
592 codecInfoDoesQuad = (1L << 12), /* codec can stretch to quadruple size exactly */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
593 codecInfoDoesHalf = (1L << 13), /* codec can shrink to half size */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
594 codecInfoDoesQuarter = (1L << 14), /* codec can shrink to quarter size */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
595 codecInfoDoesRotate = (1L << 15), /* codec can rotate on decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
596 codecInfoDoesHorizFlip = (1L << 16), /* codec can flip horizontally on decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
597 codecInfoDoesVertFlip = (1L << 17), /* codec can flip vertically on decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
598 codecInfoHasEffectParameterList = (1L << 18), /* codec implements get effects parameter list call, once was codecInfoDoesSkew */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
599 codecInfoDoesBlend = (1L << 19), /* codec can blend on decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
600 codecInfoDoesWarp = (1L << 20), /* codec can warp arbitrarily on decompress */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
601 codecInfoDoesRecompress = (1L << 21), /* codec can recompress image without accumulating errors */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
602 codecInfoDoesSpool = (1L << 22), /* codec can spool image data */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
603 codecInfoDoesRateConstrain = (1L << 23) /* codec can data rate constrain */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
604 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
605
e331fefb520e some more...
arpi
parents: 2797
diff changeset
606
e331fefb520e some more...
arpi
parents: 2797
diff changeset
607 enum {
e331fefb520e some more...
arpi
parents: 2797
diff changeset
608 codecInfoDepth1 = (1L << 0), /* compressed data at 1 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
609 codecInfoDepth2 = (1L << 1), /* compressed data at 2 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
610 codecInfoDepth4 = (1L << 2), /* compressed data at 4 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
611 codecInfoDepth8 = (1L << 3), /* compressed data at 8 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
612 codecInfoDepth16 = (1L << 4), /* compressed data at 16 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
613 codecInfoDepth32 = (1L << 5), /* compressed data at 32 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
614 codecInfoDepth24 = (1L << 6), /* compressed data at 24 bpp depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
615 codecInfoDepth33 = (1L << 7), /* compressed data at 1 bpp monochrome depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
616 codecInfoDepth34 = (1L << 8), /* compressed data at 2 bpp grayscale depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
617 codecInfoDepth36 = (1L << 9), /* compressed data at 4 bpp grayscale depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
618 codecInfoDepth40 = (1L << 10), /* compressed data at 8 bpp grayscale depth available */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
619 codecInfoStoresClut = (1L << 11), /* compressed data can have custom cluts */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
620 codecInfoDoesLossless = (1L << 12), /* compressed data can be stored in lossless format */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
621 codecInfoSequenceSensitive = (1L << 13) /* compressed data is sensitive to out of sequence decoding */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
622 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
623
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
624 struct __attribute__((__packed__)) CodecInfo {
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
625 Str31 typeName; /* name of the codec type i.e.: 'Apple Image Compression' */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
626 short version; /* version of the codec data that this codec knows about */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
627 short revisionLevel; /* revision level of this codec i.e: 0x00010001 (1.0.1) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
628 long vendor; /* Maker of this codec i.e: 'appl' */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
629 long decompressFlags; /* codecInfo flags for decompression capabilities */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
630 long compressFlags; /* codecInfo flags for compression capabilities */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
631 long formatFlags; /* codecInfo flags for compression format details */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
632 UInt8 compressionAccuracy; /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
633 UInt8 decompressionAccuracy; /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
634 unsigned short compressionSpeed; /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
635 unsigned short decompressionSpeed; /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
636 UInt8 compressionLevel; /* measure (1-255) of compression level of this codec (0 if unknown) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
637 UInt8 resvd; /* pad */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
638 short minimumHeight; /* minimum height of image (block size) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
639 short minimumWidth; /* minimum width of image (block size) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
640 short decompressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
641 short compressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
e331fefb520e some more...
arpi
parents: 2797
diff changeset
642 long privateData;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
643 };
e331fefb520e some more...
arpi
parents: 2797
diff changeset
644 typedef struct CodecInfo CodecInfo;
e331fefb520e some more...
arpi
parents: 2797
diff changeset
645
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
646 static inline void dump_ImageDescription(void* xxx){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
647 ImageDescription* id=(ImageDescription*)xxx;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
648 unsigned char* x;
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
649 int i;
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
650
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
651 for(i=0;i<id->idSize;i++){
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
652 printf(" %02X",((unsigned char*)id)[i]);
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
653 if((i%16)==15) printf("\n");
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
654 }
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
655 printf("\n");
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
656
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
657
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
658 printf("=============== ImageDescription at %p ==================\n",xxx);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
659 printf("idSize=0x%X fourcc=0x%08X\n",id->idSize,id->cType);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
660 printf("ver=%d rev=%d vendor=0x%08X\n",id->version,id->revisionLevel,id->vendor);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
661 printf("tempQ=%d spatQ=%d dim: %d x %d dpi: %d x %d depth: %d\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
662 id->temporalQuality,id->spatialQuality,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
663 id->width, id->height,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
664 id->hRes, id->vRes,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
665 id->depth);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
666 printf("dataSize=%d frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
667 printf("name='%.*s'\n",((char*)(&id->name))[0],((char*)(&id->name))+1);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
668 x=((char*)(&id->clutID))+2;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
669 if(id->idSize>sizeof(ImageDescription)){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
670 printf("%02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X | %02X %02X %02X %02X\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
671 x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
672 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
673 printf("=========================================================\n");
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
674 }
5253
e331fefb520e some more...
arpi
parents: 2797
diff changeset
675
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
676 static inline void dump_Rect(char* title,Rect *r){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
677 printf("%s: %d;%d - %d;%d\n",title,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
678 (int)r->top,(int)r->left,(int)r->bottom,(int)r->right);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
679 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
680
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
681 static inline void dump_MatrixRecord(char* title, MatrixRecord *m){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
682 printf("%s: [%d %d %d][%d %d %d][%d %d %d]\n",title,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
683 m->matrix[0][0],m->matrix[0][1],m->matrix[0][2],
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
684 m->matrix[1][0],m->matrix[1][1],m->matrix[1][2],
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
685 m->matrix[2][0],m->matrix[2][1],m->matrix[2][2]);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
686 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
687
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
688 static inline void dump_PixMap(void* xxx){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
689 PixMap *p=xxx;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
690 printf("=============== PixMap at %p ==================\n",xxx);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
691 printf("base=%p stride=%d\n",p->baseAddr, p->rowBytes);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
692 dump_Rect("bounds",&p->bounds);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
693 printf("pmVersion=0x%X packType=0x%X\n packSize=0x%X\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
694 p->pmVersion,p->packType, p->packSize);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
695 printf("hRes=0x%X vRes=0x%X pixelType=0x%X pixelSize=0x%X\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
696 p->hRes,p->vRes,p->pixelType,p->pixelSize);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
697 printf("cmpCount=0x%X cmpSize=0x%X pixelFormat=0x%X\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
698 p->cmpCount,p->cmpSize,p->pixelFormat);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
699 printf("pmTable=%p pmExt=%p\n",p->pmTable,p->pmExt);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
700 printf("=========================================================\n");
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
701 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
702
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
703 static inline void dump_CodecCapabilities(void* xxx){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
704 CodecCapabilities* cc=xxx;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
705 if(!xxx) return;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
706 printf("=============== CodecCapabilities at %p =================\n",xxx);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
707 printf("flags=0x%X flags2=0x%X\n",cc->flags,cc->flags2);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
708 printf("wantedPixelSize=%d extendWidth=%d extendHeight=%d band=%d+%d\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
709 cc->wantedPixelSize,cc->extendWidth,cc->extendHeight,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
710 cc->bandMin,cc->bandInc);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
711 printf("pad=0x%X time=0x%X\n",cc->pad,cc->time);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
712 printf("=========================================================\n");
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
713 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
714
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
715 static inline void dump_CodecDecompressParams(void* xxx){
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
716 CodecDecompressParams* cd=xxx;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
717 ImageDescription **idh;
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
718 int i;
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
719 if(!xxx) return;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
720 printf("=============== CodecDecompressParams at %p ==================\n",xxx);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
721 printf("sequenceID=%d\n",cd->sequenceID);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
722 idh=cd->imageDescription;
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
723 if(idh && idh[0]) dump_ImageDescription(idh[0]);
8266
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
724
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
725 for(i=0;i<sizeof(CodecDecompressParams);i++){
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
726 printf(" %02X",((unsigned char*)cd)[i]);
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
727 if((i%16)==15) printf("\n");
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
728 }
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
729 printf("\n");
2de1fa441839 fixes, updates
arpi
parents: 5334
diff changeset
730
5334
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
731 printf("data=%p size=%d\n",cd->data,cd->bufferSize);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
732 printf("frameno=%d lines: %d .. %d condflags=0x%X callerflags=0x%X\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
733 cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
734 // printf("maskBits=%p mattePixMap=%p\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
735 // cd->maskBits,cd->mattePixMap);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
736 // dump_PixMap(&cd->dstPixMap);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
737 // if(cd->mattePixMap) dump_PixMap(cd->mattePixMap);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
738 // dump_MatrixRecord("matrix",cd->matrix);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
739 printf("accuracy=%d transferMode=%d matrixFlags=0x%X matrixType=%d\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
740 (int)cd->accuracy, (int)cd->transferMode, (int)cd->matrixFlags, (int)cd->matrixType);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
741 printf("srcrect: %d;%d - %d;%d\n",cd->srcRect.top,cd->srcRect.left,cd->srcRect.bottom,cd->srcRect.right);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
742 printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
743 printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
744 printf("screenFloodMethod=%d value=%d preferredOffscreenPixelSize=%d\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
745 cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
746 printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n",
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
747 cd->progressProcRecord, cd->completionProcRecord,
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
748 cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime);
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
749 // printf("\n");
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
750
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
751 printf("=========================================================\n");
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
752
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
753
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
754 }
2cb0e0e83e95 dump stuff
arpi
parents: 5253
diff changeset
755