< Previous PageNext Page > Hide TOC

QuickTime Public Resources

Resources

'atms'

Lists effect and parameter description atoms for effect components.

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
};
};
};
};

Discussion

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.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'avvc'

Lists AVI four cc types for compressor components.

type 'avvc' {
array {
literal longint; // avi four cc type
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'avvd'

Lists AVI four cc types for decompressor components.

type 'avvd' {
array {
literal longint; // avi four cc type
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'cdci'

Contains codec characteristics.

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;
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'cdec'

Contains a codec string.

type 'cdec' {
hex string;
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'cpix'

Lists supported pixel formats for a codec compressor.

type 'cpix' {
array {
literal longint;
};
};

Discussion

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.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: ImageCodec.r
Programming summary: Component Public Resources

'dlle'

Contains a string for a multiplatform component.

type 'dlle' {
cstring;
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'mcfg'

Lists characteristics of files supported by a graphics importer component.

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
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: QuicktimeComponents.r
Programming summary: Component Public Resources

'mgrp'

Lists MIME groups supported by a graphics importer component.

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
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: QuicktimeComponents.r
Programming summary: Component Public Resources

'mime'[resource]

Lists MIME types supported by a movie importer or exporter component.

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:
};

Discussion

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
}
Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: QuicktimeComponents.r
Programming summary: Component Public Resources

'pcki'

Lists streaming payload media supported by a packetizer component.

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;
};
};

Discussion

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.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: QTStreamingComponents.r
Programming summary: Component Public Resources

'qter'

Stores error messages for 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;
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: Movies.r

'rsmi'

Lists the characteristics of streaming payloads supported by a reassembler component.

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;
};
};

Discussion

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.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: QTStreamingComponents.r
Programming summary: Component Public Resources

'skcr'

Defines a media skin content region.

// no declaration

Discussion

The content of this resource is currently a 1-bit 'pict' image.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Programming summary: Component Public Resources

'skgr'

Defines a media skin drag region.

// no declaration

Discussion

The content of this resource is currently a 1-bit 'pict' image.

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Programming summary: Component Public Resources

'snd '

Lists sound commands supported by a sound component.

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)])];
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Sound.r
Programming summary: Component Public Resources

'src#'

Lists a movie exporter component's supported media types and the minimum and maximum number of sources for each.

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;
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Can be made public
Rez source file: QuicktimeComponents.r
Programming summary: Component Public Resources

'stg#'

Lists QuickTime's presets.

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
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: QuicktimeComponents.r
Programming summary: Component Public Resources

'stgp'

Lists QuickTime's preset platforms.

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;
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: QuickTimeComponents.r
Programming summary: Component Public Resources

'stri'

Contains a component information string.

type 'stri' {
pstring; // string
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'strn'

Contains a component name string.

type 'strn' {
pstring; // string
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'sttg'

Lists QuickTime's presets.

// no declaration

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Programming summary: Component Public Resources

'thga'

Lists the characteristics of a component resource alias.

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
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'thn#'

Lists a component's load order dependencies.

type 'thn#' {
array {
literal longint; // code type
integer; // code ID
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'thnd'

Lists a component's dependencies.

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
};
};

Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'thng'

Lists the characteristics of a component resource.

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
};

Fields
platform type
Discussion

The response from gestaltComponentPlatform if available, or else from gestaltSysArchitecture.

resource map
Discussion

See the 'thnr' resource type.

Discussion

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
};
Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources

'thnr'

Contains a public resource map for a component.

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
};
};

Fields
flags
Discussion

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.

Discussion

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,
    }
}
Version Notes

Introduced in QuickTime 6.

Programming Info
Resource accessibility: Private
Rez source file: Components.r
Programming summary: Component Public Resources
See Also

For functions that access public resources, see GetComponentPublicResource and GetComponentPublicResourceList.



< Previous PageNext Page > Hide TOC


Last updated: 2006-05-23