The following constants represent atom types for sprite media:
enum { |
kSpriteAtomType = 'sprt', |
kSpriteImagesContainerAtomType = 'imct', |
kSpriteImageAtomType = 'imag', |
kSpriteImageDataAtomType = 'imda', |
kSpriteImageDataRefAtomType = 'imre', |
kSpriteImageDataRefTypeAtomType = 'imrt', |
kSpriteImageGroupIDAtomType = 'imgr', |
kSpriteImageRegistrationAtomType = 'imrg', |
kSpriteImageDefaultImageIndexAtomType ='defi', |
kSpriteSharedDataAtomType = 'dflt', |
kSpriteNameAtomType = 'name', |
kSpriteImageNameAtomType = 'name', |
kSpriteUsesImageIDsAtomType = 'uses', |
kSpriteBehaviorsAtomType = 'beha', |
kSpriteImageBehaviorAtomType = 'imag', |
kSpriteCursorBehaviorAtomType = 'crsr', |
kSpriteStatusStringsBehaviorAtomType = 'sstr', |
kSpriteVariablesContainerAtomType = 'vars', |
kSpriteStringVariableAtomType = 'strv', |
kSpriteFloatingPointVariableAtomType = 'flov' |
kSpriteSharedDataAtomType = 'dflt', |
kSpriteURLLinkAtomType = 'url ' |
kSpritePropertyMatrix = 1 |
kSpritePropertyVisible = 4 |
kSpritePropertyLayer = 5 |
kSpritePropertyGraphicsMode = 6 |
kSpritePropertyImageIndex = 100 |
kSpritePropertyBackgroundColor = 101 |
kSpritePropertyOffscreenBitDepth = 102 |
kSpritePropertySampleFormat = 103 |
}; |
kSpriteAtomTypeThe atom is a parent atom that describes a sprite. It
contains atoms that describe properties of the sprite. Optionally,
it may also include an atom of type kSpriteNameAtomType that
defines the name of the sprite.
kSpriteImagesContainerAtomTypeThe atom is a parent atom that contains atoms
of type kSpriteImageAtomType.
kSpriteImageAtomTypeThe atom is a parent atom that contains an atom
of type kSpriteImageDataAtomType.
Optionally, it may also include an atom of type kSpriteNameAtomType that
defines the name of the image.
kSpriteImageDataAtomTypeThe atom is a leaf atom that contains image data.
kSpriteSharedDataAtomTypeThe atom is a parent atom that contains shared
sprite data, such as an atom container of type kSpriteImagesContainerAtomType.
kSpriteNameAtomTypeThe atom is a leaf atom that contains the name of a sprite or an image. The leaf data is composed of one or more ASCII characters.
kSpritePropertyImageIndexA leaf atom containing the image index property
which is of type short. This
atom is a child atom of kSpriteAtom.
kSpritePropertyLayerA leaf atom containing the layer property which
is of type short. This
atom is a child atom of kSpriteAtom.
kSpritePropertyMatrixA leaf atom containing the matrix property which
is of type MatrixRecord. This
atom is a child atom of kSpriteAtom.
kSpritePropertyVisibleA leaf atom containing the visible property which
is of type short. This atom
is a child atom of kSpriteAtom.
kSpritePropertyGraphicsModeA leaf atom containing the graphics mode property
which is of type ModifyerTrackGraphicsModeRecord.
This atom is a child atom of kSpriteAtom.
kSpritePropertyBackgroundColorA leaf atom containing the background color property
which is of type RGBColor.
This atom is used in a sprite track’s MediaPropertyAtom atom container.
kSpritePropertyOffscreenBitDepthA leaf atom containing the preferred offscreen
bitdepth which is of type short.
This atom is used in a sprite track’s MediaPropertyAtom atom container.
kSpritePropertySampleFormatA leaf atom containing the sample format property,
which is of type short. This
atom is used in a sprite track’s MediaPropertyAtom atom
container.
kSpriteImageRegistrationAtomTypeSprite images have a default registration point
of 0, 0. To specify a different point, add an atom of type kSpriteImageRegistrationAtomType as
a child atom of the kSpriteImageAtomType and
set its leaf data to a FixedPoint value with
the desired registration point.
kSpriteImageGroupIDAtomTypeYou must assign group IDs to sets of equivalent images in your key frame sample. For example, if the sample contains ten images where the first two images are equivalent, and the last eight images are equivalent, then you could assign a group ID of 1000 to the first two images, and a group ID of 1001 to the last eight images. This divides the images in the sample into two sets. The actual ID does not matter, it just needs to be a unique positive integer.
Each
image in a sprite media key frame sample is assigned to a group.
Add an atom of type kSpriteImageGroupIDAtomType as
a child of the kSpriteImageAtomType atom
and set its leaf data to a long containing the group ID.
For each of the following atom types (added to QuickTime 4)––except kSpriteBehaviorsAtomType––you
fill in the structure QTSpriteButtonBehaviorStruct,
which contains a value for each of the four states.
kSpriteBehaviorsAtomTypeThis is the parent atom of kSpriteImageBehaviorAtomType, kSpriteCursorBehaviorAtomType,
and kSpriteStatusStringsBehaviorAtomType.
kSpriteImageBehaviorAtomTypeSpecifies the imageIndex.
kSpriteCursorBehaviorAtomTypeSpecifies the cursorID.
kSpriteStatusStringsBehaviorAtomTypeSpecifies an ID of a string variable contained in a sprite track to display in the status area of the browser.
kSpriteUsesImageIDsAtomTypeThis atom allows a sprite to specify which images
it uses—in other words, the subset of images that its imageIndex property
can refer to.
You add an atom of type kSpriteUsesImageIDsAtomType as
a child of a kSpriteAtomType atom,
setting its leaf data to an array of QT atom IDs. This array contains
the IDs of the images used, not the indices.
Although QuickTime does not currently use this atom internally, tools that edit sprite media can use the information provided to optimize certain operations, such as cut, copy, and paste.
kSpriteImageRegistrationAtomTypeSprite images have a default registration point
of 0, 0. To specify a different point, you add an atom of type kSpriteImageRegistrationAtomType as
a child atom of the kSpriteImageAtomType and
set its leaf data to a FixedPoint value
with the desired registration point.
kSpriteImageGroupIDAtomTypeYou must assign group IDs to sets of equivalent images in your key frame sample. For example, if the sample contains ten images where the first two images are equivalent, and the last eight images are equivalent, then you could assign a group ID of 1000 to the first two images, and a group ID of 1001 to the last eight images. This divides the images in the sample into two sets. The actual ID does not matter; it just needs to be a unique positive integer.
Each
image in a sprite media key frame sample is assigned to a group.
You add an atom of type kSpriteImageGroupIDAtomType as
a child of the kSpriteImageAtomType atom
and set its leaf data to a long containing the group ID.
You use the following atom types, which were added to QuickTime 4, to specify that an image is referenced and how to access it.
kSpriteImageDataRefAtomType Add this atom as a child of the kSpriteImageAtomType atom
instead of a kSpriteImageDataAtomType.
Its ID should be 1. Its data should contain the data reference (similar
to the dataRef parameter
of GetDataHandler).
kSpriteImageDataRefTypeAtomType Add this atom as a child of the kSpriteImageAtomType atom.
Its ID should be 1. Its data should contain the data reference type
(similar to the dataRefType parameter
of GetDataHandler).
kSpriteImageDefaultImageIndexAtomType You may optionally add this atom as a child of
the kSpriteImageAtomType atom.
Its ID should be 1. Its data should contain a short,
which specifies an image index of a traditional image to use while
waiting for the referenced image to load.
The following constants represent formats of a sprite track.
The value of the constant indicates how override samples in a sprite
track should be interpreted. You set a sprite track’s format by
creating a kSpriteTrackPropertySampleFormat atom.
enum { |
kKeyFrameAndSingleOverride = 1L << 1, |
kKeyFrameAndAllOverrides = 1L << 2 |
}; |
kKeyFrameAndSingleOverrideThe current state of the sprite track is defined by the most recent key frame sample and the current override sample. This is the default format.
kKeyFrameAndAllOverridesThe current state of the sprite track is defined by the most recent key frame sample and all subsequent override samples up to and including the current override sample.
Last updated: 2007-09-04