~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/os2units/mmtk/mmio.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    Copyright (c) 1990-1993 International Business Machines Corporation
 
3
    Copyright (c) 2002 by Andry Svirgunov (cool2@ngs.ru)
 
4
    Copyright (c) 2002-2003 by Yuri Prokushev (prokushev@freemail.ru)
 
5
 
 
6
    OS/2 2.0 Multimedia Extensions Input/Output Manager
 
7
 
 
8
    This program is free software; you can redistribute it and/or modify it
 
9
    under the terms of the GNU Library General Public License (LGPL) as
 
10
    published by the Free Software Foundation; either version 2 of the
 
11
    License, or (at your option) any later version. This program is
 
12
    distributed in the hope that it will be useful, but WITHOUT ANY
 
13
    WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
    FITNESS FOR A PARTICULAR PURPOSE.
 
15
 
 
16
    See the GNU Library General Public License for more details. You should
 
17
    have received a copy of the GNU Library General Public License along
 
18
    with this program; if not, write to the Free Software Foundation, Inc.,
 
19
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
 
 
21
 **********************************************************************}
 
22
 
 
23
{
 
24
@abstract(OS/2 2.0 Multimedia Extensions Input/Output Manager)
 
25
@author(Andry Svirgunov (cool2@ngs.ru))
 
26
@author(Yuri Prokushev (prokushev@freemail.ru))
 
27
@created(17 Dec 2002)
 
28
@lastmod(19 Jan 2003)
 
29
OS/2 2.0 Multimedia Extensions Input/Output Manager
 
30
Warning: This code is alfa. Future versions of this unit will propably
 
31
not be compatible.
 
32
}
 
33
Unit MMIO;
 
34
 
 
35
Interface
 
36
 
 
37
Uses
 
38
  MMBase;
 
39
 
 
40
Const
 
41
  LibName='MMPM'; // !!TODO!! Subject to replace by MMIO
 
42
 
 
43
// MS compat defines.
 
44
Type
 
45
  HPSTR = PChar;
 
46
  Hwnd = LongInt;
 
47
  PFourCC = ^FourCC;
 
48
  HMMCF = hmmIO;
 
49
  HMODULE = LongInt;
 
50
  PHModule = ^Hmodule;
 
51
  pLong = ^LongInt;
 
52
 
 
53
// Define MMIO public data structures.
 
54
  mmCkInfo = record
 
55
    ckid              : FourCC;                // Chunk id (FourCC)
 
56
    ckSize            : LongInt;                 // Chunk Size (bytes)
 
57
    fccType           : FourCC;                // FourCC Type (if ckid RIFF or LIST)
 
58
    ulDataOffset      : LongInt;                 // File Offset of data portion of chunk
 
59
    ulFlags           : LongInt;                 // MMIO_DIRTY (if new chunk)
 
60
  end;
 
61
  pmmCkInfo = ^mmCkInfo;
 
62
  lpmmckinfo = pmmckinfo; // MS compat define */
 
63
 
 
64
  mmIOProc = function( pmmIOInfo: Pointer; usMsg: Word; lp1, lp2: LongInt): LongInt;
 
65
  pmmIOProc = mmIOProc;
 
66
  pCodecProc = mmIOProc;
 
67
  ppmmioproc = mmIOProc;
 
68
  LPMMIOProc = pmmIOProc;
 
69
 
 
70
  mmIOInfo = record
 
71
    ulFlags           : LongInt;                 // Open flags
 
72
    fccIOProc         : FourCC;                // FourCC of the IOProc to use
 
73
    pIOProc           : mmIOProc;              // Function Pointer to IOProc to use
 
74
    ulErrorRet        : LongInt;                 // Extended Error return code
 
75
    cchBuffer         : LongInt;                  // I/O buff size (if used), Fsize if MEM
 
76
    pchBuffer         : pChar;                 // Start of I/O buff
 
77
    pchNext           : pChar;                 // Next char to read or write in buff
 
78
    pchEndRead        : pChar;                 // Last char in buff can be read + 1
 
79
    pchEndWrite       : pChar;                 // Last char in buff can be written + 1
 
80
    lBufOffset        : LongInt;                  // Offset in buff to pchNext
 
81
    lDiskOffset       : LongInt;                  // Disk offset in file
 
82
    aulInfo           : Array[0..3] of LongInt;  // IOProc specific fields
 
83
    lLogicalFilePos   : LongInt;                  // Actual file position, buffered or not
 
84
    ulTranslate       : LongInt;                 // Translation field
 
85
    fccChildIOProc    : FourCC;                // FourCC of Child IOProc
 
86
    pExtraInfoStruct  : Pointer;               // Pointer to a structure of related data
 
87
    mmio              : hmmIO;                 // Handle to media element
 
88
  end;
 
89
  pmmIOInfo = ^mmIOInfo;
 
90
  lpmmIOInfo = pmmIOInfo;
 
91
 
 
92
 
 
93
  mmCfInfo = record
 
94
    ulHeaderSize      : LongInt;                 // CTOC header size
 
95
    ulEntriesTotal    : LongInt;                 // Num of CTOC table entries
 
96
    ulEntriesDeleted  : LongInt;                 // Num of CTOC table entries deleted
 
97
    ulEntriesUnused   : LongInt;                 // Num of unused CTOC entries
 
98
    ulBytesTotal      : LongInt;                 // Combined byte size of all CGRP elements
 
99
    ulBytesDeleted    : LongInt;                 // Byte size of all deleted CGRP elements
 
100
    ulHeaderFlags     : LongInt;                 // Info about entire compound file (CF)
 
101
    usEntrySize       : Word;                // Size of each CTOC table entry
 
102
    usNameSize        : Word;                // Size of name field in entry, default 13
 
103
    usExHdrFields     : Word;                // Num CTOC header extra fields
 
104
    usExEntFields     : Word;                // Num CTOC entry extra fields
 
105
  end;
 
106
 
 
107
// Note:  The are variable length DWORD arrays that may be present
 
108
//        at the end of the MMCFINFO structure.
 
109
 
 
110
//   DWORD    (*adwExHdrFldUsage)[];  */   // Array of header extra usage fields */
 
111
//   DWORD    (*adwExtEntFldUsage)[]; */   // Array of entry extra usage fields  */
 
112
//   DWORD    (*adwExHdrField)[];     */   // Array of header extra fields       */
 
113
  pmmCfInfo = ^mmCfInfo;
 
114
  lpmmCfInfo = pmmcfInfo;
 
115
 
 
116
  mmCtocEntry = record
 
117
    ulOffset          : LongInt;                 // Offset of element within CGRP
 
118
    ulSize            : LongInt;                 // Size of element
 
119
    ulMedType         : LongInt;                 // Fourcc of element
 
120
    ulMedUsage        : LongInt;                 // Possible sub type
 
121
    ulCompressTech    : LongInt;                 // Compression technique used
 
122
    ulUncompressBytes : LongInt;                 // Actual size of uncompressed element
 
123
  end;
 
124
 
 
125
 
 
126
// Note:  A variable length name field and possibly a DWORD array may
 
127
//        be present at the end of the MMCTOCENTRY structure.
 
128
 
 
129
//   DWORD    (*adwExEntField)[]; */   // Array of entry extra fields */
 
130
//   PSZ      pszElementName[];   */   // Name of element, variable length */
 
131
 
 
132
  pmmCtocEntry = ^mmCtocEntry;
 
133
  lpmmCtocEntry = pmmCtocEntry;
 
134
 
 
135
// Conversion Flags/Data Structures:
 
136
 
 
137
const
 
138
  // Conversion Flags/Data Structures:
 
139
  MMIO_MEDIATYPE_IMAGE          = $00000001;  // Image media
 
140
  MMIO_MEDIATYPE_AUDIO          = $00000002;  // Audio media
 
141
  MMIO_MEDIATYPE_MIDI           = $00000004;  // MIDI media
 
142
  MMIO_MEDIATYPE_COMPOUND       = $00000008;  // Cmpd media
 
143
  MMIO_MEDIATYPE_OTHER          = $00000010;  // Other media
 
144
  MMIO_MEDIATYPE_UNKNOWN        = $00000020;  // Unknown media
 
145
  MMIO_MEDIATYPE_DIGITALVIDEO   = $00000040;  // Digital Video
 
146
  MMIO_MEDIATYPE_ANIMATION      = $00000080;  // Future: Not Supported
 
147
  MMIO_MEDIATYPE_MOVIE          = $00000100;  // Movie File
 
148
 
 
149
  MMIO_CANREADTRANSLATED        = $00000001;  //IOProc Cpbilty Flgs
 
150
  MMIO_CANWRITETRANSLATED       = $00000002;  // "       "       "
 
151
  MMIO_CANREADWRITETRANSLATED   = $00000004;  // "       "       "
 
152
  MMIO_CANREADUNTRANSLATED      = $00000008;  // "       "       "
 
153
  MMIO_CANWRITEUNTRANSLATED     = $00000010;  // "       "       "
 
154
  MMIO_CANREADWRITEUNTRANSLATED = $00000020;  // "       "       "
 
155
  MMIO_CANSEEKTRANSLATED        = $00000040;  // "       "       "
 
156
  MMIO_CANSEEKUNTRANSLATED      = $00000080;  // "       "       "
 
157
  MMIO_CANINSERTUNTRANSLATED    = $00000100;  // "       "       "
 
158
  MMIO_CANSAVEUNTRANSLATED      = $00000200;  // "       "       "
 
159
  MMIO_CANINSERTTRANSLATED      = $00000400;  // "       "       "
 
160
  MMIO_CANSAVETRANSLATED        = $00000800;  // "       "       "
 
161
  MMIO_CANMULTITRACKREADTRANSLATED = $00001000; // "       "       "
 
162
  MMIO_CANMULTITRACKREADUNTRANSLATED = $00002000; // "       "       "
 
163
  MMIO_CANMULTITRACKWRITETRANSLATED = $00004000; // "       "       "
 
164
  MMIO_CANMULTITRACKWRITEUNTRANSLATED = $00008000; // "       "       "
 
165
  MMIO_CANTRACKSEEKTRANSLATED   = $00010000;  // "       "       "
 
166
  MMIO_CANTRACKSEEKUNTRANSLATED = $00020000;  // "       "       "
 
167
  MMIO_CANTRACKREADTRANSLATED   = $00040000;  // "       "       "
 
168
  MMIO_CANTRACKREADUNTRANSLATED = $00080000;  // "       "       "
 
169
  MMIO_CANTRACKWRITETRANSLATED  = $00100000;  // "       "       "
 
170
  MMIO_CANTRACKWRITEUNTRANSLATED = $00200000; // "       "       "
 
171
 
 
172
  MMIO_IOPROC_STORAGESYSTEM     = $00000001;  // IOProc Types
 
173
  MMIO_IOPROC_FILEFORMAT        = $00000002;
 
174
  MMIO_IOPROC_DATAFORMAT        = $00000004;
 
175
 
 
176
Type
 
177
  mmFormatInfo = record
 
178
    ulStructLen       : LongInt;                 // Length of this structure
 
179
    fccIOProc         : FourCC;                // IOProc identifier
 
180
    ulIOProcType      : LongInt;                 // Type of IOProc
 
181
    ulMediaType       : LongInt;                 // Media Type
 
182
    ulFlags           : LongInt;                 // IOProc capability flags
 
183
    szDefaultFormatExt : Array[0..Sizeof(FourCC)] of Char;
 
184
                                               // Default extension 4 + null
 
185
    ulCodePage        : LongInt;                 // Code Page
 
186
    ulLanguage        : LongInt;                 // Language
 
187
    lNameLength       : LongInt;                  // length of identifier string
 
188
  end;
 
189
  pmmFormatInfo = ^mmFormatInfo;
 
190
 
 
191
Const
 
192
  MMIO_IMAGE_UNKNOWN            = $00000000;   // Unknown image content
 
193
  MMIO_IMAGE_DRAWING            = $00000001;   // Simple drawing
 
