'atms' |
type 'atms' {
longint; // root atom count
array AtomArray {
literal longint; // atomType
longint; // atomID
longint noChildren =0; // children
longint =$$CountOf(AtomData);
array AtomData {
switch {
case long:
key literal longint ='long';
pstring; // data
case short:
key literal longint ='shrt';
pstring; // data
case noMininumFixed:
key literal longint ='nmiF';
pstring = ""; // data
case noMaximumFixed:
key literal longint ='nmaF';
pstring = ""; // data
case noMininumDouble:
key literal longint ='nmiD';
pstring = ""; // data
case noMaximumDouble:
key literal longint ='nmaD';
pstring = ""; // data
case fixed:
key literal longint ='fixd';
pstring; // data
case double:
key literal longint ='doub';
pstring; // data
case string:
key literal longint ='str ';
pstring; // data
case lstring:
key literal longint ='lstr';
LongStringStart:
longint =
((LongStringEnd[$$ArrayIndex(AtomArray),
$$ArrayIndex(AtomData)] -
LongStringStart[$$ArrayIndex(AtomArray),
$$ArrayIndex(AtomData)]) >
>
3) - 4;
hex string
[$$Word(LongStringStart[$$ArrayIndex(AtomArray),
$$ArrayIndex(AtomData)]) - 4];
LongStringEnd:
case OSType:
key literal longint ='osty';
pstring; // data
};
};
};
};
The 'atms'
resource for a video effect contains two sets of information. The first set contains the effect information that is used to construct the standard parameters dialog box. This includes items such as the name of the effect and optional copyright information. The second set contains a description of each parameter that the effect takes. If the effect does not take parameters, there is no information in this set.
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'avvc' |
type 'avvc' {
array {
literal longint; // avi four cc type
};
};
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'avvd' |
type 'avvd' {
array {
literal longint; // avi four cc type
};
};
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'cdci' |
type 'cdci' {
pstring[31];
hex integer version;
hex integer revlevel;
hex longint vendor;
hex longint decompressFlags;
hex longint compressFlags;
hex longint formatFlags;
byte compressionAccuracy;
byte decompressionAccuracy;
integer compressionSpeed;
integer decompressionSpeed;
byte compressionLevel;
byte resvd;
integer minimumHeight;
integer minimumWidth;
integer decompressPipelineLatency;
integer compressPipelineLatency;
longint privateData;
};
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'cdec' |
type 'cdec' {
hex string;
};
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'cpix' |
type 'cpix' {
array {
literal longint;
};
};
A 'cpix'
resource is an array of 4-character codes (such as '2vuy' or 'yuvs'
) that define the pixel formats a codec can accept. You can use this array to list any pixel formats that your codec prefers to straight RGB. An application can get the list, by calling GetComponentPublicResource
, to see what kind of graphics world it should construct.
Introduced in QuickTime 6.
ImageCodec.r
Component Public Resources
'dlle' |
type 'dlle' {
cstring;
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'mcfg' |
type 'mcfg' {
longint =kQTMediaConfigResourceVersion; // resource version (long)
// version of the component this applies to
longint kVersionDoesntMatter =0;
// array, one entry for each media type
longint =$$Countof(MIMEInfoArray);
array MIMEInfoArray {
literal longint; // ID of the group this type belongs with:
// OSType, a kQTMediaConfigStreamGroupID, etc.
literal longint; // MIME config flags:
// unsigned long, a kQTMediaConfigCanUseApp, etc.
literal longint; // MacOS file type when saved (OSType)
literal longint; // MacOS file creator when saved (OSType)
literal longint; // component type (OSType)
literal longint; // component subtype (OSType)
literal longint; // component manufacturer (OSType)
unsigned hex longint; // component flags
// component flags mask
unsigned hex longint kAnyComponentFlagsMask =0;
literal longint; // default file extension (OSType)
// all caps to match subType
// of eat and grip components
literal longint; // QT file group:
// OSType, a kQTMediaInfoNetGroup, etc.
longint =$$Countof(QTMediaSynonymsArray);
array QTMediaSynonymsArray {
pstring; // array of media type synonyms
};
align long; // align
wide array [5] {
pstring;
// array of 5 Pascal strings:
// + media type description
// + file extension(s)
// + opening application name
// + missing software description
// + vendor info string (copyright, version, etc)
};
align long; // align
// array of MIME types that describe this
// (eg. audio/mpeg, audio/x-mpeg, etc.)
longint =$$Countof(MIMETypeArray);
array MIMETypeArray {
pstring;
};
align long; // align
};
};
Introduced in QuickTime 6.
QuicktimeComponents.r
Component Public Resources
'mgrp' |
type 'mgrp' {
longint =kQTMediaGroupResourceVersion; // resource version (long)
// component version this applies to
longint kVersionDoesntMatter =0;
// array of group information
// (optional unless you are defining new group(s))
longint =$$Countof(MIMEGroupArray);
array MIMEGroupArray {
literal longint; // group ID (OSType)
pstring; // name of the grouping
pstring; // description
align long; // align
};
};
Introduced in QuickTime 6.
QuicktimeComponents.r
Component Public Resources
'mime'[resource] |
type 'mime' {
longint =0; // 10 bytes of reserved
longint =0;
integer =0;
integer =0; // 2 bytes of lock count
parentStart:
longint =( (parentEnd - parentStart) / 8 ); // size of this atom
literal longint ='sean'; // atom type
longint =1; // atom ID
integer =0;
integer = $$CountOf(AtomArray);
longint =0;
array AtomArray {
atomStart:
// size of this atom
longint =((atomEnd[$$ArrayIndex(AtomArray)] -
atomStart[$$ArrayIndex(AtomArray)]) / 8);
literal longint; // atom type
longint; // atom ID
integer =0;
integer =0; // no children
longint =0;
string;
atomEnd:
};
parentEnd:
};
Every import component should include a 'thnr'
resource holding the same data that MovieImportGetMIMETypeList
would return. By including this public resource, QuickTime and applications don't need to open the import component and call MovieImportGetMIMETypeList
to determine the MIME types the importer supports. In the absence of this resource, QuickTime and applications will use MovieImportGetMIMETypeList
. This resource's public type and ID should be 'mime'
and 1. Here is an example of such a list:
resource 'thnr' (kMyImportComponentResID) { |
'mime', 1, 0, |
'mime', kMyImportMIMETypeListResID, 0 |
} |
Introduced in QuickTime 6.
QuicktimeComponents.r
Component Public Resources
'pcki' |
type 'pcki' {
array infoArray {
align long;
hex longint mediaType;
hex longint dataFormat;
hex longint vendor;
hex longint capabilityFlags;
byte canPackMatrixType;
byte =0;
byte =0;
byte =0;
longint =$$CountOf(characteristicArray); // array size
array characteristicArray {
hex longint tag;
hex longint value;
};
hex longint payloadFlags;
byte payloadID; // if static payload
byte =0;
byte =0;
byte =0;
cstring;
};
};
Every packetizer must provide a public resource of type 'pcki'
, which contains information about its capabilities. This information lists the media
types and compression formats the packetizer can work with. It also lists the track characteristics the packetizer can work with, such as layers or transformation matrices. In addition, it provides information about the packetizer's performance characteristics, such as its speed or ability to recover from packet loss. QuickTime selects the packetizer best suited to a stream's current media, compression format, and track characteristics. If there are multiple packetizers that can work with a given track, QuickTime picks the one with the best performance.
Introduced in QuickTime 6.
QTStreamingComponents.r
Component Public Resources
'qter' |
QTAddMovieError
.
type 'qter' {
longint =$$Countof(ErrorSpec);
wide array ErrorSpec {
longint; // error code used to find this error
longint // error type
kQuickTimeErrorNotice =1,
kQuickTimeErrorWarning =2,
kQuickTimeErrorError =3;
// In the following strings, ^FILENAME, ^APPNAME, ^0, ^1, etc will be
// replaced as appropriate.
pstring; // main error string
pstring; // explanation error string
pstring; // technical string (not displayed
// to user except in debug cases)
align long;
};
};
Introduced in QuickTime 6.
Movies.r
'rsmi' |
type 'rsmi' {
array infoArray {
align long;
longint =$$CountOf(characteristicArray); // array size
array characteristicArray {
hex longint tag;
hex longint value;
};
hex longint payloadFlags;
byte payloadID; // if static payload
byte =0;
byte =0;
byte =0;
cstring;
};
};
Every reassembler must provide a public resource of type 'rsmi'
, which contains information about its capabilities. This information lists the RTP payload types the reassembler can work with, as well as the reassembler's speed and ability to recover from lost packets. If more than one reassembler is available for a given RTP payload type, QuickTime chooses the one with the best performance characteristics, such as highest speed or best ability to deal with packet loss.
Introduced in QuickTime 6.
QTStreamingComponents.r
Component Public Resources
'skcr' |
// no declaration
The content of this resource is currently a 1-bit 'pict'
image.
Introduced in QuickTime 6.
Component Public Resources
'skgr' |
// no declaration
The content of this resource is currently a 1-bit 'pict'
image.
Introduced in QuickTime 6.
Component Public Resources
'snd ' |
type 'snd ' {
switch {
case FormatOne:
key unsigned integer =$0001;
unsigned integer =$$CountOf(Synthesizers);
wide array Synthesizers {
// Resource ID of synthesizer/modifer
integer squareWaveSynth =$0001,
waveTableSynth =$0003,
sampledSynth =$0005;
longint; // init parameter
};
case FormatTwo:
key unsigned integer =$0002;
integer free =0, keepInMemory =256+1; // Space for refe count
};
unsigned integer =$$CountOf(SoundCmnds);
wide array SoundCmnds {
boolean noData, hasData;
switch {
case nullCmd:
key bitstring[15] =0;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case quietCmd:
key bitstring[15] =3;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case flushCmd:
key bitstring[15] =4;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case waitCmd:
key bitstring[15] =10;
integer oneSecond =2000; // Duration
fill long; // Param 2 =nil
case pauseCmd:
key bitstring[15] =11;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case resumeCmd:
key bitstring[15] =12;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case callBackCmd:
key bitstring[15] =13;
integer; // User-defined
longint; // User-defined
case syncCmd:
key bitstring[15] =14;
integer; // Count
longint; // Identifier
case emptyCmd:
key bitstring[15] =15;
fill word; // Param 1 =nil
fill long; // Param 2 =nil
case freqDurationCmd:
key bitstring[15] =40;
integer oneSecond =2000; // Duration
longint; // Frequency
case restCmd:
key bitstring[15] =41;
integer oneSecond =2000; // Duration
fill long; // Param 2 =nil
case freqCmd:
key bitstring[15] =42;
fill word; // Param 1 =nil
longint; // Frequency
case ampCmd:
key bitstring[15] =43;
integer; // Amplitude
fill long; // Param 2
case timbreCmd:
key bitstring[15] =44;
integer sineWave, squareWave =255; // Timbre
fill long; // Param 2
case waveTableCmd:
key bitstring[15] =60;
unsigned integer; // Length
longint; // Pointer to table
case phaseCmd:
key bitstring[15] =61;
integer; // Shift
longint; // chanPtr
case soundCmd:
key bitstring[15] =80;
fill word; // Param 1 =nil
longint; // Pointer to sound
case bufferCmd:
key bitstring[15] =81;
fill word; // Param 1 =nil
longint; // Pointer to buffer
case rateCmd:
key bitstring[15] =82;
fill word; // Param 1 =nil
longint; // Rate
};
};
array DataTables {
DataTable:
fill long; // Pointer to data
SampleCnt:
unsigned longint; // # of sound samples
unsigned hex longint Rate22K =$56EE8BA3; // Sampling rate
unsigned longint; // Start of loop
unsigned longint; // End of loop
hex byte; // encode (header type)
hex byte; // baseFrequency
hex string [$$Long(SampleCnt[$$ArrayIndex(DataTables)])];
};
};
Introduced in QuickTime 6.
Sound.r
Component Public Resources
'src#' |
type 'src#' {
longint =$$CountOf(SourceArray);
longint =0; // reserved
array SourceArray {
literal longint; // Media type of source
// min number of sources of this kind required; 0 if none required
integer;
// max number of sources of this kind allowed;
// 65535 if unlimited allowed
integer;
longint isMediaType =0x01,
isMediaCharacteristic =0x02,
isSourceType =0x04;
};
};
Introduced in QuickTime 6.
QuicktimeComponents.r
Component Public Resources
'stg#' |
type 'stg#' {
hex longint; // flags
longint =$$CountOf(PresetDescriptionArray);
longint =0;
array PresetDescriptionArray {
literal longint; // preset key ID
unsigned hex longint noFlags =0,
kQTPresetInfoIsDivider =1; // preset flags
literal longint; // preset resource type
integer; // preset resource ID
integer =0; // padding but also reserved
integer; // preset name string list ID
integer; // preset name string index
integer; // preset description string list ID
integer; // preset description string index
};
};
Introduced in QuickTime 6.
QuicktimeComponents.r
Component Public Resources
'stgp' |
type 'stgp' {
longint =0; // reserved
literal longint; // default settings list resource type
integer; // default settings list resource id
integer =$$CountOf(SettingsPlatformInfo);
wide array SettingsPlatformInfo {
unsigned hex longint =0; // reserved
literal longint; // platform settings list resource Type
integer; // platform settings list resource ID
// platform type (response from gestaltSysArchitecture)
integer platform68k =1,
platformPowerPC =2,
platformInterpreted =3,
platformWin32 =4;
};
};
Introduced in QuickTime 6.
QuickTimeComponents.r
Component Public Resources
'stri' |
type 'stri' {
pstring; // string
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'strn' |
type 'strn' {
pstring; // string
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'sttg' |
// no declaration
Introduced in QuickTime 6.
Component Public Resources
'thga' |
type 'thga' {
literal longint; // type
literal longint; // subtype
literal longint; // manufacturer
unsigned hex longint; // component flags
unsigned hex longint kAnyComponentFlagsMask =0; // component flags mask
literal longint; // code type
integer; // code ID
literal longint; // name type
integer; // name ID
literal longint; // info type
integer; // info ID
literal longint; // icon type
integer; // icon ID
literal longint; // type
literal longint; // subtype
literal longint; // manufacturer
unsigned hex longint; // component flags
unsigned hex longint kAnyComponentFlagsMask =0; // component flags mask
#if thng_RezTemplateVersion >
=2
literal longint; // resource map type
integer; // resource map id
integer cmpAliasNoFlags =0,
cmpAliasOnlyThisFile =1; // alias flags
#endif
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'thn#' |
type 'thn#' {
array {
literal longint; // code type
integer; // code ID
};
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'thnd' |
type 'thnd' {
longint =$$CountOf(ComponentDependency);
wide array ComponentDependency {
literal longint; // type
literal longint; // subtype
literal longint; // manufacturer
unsigned hex longint; // component flags
unsigned hex longint kAnyComponentFlagsMask =0; // flags mask
};
};
Introduced in QuickTime 6.
Components.r
Component Public Resources
'thng' |
type 'thng' {
literal longint; // type
literal longint; // subtype
literal longint; // manufacturer
unsigned hex longint; // component flags
unsigned hex longint kAnyComponentFlagsMask =0; // component flags mask
literal longint; // code type
integer; // code ID
literal longint; // name type
integer; // name ID
literal longint; // info type
integer; // info ID
literal longint; // icon type
integer; // icon ID
#if thng_RezTemplateVersion >
=1
unsigned hex longint; // version
longint; // registration flags
integer; // resource ID of icon family
longint =$$CountOf(ComponentPlatformInfo);
wide array ComponentPlatformInfo {
unsigned hex longint; // component flags
literal longint; // code type
integer; // code ID
integer platform68k =1, // platform type
platformPowerPC =2,
platformInterpreted =3,
platformWin32 =4,
platformPowerPCNativeEntryPoint =5;
};
#if thng_RezTemplateVersion >
=2
literal longint; // resource map type
integer; // resource map ID
#endif
#endif
};
platform type
The response from gestaltComponentPlatform
if available, or else from gestaltSysArchitecture
.
resource map
See the 'thnr'
resource type.
To associate a Public Resource Map with a component, the component's 'thng'
resource must be extended to include a references to a 'thnr'
resource. This can be done when the value of thng_RezTemplateVersion
is 2, by adding the resource
type 'thnr'
and an ID. Here is an example:
resource 'thng' (512) { |
// component type, subtype, manufacturer, etc. go here |
'thnr', 512 |
}; |
Introduced in QuickTime 6.
Components.r
Component Public Resources
'thnr' |
type 'thnr' {
array {
literal longint; // resource type
integer; // resource id
integer; // unused flags
literal longint; // Mac OS resource type
integer; // Mac OS resource ID
integer cmpResourceNoFlags =0,
cmpResourceCallComponent =1; // flags
};
};
flags
Some components may need to build the contents of their public resources at run time. For example, the ColorSync visual effect's parameter list varies depending on what color matching methods are installed. In this case, its public component resource cannot be stored in its resource file, but instead must be dynamically created at run time. To indicate that a public resource cannot be loaded directly from a component's file, the component's 'thnr'
resource contains 0 in the ID
field for that resource and the cmpResourceCallComponent
flag is set to 1.
Public resources are identified by a four-character OSType
codes and ID numbers. Unlike private resources, however, a public resource's OSType
code and ID do not have to be the same as the Mac OS resource type and ID that the resource is stored in. Consequently, a component that provides public resources must add a Public Resource Map to the component's 'thng'
resource, giving the mapping between each public resource type and ID and the corresponding private resource type and ID. Here's an example of a Public Resource Map. It makes available two public resource, 'PICT'
1 and 'PICT'
2, which are stored in the component as Mac OS resources 'pict'
128 and 'pict'
129.
resource 'thnr' (512) { |
{ |
'PICT', 1, 0, 'pict', 128, 0, |
'PICT', 2, 0, 'pict', 129, 0, |
} |
} |
Introduced in QuickTime 6.
Components.r
Component Public Resources
For functions that access public resources, see GetComponentPublicResource
and GetComponentPublicResourceList
.
Last updated: 2006-05-23