MoviesFormat.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:31k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       MoviesFormat.h
  3.  
  4.      Contains:   QuickTime Interfaces.
  5.  
  6.      Version:    Technology: QuickTime 6.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1990-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __MOVIESFORMAT__
  18. #define __MOVIESFORMAT__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __MOVIES__
  23. #include "Movies.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. enum {
  42.     kMovieVersion               = 0                             /* version number of the format here described */
  43. };
  44. /****************************************
  45. *
  46. *   General Types -
  47. *       These types are used in more than one of the
  48. *       directory types.
  49. *
  50. ****************************************/
  51. /* MoviesUserData is the type used for user data in movie and track directories */
  52. struct MoviesUserData {
  53.     long                            size;                       /* size of this user data */
  54.     long                            udType;                     /* type of user data */
  55.     char                            data[1];                    /* the user data */
  56. };
  57. typedef struct MoviesUserData           MoviesUserData;
  58. struct UserDataAtom {
  59.     long                            size;
  60.     long                            atomType;
  61.     MoviesUserData                  userData[1];
  62. };
  63. typedef struct UserDataAtom             UserDataAtom;
  64. /* MoviesDataDescription tells us where the data for the movie or track lives.
  65.    The data can follow the directory, be in the datafork of the same file as the directory resource,
  66.    be in the resource fork of the same file as the directory resource, be in another file in the
  67.    data fork or resource fork, or require a specific bottleneck to fetch the data. */
  68. /****************************************
  69. *
  70. *   MediaDirectory information -
  71. *       The MediaDirectory is tightly coupled to the data.
  72. *
  73. ****************************************/
  74. struct SampleDescriptionAtom {
  75.     long                            size;
  76.     long                            atomType;                   /* = 'stsd' */
  77.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  78.     long                            numEntries;
  79.     SampleDescription               sampleDescTable[1];
  80. };
  81. typedef struct SampleDescriptionAtom    SampleDescriptionAtom;
  82. /* TimeToSampleNum maps physical sample time to physical sample number. */
  83. struct TimeToSampleNum {
  84.     long                            sampleCount;
  85.     TimeValue                       sampleDuration;
  86. };
  87. typedef struct TimeToSampleNum          TimeToSampleNum;
  88. struct TimeToSampleNumAtom {
  89.     long                            size;
  90.     long                            atomType;                   /* = 'stts' */
  91.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  92.     long                            numEntries;
  93.     TimeToSampleNum                 timeToSampleNumTable[1];
  94. };
  95. typedef struct TimeToSampleNumAtom      TimeToSampleNumAtom;
  96. /* SyncSamples is a list of the physical samples which are self contained. */
  97. struct SyncSampleAtom {
  98.     long                            size;
  99.     long                            atomType;                   /* = 'stss' */
  100.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  101.     long                            numEntries;
  102.     long                            syncSampleTable[1];
  103. };
  104. typedef struct SyncSampleAtom           SyncSampleAtom;
  105. /* SampleToChunk maps physical sample number to chunk number. */
  106. /* same as SampleToChunk, but redundant first sample is removed */
  107. struct SampleToChunk {
  108.     long                            firstChunk;
  109.     long                            samplesPerChunk;
  110.     long                            sampleDescriptionID;
  111. };
  112. typedef struct SampleToChunk            SampleToChunk;
  113. struct SampleToChunkAtom {
  114.     long                            size;
  115.     long                            atomType;                   /* = 'stsc' */
  116.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  117.     long                            numEntries;
  118.     SampleToChunk                   sampleToChunkTable[1];
  119. };
  120. typedef struct SampleToChunkAtom        SampleToChunkAtom;
  121. struct ChunkOffsetAtom {
  122.     long                            size;
  123.     long                            atomType;                   /* = 'stco' */
  124.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  125.     long                            numEntries;
  126.     long                            chunkOffsetTable[1];
  127. };
  128. typedef struct ChunkOffsetAtom          ChunkOffsetAtom;
  129. struct SampleSizeAtom {
  130.     long                            size;
  131.     long                            atomType;                   /* = 'stsz' */
  132.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  133.     long                            sampleSize;
  134.     long                            numEntries;
  135.     long                            sampleSizeTable[1];
  136. };
  137. typedef struct SampleSizeAtom           SampleSizeAtom;
  138. struct ShadowSync {
  139.     long                            fdSampleNum;
  140.     long                            syncSampleNum;
  141. };
  142. typedef struct ShadowSync               ShadowSync;
  143. struct ShadowSyncAtom {
  144.     long                            size;
  145.     long                            atomType;                   /* = 'stsz' */
  146.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  147.     long                            numEntries;
  148.     ShadowSync                      shadowSyncTable[1];
  149. };
  150. typedef struct ShadowSyncAtom           ShadowSyncAtom;
  151. struct SampleTableAtom {
  152.     long                            size;
  153.     long                            atomType;                   /* = 'stbl' */
  154.     SampleDescriptionAtom           sampleDescription;
  155.     TimeToSampleNumAtom             timeToSampleNum;
  156.     SampleToChunkAtom               sampleToChunk;
  157.     SyncSampleAtom                  syncSample;
  158.     SampleSizeAtom                  sampleSize;
  159.     ChunkOffsetAtom                 chunkOffset;
  160.     ShadowSyncAtom                  shadowSync;
  161. };
  162. typedef struct SampleTableAtom          SampleTableAtom;
  163. struct PublicHandlerInfo {
  164.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  165.     long                            componentType;
  166.     long                            componentSubType;
  167.     long                            componentManufacturer;
  168.     long                            componentFlags;
  169.     long                            componentFlagsMask;
  170.     char                            componentName[1];
  171. };
  172. typedef struct PublicHandlerInfo        PublicHandlerInfo;
  173. struct HandlerAtom {
  174.     long                            size;
  175.     long                            atomType;                   /* = 'hdlr' */
  176.     PublicHandlerInfo               hInfo;
  177. };
  178. typedef struct HandlerAtom              HandlerAtom;
  179. /* a data reference is a private structure */
  180. typedef long                            DataRefAtom;
  181. struct DataInfoAtom {
  182.     long                            size;
  183.     long                            atomType;                   /* = 'dinf' */
  184.     DataRefAtom                     dataRef;
  185. };
  186. typedef struct DataInfoAtom             DataInfoAtom;
  187. struct RgnAtom {
  188.     long                            size;
  189.     long                            atomType;
  190.     short                           rgnSize;
  191.     Rect                            rgnBBox;
  192.     char                            data[1];
  193. };
  194. typedef struct RgnAtom                  RgnAtom;
  195. struct MatteCompressedAtom {
  196.     long                            size;
  197.     long                            atomType;
  198.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  199.     ImageDescription                matteImageDescription;
  200.     char                            matteData[1];
  201. };
  202. typedef struct MatteCompressedAtom      MatteCompressedAtom;
  203. struct MatteAtom {
  204.     long                            size;
  205.     long                            atomType;
  206.     MatteCompressedAtom             aCompressedMatte;
  207. };
  208. typedef struct MatteAtom                MatteAtom;
  209. struct ClippingAtom {
  210.     long                            size;
  211.     long                            atomType;
  212.     RgnAtom                         aRgnClip;
  213. };
  214. typedef struct ClippingAtom             ClippingAtom;
  215. /***********************
  216. * Media Info Example Structures
  217. ***********************/
  218. struct VideoMediaInfoHeader {
  219.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  220.     short                           graphicsMode;               /* for QD - transfer mode */
  221.     short                           opColorRed;                 /* opcolor for transfer mode */
  222.     short                           opColorGreen;
  223.     short                           opColorBlue;
  224. };
  225. typedef struct VideoMediaInfoHeader     VideoMediaInfoHeader;
  226. struct VideoMediaInfoHeaderAtom {
  227.     long                            size;                       /* size of Media info */
  228.     long                            atomType;                   /* = 'vmhd' */
  229.     VideoMediaInfoHeader            vmiHeader;
  230. };
  231. typedef struct VideoMediaInfoHeaderAtom VideoMediaInfoHeaderAtom;
  232. struct VideoMediaInfo {
  233.     long                            size;                       /* size of Media info */
  234.     long                            atomType;                   /* = 'minf' */
  235.     VideoMediaInfoHeaderAtom        header;
  236.     HandlerAtom                     dataHandler;
  237.     DataInfoAtom                    dataInfo;
  238.     SampleTableAtom                 sampleTable;
  239. };
  240. typedef struct VideoMediaInfo           VideoMediaInfo;
  241. struct SoundMediaInfoHeader {
  242.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  243.     short                           balance;
  244.     short                           rsrvd;
  245. };
  246. typedef struct SoundMediaInfoHeader     SoundMediaInfoHeader;
  247. struct SoundMediaInfoHeaderAtom {
  248.     long                            size;                       /* size of Media info */
  249.     long                            atomType;                   /* = 'vmhd' */
  250.     SoundMediaInfoHeader            smiHeader;
  251. };
  252. typedef struct SoundMediaInfoHeaderAtom SoundMediaInfoHeaderAtom;
  253. struct SoundMediaInfo {
  254.     long                            size;                       /* size of Media info */
  255.     long                            atomType;                   /* = 'minf' */
  256.     SoundMediaInfoHeaderAtom        header;
  257.     HandlerAtom                     dataHandler;
  258.     DataRefAtom                     dataReference;
  259.     SampleTableAtom                 sampleTable;
  260. };
  261. typedef struct SoundMediaInfo           SoundMediaInfo;
  262. /* whatever data the media handler needs goes after the atomType */
  263. struct MediaInfo {
  264.     long                            size;
  265.     long                            atomType;
  266. };
  267. typedef struct MediaInfo                MediaInfo;
  268. /***********************
  269. * Media Directory Structures
  270. ***********************/
  271. struct MediaHeader {
  272.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  273.     long                            creationTime;               /* seconds since Jan 1904 when directory was created */
  274.     long                            modificationTime;           /* seconds since Jan 1904 when directory was appended */
  275.     TimeValue                       timeScale;                  /* start time for Media (Media time) */
  276.     TimeValue                       duration;                   /* length of Media (Media time) */
  277.     short                           language;
  278.     short                           quality;
  279. };
  280. typedef struct MediaHeader              MediaHeader;
  281. struct MediaHeaderAtom {
  282.     long                            size;
  283.     long                            atomType;
  284.     MediaHeader                     header;
  285. };
  286. typedef struct MediaHeaderAtom          MediaHeaderAtom;
  287. struct MediaDirectory {
  288.     long                            size;
  289.     long                            atomType;                   /* = 'mdia' */
  290.     MediaHeaderAtom                 mediaHeader;                /* standard Media information */
  291.     HandlerAtom                     mediaHandler;
  292.     MediaInfo                       mediaInfo;
  293. };
  294. typedef struct MediaDirectory           MediaDirectory;
  295. /***********************
  296. * Track Structures
  297. ***********************/
  298. enum {
  299.     TrackEnable                 = 1 << 0,
  300.     TrackInMovie                = 1 << 1,
  301.     TrackInPreview              = 1 << 2,
  302.     TrackInPoster               = 1 << 3
  303. };
  304. struct TrackHeader {
  305.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  306.     long                            creationTime;               /* seconds since Jan 1904 when directory was created */
  307.     long                            modificationTime;           /* seconds since Jan 1904 when directory was appended */
  308.     long                            trackID;
  309.     long                            reserved1;
  310.     TimeValue                       duration;                   /* length of track (track time) */
  311.     long                            reserved2;
  312.     long                            reserved3;
  313.     short                           layer;
  314.     short                           alternateGroup;
  315.     short                           volume;
  316.     short                           reserved4;
  317.     MatrixRecord                    matrix;
  318.     Fixed                           trackWidth;
  319.     Fixed                           trackHeight;
  320. };
  321. typedef struct TrackHeader              TrackHeader;
  322. struct TrackHeaderAtom {
  323.     long                            size;                       /* size of track header */
  324.     long                            atomType;                   /* = 'tkhd' */
  325.     TrackHeader                     header;
  326. };
  327. typedef struct TrackHeaderAtom          TrackHeaderAtom;
  328. struct EditListType {
  329.     TimeValue                       trackDuration;
  330.     TimeValue                       mediaTime;
  331.     Fixed                           mediaRate;
  332. };
  333. typedef struct EditListType             EditListType;
  334. struct EditListAtom {
  335.     long                            size;
  336.     long                            atomType;                   /* = elst */
  337.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  338.     long                            numEntries;
  339.     EditListType                    editListTable[1];
  340. };
  341. typedef struct EditListAtom             EditListAtom;
  342. struct EditsAtom {
  343.     long                            size;
  344.     long                            atomType;                   /* = edts */
  345.     EditListAtom                    editList;
  346. };
  347. typedef struct EditsAtom                EditsAtom;
  348. struct TrackLoadSettings {
  349.     TimeValue                       preloadStartTime;
  350.     TimeValue                       preloadDuration;
  351.     long                            preloadFlags;
  352.     long                            defaultHints;
  353. };
  354. typedef struct TrackLoadSettings        TrackLoadSettings;
  355. struct TrackLoadSettingsAtom {
  356.     long                            size;
  357.     long                            atomType;                   /* = load */
  358.     TrackLoadSettings               settings;
  359. };
  360. typedef struct TrackLoadSettingsAtom    TrackLoadSettingsAtom;
  361. struct TrackDirectory {
  362.     long                            size;
  363.     long                            atomType;                   /* = 'trak' */
  364.     TrackHeaderAtom                 trackHeader;                /* standard track information */
  365.     ClippingAtom                    trackClip;
  366.     EditsAtom                       edits;
  367.     MediaDirectory                  media;
  368.     UserDataAtom                    userData;                   /* space for extending with new data types */
  369. };
  370. typedef struct TrackDirectory           TrackDirectory;
  371. /****************************************
  372. *
  373. *   MovieDirectory -
  374. *       The MovieDirectory is the top level structure which
  375. *       holds the TrackInstance describing where the
  376. *       TrackDirectories are.
  377. *
  378. ****************************************/
  379. struct MovieHeader {
  380.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  381.     long                            creationTime;               /* seconds since Jan 1904 when directory was created */
  382.     long                            modificationTime;           /* seconds since Jan 1904 when directory was appended */
  383.     TimeValue                       timeScale;                  /* Time specifications */
  384.     TimeValue                       duration;
  385.     Fixed                           preferredRate;              /* rate at which to play this movie */
  386.     short                           preferredVolume;            /* volume to play movie at */
  387.     short                           reserved1;
  388.     long                            preferredLong1;
  389.     long                            preferredLong2;
  390.     MatrixRecord                    matrix;
  391.     TimeValue                       previewTime;                /* time in track the proxy begins (track time) */
  392.     TimeValue                       previewDuration;            /* how long the proxy lasts (track time) */
  393.     TimeValue                       posterTime;                 /* time in track the proxy begins (track time) */
  394.     TimeValue                       selectionTime;              /* time in track the proxy begins (track time) */
  395.     TimeValue                       selectionDuration;          /* time in track the proxy begins (track time) */
  396.     TimeValue                       currentTime;                /* time in track the proxy begins (track time) */
  397.     long                            nextTrackID;                /* next value to use for a TrackID */
  398. };
  399. typedef struct MovieHeader              MovieHeader;
  400. struct MovieHeaderAtom {
  401.     long                            size;
  402.     long                            atomType;                   /* = 'mvhd' */
  403.     MovieHeader                     header;
  404. };
  405. typedef struct MovieHeaderAtom          MovieHeaderAtom;
  406. struct TrackDirectoryEntry {
  407.     TrackDirectory                  trackDirectory;             /* Track directory information */
  408. };
  409. typedef struct TrackDirectoryEntry      TrackDirectoryEntry;
  410. struct MovieDirectory {
  411.     long                            size;
  412.     long                            atomType;                   /* = 'moov' */
  413.     MovieHeaderAtom                 header;
  414.     ClippingAtom                    movieClip;
  415.                                                                 /* Track Directories */
  416.     TrackDirectoryEntry             track[1];                   /* Track directory information */
  417.                                                                 /* User data for Movie */
  418.     UserDataAtom                    userData;                   /* space for user extensions */
  419. };
  420. typedef struct MovieDirectory           MovieDirectory;
  421. /****************************************
  422. ****************************************/
  423. /* Movie formats and tags */
  424. enum {
  425.                                                                 /* some system defined format IDs */
  426.     MOVIE_TYPE                  = FOUR_CHAR_CODE('moov'),
  427.     TRACK_TYPE                  = FOUR_CHAR_CODE('trak'),
  428.     MEDIA_TYPE                  = FOUR_CHAR_CODE('mdia'),
  429.     VIDEO_TYPE                  = FOUR_CHAR_CODE('vide'),
  430.     SOUND_TYPE                  = FOUR_CHAR_CODE('soun')
  431. };
  432. /* atom id's */
  433. enum {
  434.     MovieAID                    = FOUR_CHAR_CODE('moov'),
  435.     MovieHeaderAID              = FOUR_CHAR_CODE('mvhd'),
  436.     ClipAID                     = FOUR_CHAR_CODE('clip'),
  437.     RgnClipAID                  = FOUR_CHAR_CODE('crgn'),
  438.     MatteAID                    = FOUR_CHAR_CODE('matt'),
  439.     MatteCompAID                = FOUR_CHAR_CODE('kmat'),
  440.     TrackAID                    = FOUR_CHAR_CODE('trak'),
  441.     UserDataAID                 = FOUR_CHAR_CODE('udta'),
  442.     TrackHeaderAID              = FOUR_CHAR_CODE('tkhd'),
  443.     EditsAID                    = FOUR_CHAR_CODE('edts'),
  444.     EditListAID                 = FOUR_CHAR_CODE('elst'),
  445.     MediaAID                    = FOUR_CHAR_CODE('mdia'),
  446.     MediaHeaderAID              = FOUR_CHAR_CODE('mdhd'),
  447.     MediaInfoAID                = FOUR_CHAR_CODE('minf'),
  448.     VideoMediaInfoHeaderAID     = FOUR_CHAR_CODE('vmhd'),
  449.     SoundMediaInfoHeaderAID     = FOUR_CHAR_CODE('smhd'),
  450.     GenericMediaInfoHeaderAID   = FOUR_CHAR_CODE('gmhd'),
  451.     GenericMediaInfoAID         = FOUR_CHAR_CODE('gmin'),
  452.     DataInfoAID                 = FOUR_CHAR_CODE('dinf'),
  453.     DataRefAID                  = FOUR_CHAR_CODE('dref'),
  454.     SampleTableAID              = FOUR_CHAR_CODE('stbl'),
  455.     STSampleDescAID             = FOUR_CHAR_CODE('stsd'),
  456.     STTimeToSampAID             = FOUR_CHAR_CODE('stts'),
  457.     STSyncSampleAID             = FOUR_CHAR_CODE('stss'),
  458.     STSampleToChunkAID          = FOUR_CHAR_CODE('stsc'),
  459.     STShadowSyncAID             = FOUR_CHAR_CODE('stsh'),
  460.     HandlerAID                  = FOUR_CHAR_CODE('hdlr'),
  461.     STSampleSizeAID             = FOUR_CHAR_CODE('stsz'),
  462.     STChunkOffsetAID            = FOUR_CHAR_CODE('stco'),
  463.     STChunkOffset64AID          = FOUR_CHAR_CODE('co64'),
  464.     STSampleIDAID               = FOUR_CHAR_CODE('stid'),
  465.     DataRefContainerAID         = FOUR_CHAR_CODE('drfc'),
  466.     TrackReferenceAID           = FOUR_CHAR_CODE('tref'),
  467.     ColorTableAID               = FOUR_CHAR_CODE('ctab'),
  468.     LoadSettingsAID             = FOUR_CHAR_CODE('load'),
  469.     PropertyAtomAID             = FOUR_CHAR_CODE('code'),
  470.     InputMapAID                 = FOUR_CHAR_CODE('imap'),
  471.     MovieBufferHintsAID         = FOUR_CHAR_CODE('mbfh'),
  472.     MovieDataRefAliasAID        = FOUR_CHAR_CODE('mdra'),
  473.     SoundLocalizationAID        = FOUR_CHAR_CODE('sloc'),
  474.     CompressedMovieAID          = FOUR_CHAR_CODE('cmov'),
  475.     CompressedMovieDataAID      = FOUR_CHAR_CODE('cmvd'),
  476.     DataCompressionAtomAID      = FOUR_CHAR_CODE('dcom'),
  477.     ReferenceMovieRecordAID     = FOUR_CHAR_CODE('rmra'),
  478.     ReferenceMovieDescriptorAID = FOUR_CHAR_CODE('rmda'),
  479.     ReferenceMovieDataRefAID    = FOUR_CHAR_CODE('rdrf'),
  480.     ReferenceMovieVersionCheckAID = FOUR_CHAR_CODE('rmvc'),
  481.     ReferenceMovieDataRateAID   = FOUR_CHAR_CODE('rmdr'),
  482.     ReferenceMovieComponentCheckAID = FOUR_CHAR_CODE('rmcd'),
  483.     ReferenceMovieQualityAID    = FOUR_CHAR_CODE('rmqu'),
  484.     ReferenceMovieLanguageAID   = FOUR_CHAR_CODE('rmla'),
  485.     ReferenceMovieCPURatingAID  = FOUR_CHAR_CODE('rmcs'),
  486.     ReferenceMovieAlternateGroupAID = FOUR_CHAR_CODE('rmag'),
  487.     ReferenceMovieNetworkStatusAID = FOUR_CHAR_CODE('rnet'),
  488.     CloneMediaAID               = FOUR_CHAR_CODE('clon'),
  489.     FileTypeAID                 = FOUR_CHAR_CODE('ftyp'),
  490.     SecureContentInfoAID        = FOUR_CHAR_CODE('sinf'),
  491.     SecureContentSchemeTypeAID  = FOUR_CHAR_CODE('schm'),
  492.     SecureContentSchemeInfoAID  = FOUR_CHAR_CODE('schi')
  493. };
  494. /* Text ATOM definitions*/
  495. struct TextBoxAtom {
  496.     long                            size;
  497.     long                            atomType;                   /* = 'tbox' */
  498.     Rect                            textBox;                    /* New text box (overrides defaultTextBox)*/
  499. };
  500. typedef struct TextBoxAtom              TextBoxAtom;
  501. struct HiliteAtom {
  502.     long                            size;
  503.     long                            atomType;                   /* = 'hlit' */
  504.     long                            selStart;                   /* hilite selection start character*/
  505.     long                            selEnd;                     /* hilite selection end character*/
  506. };
  507. typedef struct HiliteAtom               HiliteAtom;
  508. struct KaraokeRec {
  509.     TimeValue                       timeVal;
  510.     short                           beginHilite;
  511.     short                           endHilite;
  512. };
  513. typedef struct KaraokeRec               KaraokeRec;
  514. struct KaraokeAtom {
  515.     long                            numEntries;
  516.     KaraokeRec                      karaokeEntries[1];
  517. };
  518. typedef struct KaraokeAtom              KaraokeAtom;
  519. /* for ReferenceMovieDataRefRecord.flags*/
  520. enum {
  521.     kDataRefIsSelfContained     = (1 << 0)
  522. };
  523. struct ReferenceMovieDataRefRecord {
  524.     long                            flags;
  525.     OSType                          dataRefType;
  526.     long                            dataRefSize;
  527.     char                            dataRef[1];
  528. };
  529. typedef struct ReferenceMovieDataRefRecord ReferenceMovieDataRefRecord;
  530. /* for VersionCheckRecord.checkType*/
  531. enum {
  532.     kVersionCheckMin            = 0,                            /* val1 is the min. version required*/
  533.     kVersionCheckMask           = 1                             /* (gestalt return value & val2) must == val1*/
  534. };
  535. struct QTAltVersionCheckRecord {
  536.     long                            flags;                      /* currently always 0*/
  537.     OSType                          gestaltTag;
  538.     UInt32                          val1;
  539.     UInt32                          val2;
  540.     short                           checkType;
  541. };
  542. typedef struct QTAltVersionCheckRecord  QTAltVersionCheckRecord;
  543. /* some helpful constants for DataRateRecord.dataRate */
  544. enum {
  545.     kDataRate144ModemRate       = 1400L,
  546.     kDataRate288ModemRate       = 2800L,
  547.     kDataRateISDNRate           = 5600L,
  548.     kDataRateDualISDNRate       = 11200L,
  549.     kDataRate256kbpsRate        = 25600L,
  550.     kDataRate384kbpsRate        = 38400L,
  551.     kDataRate512kbpsRate        = 51200L,
  552.     kDataRate768kbpsRate        = 76800L,
  553.     kDataRate1MbpsRate          = 100000L,
  554.     kDataRateT1Rate             = 150000L,
  555.     kDataRateInfiniteRate       = 0x7FFFFFFF,
  556.     kDataRateDefaultIfNotSet    = kDataRateISDNRate
  557. };
  558. struct QTAltDataRateRecord {
  559.     long                            flags;                      /* currently always 0*/
  560.     long                            dataRate;
  561. };
  562. typedef struct QTAltDataRateRecord      QTAltDataRateRecord;
  563. struct QTAltComponentCheckRecord {
  564.     long                            flags;                      /* currently always 0 */
  565.     ComponentDescription            cd;
  566.     unsigned long                   minVersion;
  567. };
  568. typedef struct QTAltComponentCheckRecord QTAltComponentCheckRecord;
  569. struct QTAltLanguageRecord {
  570.     long                            flags;                      /* currently always 0*/
  571.     short                           language;
  572. };
  573. typedef struct QTAltLanguageRecord      QTAltLanguageRecord;
  574. enum {
  575.     kQTCPUSpeed1Rating          = 100,                          /* slowest*/
  576.     kQTCPUSpeed2Rating          = 200,
  577.     kQTCPUSpeed3Rating          = 300,
  578.     kQTCPUSpeed4Rating          = 400,
  579.     kQTCPUSpeed5Rating          = 500                           /* fastest*/
  580. };
  581. struct QTAltCPURatingRecord {
  582.     UInt32                          flags;                      /* currently always 0*/
  583.     UInt16                          speed;
  584. };
  585. typedef struct QTAltCPURatingRecord     QTAltCPURatingRecord;
  586. struct ReferenceMovieNetworkStatusRecord {
  587.     UInt32                          flags;                      /* currently always 0*/
  588.     UInt32                          valueCount;                 /* how many status values are in array*/
  589.     long                            netStatusValues[1];         /* a value from kQTNetworkStatus... constants*/
  590. };
  591. typedef struct ReferenceMovieNetworkStatusRecord ReferenceMovieNetworkStatusRecord;
  592. struct CloneRecord {
  593.     long                            flags;
  594.     long                            masterTrackID;              /* track ID of the track we're cloning */
  595. };
  596. typedef struct CloneRecord              CloneRecord;
  597. struct CloneAtom {
  598.     long                            size;
  599.     long                            atomType;                   /* = clon */
  600.     CloneRecord                     cloneInfo;
  601. };
  602. typedef struct CloneAtom                CloneAtom;
  603. struct FileTypeAtom {
  604.     long                            size;
  605.     long                            atomType;                   /* = 'ftyp' */
  606.     long                            majorBrand;                 /* best use brand */
  607.     long                            minorVersion;
  608.     long                            compatibleBrands[4];        /* 1 or greater */
  609. };
  610. typedef struct FileTypeAtom             FileTypeAtom;
  611. enum {
  612.     kQTFileTypeBrandQuickTimeMovie = FOUR_CHAR_CODE('qt  '),    /* QuickTime movie files*/
  613.     kQTFileTypeBrandISOFile     = FOUR_CHAR_CODE('isom'),       /* ISO Base Media files*/
  614.     kQTFileTypeBrandMPEG4v1     = FOUR_CHAR_CODE('mp41'),       /* MPEG-4 (ISO/IEC 14496-1) version 1 files*/
  615.     kQTFileTypeBrandMPEG4v2     = FOUR_CHAR_CODE('mp42')        /* MPEG-4 (ISO/IEC 14496-1) version 2 files*/
  616. };
  617. struct SecureContentInfoAtom {
  618.     long                            size;
  619.     long                            atomType;                   /* = 'sinf' */
  620. };
  621. typedef struct SecureContentInfoAtom    SecureContentInfoAtom;
  622. struct SecureContentSchemeTypeAtom {
  623.     long                            size;
  624.     long                            atomType;                   /* = 'schm' */
  625.     long                            flags;                      /* 1 byte of version / 3 bytes of flags */
  626.     long                            schemeType;
  627.     UInt16                          schemeVersion;
  628.                                                                 /* if flags & 1, C string holding URL for security component server*/
  629. };
  630. typedef struct SecureContentSchemeTypeAtom SecureContentSchemeTypeAtom;
  631. struct SecureContentSchemeInfoAtom {
  632.     long                            size;
  633.     long                            atomType;                   /* = 'schi' */
  634. };
  635. typedef struct SecureContentSchemeInfoAtom SecureContentSchemeInfoAtom;
  636. #if PRAGMA_STRUCT_ALIGN
  637.     #pragma options align=reset
  638. #elif PRAGMA_STRUCT_PACKPUSH
  639.     #pragma pack(pop)
  640. #elif PRAGMA_STRUCT_PACK
  641.     #pragma pack()
  642. #endif
  643. #ifdef PRAGMA_IMPORT_OFF
  644. #pragma import off
  645. #elif PRAGMA_IMPORT
  646. #pragma import reset
  647. #endif
  648. #ifdef __cplusplus
  649. }
  650. #endif
  651. #endif /* __MOVIESFORMAT__ */