Mac OS 9
MoviesFormat.h
Go to the documentation of this file.
1 
19 #ifndef __MOVIESFORMAT__
20 #define __MOVIESFORMAT__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MOVIES__
27 #include <Movies.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #if PRAGMA_IMPORT
39 #pragma import on
40 #endif
41 
42 #if PRAGMA_STRUCT_ALIGN
43 #pragma options align = mac68k
44 #elif PRAGMA_STRUCT_PACKPUSH
45 #pragma pack(push, 2)
46 #elif PRAGMA_STRUCT_PACK
47 #pragma pack(2)
48 #endif
49 
50 enum {
51  kMovieVersion = 0
52 };
53 
54 /*****************************************
55  *
56  * General Types -
57  * These types are used in more than one of the
58  * directory types.
59  *
60  ****************************************/
64  long size;
65  long udType;
66  char data[1];
67 };
68 typedef struct MoviesUserData MoviesUserData;
69 struct UserDataAtom {
70  long size;
71  long atomType;
72  MoviesUserData userData[1];
73 };
74 typedef struct UserDataAtom UserDataAtom;
80 /*****************************************
81  *
82  * MediaDirectory information -
83  * The MediaDirectory is tightly coupled to the data.
84  *
85  ****************************************/
86 
88  long size;
89  long atomType;
90  long flags;
91  long numEntries;
92  SampleDescription sampleDescTable[1];
93 };
97  long sampleCount;
98  TimeValue sampleDuration;
99 };
100 typedef struct TimeToSampleNum TimeToSampleNum;
102  long size;
103  long atomType;
104  long flags;
106  TimeToSampleNum timeToSampleNumTable[1];
107 };
111  long size;
112  long atomType;
113  long flags;
115  long syncSampleTable[1];
116 };
117 typedef struct SyncSampleAtom SyncSampleAtom;
121  long firstChunk;
122  long samplesPerChunk;
123  long sampleDescriptionID;
124 };
125 typedef struct SampleToChunk SampleToChunk;
127  long size;
128  long atomType;
129  long flags;
131  SampleToChunk sampleToChunkTable[1];
132 };
133 typedef struct SampleToChunkAtom SampleToChunkAtom;
135  long size;
136  long atomType;
137  long flags;
139  long chunkOffsetTable[1];
140 };
141 typedef struct ChunkOffsetAtom ChunkOffsetAtom;
143  long size;
144  long atomType;
145  long flags;
147  long numEntries;
148  long sampleSizeTable[1];
149 };
150 typedef struct SampleSizeAtom SampleSizeAtom;
151 struct ShadowSync {
152  long fdSampleNum;
153  long syncSampleNum;
154 };
155 typedef struct ShadowSync ShadowSync;
157  long size;
158  long atomType;
159  long flags;
161  ShadowSync shadowSyncTable[1];
162 };
163 typedef struct ShadowSyncAtom ShadowSyncAtom;
165  long size;
166  long atomType;
169  TimeToSampleNumAtom timeToSampleNum;
170  SampleToChunkAtom sampleToChunk;
171  SyncSampleAtom syncSample;
172  SampleSizeAtom sampleSize;
173  ChunkOffsetAtom chunkOffset;
174  ShadowSyncAtom shadowSync;
175 };
176 typedef struct SampleTableAtom SampleTableAtom;
178  long flags;
181  long componentSubType;
182  long componentManufacturer;
183  long componentFlags;
184  long componentFlagsMask;
185  char componentName[1];
186 };
187 typedef struct PublicHandlerInfo PublicHandlerInfo;
188 struct HandlerAtom {
189  long size;
190  long atomType;
193 };
194 typedef struct HandlerAtom HandlerAtom;
197 typedef long DataRefAtom;
198 struct DataInfoAtom {
199  long size;
200  long atomType;
203 };
204 typedef struct DataInfoAtom DataInfoAtom;
205 struct RgnAtom {
206  long size;
207  long atomType;
208 
209  short rgnSize;
210  Rect rgnBBox;
211  char data[1];
212 };
213 typedef struct RgnAtom RgnAtom;
215  long size;
216  long atomType;
217 
218  long flags;
221 
222  char matteData[1];
223 };
225 struct MatteAtom {
226  long size;
227  long atomType;
228 
229  MatteCompressedAtom aCompressedMatte;
230 };
231 typedef struct MatteAtom MatteAtom;
232 struct ClippingAtom {
233  long size;
234  long atomType;
235 
236  RgnAtom aRgnClip;
237 };
238 typedef struct ClippingAtom ClippingAtom;
239 /************************
240  * Media Info Example Structures
241  ***********************/
242 
244  long flags;
246  short graphicsMode;
247  short opColorRed;
249  short opColorBlue;
250 };
253  long size;
254  long atomType;
256 };
259  long size;
260  long atomType;
263 
264  HandlerAtom dataHandler;
265 
266  DataInfoAtom dataInfo;
267 
268  SampleTableAtom sampleTable;
269 };
270 typedef struct VideoMediaInfo VideoMediaInfo;
272  long flags;
274  short balance;
275  short rsrvd;
276 };
279  long size;
280  long atomType;
283 };
286  long size;
287  long atomType;
290 
291  HandlerAtom dataHandler;
292 
293  DataRefAtom dataReference;
294 
295  SampleTableAtom sampleTable;
296 };
297 typedef struct SoundMediaInfo SoundMediaInfo;
299 struct MediaInfo {
300  long size;
301  long atomType;
302 };
303 typedef struct MediaInfo MediaInfo;
304 /************************
305  * Media Directory Structures
306  ***********************/
307 struct MediaHeader {
308  long flags;
314  TimeValue timeScale;
315  TimeValue duration;
317  short language;
318  short quality;
319 };
320 typedef struct MediaHeader MediaHeader;
322  long size;
323  long atomType;
324 
326 };
327 typedef struct MediaHeaderAtom MediaHeaderAtom;
329  long size;
330  long atomType;
335 
336  MediaInfo mediaInfo;
337 };
338 typedef struct MediaDirectory MediaDirectory;
339 /************************
340  * Track Structures
341  ***********************/
342 enum {
343  TrackEnable = 1 << 0,
344  TrackInMovie = 1 << 1,
345  TrackInPreview = 1 << 2,
346  TrackInPoster = 1 << 3
347 };
348 
349 struct TrackHeader {
350  long flags;
356  long trackID;
357 
358  long reserved1;
359 
360  TimeValue duration;
362  long reserved2;
363  long reserved3;
364 
365  short layer;
366  short alternateGroup;
367 
368  short volume;
369  short reserved4;
370 
371  MatrixRecord matrix;
372  Fixed trackWidth;
373  Fixed trackHeight;
374 };
375 typedef struct TrackHeader TrackHeader;
377  long size;
378  long atomType;
381 };
382 typedef struct TrackHeaderAtom TrackHeaderAtom;
383 struct EditListType {
384  TimeValue trackDuration;
385  TimeValue mediaTime;
386  Fixed mediaRate;
387 };
388 typedef struct EditListType EditListType;
389 struct EditListAtom {
390  long size;
391  long atomType;
393  long flags;
396  EditListType editListTable[1];
397 };
398 typedef struct EditListAtom EditListAtom;
399 struct EditsAtom {
400  long size;
401  long atomType;
404 };
405 typedef struct EditsAtom EditsAtom;
407  TimeValue preloadStartTime;
408  TimeValue preloadDuration;
409  long preloadFlags;
410  long defaultHints;
411 };
412 typedef struct TrackLoadSettings TrackLoadSettings;
414  long size;
415  long atomType;
418 };
421  long size;
422  long atomType;
427 
428  EditsAtom edits;
429 
430  MediaDirectory media;
431 
432  UserDataAtom userData;
433 };
434 typedef struct TrackDirectory TrackDirectory;
435 /*****************************************
436  *
437  * MovieDirectory -
438  * The MovieDirectory is the top level structure which
439  * holds the TrackInstance describing where the
440  * TrackDirectories are.
441  *
442  ****************************************/
443 struct MovieHeader {
444  long flags;
450  TimeValue timeScale;
451  TimeValue duration;
452  Fixed preferredRate;
455  short reserved1;
456 
457  long preferredLong1;
458  long preferredLong2;
459 
460  MatrixRecord matrix;
461 
462  TimeValue previewTime;
463  TimeValue previewDuration;
465  TimeValue posterTime;
467  TimeValue selectionTime;
468  TimeValue
470  TimeValue currentTime;
472  long nextTrackID;
473 };
474 typedef struct MovieHeader MovieHeader;
476  long size;
477  long atomType;
480 };
481 typedef struct MovieHeaderAtom MovieHeaderAtom;
483  TrackDirectory trackDirectory;
484 };
487  long size;
488  long atomType;
491 
492  ClippingAtom movieClip;
493 
499 };
500 typedef struct MovieDirectory MovieDirectory;
501 /*****************************************
502 ****************************************/
503 
505 enum {
507  MOVIE_TYPE = FOUR_CHAR_CODE('moov'),
508  TRACK_TYPE = FOUR_CHAR_CODE('trak'),
509  MEDIA_TYPE = FOUR_CHAR_CODE('mdia'),
510  VIDEO_TYPE = FOUR_CHAR_CODE('vide'),
511  SOUND_TYPE = FOUR_CHAR_CODE('soun')
512 };
513 
515 enum {
516  MovieAID = FOUR_CHAR_CODE('moov'),
517  MovieHeaderAID = FOUR_CHAR_CODE('mvhd'),
518  ClipAID = FOUR_CHAR_CODE('clip'),
519  RgnClipAID = FOUR_CHAR_CODE('crgn'),
520  MatteAID = FOUR_CHAR_CODE('matt'),
521  MatteCompAID = FOUR_CHAR_CODE('kmat'),
522  TrackAID = FOUR_CHAR_CODE('trak'),
523  UserDataAID = FOUR_CHAR_CODE('udta'),
524  TrackHeaderAID = FOUR_CHAR_CODE('tkhd'),
525  EditsAID = FOUR_CHAR_CODE('edts'),
526  EditListAID = FOUR_CHAR_CODE('elst'),
527  MediaAID = FOUR_CHAR_CODE('mdia'),
528  MediaHeaderAID = FOUR_CHAR_CODE('mdhd'),
529  MediaInfoAID = FOUR_CHAR_CODE('minf'),
530  VideoMediaInfoHeaderAID = FOUR_CHAR_CODE('vmhd'),
531  SoundMediaInfoHeaderAID = FOUR_CHAR_CODE('smhd'),
532  GenericMediaInfoHeaderAID = FOUR_CHAR_CODE('gmhd'),
533  GenericMediaInfoAID = FOUR_CHAR_CODE('gmin'),
534  DataInfoAID = FOUR_CHAR_CODE('dinf'),
535  DataRefAID = FOUR_CHAR_CODE('dref'),
536  SampleTableAID = FOUR_CHAR_CODE('stbl'),
537  STSampleDescAID = FOUR_CHAR_CODE('stsd'),
538  STTimeToSampAID = FOUR_CHAR_CODE('stts'),
539  STSyncSampleAID = FOUR_CHAR_CODE('stss'),
540  STSampleToChunkAID = FOUR_CHAR_CODE('stsc'),
541  STShadowSyncAID = FOUR_CHAR_CODE('stsh'),
542  HandlerAID = FOUR_CHAR_CODE('hdlr'),
543  STSampleSizeAID = FOUR_CHAR_CODE('stsz'),
544  STChunkOffsetAID = FOUR_CHAR_CODE('stco'),
545  STChunkOffset64AID = FOUR_CHAR_CODE('co64'),
546  STSampleIDAID = FOUR_CHAR_CODE('stid'),
547  DataRefContainerAID = FOUR_CHAR_CODE('drfc'),
548  TrackReferenceAID = FOUR_CHAR_CODE('tref'),
549  ColorTableAID = FOUR_CHAR_CODE('ctab'),
550  LoadSettingsAID = FOUR_CHAR_CODE('load'),
551  PropertyAtomAID = FOUR_CHAR_CODE('code'),
552  InputMapAID = FOUR_CHAR_CODE('imap'),
553  MovieBufferHintsAID = FOUR_CHAR_CODE('mbfh'),
554  MovieDataRefAliasAID = FOUR_CHAR_CODE('mdra'),
555  SoundLocalizationAID = FOUR_CHAR_CODE('sloc'),
556  CompressedMovieAID = FOUR_CHAR_CODE('cmov'),
557  CompressedMovieDataAID = FOUR_CHAR_CODE('cmvd'),
558  DataCompressionAtomAID = FOUR_CHAR_CODE('dcom'),
559  ReferenceMovieRecordAID = FOUR_CHAR_CODE('rmra'),
560  ReferenceMovieDescriptorAID = FOUR_CHAR_CODE('rmda'),
561  ReferenceMovieDataRefAID = FOUR_CHAR_CODE('rdrf'),
562  ReferenceMovieVersionCheckAID = FOUR_CHAR_CODE('rmvc'),
563  ReferenceMovieDataRateAID = FOUR_CHAR_CODE('rmdr'),
564  ReferenceMovieComponentCheckAID = FOUR_CHAR_CODE('rmcd'),
565  ReferenceMovieQualityAID = FOUR_CHAR_CODE('rmqu'),
566  ReferenceMovieLanguageAID = FOUR_CHAR_CODE('rmla'),
567  ReferenceMovieCPURatingAID = FOUR_CHAR_CODE('rmcs'),
568  ReferenceMovieAlternateGroupAID = FOUR_CHAR_CODE('rmag'),
569  ReferenceMovieNetworkStatusAID = FOUR_CHAR_CODE('rnet'),
570  CloneMediaAID = FOUR_CHAR_CODE('clon')
571 };
572 
575 struct TextBoxAtom {
576  long size;
577  long atomType;
579 };
580 typedef struct TextBoxAtom TextBoxAtom;
581 struct HiliteAtom {
582  long size;
583  long atomType;
584  long selStart;
585  long selEnd;
586 };
587 typedef struct HiliteAtom HiliteAtom;
588 struct KaraokeRec {
589  TimeValue timeVal;
590  short beginHilite;
591  short endHilite;
592 };
593 typedef struct KaraokeRec KaraokeRec;
594 struct KaraokeAtom {
595  long numEntries;
596  KaraokeRec karaokeEntries[1];
597 };
598 typedef struct KaraokeAtom KaraokeAtom;
600 enum { kDataRefIsSelfContained = (1 << 0) };
601 
603  long flags;
604  OSType dataRefType;
605  long dataRefSize;
606  char dataRef[1];
607 };
610 enum {
611  kVersionCheckMin = 0,
612  kVersionCheckMask = 1
613 };
614 
616  long flags;
617  OSType gestaltTag;
618  UInt32 val1;
619  UInt32 val2;
620  short checkType;
621 };
624 enum {
625  kDataRate144ModemRate = 1400L,
626  kDataRate288ModemRate = 2800L,
627  kDataRateISDNRate = 5600L,
628  kDataRateDualISDNRate = 11200L,
629  kDataRate256kbpsRate = 25600L,
630  kDataRate384kbpsRate = 38400L,
631  kDataRate512kbpsRate = 51200L,
632  kDataRate768kbpsRate = 76800L,
633  kDataRate1MbpsRate = 100000L,
634  kDataRateT1Rate = 150000L,
635  kDataRateInfiniteRate = 0x7FFFFFFF,
636  kDataRateDefaultIfNotSet = kDataRateISDNRate
637 };
638 
640  long flags;
641  long dataRate;
642 };
645  long flags;
647  unsigned long minVersion;
648 };
651  long flags;
652  short language;
653 };
655 
656 enum {
657  kQTCPUSpeed1Rating = 100,
659  kQTCPUSpeed3Rating = 300,
660  kQTCPUSpeed4Rating = 400,
661  kQTCPUSpeed5Rating = 500
662 };
663 
665  UInt32 flags;
666  UInt16 speed;
667 };
670  UInt32 flags;
671  UInt32 valueCount;
672  long netStatusValues[1];
673 };
676 struct CloneRecord {
677  long flags;
678  long masterTrackID;
679 };
680 typedef struct CloneRecord CloneRecord;
681 struct CloneAtom {
682  long size;
683  long atomType;
686 };
687 typedef struct CloneAtom CloneAtom;
688 
689 #if PRAGMA_STRUCT_ALIGN
690 #pragma options align = reset
691 #elif PRAGMA_STRUCT_PACKPUSH
692 #pragma pack(pop)
693 #elif PRAGMA_STRUCT_PACK
694 #pragma pack()
695 #endif
696 
697 #ifdef PRAGMA_IMPORT_OFF
698 #pragma import off
699 #elif PRAGMA_IMPORT
700 #pragma import reset
701 #endif
702 
703 #ifdef __cplusplus
704 }
705 #endif
706 
707 #endif
Basic Macintosh data types.
long Fixed
Definition: MacTypes.h:153
@ kVersionCheckMask
Definition: MoviesFormat.h:612
@ MOVIE_TYPE
Definition: MoviesFormat.h:507
long DataRefAtom
Definition: MoviesFormat.h:197
@ kQTCPUSpeed2Rating
Definition: MoviesFormat.h:658
QuickTime Interfaces.
Definition: MoviesFormat.h:134
long numEntries
Definition: MoviesFormat.h:138
long flags
Definition: MoviesFormat.h:137
Definition: MoviesFormat.h:232
Definition: MoviesFormat.h:681
CloneRecord cloneInfo
Definition: MoviesFormat.h:685
Definition: MoviesFormat.h:676
Definition: Components.h:133
Definition: Components.h:266
Definition: MoviesFormat.h:198
DataRefAtom dataRef
Definition: MoviesFormat.h:202
Definition: MoviesFormat.h:389
long numEntries
Definition: MoviesFormat.h:395
long flags
Definition: MoviesFormat.h:393
Definition: MoviesFormat.h:383
Definition: MoviesFormat.h:399
EditListAtom editList
Definition: MoviesFormat.h:403
Definition: MoviesFormat.h:188
PublicHandlerInfo hInfo
Definition: MoviesFormat.h:192
Definition: MoviesFormat.h:581
long selEnd
Definition: MoviesFormat.h:585
long selStart
Definition: MoviesFormat.h:584
Definition: ImageCompression.h:433
Definition: MoviesFormat.h:594
Definition: MoviesFormat.h:588
Definition: ImageCompression.h:68
Definition: MoviesFormat.h:225
Definition: MoviesFormat.h:214
ImageDescription matteImageDescription
Definition: MoviesFormat.h:220
Definition: MoviesFormat.h:328
MediaHeaderAtom mediaHeader
Definition: MoviesFormat.h:332
HandlerAtom mediaHandler
Definition: MoviesFormat.h:334
Definition: MoviesFormat.h:321
Definition: MoviesFormat.h:307
long modificationTime
Definition: MoviesFormat.h:311
TimeValue duration
Definition: MoviesFormat.h:315
long creationTime
Definition: MoviesFormat.h:310
short language
Definition: MoviesFormat.h:317
TimeValue timeScale
Definition: MoviesFormat.h:314
Definition: MoviesFormat.h:299
Definition: MoviesFormat.h:486
MovieHeaderAtom header
Definition: MoviesFormat.h:490
UserDataAtom userData
Definition: MoviesFormat.h:498
TrackDirectoryEntry track[1]
Definition: MoviesFormat.h:495
Definition: MoviesFormat.h:475
MovieHeader header
Definition: MoviesFormat.h:479
Definition: MoviesFormat.h:443
TimeValue timeScale
Definition: MoviesFormat.h:450
long creationTime
Definition: MoviesFormat.h:446
TimeValue selectionTime
Definition: MoviesFormat.h:467
TimeValue duration
Definition: MoviesFormat.h:451
TimeValue previewDuration
Definition: MoviesFormat.h:463
long nextTrackID
Definition: MoviesFormat.h:472
long modificationTime
Definition: MoviesFormat.h:447
short reserved1
Definition: MoviesFormat.h:455
short preferredVolume
Definition: MoviesFormat.h:454
TimeValue posterTime
Definition: MoviesFormat.h:465
TimeValue currentTime
Definition: MoviesFormat.h:470
TimeValue selectionDuration
Definition: MoviesFormat.h:469
Definition: MoviesFormat.h:63
long udType
Definition: MoviesFormat.h:65
Definition: MoviesFormat.h:177
long componentType
Definition: MoviesFormat.h:180
Definition: MoviesFormat.h:664
UInt16 speed
Definition: MoviesFormat.h:666
Definition: MoviesFormat.h:644
ComponentDescription cd
Definition: MoviesFormat.h:646
Definition: MoviesFormat.h:639
long dataRate
Definition: MoviesFormat.h:641
Definition: MoviesFormat.h:650
short language
Definition: MoviesFormat.h:652
Definition: MoviesFormat.h:615
OSType gestaltTag
Definition: MoviesFormat.h:617
Definition: MacTypes.h:527
Definition: MoviesFormat.h:602
Definition: MoviesFormat.h:669
long netStatusValues[1]
Definition: MoviesFormat.h:672
UInt32 valueCount
Definition: MoviesFormat.h:671
Definition: MoviesFormat.h:205
Definition: MoviesFormat.h:87
long flags
Definition: MoviesFormat.h:90
long numEntries
Definition: MoviesFormat.h:91
Definition: Movies.h:239
Definition: MoviesFormat.h:142
long sampleSize
Definition: MoviesFormat.h:146
long flags
Definition: MoviesFormat.h:145
Definition: MoviesFormat.h:164
SampleDescriptionAtom sampleDescription
Definition: MoviesFormat.h:168
Definition: MoviesFormat.h:126
long numEntries
Definition: MoviesFormat.h:130
long flags
Definition: MoviesFormat.h:129
Definition: MoviesFormat.h:120
Definition: MoviesFormat.h:156
long numEntries
Definition: MoviesFormat.h:160
long flags
Definition: MoviesFormat.h:159
Definition: MoviesFormat.h:151
Definition: MoviesFormat.h:278
long atomType
Definition: MoviesFormat.h:280
SoundMediaInfoHeader smiHeader
Definition: MoviesFormat.h:282
Definition: MoviesFormat.h:271
short balance
Definition: MoviesFormat.h:274
Definition: MoviesFormat.h:285
long atomType
Definition: MoviesFormat.h:287
SoundMediaInfoHeaderAtom header
Definition: MoviesFormat.h:289
Definition: MoviesFormat.h:110
long flags
Definition: MoviesFormat.h:113
long numEntries
Definition: MoviesFormat.h:114
Definition: MoviesFormat.h:575
Rect textBox
Definition: MoviesFormat.h:578
Definition: MoviesFormat.h:101
long flags
Definition: MoviesFormat.h:104
long numEntries
Definition: MoviesFormat.h:105
Definition: MoviesFormat.h:96
Definition: MoviesFormat.h:482
Definition: MoviesFormat.h:420
ClippingAtom trackClip
Definition: MoviesFormat.h:426
TrackHeaderAtom trackHeader
Definition: MoviesFormat.h:424
Definition: MoviesFormat.h:376
long atomType
Definition: MoviesFormat.h:378
TrackHeader header
Definition: MoviesFormat.h:380
Definition: MoviesFormat.h:349
long creationTime
Definition: MoviesFormat.h:352
long reserved2
Definition: MoviesFormat.h:362
long modificationTime
Definition: MoviesFormat.h:353
long trackID
Definition: MoviesFormat.h:356
Definition: MoviesFormat.h:413
TrackLoadSettings settings
Definition: MoviesFormat.h:417
Definition: MoviesFormat.h:406
Definition: MoviesFormat.h:69
Definition: MoviesFormat.h:252
VideoMediaInfoHeader vmiHeader
Definition: MoviesFormat.h:255
long atomType
Definition: MoviesFormat.h:254
Definition: MoviesFormat.h:243
short opColorGreen
Definition: MoviesFormat.h:248
short opColorRed
Definition: MoviesFormat.h:247
short graphicsMode
Definition: MoviesFormat.h:246
Definition: MoviesFormat.h:258
VideoMediaInfoHeaderAtom header
Definition: MoviesFormat.h:262
long atomType
Definition: MoviesFormat.h:260