194
  MMIO_IMAGE_GRAPH              = $00000002;   // Graphs & Cartoons
 
195
  MMIO_IMAGE_PHOTO              = $00000004;   // Varying Color & Shades
 
196
 
 
197
  MAX_PALETTE                   = 256;
 
198
 
 
199
//*********************************************
 
200
// *
 
201
// * GENPAL - Generic Header Palette
 
202
// *
 
203
// **********************************************/
 
204
 
 
205
Type
 
206
  RGB2 = record
 
207
    bBlue:     Byte;            { Blue component of the color definition }
 
208
    bGreen:    Byte;            { Green component of the color definition}
 
209
    bRed:      Byte;            { Red component of the color definition  }
 
210
    fcOptions: Byte;            { Reserved, must be zero                 }
 
211
   end;
 
212
  PRGB2 = ^RGB2;
 
213
 
 
214
Type
 
215
  GENPAL = RECORD          // genpal */
 
216
    ulStartIndex:LongInt;       // starting RGB index */
 
217
    ulNumColors:LongInt;        // number of following entries */
 
218
    prgb2Entries:PRGB2;         // 256 RGB entries */
 
219
  end;
 
220
  PGENPAL = ^GENPAL;          // Ptr to a generic palette */
 
221
 
 
222
Type
 
223
  BitMapInfoHeader2 = record
 
224
    cbFix:           LongInt;     { Length of structure                    }
 
225
    cx:              LongInt;     { Bit-map width in pels                  }
 
226
    cy:              LongInt;     { Bit-map height in pels                 }
 
227
    cPlanes:         Word; { Number of bit planes                   }
 
228
    cBitCount:       Word; { Number of bits per pel within a plane  }
 
229
    ulCompression:   Longint;     { Compression scheme used to store the bitmap }
 
230
    cbImage:         Longint;     { Length of bit-map storage data in bytes}
 
231
    cxResolution:    Longint;     { x resolution of target device          }
 
232
    cyResolution:    Longint;     { y resolution of target device          }
 
233
    cclrUsed:        Longint;     { Number of color indices used           }
 
234
    cclrImportant:   Longint;     { Number of important color indices      }
 
235
    usUnits:         Word; { Units of measure                       }
 
236
    usReserved:      Word; { Reserved                               }
 
237
    usRecording:     Word; { Recording algorithm                    }
 
238
    usRendering:     Word; { Halftoning algorithm                   }
 
239
    cSize1:          Longint;     { Size value 1                           }
 
240
    cSize2:          Longint;     { Size value 2                           }
 
241
    ulColorEncoding: Longint;     { Color encoding                         }
 
242
    ulIdentifier:    Longint;     { Reserved for application use           }
 
243
  end;
 
244
  pbitmapinfoheader2=^bitmapinfoheader2;
 
245
 
 
246
  xdibHdr_Prefix = record
 
247
    ulMemSize         : LongInt;                 // Length of bitmap
 
248
    ulPelFormat       : LongInt;
 
249
    usTransType       : Word;
 
250
    ulTransVal        : LongInt;
 
251
  end;
 
252
 
 
253
  mmxdibHeader = record                        // XDIB Header
 
254
    XDIBHeaderPrefix  : XDIBHDR_PREFIX;
 
255
    BMPInfoHeader2    : BITMAPINFOHEADER2;
 
256
  end;
 
257
  pmmxdibHeader = ^mmxdibHeader;
 
258
 
 
259
  mmImageHeader = record
 
260
    ulHeaderLength    : LongInt;                 // Length in Bytes
 
261
    ulContentType     : LongInt;                 // Image content
 
262
    ulMediaType       : LongInt;                 // Media Type
 
263
    mmXDIBHeader      : mmXDIBHeader;          // OS/2 2.0 PM compat header
 
264
    bmiColors         : Array[0..MAX_PALETTE-1] of RGB2; // PM compatible palette
 
265
  end;
 
266
  pmmImageHeader = ^mmImageHeader;
 
267
 
 
268
 
 
269
Const
 
270
  MMIO_AUDIO_UNKNOWN            = $00000000;   // Unknown image content
 
271
  MMIO_AUDIO_VOICE              = $00000001;   // Limited Range
 
272
  MMIO_AUDIO_MUSIC              = $00000002;   // FM Radio or equivalent
 
273
  MMIO_AUDIO_HIFI               = $00000004;   // High quality recording
 
274
 
 
275
Type
 
276
  Wave_Header = record
 
277
    usFormatTag       : Word;                // Type of wave format
 
278
    usChannels        : Word;                // Number of channels
 
279
    ulSamplesPerSec   : LongInt;                 // Sampling rate
 
280
    ulAvgBytesPerSec  : LongInt;                 // Avg bytes per sec
 
281
    usBlockAlign      : Word;                // Block Alignment in bytes
 
282
    usBitsPerSample   : Word;                // Bits per sample
 
283
  end;
 
284
 
 
285
  xWav_HeaderInfo = record
 
286
    ulAudioLengthInMS      : LongInt;            // Audio data in millisecs
 
287
    ulAudioLengthInBytes   : LongInt;            // Audio data in bytes
 
288
    pAdditionalInformation : Pointer;
 
289
  end;
 
290
 
 
291
  mmxWav_Header = record
 
292
    WAVEHeader        : WAVE_HEADER;           // Per RIFF WAVE Definition
 
293
    XWAVHeaderInfo    : XWAV_HEADERINFO;       // Extended wave definition
 
294
  end;
 
295
 
 
296
  mmAudioHeader = record
 
297
    ulHeaderLength    : LongInt;                 // Length in Bytes
 
298
    ulContentType     : LongInt;                 // Image content
 
299
    ulMediaType       : LongInt;                 // Media Type
 
300
    mmXWAVHeader      : MMXWAV_HEADER;         // header
 
301
  end;
 
302
  pmmAudioHeader = ^mmAudioHeader;
 
303
 
 
304
Const
 
305
  MMIO_MIDI_UNKNOWN             = $00000000;  // Unknown midi content
 
306
  MMIO_MIDI_VOICE               = $00000001;  // Limited Range
 
307
  MMIO_MIDI_MUSIC               = $00000002;  // FM Radio or equivalent
 
308
  MMIO_MIDI_HIFI                = $00000004;  // High quality recording
 
309
 
 
310
// MMPMMMIO.INI file structure and definitions.
 
311
  CCHMAXPATH                    = 260;
 
312
  DLLNAME_SIZE                  = CCHMAXPATH;
 
313
  PROCNAME_SIZE                 = 32;
 
314
  MAX_EXTENSION_NAME            = 4;
 
315
 
 
316
Type
 
317
  mmIniFileInfo = record
 
318
    fccIOProc         : FourCC;                // IOProc identifier
 
319
    szDLLName         : Array[0..DLLName_Size-1] of Char;  // DLL name string
 
320
    szProcName        : Array[0..ProcName_Size-1] of Char; // Procedure name string
 
321
    ulFlags           : LongInt;                 // Flags for Preload
 
322
    ulExtendLen       : LongInt;                 // Length of ext fields
 
323
    ulMediaType       : LongInt;                 // Media type
 
324
    ulIOProcType      : LongInt;                 // Type of IOProc
 
325
    szDefExt          : Array[0..Max_Extension_Name] of Char;
 
326
  end;
 
327
  pmmIniFileInfo = ^mmIniFileInfo;
 
328
 
 
329
// CODEC Structures and type definitions for Rel. 1.1
 
330
Const
 
331
  CODEC_INFO_SIZE               = 8;
 
332
  CODEC_HW_NAME_SIZE            = 32;
 
333
 
 
334
Type
 
335
  CodecIniFileInfo = record
 
336
    ulStructLen       : LongInt;                 // length of this structure
 
337
    fcc               : FourCC;                // File Format ID
 
338
    szDLLName         : Array[0..DLLName_Size-1] of Char;       // DLL name string
 
339
    szProcName        : Array[0..ProcName_Size-1] of Char;      // Procedure name string
 
340
    ulCompressType    : LongInt;                 // Compression Type
 
341
    ulCompressSubType : LongInt;                 // Compression SubType
 
342
    ulMediaType       : LongInt;                 // Media type
 
343
    ulCapsFlags       : LongInt;                 // capabilities flags
 
344
    ulFlags           : LongInt;                 // flags
 
345
    szHWID            : Array[0..Codec_HW_Name_Size-1] of Char; // specific information
 
346
    ulMaxSrcBufLen    : LongInt;                 // max source buffer length
 
347
    ulSyncMethod      : LongInt;                 // Synchronization method
 
348
    fccPreferredFormat: LongInt;                 // Preferred output format
 
349
    ulXalignment      : LongInt;                 // x alignment - video only
 
350
    ulYalignment      : LongInt;                 // y alignment - video only
 
351
    ulSpecInfo        : Array[0..Codec_Info_Size-1] of LongInt;   // specific information
 
352
  end;
 
353
  pCodecIniFileInfo = ^CodecIniFileInfo;
 
354
 
 
355
Const
 
356
  // CODECINIFILEINFO synchronization method (ulSyncMethod) values.
 
357
  CODEC_SYNC_METHOD_NO_DROP_FRAMES = 0;
 
358
  CODEC_SYNC_METHOD_DROP_FRAMES_IMMEDIATELY = 1;
 
359
  CODEC_SYNC_METHOD_DROP_FRAMES_PRECEDING_KEY = 2;
 
360
  CODEC_SYNC_METHOD_HARDWARE    = 3;
 
361
 
 
362
  // CODECINIFILEINFO capabilities (ulCapsFlags) values.
 
363
  CODEC_COMPRESS                = $00000001;
 
364
  CODEC_DECOMPRESS              = $00000002;
 
365
  CODEC_WINDOW_CLIPPING         = $00000004;
 
366
  CODEC_PALETTE_TRANS           = $00000008;
 
367
  CODEC_SELFHEAL                = $00000010;
 
368
  CODEC_SCALE_PEL_DOUBLE        = $00000020;
 
369
  CODEC_SCALE_PEL_HALVED        = $00000040;
 
370
  CODEC_SCALE_CONTINUOUS        = $00000080;
 
371
  CODEC_MULAPERTURE             = $00000100;
 
372
  CODEC_4_BIT_COLOR             = $00000200;
 
373
  CODEC_8_BIT_COLOR             = $00000400;
 
374
  CODEC_16_BIT_COLOR            = $00000800;
 
375
  CODEC_24_BIT_COLOR            = $00001000;
 
376
  CODEC_HARDWARE                = $00002000;
 
377
  CODEC_SYMMETRIC               = $00004000;
 
378
  CODEC_ASYMMETRIC              = $00008000;
 
379
  CODEC_DIRECT_DISPLAY          = $00010000;
 
380
  CODEC_DEFAULT                 = $00020000;
 
381
  CODEC_ORIGIN_LOWERLEFT        = $00040000;
 
382
  CODEC_ORIGIN_UPPERLEFT        = $00080000;
 
383
  CODEC_SET_QUALITY             = $00100000;  // quality level is settable
 
384
  CODEC_DATA_CONSTRAINT         = $00200000;  // data constraint supported
 
385
  CODEC_HW_OVERLAY              = $00400000;
 
386
  CODEC_MULTI_BUFFER            = $00800000;
 
387
  CODEC_DITHER_OUTPUT           = $01000000;
 
388
 
 
389
  // Audio related flags
 
390
  CODEC_COMP_REALTIME           = $00020000;
 
391
  CODEC_DECOMP_REALTIME         = $00040000;
 
392
 
 
393
// CODECINIFILEINFO Flag Values (ulFlags) values.
 
394
 
 
395
  // Bit definitions for mmioSet()
 
396
  MMIO_SET_EXTENDEDINFO         = $0001;
 
397
  MMIO_QUERY_EXTENDEDINFO_BASE  = $0002;
 
398
  MMIO_QUERY_EXTENDEDINFO_ALL   = $0004;
 
399
 
 
400
Type
 
401
  // CODECASSOC structure
 
