PageRenderTime 93ms CodeModel.GetById 33ms app.highlight 26ms RepoModel.GetById 2ms app.codeStats 6ms

/packages/univint/src/Movies.pas

https://github.com/slibre/freepascal
Pascal | 13045 lines | 2597 code | 1537 blank | 8911 comment | 0 complexity | 895f73aa2f965503d84525a9f913758c MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0

Large files files are truncated, but you can click here to view the full file

   1{
   2     File:       QuickTime/Movies.h
   3 
   4     Contains:   QuickTime Interfaces.
   5 
   6     Version:    QuickTime 7.7.1
   7 
   8     Copyright:  � 1990-2012 by Apple Inc., all rights reserved
   9 
  10     Bugs?:      For bug reports, consult the following page on
  11                 the World Wide Web:
  12 
  13                     http://www.freepascal.org/bugs.html
  14 
  15}
  16{  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
  17{  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
  18{
  19    Modified for use with Free Pascal
  20    Version 308
  21    Please report any bugs to <gpc@microbizz.nl>
  22}
  23
  24{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  25{$mode macpas}
  26{$packenum 1}
  27{$macro on}
  28{$inline on}
  29{$calling mwpascal}
  30
  31unit Movies;
  32interface
  33{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  34{$setc GAP_INTERFACES_VERSION := $0308}
  35
  36{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  37    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  38{$endc}
  39
  40{$ifc defined CPUPOWERPC and defined CPUI386}
  41	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  42{$endc}
  43{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  44	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  45{$endc}
  46
  47{$ifc not defined __ppc__ and defined CPUPOWERPC32}
  48	{$setc __ppc__ := 1}
  49{$elsec}
  50	{$setc __ppc__ := 0}
  51{$endc}
  52{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  53	{$setc __ppc64__ := 1}
  54{$elsec}
  55	{$setc __ppc64__ := 0}
  56{$endc}
  57{$ifc not defined __i386__ and defined CPUI386}
  58	{$setc __i386__ := 1}
  59{$elsec}
  60	{$setc __i386__ := 0}
  61{$endc}
  62{$ifc not defined __x86_64__ and defined CPUX86_64}
  63	{$setc __x86_64__ := 1}
  64{$elsec}
  65	{$setc __x86_64__ := 0}
  66{$endc}
  67{$ifc not defined __arm__ and defined CPUARM}
  68	{$setc __arm__ := 1}
  69{$elsec}
  70	{$setc __arm__ := 0}
  71{$endc}
  72
  73{$ifc defined cpu64}
  74  {$setc __LP64__ := 1}
  75{$elsec}
  76  {$setc __LP64__ := 0}
  77{$endc}
  78
  79
  80{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  81	{$error Conflicting definitions for __ppc__ and __i386__}
  82{$endc}
  83
  84{$ifc defined __ppc__ and __ppc__}
  85	{$setc TARGET_CPU_PPC := TRUE}
  86	{$setc TARGET_CPU_PPC64 := FALSE}
  87	{$setc TARGET_CPU_X86 := FALSE}
  88	{$setc TARGET_CPU_X86_64 := FALSE}
  89	{$setc TARGET_CPU_ARM := FALSE}
  90	{$setc TARGET_OS_MAC := TRUE}
  91	{$setc TARGET_OS_IPHONE := FALSE}
  92	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
  93	{$setc TARGET_OS_EMBEDDED := FALSE}
  94{$elifc defined __ppc64__ and __ppc64__}
  95	{$setc TARGET_CPU_PPC := FALSE}
  96	{$setc TARGET_CPU_PPC64 := TRUE}
  97	{$setc TARGET_CPU_X86 := FALSE}
  98	{$setc TARGET_CPU_X86_64 := FALSE}
  99	{$setc TARGET_CPU_ARM := FALSE}
 100	{$setc TARGET_OS_MAC := TRUE}
 101	{$setc TARGET_OS_IPHONE := FALSE}
 102	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 103	{$setc TARGET_OS_EMBEDDED := FALSE}
 104{$elifc defined __i386__ and __i386__}
 105	{$setc TARGET_CPU_PPC := FALSE}
 106	{$setc TARGET_CPU_PPC64 := FALSE}
 107	{$setc TARGET_CPU_X86 := TRUE}
 108	{$setc TARGET_CPU_X86_64 := FALSE}
 109	{$setc TARGET_CPU_ARM := FALSE}
 110{$ifc defined(iphonesim)}
 111 	{$setc TARGET_OS_MAC := FALSE}
 112	{$setc TARGET_OS_IPHONE := TRUE}
 113	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
 114{$elsec}
 115	{$setc TARGET_OS_MAC := TRUE}
 116	{$setc TARGET_OS_IPHONE := FALSE}
 117	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 118{$endc}
 119	{$setc TARGET_OS_EMBEDDED := FALSE}
 120{$elifc defined __x86_64__ and __x86_64__}
 121	{$setc TARGET_CPU_PPC := FALSE}
 122	{$setc TARGET_CPU_PPC64 := FALSE}
 123	{$setc TARGET_CPU_X86 := FALSE}
 124	{$setc TARGET_CPU_X86_64 := TRUE}
 125	{$setc TARGET_CPU_ARM := FALSE}
 126	{$setc TARGET_OS_MAC := TRUE}
 127	{$setc TARGET_OS_IPHONE := FALSE}
 128	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 129	{$setc TARGET_OS_EMBEDDED := FALSE}
 130{$elifc defined __arm__ and __arm__}
 131	{$setc TARGET_CPU_PPC := FALSE}
 132	{$setc TARGET_CPU_PPC64 := FALSE}
 133	{$setc TARGET_CPU_X86 := FALSE}
 134	{$setc TARGET_CPU_X86_64 := FALSE}
 135	{$setc TARGET_CPU_ARM := TRUE}
 136	{ will require compiler define when/if other Apple devices with ARM cpus ship }
 137	{$setc TARGET_OS_MAC := FALSE}
 138	{$setc TARGET_OS_IPHONE := TRUE}
 139	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
 140	{$setc TARGET_OS_EMBEDDED := TRUE}
 141{$elsec}
 142	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
 143{$endc}
 144
 145{$ifc defined __LP64__ and __LP64__ }
 146  {$setc TARGET_CPU_64 := TRUE}
 147{$elsec}
 148  {$setc TARGET_CPU_64 := FALSE}
 149{$endc}
 150
 151{$ifc defined FPC_BIG_ENDIAN}
 152	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
 153	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 154{$elifc defined FPC_LITTLE_ENDIAN}
 155	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
 156	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 157{$elsec}
 158	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 159{$endc}
 160{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 161{$setc CALL_NOT_IN_CARBON := FALSE}
 162{$setc OLDROUTINENAMES := FALSE}
 163{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 164{$setc OPAQUE_UPP_TYPES := TRUE}
 165{$setc OTCARBONAPPLICATION := TRUE}
 166{$setc OTKERNEL := FALSE}
 167{$setc PM_USE_SESSION_APIS := TRUE}
 168{$setc TARGET_API_MAC_CARBON := TRUE}
 169{$setc TARGET_API_MAC_OS8 := FALSE}
 170{$setc TARGET_API_MAC_OSX := TRUE}
 171{$setc TARGET_CARBON := TRUE}
 172{$setc TARGET_CPU_68K := FALSE}
 173{$setc TARGET_CPU_MIPS := FALSE}
 174{$setc TARGET_CPU_SPARC := FALSE}
 175{$setc TARGET_OS_UNIX := FALSE}
 176{$setc TARGET_OS_WIN32 := FALSE}
 177{$setc TARGET_RT_MAC_68881 := FALSE}
 178{$setc TARGET_RT_MAC_CFM := FALSE}
 179{$setc TARGET_RT_MAC_MACHO := TRUE}
 180{$setc TYPED_FUNCTION_POINTERS := TRUE}
 181{$setc TYPE_BOOL := FALSE}
 182{$setc TYPE_EXTENDED := FALSE}
 183{$setc TYPE_LONGLONG := TRUE}
 184uses MacTypes,Aliases,Components,Dialogs,Events,Files,Menus,ImageCompression,QDOffscreen,QuickdrawTypes,TextEdit,HIObject,CFBase,CFDictionary,CFString,CoreAudioTypes,AUComponent;
 185{$endc} {not MACOSALLINCLUDE}
 186
 187
 188{$ifc TARGET_OS_MAC}
 189
 190{
 191    Important note regarding availability macros
 192    ============================================
 193    
 194    QuickTime APIs that were introduced in QuickTime 6.0 and later are tagged with 
 195    availability macros indicating the first Mac OS X version in which they were 
 196    *always* available.  Such APIs may also be present on systems running earlier 
 197    Mac OS X releases when QuickTime updates have been installed.
 198    
 199    For example, QTNewDataReferenceFromCFURL was introduced in QuickTime 6.4.
 200    It is always available on Mac OS X 10.3, which shipped with QuickTime 6.4.
 201    However, QuickTime 6.4 can also be installed as an update to Mac OS X 10.2.x,
 202    so QTNewDataReferenceFromCFURL is also available on some systems running 
 203    Mac OS X 10.2.x.
 204    
 205    QuickTime 6.0 / Mac OS X 10.2  :  AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
 206    QuickTime 6.4 / Mac OS X 10.3  :  AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
 207    QuickTime 7.0 / Mac OS X 10.4  :  AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
 208    QuickTime 7.2 / Mac OS X 10.5  :  AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
 209    
 210    As described in /usr/include/AvailabilityMacros.h, you can use the
 211    MAC_OS_X_VERSION_MIN_REQUIRED macro to weak-link to the APIs that may not be 
 212    available on the Mac OS X versions your software targets.
 213}
 214
 215
 216{$ALIGN MAC68K}
 217
 218{ This sets the user defined exportset name i.e. fw_QuickTime_XManchego, available on 10.5 or later, and comment [4486184] }
 219{ NOTE:  Requires Interfacer-35 or later }
 220{ <exportset=fw_QuickTime_XManchego> }
 221{ <exportset=fw_QuickTime_XMaguro> }
 222
 223{  "kFix1" is defined in FixMath as "fixed1"  }
 224{ error codes are in Errors.[haa] }
 225{ gestalt codes are in Gestalt.[hpa] }
 226const
 227	MovieFileType = FourCharCode('MooV');
 228	MovieScrapType = FourCharCode('moov');
 229
 230const
 231	MovieResourceType = FourCharCode('moov');
 232	MovieForwardPointerResourceType = FourCharCode('fore');
 233	MovieBackwardPointerResourceType = FourCharCode('back');
 234
 235const
 236	MovieResourceAtomType = FourCharCode('moov');
 237	MovieDataAtomType = FourCharCode('mdat');
 238	FreeAtomType = FourCharCode('free');
 239	SkipAtomType = FourCharCode('skip');
 240	WideAtomPlaceholderType = FourCharCode('wide');
 241
 242const
 243	MediaHandlerType = FourCharCode('mhlr');
 244	DataHandlerType = FourCharCode('dhlr');
 245
 246const
 247	VideoMediaType = FourCharCode('vide');
 248	SoundMediaType = FourCharCode('soun');
 249	TextMediaType = FourCharCode('text');
 250	BaseMediaType = FourCharCode('gnrc');
 251	MPEGMediaType = FourCharCode('MPEG');
 252	MusicMediaType = FourCharCode('musi');
 253	TimeCodeMediaType = FourCharCode('tmcd');
 254	SpriteMediaType = FourCharCode('sprt');
 255	FlashMediaType = FourCharCode('flsh');
 256	MovieMediaType = FourCharCode('moov');
 257	TweenMediaType = FourCharCode('twen');
 258	ThreeDeeMediaType = FourCharCode('qd3d');
 259	SkinMediaType = FourCharCode('skin');
 260	HandleDataHandlerSubType = FourCharCode('hndl');
 261	PointerDataHandlerSubType = FourCharCode('ptr ');
 262	NullDataHandlerSubType = FourCharCode('null');
 263	ResourceDataHandlerSubType = FourCharCode('rsrc');
 264	URLDataHandlerSubType = FourCharCode('url ');
 265	AliasDataHandlerSubType = FourCharCode('alis');
 266	WiredActionHandlerType = FourCharCode('wire');
 267	kQTQuartzComposerMediaType = FourCharCode('qtz ');
 268	TimeCode64MediaType = FourCharCode('tc64');
 269
 270const
 271	VisualMediaCharacteristic = FourCharCode('eyes');
 272	AudioMediaCharacteristic = FourCharCode('ears');
 273	kCharacteristicCanSendVideo = FourCharCode('vsnd');
 274	kCharacteristicProvidesActions = FourCharCode('actn');
 275	kCharacteristicNonLinear = FourCharCode('nonl');
 276	kCharacteristicCanStep = FourCharCode('step');
 277	kCharacteristicHasNoDuration = FourCharCode('noti');
 278	kCharacteristicHasSkinData = FourCharCode('skin');
 279	kCharacteristicProvidesKeyFocus = FourCharCode('keyf');
 280	kCharacteristicSupportsDisplayOffsets = FourCharCode('dtdd');
 281
 282const
 283	kUserDataMovieControllerType = FourCharCode('ctyp');
 284	kUserDataName = FourCharCode('name');
 285	kUserDataTextAlbum = FourCharCode('�alb');
 286	kUserDataTextArtist = FourCharCode('�ART');
 287	kUserDataTextAuthor = FourCharCode('�aut');
 288	kUserDataTextChapter = FourCharCode('�chp');
 289	kUserDataTextComment = FourCharCode('�cmt');
 290	kUserDataTextComposer = FourCharCode('�com');
 291	kUserDataTextCopyright = FourCharCode('�cpy');
 292	kUserDataTextCreationDate	= FourCharCode('�day');
 293	kUserDataTextDescription = FourCharCode('�des');
 294	kUserDataTextDirector = FourCharCode('�dir');
 295	kUserDataTextDisclaimer = FourCharCode('�dis');
 296	kUserDataTextEncodedBy = FourCharCode('�enc');
 297	kUserDataTextFullName = FourCharCode('�nam');
 298	kUserDataTextGenre = FourCharCode('�gen');
 299	kUserDataTextHostComputer	= FourCharCode('�hst');
 300	kUserDataTextInformation = FourCharCode('�inf');
 301	kUserDataTextKeywords = FourCharCode('�key');
 302	kUserDataTextMake = FourCharCode('�mak');
 303	kUserDataTextModel = FourCharCode('�mod');
 304	kUserDataTextOriginalArtist	= FourCharCode('�ope');
 305	kUserDataTextOriginalFormat	= FourCharCode('�fmt');
 306	kUserDataTextOriginalSource	= FourCharCode('�src');
 307	kUserDataTextPerformers = FourCharCode('�prf');
 308	kUserDataTextProducer = FourCharCode('�prd');
 309	kUserDataTextPublisher = FourCharCode('�pub');
 310	kUserDataTextProduct = FourCharCode('�PRD');
 311	kUserDataTextSoftware = FourCharCode('�swr');
 312	kUserDataTextSpecialPlaybackRequirements = FourCharCode('�req');
 313	kUserDataTextTrack = FourCharCode('�trk');
 314	kUserDataTextWarning = FourCharCode('�wrn');
 315	kUserDataTextWriter = FourCharCode('�wrt');
 316	kUserDataTextURLLink = FourCharCode('�url');
 317	kUserDataTextEditDate1 = FourCharCode('�ed1');
 318	kUserDataAnimatedGIFLoopCount = FourCharCode('gifc'); { data is big-endian UInt16 }
 319	kQTAnimatedGIFLoopCountInfinite = 0;
 320	kUserDataAnimatedGIFBufferingSize = FourCharCode('gifb'); { data is big-endian UInt32 }
 321
 322const
 323	kUserDataUnicodeBit = 1 shl 7;
 324
 325const
 326	DoTheRightThing = 0;
 327
 328
 329{$ifc not TARGET_CPU_64}
 330
 331{ property types}
 332type
 333	QTPropertyClass = OSType;
 334	QTPropertyID = OSType;
 335	QTPropertyValueType = OSType;
 336	QTPropertyValueTypePtr = ^QTPropertyValueType;
 337	QTPropertyValuePtr = UnivPtr;
 338	ConstQTPropertyValuePtr = {const} UnivPtr;
 339	MovieTypePtr = ^SInt32; { an opaque type }
 340	Movie = ^MovieTypePtr;
 341	Movie_fix = Movie; { used as field type when a record declaration contains a Movie field identifier }
 342	MoviePtr = ^Movie;
 343	PtrToMovie = MoviePtr;
 344	TrackTypePtr = ^SInt32; { an opaque type }
 345	Track = ^TrackTypePtr;
 346	Track_fix = Track; { used as field type when a record declaration contains a Track field identifier }
 347	MediaTypePtr = ^SInt32; { an opaque type }
 348	Media = ^MediaTypePtr;
 349	UserDataRecordPtr = ^SInt32; { an opaque type }
 350	UserData = ^UserDataRecordPtr;
 351	MovieEditStateRecordPtr = ^SInt32; { an opaque type }
 352	MovieEditState = ^MovieEditStateRecordPtr;
 353	TrackEditStateRecordPtr = ^SInt32; { an opaque type }
 354	TrackEditState = ^TrackEditStateRecordPtr;
 355	QTRestrictionSetRecordPtr = ^SInt32; { an opaque type }
 356	QTRestrictionSet = ^QTRestrictionSetRecordPtr;
 357	SpriteWorld = ^SInt32; { an opaque type }
 358	Sprite = ^SInt32; { an opaque type }
 359	QTTweener = ^SInt32; { an opaque type }
 360
 361{$endc} {not TARGET_CPU_64}
 362
 363
 364type
 365	SampleDescription = record
 366		descSize: SInt32;
 367		dataFormat: SInt32;
 368		resvd1: SInt32;
 369		resvd2: SInt16;
 370		dataRefIndex: SInt16;
 371	end;
 372	SampleDescriptionPtr = ^SampleDescription;
 373type
 374	SampleDescriptionHandle = ^SampleDescriptionPtr;
 375
 376{$ifc not TARGET_CPU_64}
 377
 378const
 379	kQTNetworkStatusNoNetwork = -2;
 380	kQTNetworkStatusUncertain = -1;
 381	kQTNetworkStatusNotConnected = 0;
 382	kQTNetworkStatusConnected = 1;
 383
 384type
 385	QTAtomContainer = Handle;
 386	QTAtom = SIGNEDLONG;
 387	QTAtomType = SIGNEDLONG;
 388	QTAtomID = SIGNEDLONG;
 389{ QTFloatDouble is the 64-bit IEEE-754 standard}
 390type
 391	QTFloatDouble = Float64;
 392{ QTFloatSingle is the 32-bit IEEE-754 standard}
 393type
 394	QTFloatSingle = Float32;
 395
 396{$endc} {not TARGET_CPU_64}
 397
 398{************************
 399 * SoundDescription
 400 ************************}
 401type
 402	SoundDescription = record
 403		descSize: SInt32;               { total size of SoundDescription including extra data }
 404		dataFormat: SInt32;             { sound format }
 405		resvd1: SInt32;                 { reserved for apple use. set to zero }
 406		resvd2: SInt16;                 { reserved for apple use. set to zero }
 407		dataRefIndex: SInt16;
 408		version: SInt16;                { which version is this data }
 409		revlevel: SInt16;               { what version of that codec did this }
 410		vendor: SInt32;                 { whose  codec compressed this data }
 411		numChannels: SInt16;            { number of channels of sound }
 412		sampleSize: SInt16;             { number of bits per sample }
 413		compressionID: SInt16;          { unused. set to zero. }
 414		packetSize: SInt16;             { unused. set to zero. }
 415		sampleRate: UnsignedFixed;             { sample rate sound is captured at }
 416	end;
 417	SoundDescriptionPtr = ^SoundDescription;
 418type
 419	SoundDescriptionHandle = ^SoundDescriptionPtr;
 420{ version 1 of the SoundDescription record}
 421type
 422	SoundDescriptionV1 = record
 423{ original fields}
 424		desc: SoundDescription;
 425                                              { fixed compression ratio information}
 426		samplesPerPacket: UInt32;
 427		bytesPerPacket: UInt32;
 428		bytesPerFrame: UInt32;
 429		bytesPerSample: UInt32;
 430                                              { additional atom based fields ([long size, long type, some data], repeat)}
 431	end;
 432	SoundDescriptionV1Ptr = ^SoundDescriptionV1;
 433type
 434	SoundDescriptionV1Handle = ^SoundDescriptionV1Ptr;
 435{
 436   Definitions for SoundDescriptionV2:
 437        LPCMFrame = one uncompressed sample in each of the channels (ie. 44100Hz audio has
 438                44100 LPCMFrames per second, whether it is mono, stereo, 5.1, or whatever).
 439                In other words, LPCMFrames/audioSampleRate is duration in seconds.
 440        AudioPacket = For compressed audio, an AudioPacket is the natural compressed access
 441                unit of that format.  For uncompressed audio, an AudioPacket is simply one
 442                LPCMFrame.
 443}
 444{ version 2 of the SoundDescription record}
 445type
 446	SoundDescriptionV2 = record
 447		descSize: SInt32;               { total size of SoundDescription including extra data }
 448		dataFormat: OSType;             { 'lpcm' for uncompressed, compression type otherwise (eg. 'ima4') }
 449		resvd1: SInt32;                 { reserved for apple use. Must be set to zero }
 450		resvd2: SInt16;                 { reserved for apple use. Must be set to zero }
 451		dataRefIndex: SInt16;
 452		version: SInt16;                { which version is this data (2 in this case) }
 453		revlevel: SInt16;               { what version of that codec did this }
 454		vendor: SInt32;                 { whose  codec compressed this data }
 455
 456		always3: SInt16;                { Reserved, must be set to 3 }
 457		always16: SInt16;               { Reserved, must be set to 16 (0x0010) }
 458		alwaysMinus2: SInt16;           { Reserved, must be set to -2 (0xFFFE) }
 459		always0: SInt16;                { Reserved, must be set to 0 }
 460		always65536: UInt32;            { Reserved, must be set to 65536 (0x00010000) }
 461
 462		sizeOfStructOnly: UInt32;       { must be set to sizeof(SoundDescriptionV2), ie. offset to extensions }
 463		audioSampleRate: Float64;        { audio frames per second, eg. 44100.0 }
 464		numAudioChannels: UInt32;       { any channel assignment info will be in an extension }
 465
 466		always7F000000: SInt32;         { Reserved, must be set to 0x7F000000 }
 467		constBitsPerChannel: UInt32;    { only set if constant (and only for uncompressed audio) }
 468
 469		formatSpecificFlags: UInt32;    { eg. see LPCM flag definitions in CoreAudioTypes.h }
 470		constBytesPerAudioPacket: UInt32; { only set if constant }
 471		constLPCMFramesPerAudioPacket: UInt32; { only set if constant }
 472
 473                                              { additional atom based extensions ([long size, long type, some data], repeat)}
 474	end;
 475	SoundDescriptionV2Ptr = ^SoundDescriptionV2;
 476type
 477	SoundDescriptionV2Handle = ^SoundDescriptionV2Ptr;
 478
 479{$ifc not TARGET_CPU_64}
 480
 481const
 482	kQTSoundDescriptionKind_Movie_Version1 = FourCharCode('mvv1');
 483	kQTSoundDescriptionKind_Movie_Version2 = FourCharCode('mvv2');
 484	kQTSoundDescriptionKind_Movie_LowestPossibleVersion = FourCharCode('mvlo');
 485	kQTSoundDescriptionKind_Movie_AnyVersion = FourCharCode('mvny');
 486
 487type
 488	QTSoundDescriptionKind = FourCharCode;
 489{
 490 *  QTSoundDescriptionCreate()
 491 *  
 492 *  Summary:
 493 *    QTSoundDescriptionCreate creates a SoundDescription of the
 494 *    requested kind from an AudioStreamBasicDescription, optional
 495 *    AudioChannelLayout, and optional magic cookie. 
 496 *    QTSoundDescriptionCreate allocates the returned
 497 *    SoundDescriptionHandle, and the caller is responsible for
 498 *    disposing it.
 499 *  
 500 *  Parameters:
 501 *    
 502 *    inASBD:
 503 *      a description of the format
 504 *    
 505 *    inLayout:
 506 *      the audio channel layout (can be NULL if there isn't one)
 507 *    
 508 *    inLayoutSize:
 509 *      size of the audio channel layout (should be 0 if inLayout is
 510 *      NULL)
 511 *    
 512 *    inMagicCookie:
 513 *      the magic cookie for the decompressor (can be NULL if there
 514 *      isn't one)
 515 *    
 516 *    inMagicCookieSize:
 517 *      size of the magic cookie (should be 0 if inMagicCookie is NULL)
 518 *    
 519 *    inRequestedKind:
 520 *      the kind of SoundDescription to create
 521 *    
 522 *    outSoundDesc:
 523 *      the resulting SoundDescription.  Caller must dispose with
 524 *      DisposeHandle.
 525 *  
 526 *  Availability:
 527 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 528 *    CarbonLib:        not available
 529 *    Non-Carbon CFM:   not available
 530 }
 531function QTSoundDescriptionCreate( var inASBD: AudioStreamBasicDescription; inLayout: AudioChannelLayoutPtr { can be NULL }; inLayoutSize: ByteCount; inMagicCookie: UnivPtr; inMagicCookieSize: ByteCount; inRequestedKind: QTSoundDescriptionKind; var outSoundDesc: SoundDescriptionHandle ): OSStatus; external name '_QTSoundDescriptionCreate';
 532(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 533
 534
 535{
 536 *  QTSoundDescriptionConvert()
 537 *  
 538 *  Summary:
 539 *    Converts from one kind of SoundDescription to another. Note that
 540 *    fromKind is reserved for future expansion.  You must set it to
 541 *    kSoundDescriptionKind_Movie_AnyVersion. You can specify (via
 542 *    toKind) that you would like a specific SoundDescription version,
 543 *    the lowest possible version (given the constraints of the format
 544 *    described by fromDescription), or any version of SoundDescription
 545 *    at all. QTSoundDescriptionConvert allocates the returned
 546 *    SoundDescriptionHandle and the caller is responsible for
 547 *    disposing it.
 548 *  
 549 *  Parameters:
 550 *    
 551 *    fromKind:
 552 *      reserved, must be set to kSoundDescriptionKind_Movie_AnyVersion
 553 *    
 554 *    fromDescription:
 555 *      input description to be converted
 556 *    
 557 *    toKind:
 558 *      kind of description toDescription will be
 559 *    
 560 *    toDescription:
 561 *      the resulting SoundDescription.  Caller must dispose with
 562 *      DisposeHandle.
 563 *  
 564 *  Availability:
 565 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 566 *    CarbonLib:        not available
 567 *    Non-Carbon CFM:   not available
 568 }
 569function QTSoundDescriptionConvert( fromKind: QTSoundDescriptionKind; fromDescription: SoundDescriptionHandle; toKind: QTSoundDescriptionKind; var toDescription: SoundDescriptionHandle ): OSStatus; external name '_QTSoundDescriptionConvert';
 570(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 571
 572
 573{ SoundDescription Properties}
 574
 575const
 576{
 577   * Properties of a SoundDescription
 578   }
 579	kQTPropertyClass_SoundDescription = FourCharCode('sdes'); { class for SoundDescription properties}
 580
 581
 582const
 583{
 584   * kQTSoundDescriptionPropertyID_AudioChannelLayout: Value is
 585   * AudioChannelLayout (Get/Set) Note that this is a variable sized
 586   * property (since it may contain an array of ChannelDescriptions;
 587   * see CoreAudioTypes.h).  You must get the size first (by calling
 588   * QTSoundDescriptionGetPropertyInfo), allocate a struct of that
 589   * size, and then get the property.
 590   }
 591	kQTSoundDescriptionPropertyID_AudioChannelLayout = FourCharCode('clay');
 592
 593  {
 594   * kQTSoundDescriptionPropertyID_MagicCookie: Value is opaque bytes
 595   * (Get/Set) Note that this is a variable sized property (since it is
 596   * completely defined by the codec in question).  You must get the
 597   * size first (by calling QTSoundDescriptionGetPropertyInfo),
 598   * allocate a struct of that size, and then get the property.
 599   }
 600	kQTSoundDescriptionPropertyID_MagicCookie = FourCharCode('kuki');
 601
 602  {
 603   * kQTSoundDescriptionPropertyID_AudioStreamBasicDescription: Value
 604   * is AudioStreamBasicDescription (Get only)
 605   }
 606	kQTSoundDescriptionPropertyID_AudioStreamBasicDescription = FourCharCode('asbd');
 607
 608  {
 609   * kQTSoundDescriptionPropertyID_BitRate: Value is UInt32 in bits per
 610   * second (Get only) kQTSoundDescriptionPropertyID_BitRate Note that
 611   * this property may not be available for formats that are inherently
 612   * very variable in bitrate and highly source-data dependent (such as
 613   * Apple Lossless).
 614   }
 615	kQTSoundDescriptionPropertyID_BitRate = FourCharCode('brat');
 616
 617  {
 618   * kQTSoundDescriptionPropertyID_UserReadableText: Value is
 619   * CFStringRef (Get only) QTSoundDescriptionGetProperty does a
 620   * CFRetain of the returned CFString on behalf of the caller, so the
 621   * caller is responsible for calling CFRelease on the returned
 622   * CFString.
 623   }
 624	kQTSoundDescriptionPropertyID_UserReadableText = FourCharCode('text');
 625
 626{
 627 *  QTSoundDescriptionGetPropertyInfo()
 628 *  
 629 *  Summary:
 630 *    Gets info about a particular property of a SoundDescription.
 631 *  
 632 *  Parameters:
 633 *    
 634 *    inDesc:
 635 *      SoundDescription being interrogated
 636 *    
 637 *    inPropClass:
 638 *      class of property being requested
 639 *    
 640 *    inPropID:
 641 *      ID of property being requested
 642 *    
 643 *    outPropType:
 644 *      type of property is returned here (can be NULL)
 645 *    
 646 *    outPropValueSize:
 647 *      size of property is returned here (can be NULL)
 648 *    
 649 *    outPropertyFlags:
 650 *      property flags are returned here (can be NULL)
 651 *  
 652 *  Availability:
 653 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 654 *    CarbonLib:        not available
 655 *    Non-Carbon CFM:   not available
 656 }
 657function QTSoundDescriptionGetPropertyInfo( inDesc: SoundDescriptionHandle; inPropClass: QTPropertyClass; inPropID: QTPropertyID; outPropType: QTPropertyValueTypePtr { can be NULL }; outPropValueSize: ByteCountPtr { can be NULL }; outPropertyFlags: UInt32Ptr { can be NULL } ): OSStatus; external name '_QTSoundDescriptionGetPropertyInfo';
 658(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 659
 660
 661{
 662 *  QTSoundDescriptionGetProperty()
 663 *  
 664 *  Summary:
 665 *    Gets a particular property of a SoundDescription.
 666 *  
 667 *  Parameters:
 668 *    
 669 *    inDesc:
 670 *      SoundDescription being interrogated
 671 *    
 672 *    inPropClass:
 673 *      class of property being requested
 674 *    
 675 *    inPropID:
 676 *      ID of property being requested
 677 *    
 678 *    inPropValueSize:
 679 *      size of property value buffer
 680 *    
 681 *    outPropValueAddress:
 682 *      pointer to property value buffer
 683 *    
 684 *    outPropValueSizeUsed:
 685 *      actual size of returned property value (can be NULL)
 686 *  
 687 *  Availability:
 688 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 689 *    CarbonLib:        not available
 690 *    Non-Carbon CFM:   not available
 691 }
 692function QTSoundDescriptionGetProperty( inDesc: SoundDescriptionHandle; inPropClass: QTPropertyClass; inPropID: QTPropertyID; inPropValueSize: ByteCount; outPropValueAddress: QTPropertyValuePtr; outPropValueSizeUsed: ByteCountPtr { can be NULL } ): OSStatus; external name '_QTSoundDescriptionGetProperty';
 693(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 694
 695
 696{
 697 *  QTSoundDescriptionSetProperty()
 698 *  
 699 *  Summary:
 700 *    Sets a particular property of a SoundDescription.
 701 *  
 702 *  Parameters:
 703 *    
 704 *    inDesc:
 705 *      SoundDescription being modified
 706 *    
 707 *    inPropClass:
 708 *      class of property being set
 709 *    
 710 *    inPropID:
 711 *      ID of property being set
 712 *    
 713 *    inPropValueSize:
 714 *      size of property value buffer
 715 *    
 716 *    inPropValueAddress:
 717 *      pointer to property value buffer
 718 *  
 719 *  Availability:
 720 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 721 *    CarbonLib:        not available
 722 *    Non-Carbon CFM:   not available
 723 }
 724function QTSoundDescriptionSetProperty( inDesc: SoundDescriptionHandle; inPropClass: QTPropertyClass; inPropID: QTPropertyID; inPropValueSize: ByteCount; inPropValueAddress: ConstQTPropertyValuePtr ): OSStatus; external name '_QTSoundDescriptionSetProperty';
 725(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 726
 727
 728{ Sound Description Extensions}
 729
 730{
 731 *  AddSoundDescriptionExtension()
 732 *  
 733 *  Availability:
 734 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 735 *    CarbonLib:        in CarbonLib 1.0 and later
 736 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 737 *    Windows:          in qtmlClient.lib 3.0 and later
 738 }
 739function AddSoundDescriptionExtension( desc: SoundDescriptionHandle; extension: Handle; idType: OSType ): OSErr; external name '_AddSoundDescriptionExtension';
 740(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 741
 742
 743{
 744 *  GetSoundDescriptionExtension()
 745 *  
 746 *  Availability:
 747 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 748 *    CarbonLib:        in CarbonLib 1.0 and later
 749 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 750 *    Windows:          in qtmlClient.lib 3.0 and later
 751 }
 752function GetSoundDescriptionExtension( desc: SoundDescriptionHandle; var extension: Handle; idType: OSType ): OSErr; external name '_GetSoundDescriptionExtension';
 753(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 754
 755
 756{
 757 *  RemoveSoundDescriptionExtension()
 758 *  
 759 *  Availability:
 760 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 761 *    CarbonLib:        in CarbonLib 1.0 and later
 762 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 763 *    Windows:          in qtmlClient.lib 3.0 and later
 764 }
 765function RemoveSoundDescriptionExtension( desc: SoundDescriptionHandle; idType: OSType ): OSErr; external name '_RemoveSoundDescriptionExtension';
 766(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 767
 768
 769{$endc} {not TARGET_CPU_64}
 770
 771
 772const
 773	kTx3gSampleType = FourCharCode('tx3g');
 774	kTx3gFontTableAtomType = FourCharCode('ftab');
 775	kTx3gBlinkAtomType = FourCharCode('blnk');
 776
 777type
 778	Tx3gRGBAColor = record
 779		red: UInt8;
 780		green: UInt8;
 781		blue: UInt8;
 782		transparency: UInt8;
 783	end;
 784type
 785	Tx3gStyleRecordPtr = ^Tx3gStyleRecord;
 786	Tx3gStyleRecord = record
 787		startChar: UInt16;
 788		endChar: UInt16;
 789		fontID: UInt16;
 790		fontFace: UInt8;
 791		fontSize: UInt8;
 792		fontColor: Tx3gRGBAColor;
 793	end;
 794type
 795	Tx3gStylePtr = Tx3gStyleRecordPtr;
 796	Tx3gStyleHandle = ^Tx3gStylePtr;
 797	Tx3gStyleTableRecordPtr = ^Tx3gStyleTableRecord;
 798	Tx3gStyleTableRecord = record
 799		count: UInt16;
 800    table: array [0..0] of Tx3gStyleRecord;
 801	end;
 802type
 803	Tx3gStyleTablePtr = Tx3gStyleTableRecordPtr;
 804	Tx3gStyleTableHandle = ^Tx3gStyleTablePtr;
 805	Tx3gFontRecord = record
 806		fontID: UInt16;
 807		nameLength: UInt8;
 808    name: array[0..0] of SInt8;
 809	end;
 810	Tx3gFontRecordPtr = ^Tx3gFontRecord;
 811type
 812	Tx3gFontTableRecordPtr = ^Tx3gFontTableRecord;
 813	Tx3gFontTableRecord = record
 814		entryCount: UInt16;
 815    fontEntries: array[0..0] of Tx3gFontRecord;
 816	end;
 817type
 818	Tx3gFontTablePtr = Tx3gFontTableRecordPtr;
 819	Tx3gFontTableHandle = ^Tx3gFontTablePtr;
 820	Tx3gDescription = record
 821		descSize: SInt32;
 822		dataFormat: SInt32;
 823		resvd1: SInt32;
 824		resvd2: SInt16;
 825		dataRefIndex: SInt16;
 826
 827		displayFlags: UInt32;
 828		horizontalJustification: char;
 829		verticalJustification: char;
 830		backgroundColor: Tx3gRGBAColor;
 831		defaultTextBox: Rect;
 832		defaultStyle: Tx3gStyleRecord;
 833	end;
 834	Tx3gDescriptionPtr = ^Tx3gDescription;
 835type
 836	Tx3gDescriptionHandle = ^Tx3gDescriptionPtr;
 837
 838{$ifc TARGET_CPU_64}
 839
 840{ QuickDraw legacy }
 841type
 842	QTRGBColor = record
 843		red: UInt16;                    { magnitude of red component}
 844		green: UInt16;                  { magnitude of green component}
 845		blue: UInt16;                   { magnitude of blue component}
 846	end;
 847
 848{$endc} {TARGET_CPU_64}
 849
 850type
 851	TextDescription = record
 852		descSize: SInt32;               { Total size of TextDescription}
 853		dataFormat: SInt32;             { 'text'}
 854
 855		resvd1: SInt32;
 856		resvd2: SInt16;
 857		dataRefIndex: SInt16;
 858
 859		displayFlags: SInt32;           { see enum below for flag values}
 860
 861		textJustification: SInt32;      { Can be: teCenter,teFlush -Default,-Right,-Left}
 862
 863
 864{$ifc TARGET_CPU_64}
 865
 866
 867		bgColor: QTRGBColor;                { Background color}
 868
 869{$elsec} {TARGET_CPU_64}
 870
 871
 872		bgColor: RGBColor;                { Background color}
 873
 874{$endc} {TARGET_CPU_64}
 875
 876
 877		defaultTextBox: Rect;         { Location to place the text within the track bounds}
 878		defaultStyle: ScrpSTElement;           { Default style (struct defined in TextEdit.h)}
 879    defaultFontName: array[0..0] of SInt8;     { Font Name (pascal string - struct extended to fit) }
 880	end;
 881	TextDescriptionPtr = ^TextDescription;
 882type
 883	TextDescriptionHandle = ^TextDescriptionPtr;
 884
 885{$ifc not TARGET_CPU_64}
 886
 887type
 888	SpriteDescription = record
 889		descSize: SIGNEDLONG;               { total size of SpriteDescription including extra data }
 890		dataFormat: SIGNEDLONG;             {  }
 891		resvd1: SIGNEDLONG;                 { reserved for apple use }
 892		resvd2: SInt16;
 893		dataRefIndex: SInt16;
 894		version: SIGNEDLONG;                { which version is this data }
 895		decompressorType: OSType;       { which decompressor to use, 0 for no decompression }
 896		sampleFlags: SIGNEDLONG;            { how to interpret samples }
 897	end;
 898	SpriteDescriptionPtr = ^SpriteDescription;
 899type
 900	SpriteDescriptionHandle = ^SpriteDescriptionPtr;
 901	FlashDescription = record
 902		descSize: SIGNEDLONG;
 903		dataFormat: SIGNEDLONG;
 904		resvd1: SIGNEDLONG;
 905		resvd2: SInt16;
 906		dataRefIndex: SInt16;
 907		version: SIGNEDLONG;                { which version is this data }
 908		decompressorType: OSType;       { which decompressor to use, 0 for no decompression }
 909		flags: SIGNEDLONG;
 910	end;
 911	FlashDescriptionPtr = ^FlashDescription;
 912type
 913	FlashDescriptionHandle = ^FlashDescriptionPtr;
 914	ThreeDeeDescription = record
 915		descSize: SIGNEDLONG;               { total size of ThreeDeeDescription including extra data }
 916		dataFormat: SIGNEDLONG;             {  }
 917		resvd1: SIGNEDLONG;                 { reserved for apple use }
 918		resvd2: SInt16;
 919		dataRefIndex: SInt16;
 920		version: SIGNEDLONG;                { which version is this data }
 921		rendererType: SIGNEDLONG;           { which renderer to use, 0 for default }
 922		decompressorType: SIGNEDLONG;       { which decompressor to use, 0 for default }
 923	end;
 924	ThreeDeeDescriptionPtr = ^ThreeDeeDescription;
 925type
 926	ThreeDeeDescriptionHandle = ^ThreeDeeDescriptionPtr;
 927	DataReferenceRecordPtr = ^DataReferenceRecord;
 928	DataReferenceRecord = record
 929		dataRefType: OSType;
 930		dataRef: Handle;
 931	end;
 932type
 933	DataReferencePtr = DataReferenceRecordPtr;
 934{--------------------------
 935  Music Sample Description
 936--------------------------}
 937type
 938	MusicDescription = record
 939		descSize: SIGNEDLONG;
 940		dataFormat: SIGNEDLONG;             { 'musi' }
 941
 942		resvd1: SIGNEDLONG;
 943		resvd2: SInt16;
 944		dataRefIndex: SInt16;
 945
 946		musicFlags: SIGNEDLONG;
 947    headerData: array [0..0] of UNSIGNEDLONG;          { variable size! }
 948	end;
 949	MusicDescriptionPtr = ^MusicDescription;
 950type
 951	MusicDescriptionHandle = ^MusicDescriptionPtr;
 952const
 953	kMusicFlagDontPlay2Soft = 1 shl 0;
 954	kMusicFlagDontSlaveToMovie = 1 shl 1;
 955
 956
 957const
 958	dfDontDisplay = 1 shl 0; { Don't display the text}
 959	dfDontAutoScale = 1 shl 1; { Don't scale text as track bounds grows or shrinks}
 960	dfClipToTextBox = 1 shl 2; { Clip update to the textbox}
 961	dfUseMovieBGColor = 1 shl 3; { Set text background to movie's background color}
 962	dfShrinkTextBoxToFit = 1 shl 4; { Compute minimum box to fit the sample}
 963	dfScrollIn = 1 shl 5; { Scroll text in until last of text is in view }
 964	dfScrollOut = 1 shl 6; { Scroll text out until last of text is gone (if both set, scroll in then out)}
 965	dfHorizScroll = 1 shl 7; { Scroll text horizontally (otherwise it's vertical)}
 966	dfReverseScroll = 1 shl 8; { vert: scroll down rather than up; horiz: scroll backwards (justfication dependent)}
 967	dfContinuousScroll = 1 shl 9; { new samples cause previous samples to scroll out }
 968	dfFlowHoriz = 1 shl 10; { horiz scroll text flows in textbox rather than extend to right }
 969	dfContinuousKaraoke = 1 shl 11; { ignore begin offset, hilite everything up to the end offset(karaoke)}
 970	dfDropShadow = 1 shl 12; { display text with a drop shadow }
 971	dfAntiAlias = 1 shl 13; { attempt to display text anti aliased}
 972	dfKeyedText = 1 shl 14; { key the text over background}
 973	dfInverseHilite = 1 shl 15; { Use inverse hiliting rather than using hilite color}
 974	dfTextColorHilite = 1 shl 16; { changes text color in place of hiliting. }
 975
 976const
 977	searchTextDontGoToFoundTime = 1 shl 16;
 978	searchTextDontHiliteFoundText = 1 shl 17;
 979	searchTextOneTrackOnly = 1 shl 18;
 980	searchTextEnabledTracksOnly = 1 shl 19;
 981
 982{use these with the text property routines}
 983const
 984{ set property parameter / get property parameter}
 985	kTextTextHandle = 1;    { Handle / preallocated Handle}
 986	kTextTextPtr = 2;    { Pointer}
 987	kTextTEStyle = 3;    { TextStyle * / TextStyle *}
 988	kTextSelection = 4;    { long [2] / long [2]}
 989	kTextBackColor = 5;    { RGBColor * / RGBColor *}
 990	kTextForeColor = 6;    { RGBColor * / RGBColor *}
 991	kTextFace = 7;    { long / long *}
 992	kTextFont = 8;    { long / long *}
 993	kTextSize = 9;    { long / long *}
 994	kTextAlignment = 10;   { short * / short *}
 995	kTextHilite = 11;   { hiliteRecord * / hiliteRecord *}
 996	kTextDropShadow = 12;   { dropShadowRecord * / dropShadowRecord *}
 997	kTextDisplayFlags = 13;   { long / long *}
 998	kTextScroll = 14;   { TimeValue * / TimeValue *}
 999	kTextRelativeScroll = 15;   { Point *}
1000	kTextHyperTextFace = 16;   { hyperTextSetFace * / hyperTextSetFace *}
1001	kTextHyperTextColor = 17;   { hyperTextSetColor * / hyperTextSetColor *}
1002	kTextKeyEntry = 18;   { short}
1003	kTextMouseDown = 19;   { Point *}
1004	kTextTextBox = 20;   { Rect * / Rect *}
1005	kTextEditState = 21;   { short / short *}
1006	kTextLength = 22;    {       / long *}
1007
1008const
1009	k3DMediaRendererEntry = FourCharCode('rend');
1010	k3DMediaRendererName = FourCharCode('name');
1011	k3DMediaRendererCode = FourCharCode('rcod');
1012
1013{ progress messages }
1014const
1015	movieProgressOpen = 0;
1016	movieProgressUpdatePercent = 1;
1017	movieProgressClose = 2;
1018
1019{ progress operations }
1020const
1021	progressOpFlatten = 1;
1022	progressOpInsertTrackSegment = 2;
1023	progressOpInsertMovieSegment = 3;
1024	progressOpPaste = 4;
1025	progressOpAddMovieSelection = 5;
1026	progressOpCopy = 6;
1027	progressOpCut = 7;
1028	progressOpLoadMovieIntoRam = 8;
1029	progressOpLoadTrackIntoRam = 9;
1030	progressOpLoadMediaIntoRam = 10;
1031	progressOpImportMovie = 11;
1032	progressOpExportMovie = 12;
1033
1034const
1035	mediaQualityDraft = $0000;
1036	mediaQualityNormal = $0040;
1037	mediaQualityBetter = $0080;
1038	mediaQualityBest = $00C0;
1039
1040{****
1041    Interactive Sprites Support
1042****}
1043{ QTEventRecord flags}
1044const
1045	kQTEventPayloadIsQTList = 1 shl 0;
1046
1047type
1048	QTEventRecord = record
1049		version: SIGNEDLONG;
1050		eventType: OSType;
1051		where: Point;
1052		flags: SIGNEDLONG;
1053		payloadRefcon: SIGNEDLONG;          { from here down only present if version >= 2}
1054		param1: SIGNEDLONG;
1055		param2: SIGNEDLONG;
1056		param3: SIGNEDLONG;
1057	end;
1058	QTEventRecordPtr = ^QTEventRecord;
1059type
1060	QTAtomSpec = record
1061		container: QTAtomContainer;
1062		atom: QTAtom;
1063	end;
1064	QTAtomSpecPtr = ^QTAtomSpec;
1065type
1066	ResolvedQTEventSpec = record
1067		actionAtom: QTAtomSpec;
1068		targetTrack: Track;
1069		targetRefCon: SIGNEDLONG;
1070	end;
1071	ResolvedQTEventSpecPtr = ^ResolvedQTEventSpec;
1072
1073{ action constants }
1074const
1075	kActionMovieSetVolume = 1024; { (short movieVolume) }
1076	kActionMovieSetRate = 1025; { (Fixed rate) }
1077	kActionMovieSetLoopingFlags = 1026; { (long loopingFlags) }
1078	kActionMovieGoToTime = 1027; { (TimeValue time) }
1079	kActionMovieGoToTimeByName = 1028; { (Str255 timeName) }
1080	kActionMovieGoToBeginning = 1029; { no params }
1081	kActionMovieGoToEnd = 1030; { no params }
1082	kActionMovieStepForward = 1031; { no params }
1083	kActionMovieStepBackward = 1032; { no params }
1084	kActionMovieSetSelection = 1033; { (TimeValue startTime, TimeValue endTime) }
1085	kActionMovieSetSelectionByName = 1034; { (Str255 startTimeName, Str255 endTimeName) }
1086	kActionMoviePlaySelection = 1035; { (Boolean selectionOnly) }
1087	kActionMovieSetLanguage = 1036; { (long language) }
1088	kActionMovieChanged = 1037; { no params }
1089	kActionMovieRestartAtTime = 1038; { (TimeValue startTime, Fixed rate) }
1090	kActionMovieGotoNextChapter = 1039; { no params }
1091	kActionMovieGotoPreviousChapter = 1040; { no params }
1092	kActionMovieGotoFirstChapter = 1041; { no params }
1093	kActionMovieGotoLastChapter = 1042; { no params }
1094	kActionMovieGotoChapterByIndex = 1043; { ( short index ) }
1095	kActionMovieSetScale = 1044; { (Fixed xScale, Fixed yScale) }
1096	kActionTrackSetVolume = 2048; { (short volume) }
1097	kActionTrackSetBalance = 2049; { (short balance) }
1098	kActionTrackSetEnabled = 2050; { (Boolean enabled) }
1099	kActionTrackSetMatrix = 2051; { (MatrixRecord matrix) }
1100	kActionTrackSetLayer = 2052; { (short layer) }
1101	kActionTrackSetClip = 2053; { (RgnHandle clip) }
1102	kActionTrackSetCursor = 2054; { (QTATomID cursorID) }
1103	kActionTrackSetGraphicsMode = 2055; { (ModifierTrackGraphicsModeRecord graphicsMode) }
1104	kActionTrackSetIdleFrequency = 2056; { (long frequency) }
1105	kActionTrackSetBassTreble = 2057; { (short base, short treble) }
1106	kActionSpriteSetMatrix = 3072; { (MatrixRecord matrix) }
1107	kActionSpriteSetImageIndex = 3073; { (short imageIndex) }
1108	kActionSpriteSetVisible = 3074; { (short visible) }
1109	kActionSpriteSetLayer = 3075; { (short layer) }
1110	kActionSpriteSetGraphicsMode = 3076; { (ModifierTrackGraphicsModeRecord graphicsMode) }
1111	kActionSpritePassMouseToCodec = 3078; { no params }
1112	kActionSpriteClickOnCodec = 3079; { Point localLoc }
1113	kActionSpriteTranslate = 3080; { (Fixed x, Fixed y, Boolean isAbsolute) }
1114	kActionSpriteScale = 3081; { (Fixed xScale, Fixed yScale) }
1115	kActionSpriteRotate = 3082; { (Fixed degrees) }
1116	kActionSpriteStretch = 3083; { (Fixed p1x, Fixed p1y, Fixed p2x, Fixed p2y, Fixed p3x, Fixed p3y, Fixed p4x, Fixed p4y) }
1117	kActionSpriteSetCanBeHitTested = 3094; { (short canBeHitTested) }
1118	kActionQTVRSetPanAngle = 4096; { (float panAngle) }
1119	kActionQTVRSetTiltAngle = 4097; { (float tiltAngle) }
1120	kActionQTVRSetFieldOfView = 4098; { (float fieldOfView) }
1121	kActionQTVRShowDefaultView = 4099; { no params }
1122	kActionQTVRGoToNodeID = 4100; { (UInt32 nodeID) }
1123	kActionQTVREnableHotSpot = 4101; { long ID, Boolean enable }
1124	kActionQTVRShowHotSpots = 4102; { Boolean show }
1125	kActionQTVRTranslateObject = 4103; { float xMove, float yMove }
1126	kActionQTVRSetViewState = 4109; { long viewStateType, short state }
1127	kActionMusicPlayNote = 5120; { (long sampleDescIndex, long partNumber, long delay, long pitch, long velocity, long duration) }
1128	kActionMusicSetController = 5121; { (long sampleDescIndex, long partNumber, long delay, long controller, long value) }
1129	kActionCase = 6144; { [(CaseStatementActionAtoms)] }
1130	kActionWhile = 6145; { [(WhileStatementActionAtoms)] }
1131	kActionGoToURL = 6146; { (C string urlLink) }
1132	kActionSendQTEventToSprite = 6147; { ([(SpriteTargetAtoms)], QTEventRecord theEvent) }
1133	kActionDebugStr = 6148; { (Str255 theString) }
1134	kActionPushCurrentTime = 6149; { no params }
1135	kActionPushCurrentTimeWithLabel = 6150; { (Str255 theLabel) }
1136	kActionPopAndGotoTopTime = 6151; { no params }
1137	kActionPopAndGotoLabeledTime = 6152; { (Str255 theLabel) }
1138	kActionStatusString = 6153; { (C string theString, long stringTypeFlags) }
1139	kActionSendQTEventToTrackObject = 6154; { ([(TrackObjectTargetAtoms)], QTEventRecord theEvent) }
1140	kActionAddChannelSubscription = 6155; { (Str255 channelName, C string channelsURL, C string channelsPictureURL) }
1141	kActionRemoveChannelSubscription = 6156; { (C string channelsURL) }
1142	kActionOpenCustomActionHandler = 6157; { (long handlerID, ComponentDescription handlerDesc) }
1143	kActionDoScript = 6158; { (long scriptTypeFlags, CString command, CString arguments) }
1144	kActionDoCompressedActions = 6159; { (compressed QTAtomContainer prefixed with eight bytes: long compressorType, long decompressedSize) }
1145	kActionSendAppMessage = 6160; { (long appMessageID) }
1146	kActionLoadComponent = 6161; { (ComponentDescription handlerDesc) }
1147	kActionSetFocus = 6162; { [(TargetAtoms theObject)] }
1148	kActionDontPassKeyEvent = 6163; { no params }
1149	kActionSetRandomSeed = 6164; { long randomSeed }
1150	kActionSpriteTrackSetVariable = 7168; { (QTAtomID variableID, float value) }
1151	kActionSpriteTrackNewSprite = 7169; { (QTAtomID spriteID, short imageIndex, MatrixRecord *matrix, short visible, short layer, ModifierTrackGraphicsModeRecord *graphicsMode, QTAtomID actionHandlingSpriteID) }
1152	kActionSpriteTrackDisposeSprite = 7170; { (QTAtomID spriteID) }
1153	kActionSpriteTrackSetVariableToString = 7171; { (QTAtomID variableID, C string value) }
1154	kActionSpriteTrackConcatVariables = 7172; { (QTAtomID firstVariableID, QTAtomID secondVariableID, QTAtomID resultVariableID ) }
1155	kActionSpriteTrackSetVariableToMovieURL = 7173; { (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) }
1156	kActionSpriteTrackSetVariableToMovieBaseURL = 7174; { (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) }
1157	kActionSpriteTrackSetAllSpritesHitTestingMode = 7181;
1158	kActionSpriteTrackNewImage = 7182; { (C string imageURL, QTAtomID desiredID) }
1159	kActionSpriteTrackDisposeImage = 7183; { (short imageIndex) }
1160	kActionApplicationNumberAndString = 8192; { (long aNumber, Str255 aString ) }
1161	kActionQD3DNamedObjectTranslateTo = 9216; { (Fixed x, Fixed y, Fixed z ) }
1162	kActionQD3DNamedObjectScaleTo = 9217; { (Fixed xScale, Fixed yScale, Fixed zScale ) }
1163	kActionQD3DNamedObjectRotateTo = 9218; { (Fixed xDegrees, Fixed yDegrees, Fixed zDegrees ) }
1164	kActionFlashTrackSetPan = 10240; { (short xPercent, short yPercent ) }
1165	kActionFlashTrackSetZoom = 10241; { (short zoomFactor ) }
1166	kActionFlashTrackSetZoomRect = 10242; { (long left, long top, long right, long bottom ) }
1167	kActionFlashTrackGotoFrameNumber = 10243; { (long frameNumber ) }
1168	kActionFlashTrackGotoFrameLabel = 10244; { (C string frameLabel ) }
1169	kActionFlashTrackSetFlashVariable = 10245; { (C string path, C string name, C string value, Boolean updateFocus) }
1170	kActionFlashTrackDoButtonActions = 10246; { (C string path, long buttonID, long transition) }
1171	kActionMovieTrackAddChildMovie = 11264; { (QTAtomID childMovieID, C string childMovieURL) }
1172	kActionMovieTrackLoadChildMovie = 11265; { (QTAtomID childMovieID) }
1173	kActionMovieTrackLoadChildMovieWithQTListParams = 11266; { (QTAtomID childMovieID, C string qtlistXML) }
1174	kActionTextTrackPasteText = 12288; { (C string theText, long startSelection, long endSelection ) }
1175	kActionTextTrackSetTextBox = 12291; { (short left, short top, short right, short bottom) }
1176	kActionTextTrackSetTextStyle = 12292; { (Handle textStyle) }
1177	kActionTextTrackSetSelection = 12293; { (long startSelection, long endSelection ) }
1178	kActionTextTrackSetBackgroundColor = 12294; { (ModifierTrackGraphicsModeRecord backgroundColor ) }
1179	kActionTextTrackSetForegroundColor = 12295; { (ModifierTrackGraphicsModeRecord foregroundColor ) }
1180	kActionTextTrackSetFace = 12296; { (long fontFace ) }
1181	kActionTextTrackSetFont = 12297; { (long fontID ) }
1182	kActionTextTrackSetSize = 12298; { (long fontSize ) }
1183	kActionTextTrackSetAlignment = 12299; { (short alignment ) }
1184	kActionTextTrackSetHilite = 12300; { (long startHighlight, long endHighlight, ModifierTrackGraphicsModeRecord highlightColor ) }
1185	kActionTextTrackSetDropShadow = 12301; { (Point dropShadow, short transparency ) }
1186	kActionTextTrackSetDisplayFlags = 12302; { (long flags ) }
1187	kActionTextTrackSetScroll = 12303; { (long delay ) }
1188	kActionTextTrackRelativeScroll = 12304; { (short deltaX, short deltaY ) }
1189	kActionTextTrackFindText = 12305; { (long flags, Str255 theText, ModifierTrackGraphicsModeRecord highlightColor ) }
1190	kActionTextTrackSetHyperTextFace = 12306; { (short index, long fontFace ) }
1191	kActionTextTrackSetHyperTextColor = 12307; { (short index, ModifierTrackGraphicsModeRecord highlightColor ) }
1192	kActionTextTrackKeyEntry = 12308; { (short character ) }
1193	kActionTextTrackMouseDown = 12309; { no params }
1194	kActionTextTrackSetEditable = 12310; { (short editState) }
1195	kActionListAddElement = 13312; { (C string parentPath, long atIndex, C string newElementName) }
1196	kActionListRemoveElements = 13313; { (C string parentPath, long startIndex, long endIndex) }
1197	kActionListSetElementValue = 13314; { (C string elementPath, C string valueString) }
1198	kActionListPasteFromXML = 13315; { (C string xml, C string targetParentPath, long startIndex) }
1199	kActionListSetMatchingFromXML = 13316; { (C string xml, C string targetParentPath) }
1200	kActionListSetFromURL = 13317; { (C string url, C string targetParentPath ) }
1201	kActionListExchangeLists = 13318; { (C string url, C string parentPath) }
1202	kActionListServerQuery = 13319; { (C string url, C string keyValuePairs, long flags, C string parentPath) }
1203	kActionListAddAttribute = 13320; { (C string elementPath, long atIndex, C string newAttributeName) }
1204	kActionListRemoveAttributes = 13321; { (C string elementPath, long startIndex, long endIndex) }
1205	kActionListSetAttributeValue = 13322; { (C string elementPath, C string attributeName, C string valueString) }
1206
1207
1208const
1209	kOperandExpression = 1;
1210	kOperandConstant = 2;
1211	kOperandSubscribedToChannel = 3;    { C string channelsURL }
1212	kOperandUniqueCustomActionHandlerID = 4;
1213	kOperandCustomActionHandlerIDIsOpen = 5; { long ID }
1214	kOperandConnectionSpeed = 6;
1215	kOperandGMTDay = 7;
1216	kOperandGMTMonth = 8;
1217	kOperandGMTYear = 9;
1218	kOperandGMTHours = 10;
1219	kOperandGMTMinutes = 11;
1220	kOperandGMTSeconds = 12;
1221	kOperandLocalDay = 13;
1222	kOperandLocalMonth = 14;
1223	kOperandLocalYear = 15;
1224	kOperandLocalHours = 16;
1225	kOperandLocalMinutes = 17;
1226	kOperandLocalSeconds = 18;
1227	kOperandRegisteredForQuickTimePro = 19;
1228	kOperandPlatformRunningOn = 20;
1229	kOperandQuickTimeVersion = 21;
1230	kOperandComponentVersion = 22;   { C string type, C string subType, C string manufacturer }
1231	kOperandOriginalHandlerRefcon = 23;
1232	kOperandTicks = 24;
1233	kOperandMaxLoadedTimeInMovie = 25;
1234	kOperandEventParameter = 26;   { short index }
1235	kOperandFreeMemory = 27;
1236	kOperandNetworkStatus = 28;
1237	kOperandQuickTimeVersionRegistered = 29; { long version }
1238	kOperandSystemVersion = 30;
1239	kOperandMovieVolume = 1024;
1240	kOperandMovieRate = 1025;
1241	kOperandMovieIsLooping = 1026;
1242	kOperandMovieLoopIsPalindrome = 1027;
1243	kOperandMovieTime = 1028;
1244	kOperandMovieDuration = 1029;
1245	kOperandMovieTimeScale = 1030;
1246	kOperandMovieWidth = 1031;
1247	kOperandMovieHeight = 1032;
1248	kOperandMovieLoadState = 1033;
1249	kOperandMovieTrackCount = 1034;
1250	kOperandMovieIsActive = 1035;
1251	kOperandMovieName = 1036;
1252	kOperandMovieID = 1037;
1253	kOperandMovieChapterCount = 1038;
1254	kOperandMovieChapterIndex = 1039;
1255	kOperandMovieChapterName = 1040;
1256	kOperandMovieChapterNameByIndex = 1041; { ( short index ) }
1257	kOperandMovieChapterIndexByName = 1042; { (c string name)  }
1258	kOperandMovieAnnotation = 1043; { (c string requested, long flags) }
1259	kOperandMovieConnectionFlags = 1044;
1260	kOperandMovieConnectionString = 1045;
1261	kOperandTrackVolume = 2048;
1262	kOperandTrackBalance = 2049;
1263	kOperandTrackEnabled = 2050;
1264	kOperandTrackLayer = 2051;
1265	kOperandTrackWidth = 2052;
1266	kOperandTrackHeight = 2053;
1267	kOperandTrackDuration = 2054;
1268	kOperandTrackName = 2055;
1269	kOperandTrackID = 2056;
1270	kOperandTrackIdleFrequency = 2057;
1271	kOperandTrackBass = 2058;
1272	kOperandTrackTreble = 2059;
1273	kOperandSpriteBoundsLeft = 3072;
1274	kOperandSpriteBoundsTop = 3073;
1275	kOperandSpriteBoundsRight = 3074;
1276	kOperandSpriteBoundsBottom = 3075;
1277	kOperandSpriteImageIndex = 3076;
1278	kOperandSpriteVisible = 3077;
1279	kOperandSpriteLayer = 3078;
1280	kOperandSpriteTrackVariable = 3079; { [QTAtomID variableID] }
1281	kOperandSpriteTrackNumSprites = 3080;
1282	kOperandSpriteTrackNumImages = 3081;
1283	kOperandSpriteID = 3082;
1284	kOperandSpriteIndex = 3083;
1285	kOperandSpriteFirstCornerX = 3084;
1286	kOperandSpriteFirstCornerY = 3085;
1287	kOperandSpriteSecondCornerX = 3086;
1288	kOperandSpriteSecondCornerY = 3087;
1289	kOperandSpriteThirdCornerX = 3088;
1290	kOperandSpriteThirdCornerY = 3089;
1291	kOperandSpriteFourthCornerX = 3090;
1292	kOperandSpriteFourthCornerY = 3091;
1293	kOperandSpriteImageRegistrationPointX = 3092;
1294	kOperandSpriteImageRegistrationPointY = 3093;
1295	kOperandSpriteTrackSpriteIDAtPoint = 3094; { short x, short y }
1296	kOperandSpriteName = 3095;
1297	kOperandSpriteCanBeHitTested = 3105; { short }
1298	kOperandSpriteTrackAllSpritesHitTestingMode = 3106;
1299	kOperandSpriteTrackImageIDByIndex = 3107; { short imageIndex }
1300	kOperandSpriteTrackImageIndexByID = 3108; { QTAtomID }
1301	kOperandQTVRPanAngle = 4096;
1302	kOperandQTVRTiltAngle = 4097;
1303	kOperandQTVRFieldOf…

Large files files are truncated, but you can click here to view the full file