MoviesFormat.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. {
  2. File: MoviesFormat.p
  3. Contains: QuickTime Interfaces.
  4. Version: Technology: QuickTime 6.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit MoviesFormat;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,ImageCompression,Components,Movies;
  92. {$ALIGN MAC68K}
  93. const
  94. kMovieVersion = 0; { version number of the format here described }
  95. { ***************************************
  96. *
  97. * General Types -
  98. * These types are used in more than one of the
  99. * directory types.
  100. *
  101. *************************************** }
  102. { MoviesUserData is the type used for user data in movie and track directories }
  103. type
  104. MoviesUserDataPtr = ^MoviesUserData;
  105. MoviesUserData = record
  106. size: SInt32; { size of this user data }
  107. udType: SInt32; { type of user data }
  108. data: SInt8; { the user data }
  109. end;
  110. UserDataAtomPtr = ^UserDataAtom;
  111. UserDataAtom = record
  112. size: SInt32;
  113. atomType: SInt32;
  114. userData: array [0..0] of MoviesUserData;
  115. end;
  116. { MoviesDataDescription tells us where the data for the movie or track lives.
  117. The data can follow the directory, be in the datafork of the same file as the directory resource,
  118. be in the resource fork of the same file as the directory resource, be in another file in the
  119. data fork or resource fork, or require a specific bottleneck to fetch the data. }
  120. { ***************************************
  121. *
  122. * MediaDirectory information -
  123. * The MediaDirectory is tightly coupled to the data.
  124. *
  125. *************************************** }
  126. SampleDescriptionAtomPtr = ^SampleDescriptionAtom;
  127. SampleDescriptionAtom = record
  128. size: SInt32;
  129. atomType: SInt32; { = 'stsd' }
  130. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  131. numEntries: SInt32;
  132. sampleDescTable: array [0..0] of SampleDescription;
  133. end;
  134. { TimeToSampleNum maps physical sample time to physical sample number. }
  135. TimeToSampleNumPtr = ^TimeToSampleNum;
  136. TimeToSampleNum = record
  137. sampleCount: SInt32;
  138. sampleDuration: TimeValue;
  139. end;
  140. TimeToSampleNumAtomPtr = ^TimeToSampleNumAtom;
  141. TimeToSampleNumAtom = record
  142. size: SInt32;
  143. atomType: SInt32; { = 'stts' }
  144. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  145. numEntries: SInt32;
  146. timeToSampleNumTable: array [0..0] of TimeToSampleNum;
  147. end;
  148. { SyncSamples is a list of the physical samples which are self contained. }
  149. SyncSampleAtomPtr = ^SyncSampleAtom;
  150. SyncSampleAtom = record
  151. size: SInt32;
  152. atomType: SInt32; { = 'stss' }
  153. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  154. numEntries: SInt32;
  155. syncSampleTable: array [0..0] of SInt32;
  156. end;
  157. { SampleToChunk maps physical sample number to chunk number. }
  158. { same as SampleToChunk, but redundant first sample is removed }
  159. SampleToChunkPtr = ^SampleToChunk;
  160. SampleToChunk = record
  161. firstChunk: SInt32;
  162. samplesPerChunk: SInt32;
  163. sampleDescriptionID: SInt32;
  164. end;
  165. SampleToChunkAtomPtr = ^SampleToChunkAtom;
  166. SampleToChunkAtom = record
  167. size: SInt32;
  168. atomType: SInt32; { = 'stsc' }
  169. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  170. numEntries: SInt32;
  171. sampleToChunkTable: array [0..0] of SampleToChunk;
  172. end;
  173. ChunkOffsetAtomPtr = ^ChunkOffsetAtom;
  174. ChunkOffsetAtom = record
  175. size: SInt32;
  176. atomType: SInt32; { = 'stco' }
  177. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  178. numEntries: SInt32;
  179. chunkOffsetTable: array [0..0] of SInt32;
  180. end;
  181. SampleSizeAtomPtr = ^SampleSizeAtom;
  182. SampleSizeAtom = record
  183. size: SInt32;
  184. atomType: SInt32; { = 'stsz' }
  185. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  186. sampleSize: SInt32;
  187. numEntries: SInt32;
  188. sampleSizeTable: array [0..0] of SInt32;
  189. end;
  190. ShadowSyncPtr = ^ShadowSync;
  191. ShadowSync = record
  192. fdSampleNum: SInt32;
  193. syncSampleNum: SInt32;
  194. end;
  195. ShadowSyncAtomPtr = ^ShadowSyncAtom;
  196. ShadowSyncAtom = record
  197. size: SInt32;
  198. atomType: SInt32; { = 'stsz' }
  199. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  200. numEntries: SInt32;
  201. shadowSyncTable: array [0..0] of ShadowSync;
  202. end;
  203. SampleTableAtomPtr = ^SampleTableAtom;
  204. SampleTableAtom = record
  205. size: SInt32;
  206. atomType: SInt32; { = 'stbl' }
  207. sampleDescription: SampleDescriptionAtom;
  208. timeToSampleNum: TimeToSampleNumAtom;
  209. sampleToChunk: SampleToChunkAtom;
  210. syncSample: SyncSampleAtom;
  211. sampleSize: SampleSizeAtom;
  212. chunkOffset: ChunkOffsetAtom;
  213. shadowSync: ShadowSyncAtom;
  214. end;
  215. PublicHandlerInfoPtr = ^PublicHandlerInfo;
  216. PublicHandlerInfo = record
  217. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  218. componentType: SInt32;
  219. componentSubType: SInt32;
  220. componentManufacturer: SInt32;
  221. componentFlags: SInt32;
  222. componentFlagsMask: SInt32;
  223. componentName: SInt8;
  224. end;
  225. HandlerAtomPtr = ^HandlerAtom;
  226. HandlerAtom = record
  227. size: SInt32;
  228. atomType: SInt32; { = 'hdlr' }
  229. hInfo: PublicHandlerInfo;
  230. end;
  231. { a data reference is a private structure }
  232. DataRefAtom = SInt32;
  233. DataInfoAtomPtr = ^DataInfoAtom;
  234. DataInfoAtom = record
  235. size: SInt32;
  236. atomType: SInt32; { = 'dinf' }
  237. dataRef: DataRefAtom;
  238. end;
  239. RgnAtomPtr = ^RgnAtom;
  240. RgnAtom = record
  241. size: SInt32;
  242. atomType: SInt32;
  243. rgnSize: SInt16;
  244. rgnBBox: Rect;
  245. data: SInt8;
  246. end;
  247. MatteCompressedAtomPtr = ^MatteCompressedAtom;
  248. MatteCompressedAtom = record
  249. size: SInt32;
  250. atomType: SInt32;
  251. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  252. matteImageDescription: ImageDescription;
  253. matteData: SInt8;
  254. end;
  255. MatteAtomPtr = ^MatteAtom;
  256. MatteAtom = record
  257. size: SInt32;
  258. atomType: SInt32;
  259. aCompressedMatte: MatteCompressedAtom;
  260. end;
  261. ClippingAtomPtr = ^ClippingAtom;
  262. ClippingAtom = record
  263. size: SInt32;
  264. atomType: SInt32;
  265. aRgnClip: RgnAtom;
  266. end;
  267. { **********************
  268. * Media Info Example Structures
  269. ********************** }
  270. VideoMediaInfoHeaderPtr = ^VideoMediaInfoHeader;
  271. VideoMediaInfoHeader = record
  272. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  273. graphicsMode: SInt16; { for QD - transfer mode }
  274. opColorRed: SInt16; { opcolor for transfer mode }
  275. opColorGreen: SInt16;
  276. opColorBlue: SInt16;
  277. end;
  278. VideoMediaInfoHeaderAtomPtr = ^VideoMediaInfoHeaderAtom;
  279. VideoMediaInfoHeaderAtom = record
  280. size: SInt32; { size of Media info }
  281. atomType: SInt32; { = 'vmhd' }
  282. vmiHeader: VideoMediaInfoHeader;
  283. end;
  284. VideoMediaInfoPtr = ^VideoMediaInfo;
  285. VideoMediaInfo = record
  286. size: SInt32; { size of Media info }
  287. atomType: SInt32; { = 'minf' }
  288. header: VideoMediaInfoHeaderAtom;
  289. dataHandler: HandlerAtom;
  290. dataInfo: DataInfoAtom;
  291. sampleTable: SampleTableAtom;
  292. end;
  293. SoundMediaInfoHeaderPtr = ^SoundMediaInfoHeader;
  294. SoundMediaInfoHeader = record
  295. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  296. balance: SInt16;
  297. rsrvd: SInt16;
  298. end;
  299. SoundMediaInfoHeaderAtomPtr = ^SoundMediaInfoHeaderAtom;
  300. SoundMediaInfoHeaderAtom = record
  301. size: SInt32; { size of Media info }
  302. atomType: SInt32; { = 'vmhd' }
  303. smiHeader: SoundMediaInfoHeader;
  304. end;
  305. SoundMediaInfoPtr = ^SoundMediaInfo;
  306. SoundMediaInfo = record
  307. size: SInt32; { size of Media info }
  308. atomType: SInt32; { = 'minf' }
  309. header: SoundMediaInfoHeaderAtom;
  310. dataHandler: HandlerAtom;
  311. dataReference: DataRefAtom;
  312. sampleTable: SampleTableAtom;
  313. end;
  314. { whatever data the media handler needs goes after the atomType }
  315. MediaInfoPtr = ^MediaInfo;
  316. MediaInfo = record
  317. size: SInt32;
  318. atomType: SInt32;
  319. end;
  320. { **********************
  321. * Media Directory Structures
  322. ********************** }
  323. MediaHeaderPtr = ^MediaHeader;
  324. MediaHeader = record
  325. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  326. creationTime: SInt32; { seconds since Jan 1904 when directory was created }
  327. modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
  328. timeScale: TimeValue; { start time for Media (Media time) }
  329. duration: TimeValue; { length of Media (Media time) }
  330. language: SInt16;
  331. quality: SInt16;
  332. end;
  333. MediaHeaderAtomPtr = ^MediaHeaderAtom;
  334. MediaHeaderAtom = record
  335. size: SInt32;
  336. atomType: SInt32;
  337. header: MediaHeader;
  338. end;
  339. MediaDirectoryPtr = ^MediaDirectory;
  340. MediaDirectory = record
  341. size: SInt32;
  342. atomType: SInt32; { = 'mdia' }
  343. mediaHeader: MediaHeaderAtom; { standard Media information }
  344. mediaHandler: HandlerAtom;
  345. mediaInfo: MediaInfo;
  346. end;
  347. { **********************
  348. * Track Structures
  349. ********************** }
  350. const
  351. TrackEnable = $01;
  352. TrackInMovie = $02;
  353. TrackInPreview = $04;
  354. TrackInPoster = $08;
  355. type
  356. TrackHeaderPtr = ^TrackHeader;
  357. TrackHeader = record
  358. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  359. creationTime: SInt32; { seconds since Jan 1904 when directory was created }
  360. modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
  361. trackID: SInt32;
  362. reserved1: SInt32;
  363. duration: TimeValue; { length of track (track time) }
  364. reserved2: SInt32;
  365. reserved3: SInt32;
  366. layer: SInt16;
  367. alternateGroup: SInt16;
  368. volume: SInt16;
  369. reserved4: SInt16;
  370. matrix: MatrixRecord;
  371. trackWidth: Fixed;
  372. trackHeight: Fixed;
  373. end;
  374. TrackHeaderAtomPtr = ^TrackHeaderAtom;
  375. TrackHeaderAtom = record
  376. size: SInt32; { size of track header }
  377. atomType: SInt32; { = 'tkhd' }
  378. header: TrackHeader;
  379. end;
  380. EditListTypePtr = ^EditListType;
  381. EditListType = record
  382. trackDuration: TimeValue;
  383. mediaTime: TimeValue;
  384. mediaRate: Fixed;
  385. end;
  386. EditListAtomPtr = ^EditListAtom;
  387. EditListAtom = record
  388. size: SInt32;
  389. atomType: SInt32; { = elst }
  390. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  391. numEntries: SInt32;
  392. editListTable: array [0..0] of EditListType;
  393. end;
  394. EditsAtomPtr = ^EditsAtom;
  395. EditsAtom = record
  396. size: SInt32;
  397. atomType: SInt32; { = edts }
  398. editList: EditListAtom;
  399. end;
  400. TrackLoadSettingsPtr = ^TrackLoadSettings;
  401. TrackLoadSettings = record
  402. preloadStartTime: TimeValue;
  403. preloadDuration: TimeValue;
  404. preloadFlags: SInt32;
  405. defaultHints: SInt32;
  406. end;
  407. TrackLoadSettingsAtomPtr = ^TrackLoadSettingsAtom;
  408. TrackLoadSettingsAtom = record
  409. size: SInt32;
  410. atomType: SInt32; { = load }
  411. settings: TrackLoadSettings;
  412. end;
  413. TrackDirectoryPtr = ^TrackDirectory;
  414. TrackDirectory = record
  415. size: SInt32;
  416. atomType: SInt32; { = 'trak' }
  417. trackHeader: TrackHeaderAtom; { standard track information }
  418. trackClip: ClippingAtom;
  419. edits: EditsAtom;
  420. media: MediaDirectory;
  421. userData: UserDataAtom; { space for extending with new data types }
  422. end;
  423. { ***************************************
  424. *
  425. * MovieDirectory -
  426. * The MovieDirectory is the top level structure which
  427. * holds the TrackInstance describing where the
  428. * TrackDirectories are.
  429. *
  430. *************************************** }
  431. MovieHeaderPtr = ^MovieHeader;
  432. MovieHeader = record
  433. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  434. creationTime: SInt32; { seconds since Jan 1904 when directory was created }
  435. modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
  436. timeScale: TimeValue; { Time specifications }
  437. duration: TimeValue;
  438. preferredRate: Fixed; { rate at which to play this movie }
  439. preferredVolume: SInt16; { volume to play movie at }
  440. reserved1: SInt16;
  441. preferredLong1: SInt32;
  442. preferredLong2: SInt32;
  443. matrix: MatrixRecord;
  444. previewTime: TimeValue; { time in track the proxy begins (track time) }
  445. previewDuration: TimeValue; { how long the proxy lasts (track time) }
  446. posterTime: TimeValue; { time in track the proxy begins (track time) }
  447. selectionTime: TimeValue; { time in track the proxy begins (track time) }
  448. selectionDuration: TimeValue; { time in track the proxy begins (track time) }
  449. currentTime: TimeValue; { time in track the proxy begins (track time) }
  450. nextTrackID: SInt32; { next value to use for a TrackID }
  451. end;
  452. MovieHeaderAtomPtr = ^MovieHeaderAtom;
  453. MovieHeaderAtom = record
  454. size: SInt32;
  455. atomType: SInt32; { = 'mvhd' }
  456. header: MovieHeader;
  457. end;
  458. TrackDirectoryEntryPtr = ^TrackDirectoryEntry;
  459. TrackDirectoryEntry = record
  460. trackDirectory: TrackDirectory; { Track directory information }
  461. end;
  462. MovieDirectoryPtr = ^MovieDirectory;
  463. MovieDirectory = record
  464. size: SInt32;
  465. atomType: SInt32; { = 'moov' }
  466. header: MovieHeaderAtom;
  467. movieClip: ClippingAtom;
  468. { Track Directories }
  469. track: array [0..0] of TrackDirectoryEntry; { Track directory information }
  470. { User data for Movie }
  471. userData: UserDataAtom; { space for user extensions }
  472. end;
  473. { ***************************************
  474. *************************************** }
  475. { Movie formats and tags }
  476. const
  477. { some system defined format IDs }
  478. MOVIE_TYPE = $6D6F6F76 (* 'moov' *);
  479. TRACK_TYPE = $7472616B (* 'trak' *);
  480. MEDIA_TYPE = $6D646961 (* 'mdia' *);
  481. VIDEO_TYPE = $76696465 (* 'vide' *);
  482. SOUND_TYPE = $736F756E (* 'soun' *);
  483. { atom id's }
  484. MovieAID = $6D6F6F76 (* 'moov' *);
  485. MovieHeaderAID = $6D766864 (* 'mvhd' *);
  486. ClipAID = $636C6970 (* 'clip' *);
  487. RgnClipAID = $6372676E (* 'crgn' *);
  488. MatteAID = $6D617474 (* 'matt' *);
  489. MatteCompAID = $6B6D6174 (* 'kmat' *);
  490. TrackAID = $7472616B (* 'trak' *);
  491. UserDataAID = $75647461 (* 'udta' *);
  492. TrackHeaderAID = $746B6864 (* 'tkhd' *);
  493. EditsAID = $65647473 (* 'edts' *);
  494. EditListAID = $656C7374 (* 'elst' *);
  495. MediaAID = $6D646961 (* 'mdia' *);
  496. MediaHeaderAID = $6D646864 (* 'mdhd' *);
  497. MediaInfoAID = $6D696E66 (* 'minf' *);
  498. VideoMediaInfoHeaderAID = $766D6864 (* 'vmhd' *);
  499. SoundMediaInfoHeaderAID = $736D6864 (* 'smhd' *);
  500. GenericMediaInfoHeaderAID = $676D6864 (* 'gmhd' *);
  501. GenericMediaInfoAID = $676D696E (* 'gmin' *);
  502. DataInfoAID = $64696E66 (* 'dinf' *);
  503. DataRefAID = $64726566 (* 'dref' *);
  504. SampleTableAID = $7374626C (* 'stbl' *);
  505. STSampleDescAID = $73747364 (* 'stsd' *);
  506. STTimeToSampAID = $73747473 (* 'stts' *);
  507. STSyncSampleAID = $73747373 (* 'stss' *);
  508. STSampleToChunkAID = $73747363 (* 'stsc' *);
  509. STShadowSyncAID = $73747368 (* 'stsh' *);
  510. HandlerAID = $68646C72 (* 'hdlr' *);
  511. STSampleSizeAID = $7374737A (* 'stsz' *);
  512. STChunkOffsetAID = $7374636F (* 'stco' *);
  513. STChunkOffset64AID = $636F3634 (* 'co64' *);
  514. STSampleIDAID = $73746964 (* 'stid' *);
  515. DataRefContainerAID = $64726663 (* 'drfc' *);
  516. TrackReferenceAID = $74726566 (* 'tref' *);
  517. ColorTableAID = $63746162 (* 'ctab' *);
  518. LoadSettingsAID = $6C6F6164 (* 'load' *);
  519. PropertyAtomAID = $636F6465 (* 'code' *);
  520. InputMapAID = $696D6170 (* 'imap' *);
  521. MovieBufferHintsAID = $6D626668 (* 'mbfh' *);
  522. MovieDataRefAliasAID = $6D647261 (* 'mdra' *);
  523. SoundLocalizationAID = $736C6F63 (* 'sloc' *);
  524. CompressedMovieAID = $636D6F76 (* 'cmov' *);
  525. CompressedMovieDataAID = $636D7664 (* 'cmvd' *);
  526. DataCompressionAtomAID = $64636F6D (* 'dcom' *);
  527. ReferenceMovieRecordAID = $726D7261 (* 'rmra' *);
  528. ReferenceMovieDescriptorAID = $726D6461 (* 'rmda' *);
  529. ReferenceMovieDataRefAID = $72647266 (* 'rdrf' *);
  530. ReferenceMovieVersionCheckAID = $726D7663 (* 'rmvc' *);
  531. ReferenceMovieDataRateAID = $726D6472 (* 'rmdr' *);
  532. ReferenceMovieComponentCheckAID = $726D6364 (* 'rmcd' *);
  533. ReferenceMovieQualityAID = $726D7175 (* 'rmqu' *);
  534. ReferenceMovieLanguageAID = $726D6C61 (* 'rmla' *);
  535. ReferenceMovieCPURatingAID = $726D6373 (* 'rmcs' *);
  536. ReferenceMovieAlternateGroupAID = $726D6167 (* 'rmag' *);
  537. ReferenceMovieNetworkStatusAID = $726E6574 (* 'rnet' *);
  538. CloneMediaAID = $636C6F6E (* 'clon' *);
  539. FileTypeAID = $66747970 (* 'ftyp' *);
  540. SecureContentInfoAID = $73696E66 (* 'sinf' *);
  541. SecureContentSchemeTypeAID = $7363686D (* 'schm' *);
  542. SecureContentSchemeInfoAID = $73636869 (* 'schi' *);
  543. { Text ATOM definitions }
  544. type
  545. TextBoxAtomPtr = ^TextBoxAtom;
  546. TextBoxAtom = record
  547. size: SInt32;
  548. atomType: SInt32; { = 'tbox' }
  549. textBox: Rect; { New text box (overrides defaultTextBox) }
  550. end;
  551. HiliteAtomPtr = ^HiliteAtom;
  552. HiliteAtom = record
  553. size: SInt32;
  554. atomType: SInt32; { = 'hlit' }
  555. selStart: SInt32; { hilite selection start character }
  556. selEnd: SInt32; { hilite selection end character }
  557. end;
  558. KaraokeRecPtr = ^KaraokeRec;
  559. KaraokeRec = record
  560. timeVal: TimeValue;
  561. beginHilite: SInt16;
  562. endHilite: SInt16;
  563. end;
  564. KaraokeAtomPtr = ^KaraokeAtom;
  565. KaraokeAtom = record
  566. numEntries: SInt32;
  567. karaokeEntries: array [0..0] of KaraokeRec;
  568. end;
  569. { for ReferenceMovieDataRefRecord.flags }
  570. const
  571. kDataRefIsSelfContained = $01;
  572. type
  573. ReferenceMovieDataRefRecordPtr = ^ReferenceMovieDataRefRecord;
  574. ReferenceMovieDataRefRecord = record
  575. flags: SInt32;
  576. dataRefType: OSType;
  577. dataRefSize: SInt32;
  578. dataRef: SInt8;
  579. end;
  580. { for VersionCheckRecord.checkType }
  581. const
  582. kVersionCheckMin = 0; { val1 is the min. version required }
  583. kVersionCheckMask = 1; { (gestalt return value & val2) must == val1 }
  584. type
  585. QTAltVersionCheckRecordPtr = ^QTAltVersionCheckRecord;
  586. QTAltVersionCheckRecord = record
  587. flags: SInt32; { currently always 0 }
  588. gestaltTag: OSType;
  589. val1: UInt32;
  590. val2: UInt32;
  591. checkType: SInt16;
  592. end;
  593. { some helpful constants for DataRateRecord.dataRate }
  594. const
  595. kDataRate144ModemRate = 1400;
  596. kDataRate288ModemRate = 2800;
  597. kDataRateISDNRate = 5600;
  598. kDataRateDualISDNRate = 11200;
  599. kDataRate256kbpsRate = 25600;
  600. kDataRate384kbpsRate = 38400;
  601. kDataRate512kbpsRate = 51200;
  602. kDataRate768kbpsRate = 76800;
  603. kDataRate1MbpsRate = 100000;
  604. kDataRateT1Rate = 150000;
  605. kDataRateInfiniteRate = $7FFFFFFF;
  606. kDataRateDefaultIfNotSet = 5600;
  607. type
  608. QTAltDataRateRecordPtr = ^QTAltDataRateRecord;
  609. QTAltDataRateRecord = record
  610. flags: SInt32; { currently always 0 }
  611. dataRate: SInt32;
  612. end;
  613. QTAltComponentCheckRecordPtr = ^QTAltComponentCheckRecord;
  614. QTAltComponentCheckRecord = record
  615. flags: SInt32; { currently always 0 }
  616. cd: ComponentDescription;
  617. minVersion: UInt32;
  618. end;
  619. QTAltLanguageRecordPtr = ^QTAltLanguageRecord;
  620. QTAltLanguageRecord = record
  621. flags: SInt32; { currently always 0 }
  622. language: SInt16;
  623. end;
  624. const
  625. kQTCPUSpeed1Rating = 100; { slowest }
  626. kQTCPUSpeed2Rating = 200;
  627. kQTCPUSpeed3Rating = 300;
  628. kQTCPUSpeed4Rating = 400;
  629. kQTCPUSpeed5Rating = 500; { fastest }
  630. type
  631. QTAltCPURatingRecordPtr = ^QTAltCPURatingRecord;
  632. QTAltCPURatingRecord = record
  633. flags: UInt32; { currently always 0 }
  634. speed: UInt16;
  635. end;
  636. ReferenceMovieNetworkStatusRecordPtr = ^ReferenceMovieNetworkStatusRecord;
  637. ReferenceMovieNetworkStatusRecord = record
  638. flags: UInt32; { currently always 0 }
  639. valueCount: UInt32; { how many status values are in array }
  640. netStatusValues: array [0..0] of SInt32; { a value from kQTNetworkStatus... constants }
  641. end;
  642. CloneRecordPtr = ^CloneRecord;
  643. CloneRecord = record
  644. flags: SInt32;
  645. masterTrackID: SInt32; { track ID of the track we're cloning }
  646. end;
  647. CloneAtomPtr = ^CloneAtom;
  648. CloneAtom = record
  649. size: SInt32;
  650. atomType: SInt32; { = clon }
  651. cloneInfo: CloneRecord;
  652. end;
  653. FileTypeAtomPtr = ^FileTypeAtom;
  654. FileTypeAtom = record
  655. size: SInt32;
  656. atomType: SInt32; { = 'ftyp' }
  657. majorBrand: SInt32; { best use brand }
  658. minorVersion: SInt32;
  659. compatibleBrands: array [0..3] of SInt32; { 1 or greater }
  660. end;
  661. const
  662. kQTFileTypeBrandQuickTimeMovie = $71742020 (* 'qt ' *); { QuickTime movie files }
  663. kQTFileTypeBrandISOFile = $69736F6D (* 'isom' *); { ISO Base Media files }
  664. kQTFileTypeBrandMPEG4v1 = $6D703431 (* 'mp41' *); { MPEG-4 (ISO/IEC 14496-1) version 1 files }
  665. kQTFileTypeBrandMPEG4v2 = $6D703432 (* 'mp42' *); { MPEG-4 (ISO/IEC 14496-1) version 2 files }
  666. type
  667. SecureContentInfoAtomPtr = ^SecureContentInfoAtom;
  668. SecureContentInfoAtom = record
  669. size: SInt32;
  670. atomType: SInt32; { = 'sinf' }
  671. end;
  672. SecureContentSchemeTypeAtomPtr = ^SecureContentSchemeTypeAtom;
  673. SecureContentSchemeTypeAtom = record
  674. size: SInt32;
  675. atomType: SInt32; { = 'schm' }
  676. flags: SInt32; { 1 byte of version / 3 bytes of flags }
  677. schemeType: SInt32;
  678. schemeVersion: UInt16;
  679. { if flags & 1, C string holding URL for security component server }
  680. end;
  681. SecureContentSchemeInfoAtomPtr = ^SecureContentSchemeInfoAtom;
  682. SecureContentSchemeInfoAtom = record
  683. size: SInt32;
  684. atomType: SInt32; { = 'schi' }
  685. end;
  686. {$ALIGN MAC68K}
  687. end.