402
  CodecAssoc = record
 
403
   pCodecOpen         : Pointer;               // codec specific open header
 
404
   pCODECIniInfo      : PCodecIniFileInfo;     // codecinifileinfo
 
405
  end;
 
406
  pCodecAssoc = ^CodecAssoc;
 
407
 
 
408
  // MMEXTENDINFO structure
 
409
  mmExtendInfo = record
 
410
    ulStructLen       : LongInt;             // length of this structure
 
411
    ulBufSize         : LongInt;             // total buffer size
 
412
    ulFlags           : LongInt;             // flags
 
413
    ulTrackID         : LongInt;             // track ID
 
414
    ulNumCODECs       : LongInt;             // number of codec entries
 
415
    pCODECAssoc       : PCodecAssoc;       // pointer to codec info array
 
416
  end;
 
417
  pmmExtendInfo = ^mmExtendInfo;
 
418
 
 
419
const
 
420
  // MMEXTENDINFO operation (ulFlags) values.
 
421
  MMIO_TRACK                    = $00000001;
 
422
  MMIO_NORMAL_READ              = $00000002;
 
423
  MMIO_SCAN_READ                = $00000004;
 
424
  MMIO_REVERSE_READ             = $00000008;
 
425
  MMIO_CODEC_ASSOC              = $00000100;
 
426
 
 
427
  // Audio Related defines
 
428
  MMIO_REALTIME_CODEC           = $00000200;
 
429
 
 
430
  MMIO_RESETTRACKS              = -1;       //  Turns off the active track number.
 
431
 
 
432
  CODEC_START                   = $0EC0;
 
433
  CODEC_END                     = $0EFF;
 
434
 
 
435
  MMIOM_CODEC_CLOSE             = CODEC_START + 1;
 
436
  MMIOM_CODEC_OPEN              = CODEC_START + 2;
 
437
  MMIOM_CODEC_QUERYNAME         = CODEC_START + 3;
 
438
  MMIOM_CODEC_QUERYNAMELENGTH   = CODEC_START + 4;
 
439
  MMIOM_CODEC_COMPRESS          = CODEC_START + 5;
 
440
  MMIOM_CODEC_DECOMPRESS        = CODEC_START + 6;
 
441
 
 
442
  MMIOMP_CODEC_HW_CONTROL_STOP_DISCARD   =0;
 
443
  MMIOMP_CODEC_HW_CONTROL_STOP_FLUSH     =1;
 
444
  MMIOMP_CODEC_HW_CONTROL_STOP_PAUSE     =2;
 
445
  MMIOMP_CODEC_HW_CONTROL_DATATYPE       =3;
 
446
 
 
447
  // Flags:
 
448
  MMIO_CREATE                   = $00000001;       // Open
 
449
  MMIO_CTOCFIRST                = $00000002;       // Open
 
450
  MMIO_READ                     = $00000004;       // Open
 
451
  MMIO_WRITE                    = $00000008;       // Open
 
452
  MMIO_READWRITE                = $00000010;       // Open
 
453
  MMIO_COMPAT                   = $00000020;       // Open
 
454
  MMIO_EXCLUSIVE                = $00000040;       // Open
 
455
  MMIO_DENYWRITE                = $00000080;       // Open
 
456
  MMIO_DENYREAD                 = $00000100;       // Open
 
457
  MMIO_DENYNONE                 = $00000200;       // Open
 
458
  MMIO_ALLOCBUF                 = $00000400;       // Open
 
459
  MMIO_DELETE                   = $00000800;       // Open
 
460
 
 
461
  MMIO_USE_TEMP                 = $00001000;       // Open/Close/Save
 
462
 
 
463
  MMIO_INSERTON                 = $00000001;       // Insert
 
464
  MMIO_INSERTOFF                = $00000002;       // Insert
 
465
 
 
466
  MMIO_RWMODE                   = $00001000;       // Open
 
467
  MMIO_SHAREMODE                = $00002000;       // Open
 
468
 
 
469
  MMIO_DIRTY                    = $00004000;       // Write
 
470
 
 
471
  MMIO_VERTBAR                  = $00008000;       // Open
 
472
  MMIO_BUFSHARED                = $00010000;       // Open
 
473
  MMIO_APPEND                   = $00020000;       // Open
 
474
  MMIO_NOIDENTIFY               = $00040000;       // Open
 
475
 
 
476
  MMIO_FINDFIRST                = $00000001;       // CF Find Entry
 
477
  MMIO_FINDNEXT                 = $00000002;       // CF Find Entry
 
478
  MMIO_FINDUNUSED               = $00000004;       // CF Find Entry
 
479
  MMIO_FINDDELETED              = $00000008;       // CF Find Entry
 
480
 
 
481
  MMIO_CHANGEDELETED            = $0001;         // CF Change Entry
 
482
 
 
483
  MMIO_CF_FQNAME                = $0001;         // CF Compact
 
484
 
 
485
  MMIO_FHOPEN                   = $0001;           // Close
 
486
 
 
487
  MMIO_EMPTYBUF                 = $0001;           // Flush
 
488
 
 
489
  MMIO_CREATERIFF               = $0001;           // CreateChunk
 
490
  MMIO_CREATELIST               = $0002;           // CreateChunk
 
491
  MMIO_FINDCHUNK                = $0004;           // Descend
 
492
  MMIO_FINDRIFF                 = $0008;           // Descend
 
493
  MMIO_FINDLIST                 = $0010;           // Descend
 
494
 
 
495
  CTOC_HF_SEQUENTIAL            = $00000001;    // CTOC ulHeaderFlags
 
496
  CTOC_HF_MEDSUBTYPE            = $00000002;    // CTOC ulHeaderFlags
 
497
 
 
498
  CTOC_EFU_UNUSED               = $00000000; // CTOC extra usage code
 
499
  CTOC_EFU_LASTMODTIME          = $00000001; // CTOC extra usage code
 
500
  CTOC_EFU_CODEPAGE             = $00000002; // CTOC extra usage code
 
501
  CTOC_EFU_LANGUAGE             = $00000003; // CTOC extra usage code
 
502
  CTOC_EFU_COMPRESSPARAM0       = $00000005; // CTOC extra usage code
 
503
  CTOC_EFU_COMPRESSPARAM1       = $00000006; // CTOC extra usage code
 
504
  CTOC_EFU_COMPRESSPARAM2       = $00000007; // CTOC extra usage code
 
505
  CTOC_EFU_COMPRESSPARAM3       = $00000008; // CTOC extra usage code
 
506
  CTOC_EFU_COMPRESSPARAM4       = $00000009; // CTOC extra usage code
 
507
  CTOC_EFU_COMPRESSPARAM5       = $0000000A; // CTOC extra usage code
 
508
  CTOC_EFU_COMPRESSPARAM6       = $0000000B; // CTOC extra usage code
 
509
  CTOC_EFU_COMPRESSPARAM7       = $0000000C; // CTOC extra usage code
 
510
  CTOC_EFU_COMPRESSPARAM8       = $0000000D; // CTOC extra usage code
 
511
  CTOC_EFU_COMPRESSPARAM9       = $0000000E; // CTOC extra usage code
 
512
  CTOC_CharSET_STANDARD         = $00000000; // CTOC charset value
 
513
 
 
514
  MMIO_INSTALLPROC              = $00000001; // Install IO Proc
 
515
  MMIO_REMOVEPROC               = $00000002; // Install IO Proc
 
516
  MMIO_FINDPROC                 = $00000004; // Install IO Proc
 
517
 
 
518
  MMIO_MATCHFIRST               = $00000010; // Ini File Handler
 
519
  MMIO_MATCHNEXT                = $00000020; // Ini File Handler
 
520
  MMIO_MATCHFourCC              = $00000040; // Ini File Handler
 
521
  MMIO_MATCHDLL                 = $00000080; // Ini File Handler
 
522
  MMIO_MATCHPROCEDURENAME       = $00000100; // Ini File Handler
 
523
  MMIO_FULLPATH                 = $00000200; // Ini File Handler
 
524
  MMIO_NOVERIFY                 = $00000400; // Ini File Handler
 
525
  MMIO_MATCHCOMPRESSTYPE        = $00000800; // Ini File Handler
 
526
  MMIO_EXTENDED_STRUCT          = $00001000; // Ini File ulFlags
 
527
  MMIO_MATCHCOMPRESSSUBTYPE     = $00002000; // Ini File Handler
 
528
  MMIO_MATCHHWID                = $00004000; // Ini File Handler
 
529
  MMIO_MATCHCAPSFLAGS           = $00008000; // Ini File Handler
 
530
  MMIO_SKIPMATCH                = $00010000; // Ini/Load Handler
 
531
 
 
532
  MMIO_TOUPPER                  = $0001;      // StringToFourcc
 
533
 
 
534
  MMIO_CF_ENTRY_EXISTS          = $00000001; // Add CGRP element
 
535
 
 
536
  MMIO_FORCE_IDENTIFY_SS        = $00000001; // Identify
 
537
  MMIO_FORCE_IDENTIFY_FF        = $00000002; // Identify
 
538
 
 
539
  MMIO_NOTRANSLATE              = $00000000; // Translation
 
540
  MMIO_TRANSLATEDATA            = $00000001; // Translation
 
541
  MMIO_TRANSLATEHEADER          = $00000002; // Translation
 
542
  MMIO_DECOMPRESS               = $00000004; // CODEC Decompress
 
543
 
 
544
  MMIO_DEFAULTBUFFER            = 8192;    // two pages under OS/2 2.0
 
545
 
 
546
  MMIO_SEEK_IFRAME              = $00010000;  // Seek to nearest previous IFRAME
 
547
 
 
548
 
 
549
 
 
550
  // Messages :
 
551
  MMIOM_START                   = $0E00;
 
552
  MMIOM_END                     = $0EFF;
 
553
 
 
554
  MMIOM_GETCF                   = MMIOM_START + 1;
 
555
  MMIOM_GETCFENTRY              = MMIOM_START + 2;
 
556
 
 
557
  MMIOM_CLOSE                   = MMIOM_START + 3;
 
558
  MMIOM_OPEN                    = MMIOM_START + 4;
 
559
  MMIOM_READ                    = MMIOM_START + 5;
 
560
  MMIOM_SEEK                    = MMIOM_START + 6;
 
561
  MMIOM_WRITE                   = MMIOM_START + 7;
 
562
 
 
563
  MMIOM_IDENTIFYFILE            = MMIOM_START + 8;
 
564
  MMIOM_GETHEADER               = MMIOM_START + 9;
 
565
  MMIOM_SETHEADER               = MMIOM_START + 10;
 
566
  MMIOM_QUERYHEADERLENGTH       = MMIOM_START + 11;
 
567
  MMIOM_GETFORMATNAME           = MMIOM_START + 12;
 
568
  MMIOM_GETFORMATINFO           = MMIOM_START + 13;
 
569
  MMIOM_SEEKBYTIME              = MMIOM_START + 14;
 
570
  MMIOM_TEMPCHANGE              = MMIOM_START + 15;
 
571
  MMIOM_BEGININSERT             = MMIOM_START + 16;
 
572
  MMIOM_ENDINSERT               = MMIOM_START + 17;
 
573
  MMIOM_SAVE                    = MMIOM_START + 18;
 
574
  MMIOM_SET                     = MMIOM_START + 19;
 
575
  MMIOM_COMPRESS                = MMIOM_START + 20;
 
576
  MMIOM_DECOMPRESS              = MMIOM_START + 21;
 
577
  MMIOM_MULTITRACKREAD          = MMIOM_START + 22;
 
578
  MMIOM_MULTITRACKWRITE         = MMIOM_START + 23;
 
579
  MMIOM_DELETE                  = MMIOM_START + 24;
 
580
  MMIOM_BEGINGROUP              = MMIOM_START + 25;
 
581
  MMIOM_ENDGROUP                = MMIOM_START + 26;
 
582
  MMIOM_UNDO                    = MMIOM_START + 27;
 
