mmio.pas 71 KB

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