12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088 |
- {
- File: QuickTime/MoviesFormat.h
-
- Contains: QuickTime Interfaces.
-
- Version: QuickTime 7.7.1
-
- Copyright: © 1990-2012 by Apple Inc., all rights reserved
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://bugs.freepascal.org
-
- }
- { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
- { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
- {
- Modified for use with Free Pascal
- Version 308
- Please report any bugs to <[email protected]>
- }
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- {$mode macpas}
- {$modeswitch cblocks}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$calling mwpascal}
- unit MoviesFormat;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
- {$setc GAP_INTERFACES_VERSION := $0308}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC32}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
- {$setc __ppc64__ := 1}
- {$elsec}
- {$setc __ppc64__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc not defined __x86_64__ and defined CPUX86_64}
- {$setc __x86_64__ := 1}
- {$elsec}
- {$setc __x86_64__ := 0}
- {$endc}
- {$ifc not defined __arm__ and defined CPUARM}
- {$setc __arm__ := 1}
- {$elsec}
- {$setc __arm__ := 0}
- {$endc}
- {$ifc not defined __arm64__ and defined CPUAARCH64}
- {$setc __arm64__ := 1}
- {$elsec}
- {$setc __arm64__ := 0}
- {$endc}
- {$ifc defined cpu64}
- {$setc __LP64__ := 1}
- {$elsec}
- {$setc __LP64__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __ppc64__ and __ppc64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __x86_64__ and __x86_64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := TRUE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __arm__ and __arm__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := TRUE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elifc defined __arm64__ and __arm64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := TRUE}
- {$ifc defined ios}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$endc}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$elsec}
- {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
- {$endc}
- {$ifc defined __LP64__ and __LP64__ }
- {$setc TARGET_CPU_64 := TRUE}
- {$elsec}
- {$setc TARGET_CPU_64 := FALSE}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,ImageCompression,Components,Movies;
- {$endc} {not MACOSALLINCLUDE}
- {$ifc TARGET_OS_MAC}
- {$ALIGN MAC68K}
- const
- kMovieVersion = 0; { version number of the format here described }
- {***************************************
- *
- * General Types -
- * These types are used in more than one of the
- * directory types.
- *
- ***************************************}
- { MoviesUserData is the type used for user data in movie and track directories }
- type
- MoviesUserDataPtr = ^MoviesUserData;
- MoviesUserData = record
- size: SInt32; { size of this user data }
- udType: SInt32; { type of user data }
- data: array [0..0] of SInt8; { the user data }
- end;
- type
- UserDataAtomPtr = ^UserDataAtom;
- UserDataAtom = record
- size: SInt32;
- atomType: SInt32;
- userData: array [0..0] of MoviesUserData;
- end;
- { MoviesDataDescription tells us where the data for the movie or track lives.
- The data can follow the directory, be in the datafork of the same file as the directory resource,
- be in the resource fork of the same file as the directory resource, be in another file in the
- data fork or resource fork, or require a specific bottleneck to fetch the data. }
- {***************************************
- *
- * MediaDirectory information -
- * The MediaDirectory is tightly coupled to the data.
- *
- ***************************************}
- { SampleDescription is in Movies.h }
- type
- SampleDescriptionAtomPtr = ^SampleDescriptionAtom;
- SampleDescriptionAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stsd' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- sampleDescTable: array [0..0] of SampleDescription;
- end;
- { TimeToSampleNum maps physical sample time to physical sample number. }
- type
- TimeToSampleNumPtr = ^TimeToSampleNum;
- TimeToSampleNum = record
- sampleCount: SInt32;
- sampleDuration: TimeValue;
- end;
- type
- TimeToSampleNumAtomPtr = ^TimeToSampleNumAtom;
- TimeToSampleNumAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stts' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- timeToSampleNumTable: array [0..0] of TimeToSampleNum;
- end;
- { SyncSamples is a list of the physical samples which are self contained. }
- type
- SyncSampleAtomPtr = ^SyncSampleAtom;
- SyncSampleAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stss' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- syncSampleTable: array [0..0] of SInt32;
- end;
- { SampleToChunk maps physical sample number to chunk number. }
- { same as SampleToChunk, but redundant first sample is removed }
- type
- SampleToChunkPtr = ^SampleToChunk;
- SampleToChunk = record
- firstChunk: SInt32;
- samplesPerChunk: SInt32;
- sampleDescriptionID: SInt32;
- end;
- type
- SampleToChunkAtomPtr = ^SampleToChunkAtom;
- SampleToChunkAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stsc' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- sampleToChunkTable: array [0..0] of SampleToChunk;
- end;
- type
- ChunkOffsetAtomPtr = ^ChunkOffsetAtom;
- ChunkOffsetAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stco' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- chunkOffsetTable: array [0..0] of SInt32;
- end;
- type
- SampleSizeAtomPtr = ^SampleSizeAtom;
- SampleSizeAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stsz' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- sampleSize: SInt32;
- numEntries: SInt32;
- sampleSizeTable: array [0..0] of SInt32;
- end;
- type
- ShadowSyncPtr = ^ShadowSync;
- ShadowSync = record
- fdSampleNum: SInt32;
- syncSampleNum: SInt32;
- end;
- type
- ShadowSyncAtomPtr = ^ShadowSyncAtom;
- ShadowSyncAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stsz' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- shadowSyncTable: array [0..0] of ShadowSync;
- end;
- { CompositionOffsetEntry maps sample numbers to composition offsets. }
- type
- CompositionOffsetEntryPtr = ^CompositionOffsetEntry;
- CompositionOffsetEntry = record
- sampleCount: SInt32;
- displayOffset: TimeValue;
- end;
- type
- CompositionOffsetAtomPtr = ^CompositionOffsetAtom;
- CompositionOffsetAtom = record
- size: SInt32;
- atomType: SInt32; { = 'ctts' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- compositionOffsetTable: array [0..0] of CompositionOffsetEntry;
- end;
- type
- SampleDependencyAtomPtr = ^SampleDependencyAtom;
- SampleDependencyAtom = record
- size: SInt32;
- atomType: SInt32; { = 'sdtp' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- sampleDependencyTable: array [0..0] of UInt8;
- end;
- {
- NOTE: The values for these flags that shipped with QuickTime 7.0 were incorrect.
- They matched neither the specification nor the implementation -- the "Yes" and "No" bits
- were reversed. The flags have been corrected but renamed to ensure that code using
- the incorrect flags is reviewed by developers.
- enum (
- kQTSampleDependency_DependsOnOthers = 1<<5, // INCORRECT VALUE
- kQTSampleDependency_DoesNotDependOnOthers = 1<<4, // INCORRECT VALUE
- kQTSampleDependency_IsDependedOnByOthers = 1<<3, // INCORRECT VALUE
- kQTSampleDependency_IsNotDependedOnByOthers = 1<<2, // INCORRECT VALUE
- kQTSampleDependency_HasRedundantCoding = 1<<1, // INCORRECT VALUE
- kQTSampleDependency_HasNoRedundantCoding = 1<<0 // INCORRECT VALUE
- );
- }
- { Values for entries in SampleDependencyAtom.sampleDependencyTable[]}
- const
- { bit 0x80 is reserved; bit combinations 0x30, 0xC0 and 0x03 are reserved}
- kQTSampleDependency_EarlierDisplayTimesAllowed = 1 shl 6; { corresponds to flag mediaSampleEarlierDisplayTimesAllowed except at different bit offset}
- kQTSampleDependency_DoesNotDependOnOthers_Corrected = 1 shl 5; { ie: an I picture}
- kQTSampleDependency_DependsOnOthers_Corrected = 1 shl 4; { ie: not an I picture}
- kQTSampleDependency_IsNotDependedOnByOthers_Corrected = 1 shl 3; { mediaSampleDroppable}
- kQTSampleDependency_IsDependedOnByOthers_Corrected = 1 shl 2;
- kQTSampleDependency_HasNoRedundantCoding_Corrected = 1 shl 1;
- kQTSampleDependency_HasRedundantCoding_Corrected = 1 shl 0;
- type
- CompositionShiftLeastGreatestAtomPtr = ^CompositionShiftLeastGreatestAtom;
- CompositionShiftLeastGreatestAtom = record
- size: SInt32;
- atomType: SInt32; { = 'cslg' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- compositionOffsetToDTDDeltaShift: SInt32;
- leastDecodeToDisplayDelta: SInt32;
- greatestDecodeToDisplayDelta: SInt32;
- displayStartTime: SInt32;
- displayEndTime: SInt32;
- end;
- type
- PartialSyncSampleAtomPtr = ^PartialSyncSampleAtom;
- PartialSyncSampleAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stps' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- partialSyncSampleTable: array [0..0] of UInt32;
- end;
- type
- SampleTableAtomPtr = ^SampleTableAtom;
- SampleTableAtom = record
- size: SInt32;
- atomType: SInt32; { = 'stbl' }
- sampleDescription: SampleDescriptionAtom;
- timeToSampleNum: TimeToSampleNumAtom;
- sampleToChunk: SampleToChunkAtom;
- syncSample: SyncSampleAtom;
- sampleSize: SampleSizeAtom;
- chunkOffset: ChunkOffsetAtom;
- shadowSync: ShadowSyncAtom;
- end;
- type
- PublicHandlerInfoPtr = ^PublicHandlerInfo;
- PublicHandlerInfo = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- componentType: SInt32;
- componentSubType: SInt32;
- componentManufacturer: SInt32;
- componentFlags: SInt32;
- componentFlagsMask: SInt32;
- componentName: array [0..0] of SInt8;
- end;
- type
- HandlerAtomPtr = ^HandlerAtom;
- HandlerAtom = record
- size: SInt32;
- atomType: SInt32; { = 'hdlr' }
- hInfo: PublicHandlerInfo;
- end;
- { a data reference is a private structure }
- type
- DataRefAtom = SInt32;
- DataInfoAtom = record
- size: SInt32;
- atomType: SInt32; { = 'dinf' }
- dataRef: DataRefAtom;
- end;
- type
- RgnAtomPtr = ^RgnAtom;
- RgnAtom = record
- size: SInt32;
- atomType: SInt32;
- rgnSize: SInt16;
- rgnBBox: Rect;
- data: array [0..0] of SInt8;
- end;
- type
- MatteCompressedAtomPtr = ^MatteCompressedAtom;
- MatteCompressedAtom = record
- size: SInt32;
- atomType: SInt32;
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- matteImageDescription: ImageDescription;
- matteData: array [0..0] of SInt8;
- end;
- type
- MatteAtomPtr = ^MatteAtom;
- MatteAtom = record
- size: SInt32;
- atomType: SInt32;
- aCompressedMatte: MatteCompressedAtom;
- end;
- type
- ClippingAtomPtr = ^ClippingAtom;
- ClippingAtom = record
- size: SInt32;
- atomType: SInt32;
- aRgnClip: RgnAtom;
- end;
- {**********************
- * Media Info Example Structures
- **********************}
- type
- VideoMediaInfoHeaderPtr = ^VideoMediaInfoHeader;
- VideoMediaInfoHeader = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- graphicsMode: SInt16; { for QD - transfer mode }
- opColorRed: SInt16; { opcolor for transfer mode }
- opColorGreen: SInt16;
- opColorBlue: SInt16;
- end;
- type
- VideoMediaInfoHeaderAtomPtr = ^VideoMediaInfoHeaderAtom;
- VideoMediaInfoHeaderAtom = record
- size: SInt32; { size of Media info }
- atomType: SInt32; { = 'vmhd' }
- vmiHeader: VideoMediaInfoHeader;
- end;
- type
- VideoMediaInfoPtr = ^VideoMediaInfo;
- VideoMediaInfo = record
- size: SInt32; { size of Media info }
- atomType: SInt32; { = 'minf' }
- header: VideoMediaInfoHeaderAtom;
- dataHandler: HandlerAtom;
- dataInfo: DataInfoAtom;
- sampleTable: SampleTableAtom;
- end;
- type
- SoundMediaInfoHeaderPtr = ^SoundMediaInfoHeader;
- SoundMediaInfoHeader = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- balance: SInt16;
- rsrvd: SInt16;
- end;
- type
- SoundMediaInfoHeaderAtomPtr = ^SoundMediaInfoHeaderAtom;
- SoundMediaInfoHeaderAtom = record
- size: SInt32; { size of Media info }
- atomType: SInt32; { = 'vmhd' }
- smiHeader: SoundMediaInfoHeader;
- end;
- type
- SoundMediaInfoPtr = ^SoundMediaInfo;
- SoundMediaInfo = record
- size: SInt32; { size of Media info }
- atomType: SInt32; { = 'minf' }
- header: SoundMediaInfoHeaderAtom;
- dataHandler: HandlerAtom;
- dataReference: DataRefAtom;
- sampleTable: SampleTableAtom;
- end;
- { whatever data the media handler needs goes after the atomType }
- type
- MediaInfoPtr = ^MediaInfo;
- MediaInfo = record
- size: SInt32;
- atomType: SInt32;
- end;
- MediaInfo_fix = MediaInfo;
- {**********************
- * Media Directory Structures
- **********************}
- type
- MediaHeaderPtr = ^MediaHeader;
- MediaHeader = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- creationTime: SInt32; { seconds since Jan 1904 when directory was created }
- modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
- timeScale: TimeValue; { start time for Media (Media time) }
- duration: TimeValue; { length of Media (Media time) }
- language: SInt16;
- quality: SInt16;
- end;
- type
- MediaHeaderAtomPtr = ^MediaHeaderAtom;
- MediaHeaderAtom = record
- size: SInt32;
- atomType: SInt32;
- header: MediaHeader;
- end;
- type
- MediaDirectoryPtr = ^MediaDirectory;
- MediaDirectory = record
- size: SInt32;
- atomType: SInt32; { = 'mdia' }
- mediaHeader: MediaHeaderAtom; { standard Media information }
- mediaHandler: HandlerAtom;
- mediaInfo: MediaInfo_fix;
- end;
- {**********************
- * Track Structures
- **********************}
- const
- TrackEnable = 1 shl 0;
- TrackInMovie = 1 shl 1;
- TrackInPreview = 1 shl 2;
- TrackInPoster = 1 shl 3;
- type
- TrackHeaderPtr = ^TrackHeader;
- TrackHeader = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- creationTime: SInt32; { seconds since Jan 1904 when directory was created }
- modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
- trackID: SInt32;
- reserved1: SInt32;
- duration: TimeValue; { length of track (track time) }
- reserved2: SInt32;
- reserved3: SInt32;
- layer: SInt16;
- alternateGroup: SInt16;
- volume: SInt16;
- reserved4: SInt16;
- matrix: MatrixRecord;
- trackWidth: Fixed;
- trackHeight: Fixed;
- end;
- type
- TrackHeaderAtomPtr = ^TrackHeaderAtom;
- TrackHeaderAtom = record
- size: SInt32; { size of track header }
- atomType: SInt32; { = 'tkhd' }
- header: TrackHeader;
- end;
- type
- EditListTypePtr = ^EditListType;
- EditListType = record
- trackDuration: TimeValue;
- mediaTime: TimeValue;
- mediaRate: Fixed;
- end;
- type
- EditListAtomPtr = ^EditListAtom;
- EditListAtom = record
- size: SInt32;
- atomType: SInt32; { = elst }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- numEntries: SInt32;
- editListTable: array [0..0] of EditListType;
- end;
- type
- EditsAtomPtr = ^EditsAtom;
- EditsAtom = record
- size: SInt32;
- atomType: SInt32; { = edts }
- editList: EditListAtom;
- end;
- type
- TrackLoadSettingsPtr = ^TrackLoadSettings;
- TrackLoadSettings = record
- preloadStartTime: TimeValue;
- preloadDuration: TimeValue;
- preloadFlags: SInt32;
- defaultHints: SInt32;
- end;
- type
- TrackLoadSettingsAtomPtr = ^TrackLoadSettingsAtom;
- TrackLoadSettingsAtom = record
- size: SInt32;
- atomType: SInt32; { = load }
- settings: TrackLoadSettings;
- end;
- type
- TrackCleanApertureDimensionsPtr = ^TrackCleanApertureDimensions;
- TrackCleanApertureDimensions = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- cleanApertureDimensions: FixedPoint;
- end;
- type
- TrackCleanApertureDimensionsAtomPtr = ^TrackCleanApertureDimensionsAtom;
- TrackCleanApertureDimensionsAtom = record
- size: SInt32;
- atomType: SInt32; { = 'tapt' }
- cleanApertureDimensions: TrackCleanApertureDimensions;
- end;
- type
- TrackProductionApertureDimensionsPtr = ^TrackProductionApertureDimensions;
- TrackProductionApertureDimensions = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- productionApertureDimensions: FixedPoint;
- end;
- type
- TrackProductionApertureDimensionsAtomPtr = ^TrackProductionApertureDimensionsAtom;
- TrackProductionApertureDimensionsAtom = record
- size: SInt32;
- atomType: SInt32; { = 'prof' }
- productionApertureDimensions: TrackProductionApertureDimensions;
- end;
- type
- TrackEncodedPixelsDimensionsPtr = ^TrackEncodedPixelsDimensions;
- TrackEncodedPixelsDimensions = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- encodedPixelsDimensions: FixedPoint;
- end;
- type
- TrackEncodedPixelsDimensionsAtomPtr = ^TrackEncodedPixelsDimensionsAtom;
- TrackEncodedPixelsDimensionsAtom = record
- size: SInt32;
- atomType: SInt32; { = 'enof' }
- encodedPixelsDimensions: TrackEncodedPixelsDimensions;
- end;
- type
- TrackDirectoryPtr = ^TrackDirectory;
- TrackDirectory = record
- size: SInt32;
- atomType: SInt32; { = 'trak' }
- trackHeader: TrackHeaderAtom; { standard track information }
- trackClip: ClippingAtom;
- edits: EditsAtom;
- media: MediaDirectory;
- userData: UserDataAtom; { space for extending with new data types }
- end;
- TrackDirectory_fix = TrackDirectory;
- {***************************************
- *
- * MovieDirectory -
- * The MovieDirectory is the top level structure which
- * holds the TrackInstance describing where the
- * TrackDirectories are.
- *
- ***************************************}
- type
- MovieHeaderPtr = ^MovieHeader;
- MovieHeader = record
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- creationTime: SInt32; { seconds since Jan 1904 when directory was created }
- modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
- timeScale: TimeValue; { Time specifications }
- duration: TimeValue;
- preferredRate: Fixed; { rate at which to play this movie }
- preferredVolume: SInt16; { volume to play movie at }
- reserved1: SInt16;
- preferredLong1: SInt32;
- preferredLong2: SInt32;
- matrix: MatrixRecord;
- previewTime: TimeValue; { time in track the proxy begins (track time) }
- previewDuration: TimeValue; { how long the proxy lasts (track time) }
- posterTime: TimeValue; { time in track the proxy begins (track time) }
- selectionTime: TimeValue; { time in track the proxy begins (track time) }
- selectionDuration: TimeValue; { time in track the proxy begins (track time) }
- currentTime: TimeValue; { time in track the proxy begins (track time) }
- nextTrackID: SInt32; { next value to use for a TrackID }
- end;
- type
- MovieHeaderAtomPtr = ^MovieHeaderAtom;
- MovieHeaderAtom = record
- size: SInt32;
- atomType: SInt32; { = 'mvhd' }
- header: MovieHeader;
- end;
- type
- TrackDirectoryEntryPtr = ^TrackDirectoryEntry;
- TrackDirectoryEntry = record
- trackDirectory: TrackDirectory_fix; { Track directory information }
- end;
- type
- MovieDirectoryPtr = ^MovieDirectory;
- MovieDirectory = record
- size: SInt32;
- atomType: SInt32; { = 'moov' }
- header: MovieHeaderAtom;
- movieClip: ClippingAtom;
- { Track Directories }
- track: array [0..0] of TrackDirectoryEntry; { Track directory information }
- { User data for Movie }
- userData: UserDataAtom; { space for user extensions }
- end;
- {***************************************
- ***************************************}
- { Movie formats and tags }
- const
- { some system defined format IDs }
- QT_MOVIE_TYPE = FourCharCode('moov');
- QT_TRACK_TYPE = FourCharCode('trak');
- QT_MEDIA_TYPE = FourCharCode('mdia');
- QT_VIDEO_TYPE = FourCharCode('vide');
- QT_SOUND_TYPE = FourCharCode('soun');
- const
- MOVIE_TYPE = FourCharCode('moov');
- TRACK_TYPE = FourCharCode('trak');
- VIDEO_TYPE = FourCharCode('vide');
- SOUND_TYPE = FourCharCode('soun');
- {$ifc not TARGET_OS_WIN32}
- { The name "MEDIA_TYPE" has a name space collision on Win32.}
- const
- MEDIA_TYPE = FourCharCode('mdia');
- {$endc} {!TARGET_OS_WIN32}
- { atom id's }
- const
- MovieAID = FourCharCode('moov');
- MovieHeaderAID = FourCharCode('mvhd');
- ClipAID = FourCharCode('clip');
- RgnClipAID = FourCharCode('crgn');
- MatteAID = FourCharCode('matt');
- MatteCompAID = FourCharCode('kmat');
- TrackAID = FourCharCode('trak');
- UserDataAID = FourCharCode('udta');
- TrackHeaderAID = FourCharCode('tkhd');
- EditsAID = FourCharCode('edts');
- EditListAID = FourCharCode('elst');
- MediaAID = FourCharCode('mdia');
- MediaHeaderAID = FourCharCode('mdhd');
- MediaInfoAID = FourCharCode('minf');
- VideoMediaInfoHeaderAID = FourCharCode('vmhd');
- SoundMediaInfoHeaderAID = FourCharCode('smhd');
- GenericMediaInfoHeaderAID = FourCharCode('gmhd');
- GenericMediaInfoAID = FourCharCode('gmin');
- DataInfoAID = FourCharCode('dinf');
- DataRefAID = FourCharCode('dref');
- SampleTableAID = FourCharCode('stbl');
- STSampleDescAID = FourCharCode('stsd');
- STTimeToSampAID = FourCharCode('stts');
- STSyncSampleAID = FourCharCode('stss');
- STSampleToChunkAID = FourCharCode('stsc');
- STShadowSyncAID = FourCharCode('stsh');
- HandlerAID = FourCharCode('hdlr');
- STSampleSizeAID = FourCharCode('stsz');
- STChunkOffsetAID = FourCharCode('stco');
- STChunkOffset64AID = FourCharCode('co64');
- STSampleIDAID = FourCharCode('stid');
- STCompositionOffsetAID = FourCharCode('ctts');
- STSampleDependencyAID = FourCharCode('sdtp');
- STCompositionShiftLeastGreatestAID = FourCharCode('cslg');
- STPartialSyncSampleAID = FourCharCode('stps');
- DataRefContainerAID = FourCharCode('drfc');
- TrackReferenceAID = FourCharCode('tref');
- ColorTableAID = FourCharCode('ctab');
- LoadSettingsAID = FourCharCode('load');
- PropertyAtomAID = FourCharCode('code');
- InputMapAID = FourCharCode('imap');
- MovieBufferHintsAID = FourCharCode('mbfh');
- MovieDataRefAliasAID = FourCharCode('mdra');
- SoundLocalizationAID = FourCharCode('sloc');
- CompressedMovieAID = FourCharCode('cmov');
- CompressedMovieDataAID = FourCharCode('cmvd');
- DataCompressionAtomAID = FourCharCode('dcom');
- ReferenceMovieRecordAID = FourCharCode('rmra');
- ReferenceMovieDescriptorAID = FourCharCode('rmda');
- ReferenceMovieDataRefAID = FourCharCode('rdrf');
- ReferenceMovieVersionCheckAID = FourCharCode('rmvc');
- ReferenceMovieDataRateAID = FourCharCode('rmdr');
- ReferenceMovieComponentCheckAID = FourCharCode('rmcd');
- ReferenceMovieQualityAID = FourCharCode('rmqu');
- ReferenceMovieLanguageAID = FourCharCode('rmla');
- ReferenceMovieCPURatingAID = FourCharCode('rmcs');
- ReferenceMovieAlternateGroupAID = FourCharCode('rmag');
- ReferenceMovieNetworkStatusAID = FourCharCode('rnet');
- CloneMediaAID = FourCharCode('clon');
- FileTypeAID = FourCharCode('ftyp');
- SecureContentInfoAID = FourCharCode('sinf');
- SecureContentSchemeTypeAID = FourCharCode('schm');
- SecureContentSchemeInfoAID = FourCharCode('schi');
- TrackApertureModeDimensionsAID = FourCharCode('tapt'); { container atom including TrackCleanApertureDimensionsAID, TrackProductionApertureDimensionsAID and TrackEncodedPixelsDimensionsAID }
- TrackCleanApertureDimensionsAID = FourCharCode('clef');
- TrackProductionApertureDimensionsAID = FourCharCode('prof');
- TrackEncodedPixelsDimensionsAID = FourCharCode('enof');
- { Text ATOM definitions}
- type
- TextBoxAtomPtr = ^TextBoxAtom;
- TextBoxAtom = record
- size: SInt32;
- atomType: SInt32; { = 'tbox' }
- textBox: Rect; { New text box (overrides defaultTextBox)}
- end;
- type
- HiliteAtomPtr = ^HiliteAtom;
- HiliteAtom = record
- size: SInt32;
- atomType: SInt32; { = 'hlit' }
- selStart: SInt32; { hilite selection start character}
- selEnd: SInt32; { hilite selection end character}
- end;
- type
- KaraokeRecPtr = ^KaraokeRec;
- KaraokeRec = record
- timeVal: TimeValue;
- beginHilite: SInt16;
- endHilite: SInt16;
- end;
- type
- KaraokeAtomPtr = ^KaraokeAtom;
- KaraokeAtom = record
- numEntries: SInt32;
- karaokeEntries: array [0..0] of KaraokeRec;
- end;
- { for ReferenceMovieDataRefRecord.flags}
- const
- kDataRefIsSelfContained = 1 shl 0;
- type
- ReferenceMovieDataRefRecordPtr = ^ReferenceMovieDataRefRecord;
- ReferenceMovieDataRefRecord = record
- flags: SInt32;
- dataRefType: OSType;
- dataRefSize: SInt32;
- dataRef: array [0..0] of SInt8;
- end;
- { for VersionCheckRecord.checkType}
- const
- kVersionCheckMin = 0; { val1 is the min. version required}
- kVersionCheckMask = 1; { (gestalt return value & val2) must == val1}
- type
- QTAltVersionCheckRecordPtr = ^QTAltVersionCheckRecord;
- QTAltVersionCheckRecord = record
- flags: SInt32; { currently always 0}
- gestaltTag: OSType;
- val1: UInt32;
- val2: UInt32;
- checkType: SInt16;
- end;
- { some helpful constants for DataRateRecord.dataRate }
- const
- kDataRate144ModemRate = 1400;
- kDataRate288ModemRate = 2800;
- kDataRateISDNRate = 5600;
- kDataRateDualISDNRate = 11200;
- kDataRate256kbpsRate = 25600;
- kDataRate384kbpsRate = 38400;
- kDataRate512kbpsRate = 51200;
- kDataRate768kbpsRate = 76800;
- kDataRate1MbpsRate = 100000;
- kDataRateT1Rate = 150000;
- kDataRateInfiniteRate = $7FFFFFFF;
- kDataRateDefaultIfNotSet = kDataRate512kbpsRate;
- type
- QTAltDataRateRecordPtr = ^QTAltDataRateRecord;
- QTAltDataRateRecord = record
- flags: SInt32; { currently always 0}
- dataRate: SInt32;
- end;
- type
- QTAltComponentCheckRecordPtr = ^QTAltComponentCheckRecord;
- QTAltComponentCheckRecord = record
- flags: SInt32; { currently always 0 }
- cd: ComponentDescription;
- minVersion: UInt32;
- end;
- type
- QTAltLanguageRecordPtr = ^QTAltLanguageRecord;
- QTAltLanguageRecord = record
- flags: SInt32; { currently always 0}
- language: SInt16;
- end;
- const
- kQTCPUSpeed1Rating = 100; { slowest}
- kQTCPUSpeed2Rating = 200;
- kQTCPUSpeed3Rating = 300;
- kQTCPUSpeed4Rating = 400;
- kQTCPUSpeed5Rating = 500; { fastest}
- type
- QTAltCPURatingRecordPtr = ^QTAltCPURatingRecord;
- QTAltCPURatingRecord = record
- flags: UInt32; { currently always 0}
- speed: UInt16;
- end;
- type
- ReferenceMovieNetworkStatusRecordPtr = ^ReferenceMovieNetworkStatusRecord;
- ReferenceMovieNetworkStatusRecord = record
- flags: UInt32; { currently always 0}
- valueCount: UInt32; { how many status values are in array}
- netStatusValues: array [0..0] of SInt32; { a value from kQTNetworkStatus... constants}
- end;
- type
- CloneRecordPtr = ^CloneRecord;
- CloneRecord = record
- flags: SInt32;
- masterTrackID: SInt32; { track ID of the track we're cloning }
- end;
- type
- CloneAtomPtr = ^CloneAtom;
- CloneAtom = record
- size: SInt32;
- atomType: SInt32; { = clon }
- cloneInfo: CloneRecord;
- end;
- type
- FileTypeAtomPtr = ^FileTypeAtom;
- FileTypeAtom = record
- size: SInt32;
- atomType: SInt32; { = 'ftyp' }
- majorBrand: SInt32; { best use brand }
- minorVersion: SInt32;
- compatibleBrands: array [0..3] of SInt32; { 1 or greater }
- end;
- const
- kQTFileTypeBrandQuickTimeMovie = FourCharCode('qt '); { QuickTime movie files}
- kQTFileTypeBrandISOFile = FourCharCode('isom'); { ISO Base Media files}
- kQTFileTypeBrandMPEG4v1 = FourCharCode('mp41'); { MPEG-4 (ISO/IEC 14496-1) version 1 files}
- kQTFileTypeBrandMPEG4v2 = FourCharCode('mp42'); { MPEG-4 (ISO/IEC 14496-1) version 2 files}
- type
- SecureContentInfoAtomPtr = ^SecureContentInfoAtom;
- SecureContentInfoAtom = record
- size: SInt32;
- atomType: SInt32; { = 'sinf' }
- end;
- type
- SecureContentSchemeTypeAtomPtr = ^SecureContentSchemeTypeAtom;
- SecureContentSchemeTypeAtom = record
- size: SInt32;
- atomType: SInt32; { = 'schm' }
- flags: SInt32; { 1 byte of version / 3 bytes of flags }
- schemeType: SInt32;
- schemeVersion: UInt32;
- { if flags & 1, C string holding URL for security component server}
- end;
- type
- SecureContentSchemeInfoAtomPtr = ^SecureContentSchemeInfoAtom;
- SecureContentSchemeInfoAtom = record
- size: SInt32;
- atomType: SInt32; { = 'schi' }
- end;
- {$endc} {TARGET_OS_MAC}
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- end.
- {$endc} {not MACOSALLINCLUDE}
|