583
  MMIOM_REDO                    = MMIOM_START + 28;
 
584
  MMIOM_BEGINSTREAM             = MMIOM_START + 29;
 
585
  MMIOM_ENDSTREAM               = MMIOM_START + 30;
 
586
 
 
587
 
 
588
  MMIOM_CUT                     = MMIOM_START + 31;
 
589
  MMIOM_COPY                    = MMIOM_START + 32;
 
590
  MMIOM_PASTE                   = MMIOM_START + 33;
 
591
  MMIOM_CLEAR                   = MMIOM_START + 34;
 
592
  MMIOM_STATUS                  = MMIOM_START + 35;
 
593
  MMIOM_WINMSG                  = MMIOM_START + 36;
 
594
  MMIOM_BEGINRECORD             = MMIOM_START + 37;
 
595
  MMIOM_ENDRECORD               = MMIOM_START + 38;
 
596
 
 
597
  // These 3 new messages were added with feature 11710
 
598
  MMIOM_QUERYIMAGE              = MMIOM_START + 39;
 
599
  MMIOM_QUERYIMAGECOUNT         = MMIOM_START + 40;
 
600
  MMIOM_SETIMAGE                = MMIOM_START + 41;
 
601
 
 
602
 
 
603
  MMIO_REALTIME                 = $00000001;
 
604
  MMIO_NONREALTIME              = $00000002;
 
605
 
 
606
  MMIOM_USER                    = $0F00;
 
607
  MMIOM_USER_END                = $0FFF;
 
608
 
 
609
Type
 
610
  // Parameter structure for MMIOM_STATUS
 
611
  mmIO_Status_Parms = record
 
612
    hwndWindow        : hwnd;                  // Some items require a window handle
 
613
    ulReturn          : LongInt;                 // Return field
 
614
    ulItem            : LongInt;                 // Use MCI_STATUS_... flags here
 
615
    ulValue           : LongInt;                 // Status value field
 
616
    ulType            : LongInt;                 // MCI_FORMAT_... of ulReturn
 
617
  end;
 
618
  pmmIO_Status_Parms = ^mmIO_Status_Parms;
 
619
 
 
620
  // Parameter structure for MMIOM_COPY, MMIOM_CUT, MMIOM_CLEAR and MMIOM_PASTE
 
621
  uSec = LongInt;                                 // microsecond time format
 
622
 
 
623
  mmIO_mEdit_Parms = record
 
624
    ulStrucLen        : LongInt;                 // length of this structure
 
625
    hwndWindow        : hwnd;                  // window handle
 
626
    ulStartTime       : uSec;                  // starting time in usec
 
627
    ulDuration        : uSec;                  // duration in usec
 
628
    ulCurrentFilePosition : LongInt;             // current file position in usec
 
629
    ulNewFilePosition : LongInt;                 // returned by IO proc in usec, MCD will issue a seek
 
630
    ulNewFileLength   : LongInt;                 // return by IO proc in usec, MCD updates its headers
 
631
    pBuffer           : Pointer;               // optional buffer
 
632
    ulBufferLength    : LongInt;                 // optional buffer's length
 
633
    pHeader           : Pointer;               // optional pointer to header for buffer
 
634
  end;
 
635
  pmmIO_mEdit_Parms = ^mmIO_mEdit_Parms;
 
636
 
 
637
  // Parameter structure for MMIOM_WINMSG
 
638
  mmIO_WinMsg = record
 
639
    hwndWindow        : hwnd;                  // these are the parameters
 
640
    usMessage         : Word;                //  ... passed to the
 
641
    pParam1           : Pointer;               //  ... window procedure
 
642
    pParam2           : Pointer;               //  ... by PM
 
643
  end;
 
644
  pmmIO_WinMsg = ^mmIO_WinMsg;
 
645
 
 
646
// JPEG IOproc specific structure
 
647
Const
 
648
  YUV_YVU            =$0080;  //v013 Compressed data is YUV///
 
649
  DST_Y              =20;
 
650
  DST_YY             =25;
 
651
 
 
652
Type
 
653
  jpegoptions = record            // this comment needed by h2inc        ///
 
654
    ulStructLen:Longint;                    // size of this sturcture                  ///
 
655
    usQuantization:Array [0..4] of word;              // Each number may be 1 - 65535      ///
 
656
    usScale:Word;                        // 1 (1/8 Size) - 8 (Full Size; default)  ///
 
657
    ulColorOrder:LongInt;                   // YUV_YVU (Default) or ~YUV_YVU     ///
 
658
    usColorSpaceOut:Word;               // DST_YY (Default) or DST_Y           ///
 
659
  end;
 
660
  pJpegOptions = ^JpegOptions;
 
661
 
 
662
// Include error codes for MMIO only.
 
663
Const
 
664
  MMIO_SUCCESS                  = 0;
 
665
  MMIO_WARNING                  = 2;
 
666
  MMIO_ERROR                    = -1;
 
667
  MMIOERR_UNSUPPORTED_MESSAGE   = -2;
 
668
 
 
669
  MMIO_CF_SUCCESS               = 0;
 
670
  MMIO_CF_FAILURE               = 1;
 
671
 
 
672
 
 
673
  MMIO_NLS_CharSET_INFO         = 8000;   // RCDATA Name ID for NLS
 
674
  MMIO_IOPROC_NAME_TABLE        = 8500;   // RCDATA Name ID for string table
 
675
  MMIO_CODEC_NAME_TABLE         = 9000;   // RCDATA Name ID for Codec  table
 
676
 
 
677
// Numeric equivalents of fourcc's.  These are needed for the resource
 
678
// compiler.
 
679
 
 
680
  HEX_FourCC_DOS                = $20534f44;
 
681
  HEX_FourCC_MEM                = $204d454d;
 
682
  HEX_FourCC_BND                = $20444e42;
 
683
  HEX_FourCC_CF                 = $20204643;
 
684
 
 
685
// Country codes (CC), languages (LC), and dialects (DC).
 
686
 
 
687
  MMIO_DEFAULT_CODE_PAGE        = 437;
 
688
 
 
689
  MMIO_CC_NONE                  = 000;
 
690
  MMIO_CC_USA                   = 001;
 
691
  MMIO_CC_CANADA                = 002;
 
692
  MMIO_CC_LATIN_AMERICA         = 003;
 
693
  MMIO_CC_GREECE                = 030;
 
694
  MMIO_CC_NETHERLANDS           = 031;
 
695
  MMIO_CC_BELGIUM               = 032;
 
696
  MMIO_CC_FRANCE                = 033;
 
697
  MMIO_CC_SPAIN                 = 034;
 
698
  MMIO_CC_ITALY                 = 039;
 
699
  MMIO_CC_SWITZERLAND           = 041;
 
700
  MMIO_CC_AUSTRIA               = 043;
 
701
  MMIO_CC_UNITED_KINGDOM        = 044;
 
702
  MMIO_CC_DENMARK               = 045;
 
703
  MMIO_CC_SWEDEN                = 046;
 
704
  MMIO_CC_NORWAY                = 047;
 
705
  MMIO_CC_WEST_GERMANY          = 049;
 
706
  MMIO_CC_MEXICO                = 052;
 
707
  MMIO_CC_BRAZIL                = 055;
 
708
  MMIO_CC_AUSTRALIA             = 061;
 
709
  MMIO_CC_NEW_ZEALAND           = 064;
 
710
  MMIO_CC_JAPAN                 = 081;
 
711
  MMIO_CC_KOREA                 = 082;
 
712
  MMIO_CC_CHINA                 = 086;
 
713
  MMIO_CC_TAIWAN                = 088;
 
714
  MMIO_CC_TURKEY                = 090;
 
715
  MMIO_CC_PORTUGAL              = 351;
 
716
  MMIO_CC_LUXEMBOURG            = 352;
 
717
  MMIO_CC_ICELAND               = 354;
 
718
  MMIO_CC_FINLAND               = 358;
 
719
 
 
720
  MMIO_LC_NONE                  = 0;
 
721
  MMIO_DC_NONE                  = 0;
 
722
  MMIO_LC_ARABIC                = 1;
 
723
  MMIO_DC_ARABIC                = 1;
 
724
  MMIO_LC_BULGARIAN             = 2;
 
725
  MMIO_DC_BULGARIAN             = 1;
 
726
  MMIO_LC_CATALAN               = 3;
 
727
  MMIO_DC_CATALAN               = 1;
 
728
  MMIO_LC_TRADITIONAL_CHINESE   = 4;
 
729
  MMIO_DC_TRADITIONAL_CHINESE   = 1;
 
730
  MMIO_LC_SIMPLE_CHINESE        = 4;
 
731
  MMIO_DC_SIMPLE_CHINESE        = 2;
 
732
  MMIO_LC_CZECH                 = 5;
 
733
  MMIO_DC_CZECH                 = 1;
 
734
  MMIO_LC_DANISH                = 6;
 
735
  MMIO_DC_DANISH                = 1;
 
736
  MMIO_LC_GERMAN                = 7;
 
737
  MMIO_DC_GERMAN                = 1;
 
738
  MMIO_LC_SWISS_GERMAN          = 7;
 
739
  MMIO_DC_SWISS_GERMAN          = 2;
 
740
  MMIO_LC_GREEK                 = 8;
 
741
  MMIO_DC_GREEK                 = 1;
 
742
  MMIO_LC_US_ENGLISH            = 9;
 
743
  MMIO_DC_US_ENGLISH            = 1;
 
744
  MMIO_LC_UK_ENGLISH            = 9;
 
745
  MMIO_DC_UK_ENGLISH            = 2;
 
746
  MMIO_LC_SPANISH               = 10;
 
747
  MMIO_DC_SPANISH               = 1;
 
748
  MMIO_LC_SPANISH_MEXICAN       = 10;
 
749
  MMIO_DC_SPANISH_MEXICAN       = 2;
 
750
  MMIO_LC_FINNISH               = 11;
 
751
  MMIO_DC_FINNISH               = 1;
 
752
  MMIO_LC_FRENCH                = 12;
 
753
  MMIO_DC_FRENCH                = 1;
 
754
  MMIO_LC_BELGIAN_FRENCH        = 12;
 
755
  MMIO_DC_BELGIAN_FRENCH        = 2;
 
756
  MMIO_LC_CANADIAN_FRENCH       = 12;
 
757
  MMIO_DC_CANADIAN_FRENCH       = 3;
 
758
  MMIO_LC_SWISS_FRENCH          = 12;
 
759
  MMIO_DC_SWISS_FRENCH          = 4;
 
760
  MMIO_LC_HEBREW                = 13;
 
761
  MMIO_DC_HEBREW                = 1;
 
762
  MMIO_LC_HUNGARIAN             = 14;
 
763
  MMIO_DC_HUNGARIAN             = 1;
 
764
  MMIO_LC_ICELANDIC             = 15;
 
765
  MMIO_DC_ICELANDIC             = 1;
 
766
  MMIO_LC_ITALIAN               = 16;
 
767
  MMIO_DC_ITALIAN               = 1;
 
768
  MMIO_LC_SWISS_ITALIAN         = 16;
 
769
  MMIO_DC_SWISS_ITALIAN         = 2;
 
770
  MMIO_LC_JAPANESE              = 17;
 
771
  MMIO_DC_JAPANESE              = 1;
 
772
  MMIO_LC_KOREAN                = 18;
 
773
  MMIO_DC_KOREAN                = 1;
 
774
  MMIO_LC_DUTCH                 = 19;
 
775
  MMIO_DC_DUTCH                 = 1;
 
776
  MMIO_LC_BELGIAN_DUTCH         = 19;
 
777
  MMIO_DC_BELGIAN_DUTCH         = 2;
 
778
  MMIO_LC_NORWEGIAN_BOKMAL      = 20;
 
779
  MMIO_DC_NORWEGIAN_BOKMAL      = 1;
 
780
  MMIO_LC_NORWEGIAN_NYNORSK     = 20;
 
781
  MMIO_DC_NORWEGIAN_NYNORSK     = 2;
 
782
  MMIO_LC_POLISH                = 21;
 
783
  MMIO_DC_POLISH                = 1;
 
784
  MMIO_LC_BRAZILIAN_PORTUGUESE  = 22;
 
785
  MMIO_DC_BRAZILIAN_PORTUGUESE  = 1;
 
786
  MMIO_LC_PORTUGUESE            = 22;
 
787
  MMIO_DC_PORTUGUESE            = 2;
 
788
  MMIO_LC_RHAETO_ROMANIC        = 23;
 
789
  MMIO_DC_RHAETO_ROMANIC        = 1;
 
790
  MMIO_LC_ROMANIAN              = 24;
 
791
  MMIO_DC_ROMANIAN              = 1;
 
792
  MMIO_LC_RUSSIAN               = 25;
 
793
  MMIO_DC_RUSSIAN               = 1;
 
794
  MMIO_LC_SERBO_CROATIAN_LATIN  = 26;
 
795
  MMIO_DC_SERBO_CROATIAN_LATIN  = 1;
 
796
  MMIO_LC_SERBO_CROATIAN_CYRILLIC = 26;
 
797
  MMIO_DC_SERBO_CROATIAN_CYRILLIC = 2;
 
798
  MMIO_LC_SLOVAK                = 27;
 
799
  MMIO_DC_SLOVAK                = 1;
 
800
  MMIO_LC_ALBANIAN              = 28;
 
801
  MMIO_DC_ALBANIAN              = 1;
 
802
  MMIO_LC_SWEDISH               = 29;
 
803
  MMIO_DC_SWEDISH               = 1;
 
804
  MMIO_LC_THAI                  = 30;
 
805
  MMIO_DC_THAI                  = 1;
 
806
  MMIO_LC_TURKISH               = 31;
 
807
  MMIO_DC_TURKISH               = 1;
 
808
  MMIO_LC_URDU                  = 32;
 
809
  MMIO_DC_URDU                  = 1;
 
810
  MMIO_LC_BAHASA                = 33;
 
811
  MMIO_DC_BAHASA                = 1;
 
812
 
 
813
 
 
814
// Ultimotion CODEC type for CODECINIFILEINFO ulCompressType */
 
815
//#define  FOURCC_ULTI       mmioFOURCC('U', 'L', 'T', 'I')
 
816
Const
 
817
//  FOURCC_ULTI:FOURCC=0;
 
818
  HEX_FOURCC_ULTI=$49544C55;     // ITLU */
 
819
 
 
820
// Indeo CODEC type for CODECINIFILEINFO ulCompressType */
 
821
//#define  FOURCC_RT21       mmioFOURCC('R', 'T', '2', '1')
 
822
//  FOURCC_RT21:FOURCC=0;
 
823
  HEX_FOURCC_RT21=$31325452;     // 12TR */
 
824
 
 
825
// Mondo CODEC type for CODECINIFILEINFO ulCompressType */
 
826
//#define  FOURCC_DIB        mmioFOURCC('D', 'I', 'B', ' ')
 
827
//   FOURCC_DIB:FOURCC=0;
 
828
   HEX_FOURCC_DIB=$20424944;     //  BID */
 
829
 
 
830
 
 
831
 
 
832
// CODECVIDEOHEADER - CODEC video Header
 
833
Type
 
834
  TCODECVIDEOHEADER=record  // codecvidhdr */
 
835
    ulStructLen:LongInt;
 
836
    cx:LongInt;
 
837
    cy:LongInt;
 
838
    cPlanes:Integer;
 
839
    cBitCount:Integer;
 
840
    ulColorEncoding:LongInt;
 
841
    genpal:GENPAL;
 
842
  end;
 
843
  PCodecVideoHeader=^TCODECVIDEOHEADER;
 
844
 
 
845
// ulColorEncoding defines: */
 
846
Const
 
847
  MMIO_RGB_5_6_5    =$0001;  // Each pixel is a RGB_5_6_5 datatype */
 
848
  MMIO_RGB_24       =$0002;  // Each pixel is a RGB_24 datatype */
 
849
  MMIO_YUV_4_1_1    =$0004;  // Each pixel is a YUV_4_1_1 datatype */
 
850
  MMIO_COMPRESSED   =$0008;  // The data is compressed */
 
851
  MMIO_YUV_24       =$0010;  // Each pixel is a YUV_24 datatype */
 
852
  MMIO_PALETTIZED   =$0020;  // The data is palettized */
 
853
  MMIO_OS2_BITMAP24 =$0020;  // The data is palettized */
 
854
 
 
855
 
 
856
//*********************************************
 
857
// *
 
858
// * MMVIDEOOPEN - Video Open Structure
 
859
// *
 
860
// * This structure is passed on the CODEC open
 
861
// * message when video compression is being done
 
862
// * to indicate information such as quality,
 
863
// * frame rate, data rate, and key frame rate.
 
864
// *
 
865
// * Quality:
 
866
// *
 
867
// * The ulQuality field specifies a scalar value
 
868
// * in the range 0 - 10000, where 0 is the lowest
 
869
// * quality and 10000 is the highest quality.  A
 
870
// * value of -1 specifies the default quality level,
 
871
// * and the default quality level (e.g. 5000) is
 
872
// * returned in the ulQuality field.
 
873
// *
 
874
// *
 
875
// * Key Frame rate:
 
876
//*
 
877
// * The ulKeyFrameRate structure specifies the key
 
878
// * frame (aka I-frame, reference frame) frequency.
 
879
// * Every Nth frame is a key frame as specified.
 
880
// * A value of zero specifies that no periodic key
 
881
// * are to be compressed.  Additional key frames may
 
882
// * be inserted at any point by specifying
 
883
// * MMIO_IS_KEY_FRAME in the MMCOMPRESS structure.
 
884
// *
 
885
// * example:  ulKeyFrameRate = 5  results in:
 
886
//*
 
887
//*    key delta delta delta delta key delta delta delta delta key delta...
 
888
// *
 
889
//*
 
890
// * Frame rate:
 
891
// *
 
892
// * Rate = number of time units per second
 
893
// * Scale = number of time units per frame
 
894
// *
 
895
// * examples:  Rate = 30  Scale = 1     =>    30 FPS
 
896
// *            Rate = 15  Scale = 1     =>    15 FPS
 
897
// *            Rate = 25  Scale = 2     =>    12.5 FPS
 
898
// *
 
899
// *
 
900
// * Data Constraint:
 
901
// *
 
902
// * Compressors which are capable of constraining the
 
903
// * resultant compressed video data rate use the
 
904
// * information in the ulDataConstraint and
 
905
// * ulConstraintInterval fields.  A non-zero value
 
906
//* in ulDataConstraint specifies the number of bytes
 
907
// * which is not to be exceeded over an interval of
 
908
// * frames in the output data stream, regardless of
 
909
// * the requested quality level.  This value only
 
910
// * considers video data, i.e. audio data and file format
 
911
// * overhead must be considered seperately when determining
 
912
// * the final output file data rate.  The interval of
 
913
// * frames over which the data is constrained is specified
 
914
//* in ulConstraintInterval.  A value of zero for
 
915
// * ulDataContraint specifies that the data rate is not
 
916
// * to be constrained and is compressed according to
 
917
// * the requested quality level.
 
918
// *
 
919
// * example 1:  ulDataConstraint = 150000   ulConstraintInterval = 15
 
920
// *
 
921
// *             This results in an output stream wherein the sizes of any 15
 
922
// *             consecutive frames does not exceed 150000 bytes.  If the
 
923
// *             frame rate is 15 FPS, the resultant data rate will not
 
924
// *             exceed 150000 bytes per second.
 
925
// *
 
926
// * example 2:  ulDataConstraint = 10000    ulConstraintInterval = 1
 
927
// *
 
928
// *             This results in an output stream wherein any single frame
 
929
// *             does not exceed 10000 bytes.  If the frame rate is 15 FPS,
 
930
// *             the resultant data rate will not exceed 150000 bytes per
 
931
// *             second.  Note the difference between this case and example 1
 
932
// *             where individual frames may exceed 10000 bytes (the average)
 
933
// *             so long other frames in any 15 frame sequence are sufficiently
 
934
// *             smaller to satisfy the constraint within the constraint interval.
 
935
// *
 
936
// **********************************************/
 
937
TYPE _MMVIDEOOPEN = RECORD      // mmvidopen */
 
938
       ulStructLen:LongInt;
 
939
       ulQuality:LongInt;
 
940
       ulKeyFrameRate:LongInt;
 
941
       ulScale:LongInt;
 
942
       ulRate:LongInt;
 
943
       ulDataConstraint:LongInt;
 
944
       ulConstraintInterval:LongInt;
 
945
       end;
 
946
TYPE PMMVIDEOOPEN = ^_MMVIDEOOPEN;
 
947
 
 
948
 
 
949
TYPE _MMAUDIOOPEN = RECORD
 
950
  ulStructLen:LongInt;         // Length of struct */
 
951
  ulSamplesPerBlock:LongInt;   // Samples in each block of compressed data */
 
952
  ulBytesPerBlock:LongInt;     // uncompressed bytes in each block */
 
953
  ulFlags:LongInt;             // Compression flags */
 
954
  ulBestGuess:LongInt;         // Guess at avg. compression ratio */
 
955
  ulBlockAlignment:LongInt;    // Block alignment of codec */
 
956
  ulLength:LongInt;            // Length of the file */
 
957
  hCodec:LongInt;              // Codec handle */
 
958
  pfnCodec:PCodecProc;
 
959
  end;
 
960
 
 
961
TYPE PMMAUDIOOPEN = ^_MMAUDIOOPEN;
 
962
 
 
963
// defines for the ulFlags field of the BUFER_INFORMATION */
 
964
 
 
965
CONST
 
966
 
 
967
        BLOCK_ORIENTED        =$00000001;
 
968
        NON_LINEAR            =$00000002;
 
969
        INIT_CODEC            =$00000004;
 
970
 
 
971
//*********************************************
 
972
// *
 
973
// * CODECOPEN - CODEC open structure
 
974
// *
 
975
// **********************************************/
 
976
TYPE _CODECOPEN = RECORD       // codecopen */
 
977
   ulFlags:LongInt;             // flags & events - Refer to ulCapsFlags in CODECINIFILEINFO */
 
978
   pControlHdr:Pointer;         // control header - (codec specific) */
 
979
   pSrcHdr:Pointer;             // source header - Ptr CODECVIDEOHEADER */
 
980
   pDstHdr:Pointer;             // destination header - Ptr CODECVIDEOHEADER */
 
981
   pOtherInfo:Pointer;          // other information - Ptr MMVIDEOOPEN/MMAUDIOOPEN */
 
982
   end;
 
983
TYPE PCODECOPEN = ^_CODECOPEN;
 
984
 
 
985
const
 
986
  // CODECINIFILEINFO capabilities (ulCapsFlags) values.
 
987
 
 
988
  Valid_CodecOpen_InputFlags = CODEC_DECOMPRESS or
 
989
                               CODEC_WINDOW_CLIPPING or
 
990
                               CODEC_PALETTE_TRANS or
 
991
                               CODEC_SELFHEAL or
 
992
                               CODEC_SCALE_PEL_DOUBLE or
 
993
                               CODEC_SCALE_PEL_HALVED or
 
994
                               CODEC_SCALE_CONTINUOUS or
 
995
                               CODEC_MULAPERTURE or
 
996
                               CODEC_HARDWARE or
 
997
                               CODEC_DIRECT_DISPLAY;
 
998
// Stream handler communication */
 
999
 
 
1000
TYPE _AUDIO_CODEC_INFO = RECORD
 
1001
  ulStructLen:LongInt;         // Length of struct */
 
1002
  ulBytesPerBlock:LongInt;     // uncompressed bytes in each block */
 
1003
  ulBlockAlignment:LongInt;    // Block alignment of codec */
 
1004
  hCodec:LongInt;              // Codec handle */
 
1005
  pfnCodec:PCODECPROC;
 
1006
//  LONG (* APIENTRY pfnCodec) (PVOID, SHORT, LONG, LONG); */
 
1007
  end;
 
1008
 
 
1009
CONST
 
1010
        AUDIO_CODEC_INF    =1000;
 
1011
 
 
1012
 
 
1013
//*********************************************
 
1014
// *
 
1015
// * MMCOMPRESS - Compress structure
 
1016
// *
 
1017
// **********************************************/
 
1018
TYPE _MMCOMPRESS = RECORD    // mmcomp */
 
1019
   ulStructLen:LongInt;       // length of this structure */
 
1020
   ulFlags:LongInt;           // command and status flags */
 
1021
   ulSrcBufLen:LongInt;       // source buffer size */
 
1022
   pSrcBuf:Pointer;           // source buffer */
 
1023
   ulDstBufLen:LongInt;       // destination buffer length */
 
1024
   pDstBuf:Pointer;           // destination buffer */
 
1025
   pRunTimeInfo:Pointer;      // control information */
 
1026
   end;
 
1027
TYPE PMMCOMPRESS = ^_MMCOMPRESS;
 
1028
 
 
1029
// ulFlags Input values for MMCOMPRESS structure:                */
 
1030
// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
 
1031
// below, but are listed here for information purposes only.     */
 
1032
// MMIO_IS_KEY_FRAME         This bit is set by the application  */
 
1033
//                           to instruct the IOProc to compress  */
 
1034
//                           the pSrcBuf into a key or reference */
 
1035
//                           frame.  If the bit is not set, a    */
 
1036
//                           delta frame is compressed.          */
 
1037
// MMIO_IS_PALETTE           A video palette is provided.  This  */
 
1038
//                           is set by the application.          */
 
1039
 
 
1040
 
 
1041
//*********************************************
 
1042
// *
 
1043
// * MMVIDEOCOMPRESS - Video Compress structure
 
1044
// *
 
1045
// **********************************************/
 
1046
 
 
1047
TYPE _MMVIDEOCOMPRESS = RECORD // mmvidcomp */
 
1048
   ulStructLen:LongInt;       // Structure length */
 
1049
   genpalVideo:GENPAL;       // Video stream palette */
 
1050
   pControlHdr:Pointer;       // control header (codec specific) */
 
1051
   end;
 
1052
TYPE PMMVIDEOCOMPRESS = ^_MMVIDEOCOMPRESS;
 
1053
 
 
1054
CONST
 
1055
 
 
1056
START_DECOMPRESSION     =$00000001;
 
1057
CONTINUE_DECOMPRESSION  =$00000002;
 
1058
START_SEEK              =$00000004;
 
1059
CONTINUE_SEEK           =$00000008;
 
1060
 
 
1061
//*********************************************
 
1062
// *
 
1063
// * MMDECOMPRESS - Decompress Structure
 
1064
// *
 
1065
// **********************************************/
 
1066
TYPE _MMDECOMPRESS = Record   // mmdec */
 
1067
   ulStructLen:LongInt;       // length of this structure */
 
1068
   ulFlags:LongInt;           // command and status flags */
 
1069
   ulSrcBufLen:LongInt;       // source buffer size */
 
1070
   pSrcBuf:Pointer;           // source buffer */
 
1071
   ulDstBufLen:LongInt;       // destination buffer length */
 
1072
   pDstBuf:pointer;           // destination buffer */
 
1073
   pRunTimeInfo:Pointer;      // control information Ptr to MMVIDEODECOMPRESS */
 
1074
   end;
 
1075
TYPE PMMDECOMPRESS = ^_MMDECOMPRESS;
 
1076
 
 
1077
// ulFlags defines: */
 
1078
CONST
 
1079
 
 
1080
        MMIO_DROP_DELTA_FRAME =$0001; // Input/Output - Tells the IOProc to drop the delta */
 
1081
                                      // frame if the pSrcBuf contains a delta */
 
1082
                                      // frame.  On return, the bit is reset */
 
1083
                                      // if the delta frame is dropped. */
 
1084
        MMIO_IS_KEY_FRAME     =$0002; // Output - This bit is set by the IOProc when */
 
1085
                                      // the data contained in the pSrcBuf is */
 
1086
                                      // a key or reference frame. */
 
1087
        MMIO_IS_PALETTE       =$0004; // Output - A video palette has been found. */
 
1088
                                      // This is set by the IOProc. */
 
1089
        MMIO_PALETTE_CHANGE   =$0008; // Input - The physical palette has been changed */
 
1090
                                      // in...  This is set by the application. */
 
1091
        MMIO_ORIGIN_LOWERLEFT =$0010; // Input - The video frame origin */
 
1092
        MMIO_RECTL_CHANGE     =$0020; // Input - The valid rectl list has changed. */
 
1093
        MMIO_ORIGIN_UPPERLEFT =$0040; // Input - The video frame origin */
 
1094
        MMIO_DROP_FRAME_DECODE=$0080; // Input - Tells the IOProc to drop decoding  */
 
1095
        MMIO_HIGH_QUALITY     =$0100; // Input - Tells Codec to render best */
 
1096
                                      // quality image - not time critical */
 
1097
        MMIO_IGNORE_CLIPPING  =$0200; // Ignore clipping rectangles used for bitmap capture */
 
1098
                                      // high performance */
 
1099
        MMIO_OUTPUT_FULL_IMAGE=$0400; // Output a complete image on decompress, even if this*/
 
1100
                                      // is a delta frame */
 
1101
                                      // of the frame.                         */
 
1102
 
 
1103
        VALID_DECOMPRESS_INPUTFLAGS   = MMIO_DROP_DELTA_FRAME or
 
1104
                                        MMIO_PALETTE_CHANGE or
 
1105
                                        MMIO_ORIGIN_LOWERLEFT or
 
1106
                                        MMIO_RECTL_CHANGE or
 
1107
                                        MMIO_DROP_FRAME_DECODE or
 
1108
                                        MMIO_ORIGIN_UPPERLEFT or
 
1109
                                        MMIO_HIGH_QUALITY or
 
1110
                                        MMIO_IGNORE_CLIPPING or
 
1111
                                        MMIO_OUTPUT_FULL_IMAGE;
 
1112
 
 
1113
 
 
1114
        START_COMPRESSION     =$00000001;
 
1115
        CONTINUE_COMPRESSION  =$00000002;
 
1116
        SOURCE_UNUSED         =$00000004;
 
1117
        TARGET_UNUSED         =$00000008;
 
1118
 
 
1119
//*********************************************
 
1120
// *
 
1121
// * MMVIDEODECOMPRESS - Video Decompress structure
 
1122
// *
 
1123
// **********************************************/
 
1124
TYPE  RectL   = record
 
1125
    xLeft:   Longint;
 
1126
    yBottom: Longint;
 
1127
    xRight:  Longint;
 
1128
    yTop:    Longint;
 
1129
  end;
 
1130
TYPE PRECTL = ^RECTL;
 
1131
 
 
1132
TYPE _MMVIDEODECOMPRESS = Record    // mmviddec */
 
1133
   ulStructLen:LongInt;            // Structure length */
 
1134
   ulRectlCount:LongInt;           // Valid rectangle count - for clipping */
 
1135
   prectl:PRECTL;                  // Valid rectangle array - for clipping */
 
1136
   ulSkipLength:LongInt;           // Skipped line length */
 
1137
   ulDecodeLines:LongInt;          // Num of lines to decompress */
 
1138
   genpalPhysical:GENPAL;          // Physical palette */
 
1139
   genpalVideo:GENPAL;             // Video stream palette */
 
1140
   rectlSrc:RECTL;                 // Source window rectangle */
 
1141
   rectlDst:RECTL;                 // Destination window rectangle */
 
1142
   ulDeltaCount:LongInt;           // Number of remaining delta frames before the next I-Frame */
 
1143
   ulParm1:LongInt;                // Codec specific parm */
 
1144
   ulParm2:Longint;                // Codec specific parm */
 
1145
   ulParm3:LongInt;                // Codec specific parm */
 
1146
   ulParm4:LongInt;                // Codec specific parm */
 
1147
   end;
 
1148
TYPE PMMVIDEODECOMPRESS = ^_MMVIDEODECOMPRESS;
 
1149
 
 
1150
//************************************************
 
1151
// *
 
1152
// * RECORDTAB - Record table
 
1153
// *
 
1154
// * NOTE: This structure maps to ESRCBUFTAB in ssm.h
 
1155
// *************************************************/
 
1156
TYPE _RECORDTAB = record       // recordtab */
 
1157
   ulReserved1:LongInt;       // reserved for system */
 
1158
   pRecord:Pointer;           // ptr to record in buffer */
 
1159
   ulLength:LongInt;          // length of record */
 
1160
   ulReserved2:LongInt;       // reserved for system */
 
1161
   ulReserved3:LongInt;       // reserved for system */
 
1162
   ulParm1:LongInt;           // Record specific data */
 
1163
   ulParm2:LongInt;           // Record specific data */
 
1164
   end;
 
1165
TYPE PRECORDTAB=^_RECORDTAB;  // Ptr to a buffer entry  */
 
1166
 
 
1167
 
 
1168
//**************************************************
 
1169
// *
 
1170
// * RECORDTABWRITE - Record table for video write
 
1171
// *
 
1172
// * NOTE: This structure maps to ETGTBUFTAB in ssm.h
 
1173
// ***************************************************/
 
1174
TYPE _RECORDTABWRITE=RECORD       // recordtab */
 
1175
   pRecord:Pointer;           // ptr to record in buffer */
 
1176
   ulReserved1:Longint;       // reserved for system */
 
1177
   ulLength:Longint;          // length of record */
 
1178
   ulReserved2:longint;       // reserved for system */
 
1179
   ulReserved3:longint;       // reserved for system */
 
1180
   ulParm1:longint;           // Record specific data */
 
1181
   ulParm2:longint;           // Record specific data */
 
1182
   end;
 
1183
type precordtabwrite=^_recordtabwrite;// Ptr to a buffer entry  */
 
1184
 
 
1185
 
 
1186
// ulParm1 Return values for MULTITRACK_READ only:               */
 
1187
// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
 
1188
// above, but are listed here for information purposes only      */
 
1189
// as they are valid ulParm1 Return values for MULTITRACK_READ.  */
 
1190
// MMIO_IS_KEY_FRAME         Frame is a Key frame                */
 
1191
// MMIO_IS_PALETTE           Buffer contains a video palette     */
 
1192
 
 
1193
CONST
 
1194
 
 
1195
        MMIO_INVISIBLE_FRAME   =$1000;    // Indicates a invisible video frame */
 
1196
        MMIO_NULL_FRAME        =$2000;    // Indicates a null video frame (zero length) */
 
1197
 
 
1198
// ulParm2 Return values for MULTITRACK_READ only:               */
 
1199
//    This field contains the frame number for this video frame  */
 
1200
//    if this track is a video track.                            */
 
1201
 
 
1202
 
 
1203
 
 
1204
// ulParm1 Input values for MULTITRACK_WRITE only:               */
 
1205
// Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
 
1206
// above, but are listed here for information purposes only      */
 
1207
// as they are valid ulParm1 Input values for MULTITRACK_WRITE.  */
 
1208
// MMIO_IS_KEY_FRAME         Frame is a Key frame                */
 
1209
// MMIO_IS_PALETTE           Buffer contains a video palette     */
 
1210
 
 
1211
// ulParm2 Input values for MULTITRACK_WRITE only:               */
 
1212
//    This field contains the number of null frames              */
 
1213
//    that should be inserted before this frame                  */
 
1214
//    (this recordtab entry).                                    */
 
1215
 
 
1216
 
 
1217
//***********************************************
 
1218
// *
 
1219
// *  TRACKMAP - This structure maps a track to
 
1220
// *             a record table.
 
1221
// *
 
1222
// ************************************************/
 
1223
TYPE _TRACKMAP = RECORD        // trackmap */
 
1224
   ulTrackID:LongInt;         // Input - track ID */
 
1225
   ulNumEntries:LongInt;      // Input - number of record entries */
 
1226
   pRecordTabList:PRecordTab; // Input/Output - Ptr to a record table */
 
1227
   end;
 
1228
TYPE PTRACKMAP=^_TRACKMAP;    // Ptr to a track map table entry */
 
1229
 
 
1230
//*********************************************
 
1231
// *
 
1232
// * MMMULTITRACKREAD - Multiple Track Read
 
1233
// *
 
1234
// **********************************************/
 
1235
TYPE _MMMULTITRACKREAD=RECORD   // mtread */
 
1236
   ulLength:LongInt;          // Input - Size of buffer to read.  The IO should be performed on this size of  */
 
1237
                              //          buffer.  The actual buffer size may be bigger and is given in the   */
 
1238
                              //          ulBufferLength field below.  Video frames can span pBuffer+ulLength */
 
1239
                              //          as long as the frame is less than the ulBufferLength in size.       */
 
1240
                              //          The purpose of this is to break the IO reads into smaller sizes     */
 
1241
                              //          while still allowing large frame sizes.                             */
 
1242
   pBuffer:Pointer;           // Input - ptr to read buffer           */
 
1243
   ulFlags:LongInt;           // Input/Output - read flags            */
 
1244
   ulNumTracks:LongInt;       // Input - number of track entries      */
 
1245
   pTrackMapList:PTRACKMAP;   // Input - ptr to track-to-record list  */
 
1246
// End of old MMMULTITRACKREAD structure */
 
1247
   ulBufferLength:LongInt;    // Input - Actual length of read buffer */
 
1248
   ulReserved:longInt;        // Input - Reserved (must be 0)         */
 
1249
   end;
 
1250
TYPE PMMMULTITRACKREAD=^_MMMULTITRACKREAD;
 
1251
 
 
1252
// ulFlags Input Values: */
 
1253
 
 
1254
CONST
 
1255
 
 
1256
        MULTITRACKREAD_EXTENDED       =$0004; // Indicates that the new extended multitrack   */
 
1257
                                              // read structure is passed from caller instead */
 
1258
                                              // of the previous multitrack read structure.   */
 
1259
 
 
1260
// ulFlags Return Values: */
 
1261
        MULTITRACKREAD_NOTDONE        =$0001; // Read is not done.  Another read of the same        */
 
1262
                                              // buffer is necessary.  There were not enough record */
 
1263
                                              // entries in the record table passed to this api.    */
 
1264
        MULTITRACKREAD_EOF            =$0002; // End of File.  Used because # bytes read may not    */
 
1265
                                              // match the length of the buffer in cases of a       */
 
1266
                                              // record that spans in the next buffer.              */
 
1267
 
 
1268
 
 
1269
//*********************************************
 
1270
// *
 
1271
// * MMMULTITRACKWRITE - Multiple Track Write
 
1272
// *
 
1273
// **********************************************/
 
1274
TYPE _MMMULTITRACKWRITE=RECORD   // mtwrite */
 
1275
   ulNumTracks:LongInt;       // Input - number of track entries     */
 
1276
   pTrackMapList:PTRACKMAP;     // Input - ptr to track-to-record list */
 
1277
   ulFlags:LongInt;           // Input - write flags (Default = 0)   */
 
1278
   ulReserved:LongInt;        // Input - Reserved (must be 0)        */
 
1279
   end;
 
1280
TYPE PMMMULTITRACKWRITE=^_MMMULTITRACKWRITE;
 
1281
 
 
1282
// ulFlags Input Values: */
 
1283
 
 
1284
CONST
 
1285
 
 
1286
        MULTITRACKWRITE_MERGE        =$0001; // Attempt to interleave the data on the write. */
 
1287
                                             // The default (without this flag set) is to    */
 
1288
                                             // write all records for each track then write  */
 
1289
                                             // all records of the next track and so on.     */
 
1290
 
 
1291
 
 
1292
//*********************************************
 
1293
// *
 
1294
// * MMMOVIEHEADER - standard movie header data
 
1295
// *
 
1296
// **********************************************/
 
1297
TYPE  MMTrackInfo = record
 
1298
    ulTrackID     : Longint;              // track identifier
 
1299
    ulMediaType   : Longint;              // media type
 
1300
    ulCountry     : Longint;              // country code for the track
 
1301
    ulCodePage    : Longint;              // country code page for the track
 
1302
    ulReserved1   : Longint;              // reserved must be 0
 
1303
    ulReserved2   : Longint;              // reserved must be 0
 
1304
  end;
 
1305
//TYPE  pMMTrackInfo = ^MMTrackInfo;
 
1306
 
 
1307
//TYPE
 
1308
//        PSZ = PChar;
 
1309
 
 
1310
TYPE _MMMOVIEHEADER=RECORD   // mmhdr */
 
1311
   ulStructLen:LongInt;       // length of this structure */
 
1312
   ulContentType:LongInt;     // movie content type */
 
1313
   ulMediaType:LongInt;       // video media type */
 
1314
   ulMovieCapsFlags:LongInt;  // capabilities */
 
1315
   ulMaxBytesPerSec:LongInt;  // maximum transfer rate */
 
1316
   ulPaddingGranularity:LongInt;// pad to a multiple of this size */
 
1317
   ulSuggestedBufferSize:LongInt;
 
1318
   ulStart:LongInt;           // delay time marking beginning or start of movie */
 
1319
   ulLength:LongInt;
 
1320
   ulNextTrackID:LongInt;     // next available track id */
 
1321
   ulNumEntries:LongInt;      // number of track entries */
 
1322
   pmmTrackInfoList:PMMTRACKINFO;  // track information */
 
1323
   pszMovieTitle:PSZ;     // movie title */
 
1324
   ulCountry:LongInt;         // country code for the title string */
 
1325
   ulCodePage:LongInt;        // country code page the title string */
 
1326
   ulAvgBytesPerSec:LongInt;  // average transfer rate */
 
1327
   end;
 
1328
TYPE PMMMOVIEHEADER=^_MMMOVIEHEADER;
 
1329
 
 
1330
// ulMovieCapsFlags Defines: */
 
1331
CONST
 
1332
 
 
1333
        MOVIE_HAS_VIDEO         =$0001;  // The movie contains video. */
 
1334
        MOVIE_HAS_AUDIO         =$0002;  // The movie contains audio. */
 
1335
        MOVIE_CAN_SEEK          =$0004;  // The movie can seek. */
 
1336
        MOVIE_CAN_SCAN          =$0008;  // The movie can fast scan. */
 
1337
        MOVIE_HAS_COPYRIGHT     =$0010;  // The movie contains copyrighted data. */
 
1338
        MOVIE_WAS_CAPTUREFILE   =$0020;  // The movie is a specially allocated  */
 
1339
                                          // file used for capturing real-time */
 
1340
                                          // video.  Applications should warn  */
 
1341
                                          // the user before writing over a file */
 
1342
                                          // with this flag set because the user  */
 
1343
                                          // probably defragmented this file. */
 
1344
                                          // If this flag is set, then there is a chance */
 
1345
                                          // that not all of the records will be written */
 
1346
                                          // on the call. Caller must check for this whether */
 
1347
                                          // this flag is set or not. */
 
1348
 
 
1349
//*********************************************
 
1350
// *
 
1351
// * MMVIDEOHEADER - Movie Video Track Header
 
1352
// *
 
1353
// **********************************************/
 
1354
 
 
1355
TYPE _MMVIDEOHEADER=RECORD   // mmvhdr */
 
1356
   ulStructLen:LongInt;       // length of this structure */
 
1357
   ulContentType:LongInt;     // video content type */
 
1358
   ulMediaType:LongInt;       // video media type */
 
1359
   ulVideoCapsFlags:LongInt;  // capabilities */
 
1360
   ulWidth:LongInt;           // video width in pels */
 
1361
   ulHeight:LongInt;          // video height in pels */
 
1362
   ulScale:LongInt;
 
1363
   ulRate:LongInt;            // Rate / Scale == frames/second */
 
1364
   ulStart:LongInt;           // delay time marking beginning or start of stream */
 
1365
   ulLength:LongInt;
 
1366
   ulTotalFrames:LongInt;     // total number of video frames */
 
1367
   ulInitialFrames:LongInt;
 
1368
   mmtimePerFrame:MMTIME;    // frame display time or 0L */
 
1369
   ulSuggestedBufferSize:LongInt;
 
1370
   genpalVideo:GENPAL;       // palette */
 
1371
   pmmXDIBHeader:PMMXDIBHEADER;     // windows DIB compatible header */
 
1372
   ulHHRWidth:LongInt;        // Actual width of HHR video     */
 
1373
   fHHR:Boolean;              // HHR flag                      */
 
1374
   end;
 
1375
TYPE PMMVIDEOHEADER=_MMVIDEOHEADER;
 
1376
 
 
1377
// ulContentType Defines: */
 
1378
CONST
 
1379
 
 
1380
        MMIO_VIDEO_UNKNOWN          =$00000000;  // Unknown video content */
 
1381
        MMIO_VIDEO_DATA             =$00000001;  // Video                 */
 
1382
 
 
1383
 
 
1384
//
 
1385
// Base function prototypes:
 
1386
///
 
1387
 
 
1388
function mmioAdvance( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1389
function mmioAscend( mmIO: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
 
1390
function mmioClose( mmIO: hmmio; usFlags: Word ): Word; cdecl;
 
1391
function mmioCreateChunk( mmio: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
 
1392
function mmioDescend( mmIO: hmmio; pckinfo, pckinfoParent: pMMCkInfo; usFlags: Word ): Word; cdecl;
 
1393
function mmioFlush( mmIO: hmmio; usFlags: Word ): Word; cdecl;
 
1394
function mmioGetInfo( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1395
function mmioGetLastError( mmIO: hmmio ): Longint; cdecl;
 
1396
function mmioInstallIOProc( fccIOProc: FourCC; pIOProc: pMMIOProc; ulFlags: Longint ): pmmIOProc; cdecl;
 
1397
function mmioOpen( pszFileName: pChar; mmIOInfo: pmmioinfo; ulOpenFlags: Longint ): hMMIO; cdecl;
 
1398
function mmioRead( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
 
1399
function mmioSeek( mmIO: hmmio; lOffset, lOrigin: Longint ): Longint; cdecl;
 
1400
function mmioSendMessage( mmIO: hmmio; usMsg: Word; lParam1, lParam2: Longint ): Longint; cdecl;
 
1401
function mmioSetBuffer( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint; usFlags: Word ): Word; cdecl;
 
1402
function mmioSetInfo( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1403
function mmioStringToFourCC( pszString: pChar; usFlags: Word ): FourCC; cdecl;
 
1404
function mmioWrite( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
 
1405
 
 
1406
//
 
1407
// Compound File function prototypes:
 
1408
///
 
1409
 
 
1410
function mmioCFOpen( pszFileName: pChar; CfInfo, IOInfo: pmmcfinfo; ulFlags: Longint ): hMMCF; cdecl;
 
1411
function mmioCFClose( mmCf: hmmcf; ulFlags: Longint ): Longint; cdecl;
 
1412
function mmioCFGetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
 
1413
function mmioCFSetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
 
1414
function mmioCFFindEntry( mmCf: hmmcf; ctocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1415
function mmioCFAddEntry( mmCf: hmmcf; cTocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1416
function mmioCFChangeEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1417
function mmioCFDeleteEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1418
function mmioCFAddElement( mmCf: hmmcf; pszElementName: pChar; fccType: FourCC;
 
1419
  pchBuffer: pChar; cchBytes: LongInt; ulFlags: Longint ): Longint; cdecl;
 
1420
 
 
1421
function mmioCFCopy( mmCfSource: hmmcf; pszDestFileName: pChar; ulFlags: Longint ): Longint; cdecl;
 
1422
//
 
1423
// Conversion Utility function prototypes:
 
1424
///
 
1425
 
 
1426
function mmioQueryFormatCount( FormatInfo: pmmformatinfo;
 
1427
  plNumFormats: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1428
 
 
1429
function mmioGetFormats( FormatInfo: pmmformatinfo;
 
1430
  lNumFormats: LongInt; pFormatInfoList: Pointer; plFormatsRead: pLong;
 
1431
  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1432
 
 
1433
function mmioGetFormatName( FormatInfo: pmmformatinfo; pszFormatName: pChar;
 
1434
  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1435
 
 
1436
function mmioIdentifyFile( pszFileName: pChar; MMIoInfo: pmmioinfo;
 
1437
  FormatInfo: pmmformatinfo; pfccStorageSystem: pFourCC; ulReserved: Longint;
 
1438
  ulFlags: Longint ): Longint; cdecl;
 
1439
 
 
1440
function mmioQueryHeaderLength( mmIO: hmmio; plHeaderLength: pLong;
 
1441
  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1442
 
 
1443
function mmioGetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
 
1444
  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1445
 
 
1446
function mmioSetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
 
1447
  plBytesWritten: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1448
 
 
1449
function mmioIniFileHandler( IniFileInfo: pmminifileinfo; ulFlags: Longint ): Longint; cdecl;
 
1450
 
 
1451
function mmioIdentifyStorageSystem( pszFileName: pChar;
 
1452
  MMIoInfo: pmmioinfo; pfccStorageSystem: pFourCC ): Longint; cdecl;
 
1453
 
 
1454
function mmioDetermineSSIOProc( pszFileName: pChar; MMIoInfo: pmmioinfo;
 
1455
  pfccStorageSystem: pFourCC; pszParsedRemainder: pChar ): Longint; cdecl;
 
1456
 
 
1457
function mmioQueryIOProcModuleHandle( IOProc: pMMIOProc;
 
1458
  IOProcModule: phModule ): Longint; cdecl;
 
1459
 
 
1460
function mmioCFCompact( pszFileName: pChar; ulFlags: Longint ): Longint; cdecl;
 
1461
 
 
1462
//
 
1463
// MMPMMMIO.INI file migration utility
 
1464
///
 
1465
 
 
1466
function mmioMigrateIniFile( ulFlags: Longint ): Longint; cdecl;
 
1467
 
 
1468
//
 
1469
// MMIO CODEC APIs
 
1470
///
 
1471
 
 
1472
function mmioIniFileCODEC( IniFile: pCODECIniFileInfo; ulFlags: Longint ): Longint; cdecl;
 
1473
function mmioSet( mmIO: hmmio; ExtendInfo: pmmExtendInfo; ulFlags: Longint): Longint; cdecl;
 
1474
function mmioQueryCODECName( IniInfo: pCODECIniFileinfo;
 
1475
  pszCODECName: pChar; pulBytesRead: pLongint ): Longint; cdecl;
 
1476
 
 
1477
function mmioQueryCODECNameLength( IniInfo: pCODECIniFileinfo;
 
1478
  pulNameLength: pLongint ): Longint; cdecl;
 
1479
 
 
1480
function mmioLoadCODECProc( IniInfo: pCODECIniFileInfo;
 
1481
  Module: phModule; ulFlags: Longint ): pCodecProc; cdecl;
 
1482
 
 
1483
function mmioGetData( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1484
 
 
1485
Implementation
 
1486
 
 
1487
//-------
 
1488
function mmioAdvance( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1489
    external LibName index 55;
 
1490
 
 
1491
function mmioAscend( mmIO: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
 
1492
    external LibName index 49;
 
1493
 
 
1494
function mmioClose( mmIO: hmmio; usFlags: Word ): Word; cdecl;
 
1495
    external LibName index 45;
 
1496
 
 
1497
function mmioCreateChunk( mmio: hmmio; pckinfo: pmmCkInfo; usFlags: Word ): Word; cdecl;
 
1498
    external LibName index 51;
 
1499
 
 
1500
function mmioDescend( mmIO: hmmio; pckinfo, pckinfoParent: pMMCkInfo; usFlags: Word ): Word; cdecl;
 
1501
    external LibName index 50;
 
1502
 
 
1503
function mmioFlush( mmIO: hmmio; usFlags: Word ): Word; cdecl;
 
1504
    external LibName index 44;
 
1505
 
 
1506
function mmioGetInfo( mmIO: hmmio; Info: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1507
    external LibName index 52;
 
1508
 
 
1509
function mmioGetLastError( mmIO: hmmio ): Longint; cdecl;
 
1510
    external LibName index 38;
 
1511
 
 
1512
function mmioInstallIOProc( fccIOProc: FourCC; pIOProc: pMMIOProc; ulFlags: Longint ): pmmIOProc; cdecl;
 
1513
    external LibName index 39;
 
1514
 
 
1515
function mmioOpen( pszFileName: pChar; mmIOInfo: pmmioinfo; ulOpenFlags: Longint ): hMMIO; cdecl;
 
1516
    external LibName index 40;
 
1517
 
 
1518
function mmioRead( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
 
1519
    external LibName index 41;
 
1520
 
 
1521
function mmioSeek( mmIO: hmmio; lOffset, lOrigin: Longint ): Longint; cdecl;
 
1522
    external LibName index 43;
 
1523
 
 
1524
function mmioSendMessage( mmIO: hmmio; usMsg: Word; lParam1, lParam2: Longint ): Longint; cdecl;
 
1525
    external LibName index 54;
 
1526
 
 
1527
function mmioSetBuffer( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint; usFlags: Word ): Word; cdecl;
 
1528
    external LibName index 56;
 
1529
 
 
1530
function mmioSetInfo( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1531
    external LibName index 53;
 
1532
 
 
1533
function mmioStringToFourCC( pszString: pChar; usFlags: Word ): FourCC; cdecl;
 
1534
    external LibName index 37;
 
1535
 
 
1536
function mmioWrite( mmIO: hmmio; pchBuffer: pChar; cBytes: Longint ): Longint; cdecl;
 
1537
    external LibName index 42;
 
1538
 
 
1539
function mmioCFOpen( pszFileName: pChar; CfInfo, IOInfo: pmmcfinfo; ulFlags: Longint ): hMMCF; cdecl;
 
1540
    external LibName index 57;
 
1541
 
 
1542
function mmioCFClose( mmCf: hmmcf; ulFlags: Longint ): Longint; cdecl;
 
1543
    external LibName index 58;
 
1544
 
 
1545
function mmioCFGetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
 
1546
    external LibName index 64;
 
1547
 
 
1548
function mmioCFSetInfo( mmCf: hmmcf; CfInfo: pmmcfinfo; cBytes: Longint ): Longint; cdecl;
 
1549
    external LibName index 65;
 
1550
 
 
1551
function mmioCFFindEntry( mmCf: hmmcf; ctocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1552
    external LibName index 62;
 
1553
 
 
1554
function mmioCFAddEntry( mmCf: hmmcf; cTocEntry: mmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1555
    external LibName index 59;
 
1556
 
 
1557
function mmioCFChangeEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1558
    external LibName index 61;
 
1559
 
 
1560
function mmioCFDeleteEntry( mmCf: hmmcf; CTocEntry: pmmctocentry; ulFlags: Longint ): Longint; cdecl;
 
1561
    external LibName index 60;
 
1562
 
 
1563
function mmioCFAddElement( mmCf: hmmcf; pszElementName: pChar; fccType: FourCC;
 
1564
  pchBuffer: pChar; cchBytes: LongInt; ulFlags: Longint ): Longint; cdecl;
 
1565
    external LibName index 63;
 
1566
 
 
1567
function mmioCFCopy( mmCfSource: hmmcf; pszDestFileName: pChar; ulFlags: Longint ): Longint; cdecl;
 
1568
    external LibName index 66;
 
1569
 
 
1570
function mmioQueryFormatCount( FormatInfo: pmmformatinfo;
 
1571
  plNumFormats: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1572
    external LibName index 87;
 
1573
 
 
1574
function mmioGetFormats( FormatInfo: pmmformatinfo;
 
1575
  lNumFormats: LongInt; pFormatInfoList: Pointer; plFormatsRead: pLong;
 
1576
  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1577
    external LibName index 88;
 
1578
 
 
1579
function mmioGetFormatName( FormatInfo: pmmformatinfo; pszFormatName: pChar;
 
1580
  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1581
    external LibName index 93;
 
1582
 
 
1583
function mmioIdentifyFile( pszFileName: pChar; MMIoInfo: pmmioinfo;
 
1584
  FormatInfo: pmmformatinfo; pfccStorageSystem: pFourCC; ulReserved: Longint;
 
1585
  ulFlags: Longint ): Longint; cdecl;
 
1586
    external LibName index 92;
 
1587
 
 
1588
function mmioQueryHeaderLength( mmIO: hmmio; plHeaderLength: pLong;
 
1589
  ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1590
    external LibName index 89;
 
1591
 
 
1592
function mmioGetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
 
1593
  plBytesRead: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1594
    external LibName index 90;
 
1595
 
 
1596
function mmioSetHeader( mmIO: hmmio; pHeader: Pointer; lHeaderLength: LongInt;
 
1597
  plBytesWritten: pLong; ulReserved: Longint; ulFlags: Longint ): Longint; cdecl;
 
1598
    external LibName index 91;
 
1599
 
 
1600
function mmioIniFileHandler( IniFileInfo: pmminifileinfo; ulFlags: Longint ): Longint; cdecl;
 
1601
    external LibName index 98;
 
1602
 
 
1603
function mmioIdentifyStorageSystem( pszFileName: pChar;
 
1604
  MMIoInfo: pmmioinfo; pfccStorageSystem: pFourCC ): Longint; cdecl;
 
1605
    external LibName index 100;
 
1606
 
 
1607
function mmioDetermineSSIOProc( pszFileName: pChar; MMIoInfo: pmmioinfo;
 
1608
  pfccStorageSystem: pFourCC; pszParsedRemainder: pChar ): Longint; cdecl;
 
1609
    external LibName index 101;
 
1610
 
 
1611
function mmioQueryIOProcModuleHandle( IOProc: pMMIOProc;
 
1612
  IOProcModule: phModule ): Longint; cdecl;
 
1613
    external LibName index 106;
 
1614
 
 
1615
function mmioCFCompact( pszFileName: pChar; ulFlags: Longint ): Longint; cdecl;
 
1616
    external LibName index 113;
 
1617
 
 
1618
//--------
 
1619
function mmioMigrateIniFile( ulFlags: Longint ): Longint; cdecl;
 
1620
    external LibName index 111;
 
1621
 
 
1622
//
 
1623
// MMIO CODEC APIs
 
1624
///
 
1625
 
 
1626
function mmioIniFileCODEC( IniFile: pCODECIniFileInfo; ulFlags: Longint ): Longint; cdecl;
 
1627
    external LibName index 112;
 
1628
 
 
1629
function mmioSet( mmIO: hmmio; ExtendInfo: pmmExtendInfo; ulFlags: Longint): Longint; cdecl;
 
1630
    external LibName index 114;
 
1631
 
 
1632
function mmioQueryCODECName( IniInfo: pCODECIniFileinfo;
 
1633
  pszCODECName: pChar; pulBytesRead: pLongint ): Longint; cdecl;
 
1634
    external LibName index 115;
 
1635
 
 
1636
function mmioQueryCODECNameLength( IniInfo: pCODECIniFileinfo;
 
1637
  pulNameLength: pLongint ): Longint; cdecl;
 
1638
    external LibName index 118;
 
1639
 
 
1640
function mmioLoadCODECProc( IniInfo: pCODECIniFileInfo;
 
1641
  Module: phModule; ulFlags: Longint ): pCodecProc; cdecl;
 
1642
    external LibName index 117;
 
1643
 
 
1644
function mmioGetData( mmIO: hmmio; mmIOInfo: pmmioinfo; usFlags: Word ): Word; cdecl;
 
1645
    external LibName index 119;
 
1646
 
 
1647
 
 
1648
end.