This chapter describes all the new QuickTime functions, data structures, constants, and callbacks available in this software release.
If you are a QuickTime API-level developer, content author, multimedia producer or Webmaster who is currently working with QuickTime, you should read this chapter and use it for reference, as needed, in your application development.
The following functions, callbacks, structures, and constants are new or changed with this release of QuickTime.
Functions that are new in QuickTime 7 are described in this section; they are listed in alphabetical order.
Adds sample data and a description to a media.
OSErr AddMediaSample2 ( Media theMedia, const UInt8 *dataIn, ByteCount size, TimeValue64 decodeDurationPerSample, TimeValue64 displayOffset, SampleDescriptionHandle sampleDescriptionH, ItemCount numberOfSamples, MediaSampleFlags sampleFlags, TimeValue64 *sampleDecodeTimeOut );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A handle to the sample data. The function adds this data to the media specified by theMedia. You specify the number of bytes of sample data with the size parameter.
The number of bytes of sample data to be added to the media. This parameter indicates the total number of bytes in the sample data to be added to the media, not the number of bytes per sample. Use the numberOfSamples parameter to indicate the number of samples that are contained in the sample data.
The duration of each sample to be added, representing the amount of time that passes while the sample data is being displayed. You must specify this parameter in the media’s time scale. For example, if you are adding sound that was sampled at 22 kHz to a media that contains a sound track with the same time scale, you would set durationPerSample to 1. Similarly, if you are adding video that was recorded at 10 frames per second to a video media that has a time scale of 600, you would set this parameter to 60. Note that this is the duration per sample, regardless of the number of samples being added.
A 64-bit time value that specifies the offset between the decode time (the start time of the track plus the duration of all previous samples) and the display time. This value is normally zero unless the sample is frame reordering compressed video.
A handle to a SampleDescription
structure.
Some media structures may require sample descriptions. There are
different descriptions for different types of samples. For example,
a media that contains compressed video requires that you supply
an ImageDescription
structure. A media that contains
sound requires that you supply a SoundDescription
structure.
If the media does not require a SampleDescription
structure,
set this parameter to NIL.
The number of samples contained in the sample data to be added to the media. The Movie Toolbox considers the value of this parameter as well as the value of the size parameter when it determines the size of each sample that it adds to the media. You should set the value of this parameter so that the resulting sample size represents a reasonable compromise between total data retrieval time and the overhead associated with input and output. You should also consider the speed of the data storage device; CD-ROM devices are much slower than hard disks, for example, and should therefore have a smaller sample size. For a video media, set a sample size that corresponds to the size of a frame. For a sound media, choose a number of samples that corresponds to between 0.5 and 1.0 seconds of sound. In general, you should not create groups of sound samples that are less than 2 KB in size or greater than 15 KB. Typically, a sample size of about 8 KB is reasonable for most storage devices.
Flags that control the add operation; set unused flags to 0:
mediaSampleNotSync
Indicates that the sample to be added is not a sync sample. Set this flag to 1 if the sample is not a sync sample; set it to 0 if the sample is a sync sample.
A pointer to a time value that represents
the sample decode time. After adding the sample data to the media,
the function returns in this parameter the time where the sample
was inserted. If you don’t want to receive this information, set
this parameter to NIL
.
An error code. Returns noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
Your application specifies the sample and the media for the
operation. This function updates the media so that it contains the
sample data. One call to this function can add several samples to
a media. This function replaces AddMediaSample
;
it adds 64-bit support and support for frame reordering video compression
(display offset). This function can return these errors:
noErr
Success.
memFullErr
Could not allocate memory.
paramErr
Invalid parameter.
errMediaDoesNotSupportDisplayOffsets
The media does not support nonzero display offsets.
errDisplayTimeAlreadyInUse
There is already a sample with this display time.
errDisplayTimeTooEarly
A sample’s display time would be earlier than the
display time of an existing sample that does not have the mediaSampleEarlierDisplayTimesAllowed
flag
set.
Introduced in QuickTime 7. This function extends and supersedes AddMediaSample
. Whereas AddMediaSample
takes
a Handle
+offset
+size
, AddMediaSample2
takes
a Ptr
+size
.
Movies.h
Movies.h
Adds sample data and description from an encoded frame to a media.
OSErr AddMediaSampleFromEncodedFrame ( Media theMedia, ICMEncodedFrameRef encodedFrame, TimeValue64 *sampleDecodeTimeOut );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
An encoded frame token returned by an ICMCompressionSequence.
A pointer to a time value. After adding the
sample data to the media, the function returns the decode time where
the first sample was inserted in the time value referred to by this
parameter. If you don’t want to receive this information, set
this parameter to NULL
.
An error code. Returns noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
This is a convenience API to make it easy to add frames emitted by new ICM compression functions to media. It can return these errors:
noErr
Success.
memFullErr
Could not allocate memory.
paramErr
Invalid parameter.
errMediaDoesNotSupportDisplayOffsets
The media does not support nonzero display offsets.
errDisplayTimeAlreadyInUse
There is already a sample with this display time.
errDisplayTimeTooEarly
A sample’s display time would be earlier than the
display time of an existing sample that does not have the mediaSampleEarlierDisplayTimesAllowed
flag
set.
Introduced in QuickTime 7
Movies.h
Movies.h
Adds a sample table to a media.
OSErr AddSampleTableToMedia ( Media theMedia, QTSampleTableRef sampleTable, SInt64 startSampleNum, SInt64 numberOfSamples, TimeValue64 *sampleDecodeTimeOut );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A reference to an opaque sample table object containing sample references to be added to the media.
The sample number of the first sample reference in the sample table to be added to the media. The first sample’s number is 1.
The number of sample references from the sample table to be added to the media.
A pointer to a time value. After adding the
sample references to the media, the function returns the decode
time where the first sample was inserted in the time value referred
to by this parameter. If you don’t want to receive this information,
set this parameter to NULL
.
An error code. Returns noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
This function can return these errors:
noErr
Success.
memFullErr
Could not allocate memory.
paramErr
Invalid parameter.
errMediaDoesNotSupportDisplayOffsets
The media does not support nonzero display offsets.
errDisplayTimeAlreadyInUse
There is already a sample with this display time.
errDisplayTimeTooEarly
A sample’s display time would be earlier than the
display time of an existing sample that does not have the mediaSampleEarlierDisplayTimesAllowed
flag
set.
If errDisplayTimeAlreadyInUse
or errDisplayTimeTooEarly
is
returned, no samples are added.
Introduced in QuickTime 7.
Movies.h
Movies.h
Obtains information about sample references in a media in the form of a sample table.
OSErr CopyMediaMutableSampleTable ( Media theMedia, TimeValue64 startDecodeTime, TimeValue64 *sampleStartDecodeTime, SInt64 maxNumberOfSamples, TimeValue64 maxDecodeDuration, QTMutableSampleTableRef *sampleTableOut );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the starting decode time of the sample references to be retrieved. You must specify this value in the media’s time scale.
A pointer to a time value. The function updates
this time value to indicate the actual decode time of the first
returned sample reference. If you are not interested in this information,
set this parameter to NULL
.
The returned time may differ from the time you specified with the startDecodeTime parameter.
This will occur if the time you specified falls in the middle of
a sample.
A 64-bit signed integer that contains the maximum number of sample references to be returned. If you set this parameter to 0, the Movie Toolbox uses a value that is appropriate to the media.
A 64-bit time value that represents the maximum decode duration to be returned. The function does not return samples with greater decode duration than you specify with this parameter. If you set this parameter to 0, the Movie Toolbox uses a value that is appropriate for the media.
A reference to an opaque sample table object.
When you are done with the returned sample table, release it with QTSampleTableRelease
.
An error code. Returns memFullErr
if
it could not allocate memory, paramErr
if
there was an invalid parameter, or noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
To find out how many samples were returned in the sample table,
call QTSampleTableGetNumberOfSamples
.
Introduced in QuickTime 7. This function supersedes GetMediaSampleReferences
and GetMediaSampleReferences64
.
Movies.h
Movies.h
Disposes of a MovieExportStageReachedCallbackUPP
pointer.
void DisposeMovieExportStageReachedCallbackUPP ( MovieExportStageReachedCallbackUPP userUPP );
A MovieExportStageReachedCallbackUPP
pointer.
Introduced in QuickTime 7.
QuickTimeComponents.h
QuickTimeComponents.h
Disposes a track property listener UPP.
void DisposeQTTrackPropertyListenerUPP ( QTTrackPropertyListenerUPP userUPP );
A QTTrackPropertyListenerUPP pointer. See
Universal Procedure Pointers in the QuickTime API Reference
for more information.
Introduced in QuickTime 7
Movies.h
Movies.h
Prepares a media for the addition of a completely new sequence of samples by ensuring that the media display end time is not later than the media decode end time.
OSErr ExtendMediaDecodeDurationToDisplayEndTime ( Media theMedia, Boolean *mediaChanged );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A pointer to a Boolean
that
returns TRUE
if any samples
in the media were adjusted, FALSE
otherwise.
If you don’t want to receive this information, set this parameter
to NULL
.
An error code. Returns memFullErr
if
it could not allocate memory, paramErr
if
there was an invalid parameter, or noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
After adding a complete, well-formed set of samples to a media, the media’s display end time should be the same as the media’s decode end time (also called the media decode duration). However, this is not necessarily the case after individual sample-adding operations, and hence it is possible for a media to be left with a display end time later than its decode end time (if adding a sequence of frames is aborted halfway, for example).
This may make it difficult to add a new group of samples, because a well-formed group of samples’ earliest display time should be the same as the first frame’s decode time. If such a well-formed group is added to an incompletely finished media, frames from the old and new groups frames might collide in display time.
This function prevents any such collision or overlap by extending the last sample’s decode duration as necessary. It ensures that the next added sample will have a decode time no earlier than the media’s display end time. If this was already the case, it makes no change to the media.
You can call this function before you begin adding samples to a media if you’re not certain that the media was left in a well-finished state. You do not need to call it before adding samples to a newly created media, nor should you call it between sample additions from the same compression session.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the display direction for a decompress sequence.
OSErr GetDSequenceNonScheduledDisplayDirection ( ImageSequence sequence, Fixed *rate );
Contains the unique sequence identifier that
was returned by the DecompressSequenceBegin
function.
A pointer to the display direction. Negative values represent backward display and positive values represent forward display.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Gets the display time for a decompression sequence.
OSErr GetDSequenceNonScheduledDisplayTime ( ImageSequence sequence, TimeValue64 *displayTime, TimeScale *displayTimeScale );
Contains the unique sequence identifier that
was returned by the DecompressSequenceBegin
function.
A pointer to a variable to hold the display time.
A pointer to a variable to hold the display time scale.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the advance decode time of a media.
TimeValue64 GetMediaAdvanceDecodeTime ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the media’s advance decode time. A media’s advance decode time is the absolute value of the greatest-magnitude negative display offset of its samples, or 0 if there are no samples with negative display offsets. This is the amount that the decode time axis must be adjusted ahead of the display time axis to ensure that no sample’s adjusted decode time is later than its display time. For media without nonzero display offsets, the advance decode time is 0.
Introduced in QuickTime 7.
Movies.h
Movies.h
Determines the size, in bytes, of the sample data in a media segment.
OSErr GetMediaDataSizeTime64 ( Media theMedia, TimeValue64 startDisplayTime, TimeValue64 displayDuration, SInt64 *dataSize );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that specifies the starting point of the segment in media display time.
A 64-bit time value that specifies the duration of the segment in media display time.
A pointer to a variable to receive the size, in bytes, of the sample data in the defined media segment.
An error code. Returns noErr
if
there is no error. You can access Movie Toolbox error returns through GetMoviesError
and GetMoviesStickyError
,
as well as in the function result.
The only difference between this function and GetMediaDataSize64
is
that this function uses 64-bit time values and returns a 64-bit
size.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the decode duration of a media.
TimeValue64 GetMediaDecodeDuration ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that repre sents the media’s decode duration. A media’s decode duration is the sum of the decode durations of its samples.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the display duration of a media.
TimeValue64 GetMediaDisplayDuration ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the media’s display duration. A media’s display duration is its display end time minus its display start time. For media without nonzero display offsets, the decode duration and display duration are the same.
When inserting media with display offsets into a track, use display time:
InsertMediaIntoTrack( track, |
0, // track start time |
GetMediaDisplayStartTime( media ), // media start time |
GetMediaDisplayDuration( media ), |
fixed1 ); |
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the display end time of a media.
TimeValue64 GetMediaDisplayEndTime ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the media’s display end time. A media’s display end time is the sum of the display time and decode duration of the sample with the greatest display time. For media without nonzero display offsets, the display end time is the same as the media’s decode duration.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the display start time of a media.
TimeValue64 GetMediaDisplayStartTime ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the media’s display start time. A media’s display start time is the earliest display time of any of its samples. For media without nonzero display offsets, the display start time is always 0.
Introduced in QuickTime 7.
Movies.h
Movies.h
Searches for decode times of interest in a media.
void GetMediaNextInterestingDecodeTime ( Media theMedia, short interestingTimeFlags, TimeValue64 decodeTime, Fixed rate, TimeValue64 *interestingDecodeTime, TimeValue64 *interestingDecodeDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
Flags that determine the search criteria.
Note that you may set only one of the nextTimeMediaSample
, nextTimeMediaEdit
,
or nextTimeSyncSample
flags to 1.
Set unused flags to 0:
nextTimeMediaSample
Set this flag to 1 to search for the next sample.
nextTimeMediaEdit
Set this flag to 1 to search for the next group of samples.
nextTimeSyncSample
Set this flag to 1 to search for the next sync sample.
nextTimeEdgeOK
Set this flag to 1 to accept information about elements that begin or end at the time specified by the decodeTime parameter. When this flag is set the function returns valid information about the beginning and end of a media.
Specifies the starting point for the search in decode time. This time value must be expressed in the media’s time scale.
The search direction. Negative values cause the Movie Toolbox to search backward from the starting point specified in the time parameter. Other values cause a forward search.
On return, a pointer to a 64-bit time value
in decode time. The Movie Toolbox returns the first time value it
finds that meets the search criteria specified in the flags parameter.
This time value is in the media’s time scale. If there are no
times that meet the search criteria you specify, the Movie Toolbox
sets this value to –1. Set this parameter to NULL
if
you are not interested in this information.
On return, a pointer to a 64-bit time value
in decode time. The Movie Toolbox returns the duration of the interesting
time in the media’s time coordinate system. Set this parameter
to NULL
if you don’t
want this information; this lets the function works faster.
Introduced in QuickTime 7.
Movies.h
Movies.h
Searches for display times of interest in a media.
void GetMediaNextInterestingDisplayTime ( Media theMedia, short interestingTimeFlags, TimeValue64 displayTime, Fixed rate, TimeValue64 *interestingDisplayTime, TimeValue64 *interestingDisplayDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
Flags that determine the search criteria.
Note that you may set only one of the nextTimeMediaSample
, nextTimeMediaEdit
,
or nextTimeSyncSample
flags to 1.
Set unused flags to 0:
nextTimeMediaSample
Set this flag to 1 to search for the next sample.
nextTimeMediaEdit
Set this flag to 1 to search for the next group of samples.
nextTimeSyncSample
Set this flag to 1 to search for the next sync sample.
nextTimeEdgeOK
Set this flag to 1 to accept information about elements that begin or end at the time specified by the decodeTime parameter. When this flag is set the function returns valid information about the beginning and end of a media.
Specifies the starting point for the search in display time. This time value must be expressed in the media’s time scale.
The search direction. Negative values cause the Movie Toolbox to search backward from the starting point specified in the time parameter. Other values cause a forward search.
On return, a pointer to a 64-bit time value
in display time. The Movie Toolbox returns the first time value
it finds that meets the search criteria specified in the flags parameter.
This time value is in the media’s time scale. If there are no
times that meet the search criteria you specify, the Movie Toolbox
sets this value to –1. Set this parameter to NIL
if
you are not interested in this information.
On return, a pointer to a 64-bit time value
in display time. The Movie Toolbox returns the duration of the interesting
time in the media’s time coordinate system. Set this parameter
to NIL
if you don’t
want this information; this lets the function works faster.
Introduced in QuickTime 7.
Movies.h
Movies.h
Retrieves sample data from a media file.
OSErr GetMediaSample2 ( Media theMedia, UInt8 *dataOut, ByteCount maxDataSize, ByteCount *size, TimeValue64 decodeTime, TimeValue64 *sampleDecodeTime, TimeValue64 *decodeDurationPerSample, TimeValue64 *displayOffset, SampleDescriptionHandle sampleDescriptionH, ItemCount *sampleDescriptionIndex, ItemCount maxNumberOfSamples, ItemCount *numberOfSamples, MediaSampleFlags *sampleFlags );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A pointer to a buffer to receive sample data.
The buffer must be large enough to contain at least maxDataSize bytes.
If you do not want to receive sample data, pass NULL
.
The maximum number of bytes allocated to hold the sample data.
A pointer to memory where the function returns
the number of bytes of sample data returned in the memory area specified
by dataOut. Set this parameter to NULL
if
you are not interested in this information.
The starting time of the sample to be retrieved in decode time. You must specify this value in the media’s time scale.
A pointer to a time value in decode time.
The function updates this time value to indicate the actual time
of the returned sample data. (The returned time may differ from
the time you specified with the time parameter.
This will occur if the time you specified falls in the middle of
a sample.) If you are not interested in this information, set this
parameter to NULL
.
A pointer to a time value in decode time.
The Movie Toolbox returns the duration of each sample in the media.
Set this parameter to NULL
if
you don’t want this information.
A pointer to a time value. The function updates
this time value to indicate the display offset of the returned sample.
This time value is expressed in the media’s time scale. Set this
parameter to NULL
if
you don’t want this information.
A handle to a SampleDescription
structure.
The function returns the sample description corresponding to the
returned sample data. The function resizes this handle as appropriate.
If you don’t want a SampleDescription
structure,
set this parameter to NIL
.
A pointer to a long integer. The function
returns an index value to the SampleDescription
structure
that corresponds to the returned sample data. You can retrieve the
structure by calling GetMediaSampleDescription
and passing
this index in the descH parameter.
If you don’t want this information, set this parameter to NIL
.
The maximum number of samples to be returned. The Movie Toolbox does not return more samples than you specify with this parameter. If you set this parameter to 0, the Movie Toolbox uses a value that is appropriate for the media, and returns that value in the field referenced by the numberOfSamples parameter.
A pointer to a long integer. The function
updates the field referred to by this parameter with the number
of samples it actually returns. If you don’t want this information,
set this parameter to NULL
.
A pointer to a short integer in which the
function returns flags that describe the sample. Unused flags are
set to 0. If you don’t want this information, set this parameter
to NULL
:
mediaSampleNotSync
This flag is set to 1 if the sample is not a sync sample and to 0 if the sample is a sync sample.
You can access this
function's error returns through GetMoviesError
and GetMoviesStickyError
.
It returns paramErr
if there is a bad
parameter value, maxSizeToGrowTooSmall
if
the sample data is larger than maxDataSize,
or noErr
if there is no error.
Whereas GetMediaSample
takes
a resizable Handle and a maxSizeToGrow parameter, GetMediaSample2
takes
a pointer and a maxDataSize parameter.
If you want to read a sample into a Handle, you can use the following
code:
OSErr GetMediaSampleUsingHandle (Media theMedia, Handle dataHOut, |
ByteCount maxSizeToGrow, ByteCount *size, |
TimeValue64 decodeTime, TimeValue64 *sampleDecodeTime, |
TimeValue64 *decodeDurationPerSample, |
TimeValue64 *displayOffset, |
SampleDescriptionHandle sampleDescriptionH, |
ItemCount *sampleDescriptionIndex, |
ItemCount maxNumberOfSamples, |
ItemCount *numberOfSamples, |
MediaSampleFlags *sampleFlags) |
{ |
OSErr err = noErr; |
ByteCount actualSize = 0; |
err = GetMediaSample2(theMedia, |
*dataHOut, |
GetHandleSize(dataHOut), |
&actualSize, |
decodeTime, |
sampleDecodeTime, |
decodeDurationPerSample, |
displayOffset, |
sampleDescriptionH, |
sampleDescriptionIndex, |
maxNumberOfSamples, |
numberOfSamples, |
sampleFlags); |
if ((maxSizeToGrowTooSmall == err) |
&& ((0 == maxSizeToGrow) || (actualSize <= maxSizeToGrow)) { |
SetHandleSize(dataHOut, actualSize); |
err = MemError(); |
if (err) goto bail; |
err = GetMediaSample2(theMedia, |
*dataHOut, |
GetHandleSize(dataHOut), |
&actualSize, |
decodeTime, |
sampleDecodeTime, |
decodeDurationPerSample, |
displayOffset, |
sampleDescriptionH, |
sampleDescriptionIndex, |
maxNumberOfSamples, |
numberOfSamples, |
sampleFlags); |
} |
if( size ) |
*size = actualSize; |
bail: |
return err; |
} |
Introduced in QuickTime 7. This function extends and supersedes GetMediaSample
.
It will only return multiple samples that all have the same decode
duration per sample, the same display offset, the same sample description,
and the same size per sample.
Movies.h
Movies.h
Returns the balance value for the audio mix of a movie currently playing.
OSStatus GetMovieAudioBalance ( Movie m, Float32 *leftRight, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
On return, a pointer to the current balance setting for the movie. The balance setting is a 32-bit floating-point value that controls the relative volume of the left and right sound channels. A value of 0 sets the balance to neutral. Positive values up to 1.0 shift the balance to the right channel, negative values up to –1.0 to the left channel.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie’s balance setting is not stored in the movie;
it is used only until the movie is closed. See SetMovieAudioBalance
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the current audio context for a movie.
OSStatus GetMovieAudioContext ( Movie movie, QTAudioContextRef *audioContext);
The movie.
A pointer to a variable to receive the audio context.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the current frequency meter levels of a movie mix.
OSStatus GetMovieAudioFrequencyLevels ( Movie m, FourCharCode whatMixToMeter, QTAudioFrequencyLevels *pAveragePowerLevels );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
A pointer to a QTAudioFrequencyLevels
structure (page 310)
.
An error code. Returns noErr
if
there is no error.
In the structure pointed to by pAveragePowerLevels, the numChannels field must be set to the number of channels in the movie mix being metered and the numBands field must be set to the number of bands being metered (as previously configured). Enough memory for the structure must be allocated to hold 32-bit values for all bands in all channels. This function returns the current frequency meter levels in the level field of the structure, with all the band levels for the first channel first, all the band levels for the second channel next and so on.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the chosen middle frequency for each band in the configured frequency metering of a particular movie mix.
OSStatus GetMovieAudioFrequencyMeteringBandFrequencies ( Movie m, FourCharCode whatMixToMeter, UInt32 numBands, Float32 *outBandFrequencies );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
The number of bands to examine.
A pointer to an array of frequencies, each expressed in Hz.
An error code. Returns noErr
if
there is no error.
You can use this function to label a visual meter in a user interface.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the number of frequency bands being metered for a movie’s specified audio mix.
OSStatus GetMovieAudioFrequencyMeteringNumBands ( Movie m, FourCharCode whatMixToMeter, UInt32 *outNumBands );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
A pointer to memory that stores the number of frequency bands currently being metered for the movie’s specified audio mix.
An error code. Returns noErr
if
there is no error.
See SetMovieAudioFrequencyMeteringNumBands
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the gain value for the audio mix of a movie currently playing.
OSStatus GetMovieAudioGain ( Movie m, Float32 *gain, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
A 32-bit floating-point gain value of 0 or greater. 0.0 is silent, 0.5 is –6 dB, 1.0 is 0 dB (the audio from the movie is not modified), 2.0 is +6 dB, etc. The gain level can be set higher than 1.0 to allow quiet movies to be boosted in volume. Gain settings higher than 1.0 may result in audio clipping.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie gain setting is not stored in the movie; it is used
only until the movie is closed. See SetMovieAudioGain
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the mute value for the audio mix of a movie currently playing.
OSStatus GetMovieAudioMute ( Movie m, Boolean *muted, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
Returns TRUE
if
the movie audio is currently muted, FALSE
otherwise.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie mute setting is not stored in the movie; it is used
only until the movie is closed. See SetMovieAudioMute
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the current volume meter levels of a movie.
OSStatus GetMovieAudioVolumeLevels ( Movie m, FourCharCode whatMixToMeter, QTAudioVolumeLevels *pAveragePowerLevels, QTAudioVolumeLevels *pPeakHoldLevels );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
A pointer to a QTAudioVolumeLevels
structure
that stores the average power level of each channel in the mix,
measured in decibels. 0.0 dB for each channel means full volume,
–6.0 dB means half volume, –12.0 dB means quarter volume, and
–infinite dB means silence. Pass NULL
for
this parameter if you are not interested in average power levels.
A pointer to a QTAudioVolumeLevels
structure
that stores the peak hold level of each channel in the mix, measured
in decibels. 0.0 dB for each channel means full volume, –6.0 dB
means half volume, –12.0 dB means quarter volume, and –infinite
dB means silence. Pass NULL
for
this parameter if you are not interested in peak hold levels.
An error code. Returns noErr
if
there is no error.
If either pAveragePowerLevels or pPeakHoldLevels returns
non-NULL
, it must have
the numChannels field in its QTAudioVolumeLevels
structure
set to the number of channels in the movie mix being metered and
the memory allocated for the structure must be large enough to hold
levels for all those channels.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the enabled or disabled status of volume metering of a particular audio mix of a movie.
OSStatus GetMovieAudioVolumeMeteringEnabled ( Movie m, FourCharCode whatMixToMeter, Boolean *enabled );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
Returns TRUE
if
audio volume metering is enabled, FALSE
if
it is disabled.
An error code. Returns noErr
if
there is no error.
See SetMovieAudioVolumeMeteringEnabled
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the path of the QuickTime Applications directory.
UINT GetQTApplicationDirectory ( LPSTR lpBuffer, UINT uSize );
A pointer to the buffer to receive the null-terminated string containing the path to the QuickTime Applications directory. This path does not end with a backslash unless the system directory is the root directory.
The maximum size of the buffer, in TCHARs. This value should be set to at least MAX_PATH+1 to allow sufficient space for the path and the null terminator.
If the function succeeds,
the return value is the length, in TCHARs, of the string copied
to the buffer, not including the terminating null character. If the
length is greater than the size of the buffer, the return value
is the size of the buffer required to hold the path. If the function
fails, the return value is zero. To get extended error information,
call GetLastError
.
The QuickTime Applications directory contains the QuickTime
applications files, such as QuickTime Player and others. Note that
this call looks up the value of HKEY_LOCAL_MACHINE\SOFTWARE\Apple
Computer, Inc.\QuickTime\InstallDir
, which
is the root QuickTime folder that the user chose to install into.
Introduced in QuickTime 7 for Windows.
QTLoadLibraryUtils.h
Returns the path of the QuickTime Components directory.
UINT GetQTComponentDirectory ( LPSTR lpBuffer, UINT uSize );
A pointer to the buffer to receive the null-terminated string containing the path to the QuickTime Components directory. This path does not end with a backslash unless the system directory is the root directory.
The maximum size of the buffer, in TCHARs. This value should be set to at least MAX_PATH+1 to allow sufficient space for the path and the null terminator.
If the function succeeds,
the return value is the length, in TCHARs, of the string copied
to the buffer, not including the terminating null character. If the
length is greater than the size of the buffer, the return value
is the size of the buffer required to hold the path. If the function
fails, the return value is zero. To get extended error information,
call GetLastError
.
The QuickTime Components directory contains any third-party
or user-installed component files. Note that this call looks up
the value of HKEY_LOCAL_MACHINE\SOFTWARE\Apple
Computer, Inc.\QuickTime\QTComponentsDir
,
which is where you should put your components
Introduced in QuickTime 7 for Windows.
QTLoadLibraryUtils.h
Returns the path of the QuickTime Extensions directory.
UINT GetQTExtensionDirectory ( LPSTR lpBuffer, UINT uSize );
A pointer to the buffer to receive the null-terminated string containing the path to the QuickTime Extensions directory. This path does not end with a backslash unless the system directory is the root directory.
The maximum size of the buffer, in TCHARs. This value should be set to at least MAX_PATH+1 to allow sufficient space for the path and the null terminator.
If the function succeeds,
the return value is the length, in TCHARs, of the string copied
to the buffer, not including the terminating null character. If the
length is greater than the size of the buffer, the return value
is the size of the buffer required to hold the path. If the function
fails, the return value is zero. To get extended error information,
call GetLastError
.
The QuickTime Extensions directory contains the QuickTime
extensions files, whose names ends with .qtx
and .qtr
.
(A .qtx
file contains
the data fork of an extension––a Windows DLL, while a .qtr
file
contains the resource fork of an extension for Macintosh-style resources).
Note that this call looks up the value of HKEY_LOCAL_MACHINE\SOFTWARE\Apple
Computer, Inc.\QuickTime\QTExtDir
, which points to
the folder where the extensions are installed.
Introduced in QuickTime 7 for Windows.
QTLoadLibraryUtils.h
Returns the path of the QuickTime System directory.
UINT GetQTSystemDirectory ( LPSTR lpBuffer, UINT uSize );
A pointer to the buffer to receive the null-terminated string containing the path to the QuickTime System directory. This path does not end with a backslash unless the system directory is the root directory.
The maximum size of the buffer, in TCHARs. This value should be set to at least MAX_PATH+1 to allow sufficient space for the path and the null terminator.
If the function succeeds,
the return value is the length, in TCHARs, of the string copied
to the buffer, not including the terminating null character. If the
length is greater than the size of the buffer, the return value
is the size of the buffer required to hold the path. If the function
fails, the return value is zero. To get extended error information,
call GetLastError
.
The QuickTime System directory contains all the necessary
QuickTime system files such as extensions––that is, codecs,
file importers, and so on––dynamic link libraries, resources, and
others. Note that this call looks up the value of HKEY_LOCAL_MACHINE\SOFTWARE\Apple Computer,
Inc.\QuickTime\QTSysDir
, which points to the
folder where the system components are installed.
Introduced in QuickTime 7 for Windows.
QTLoadLibraryUtils.h
Returns the gain value for the audio mix of a track currently playing.
OSStatus GetTrackAudioGain ( Track t, Float32 *gain, UInt32 flags );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
A 32-bit floating-point gain value of 0 or greater. 0.0 is silent, 0.5 is –6 dB, 1.0 is 0 dB (the audio from the track is not modified), 2.0 is +6 dB, etc. The gain level can be set higher than 1.0 to allow quiet tracks to be boosted in volume. Gain settings higher than 1.0 may result in audio clipping.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The track gain setting is not stored in the movie; it is used
only until the movie is closed. See SetTrackAudioGain
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the mute value for the audio mix of a track currently playing.
OSStatus GetTrackAudioMute ( Track t, Boolean *muted, UInt32 flags );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
Returns TRUE
if
the track’s audio is currently muted, FALSE
otherwise.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The track’s mute setting is not stored in the movie; it
is used only until the movie is closed. See SetTrackAudioMute
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the rate of the track edit of a specified track at an indicated time.
Fixed GetTrackEditRate64 ( Track theTrack, TimeValue64 atTime );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
A 64-bit time value that indicates the time at which the rate of a track edit (of a track identified in the parameter theTrack) is to be determined.
The rate of the track edit of the specified track at the specified time.
This function is useful if you are stepping through track edits directly in your application or if you are a client of QuickTime’s base media handler.
Introduced in QuickTime 7. This function is a 64-bit replacement
for GetTrackEditRate
.
Movies.h
Movies.h
Creates a frame compression options object.
OSStatus ICMCompressionFrameOptionsCreate ( CFAllocatorRef allocator, ICMCompressionSessionRef session, ICMCompressionFrameOptionsRef *options );
An allocator. Pass NULL
to
use the default allocator.
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
On return, a reference to a new frame compression options object.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Copies a frame compression options object.
OSStatus ICMCompressionFrameOptionsCreateCopy ( CFAllocatorRef allocator, ICMCompressionFrameOptionsRef originalOptions, ICMCompressionFrameOptionsRef *copiedOptions );
An allocator. Pass NULL
to
use the default allocator.
A frame compression options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
On return, a reference to a copy of the frame compression options object passed in originalOptions.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the force key frame flag.
Boolean ICMCompressionFrameOptionsGetForceKeyFrame ( ICMCompressionFrameOptionsRef options );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
Returns TRUE
if
frames are forced to be compressed as key frames, FALSE
otherwise.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the frame
type
setting.
ICMFrameType ICMCompressionFrameOptionsGetFrameType ( ICMCompressionFrameOptionsRef options );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
On return, one of
the frame
types listed below.
This function can return one of these constants:
kICMFrameType_I
= 'I'
An I frame.
kICMFrameType_P
= 'P'
A P frame.
kICMFrameType_B
= 'B'
A B frame.
kICMFrameType_Unknown
= 0
A frame of unknown type.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a compression frame options object.
OSStatus ICMCompressionFrameOptionsGetProperty ( ICMCompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to a variable to receive the returned property’s value.
On return, a pointer to the number of bytes actually used to store the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about properties of a compression frame options object.
OSStatus ICMCompressionFrameOptionsGetPropertyInfo ( ICMCompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current frame compression options object.
CFTypeID ICMCompressionFrameOptionsGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a frame compression options object.
void ICMCompressionFrameOptionsRelease ( ICMCompressionFrameOptionsRef options );
A reference to a frame compression options
object.This reference is returned by ICMCompressionFrameOptionsCreate
. If
you pass NULL
, nothing
happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a frame compression options object.
ICMCompressionFrameOptionsRef ICMCompressionFrameOptionsRetain ( ICMCompressionFrameOptionsRef options );
A reference to a frame compression options
object.This reference is returned by ICMCompressionFrameOptionsCreate
. If
you pass NULL
, nothing
happens.
A copy of the object reference passed in options, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Forces frames to be compressed as key frames.
OSStatus ICMCompressionFrameOptionsSetForceKeyFrame ( ICMCompressionFrameOptionsRef options, Boolean forceKeyFrame );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
Pass TRUE
to
force frames to be compressed as key frames, FALSE
otherwise.
An error code. Returns noErr
if
there is no error.
The compressor must obey this flag if set. By default it is
set FALSE
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Requests a frame be compressed as a particular frame type.
OSStatus ICMCompressionFrameOptionsSetFrameType ( ICMCompressionFrameOptionsRef options, ICMFrameType frameType );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
A constant that identifies a frame type. Pass one of the following but do not assume that there are no other frame types:
kICMFrameType_I
= 'I'
An I frame.
kICMFrameType_P
= 'P'
A P frame.
kICMFrameType_B
= 'B'
A B frame.
kICMFrameType_Unknown
= 0
A frame of unknown type.
An error code. Returns noErr
if
there is no error.
The frame type setting may be ignored by the compressor if
it is not appropriate. By default it is set to kICMFrameType_Unknown
.
Do not assume that kICMFrameType_I
sets
a key frame; if you need a key frame, call ICMCompressionFrameOptionsSetForceKeyFrame
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a compression frame options object.
OSStatus ICMCompressionFrameOptionsSetProperty ( ICMCompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A compression frame options reference. This
reference is returned by ICMCompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be set.
A pointer to the value of the property to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Announces the start of a specific compression pass.
OSStatus ICMCompressionSessionBeginPass ( ICMCompressionSessionRef session, ICMCompressionPassModeFlags passModeFlags, UInt32 flags );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Flags that describe how the compressor should behave in this pass of multipass encoding:
kICMCompressionPassMode_OutputEncodedFrames
= 1L<<0
Output encoded frames.
kICMCompressionPassMode_NoSourceFrames
= 1L<<1
The client need not provide source frame buffers.
kICMCompressionPassMode_WriteToMultiPassStorage
= 1L<<2
The compressor may write private data to multipass storage.
kICMCompressionPassMode_ReadFromMultiPassStorage
= 1L<<3
The compressor may read private data from multipass storage.
Reserved. Set to 0.
An error code. Returns noErr
if
there is no error.
The source frames and frame options for each display time
should be the same across passes. During multipass compression,
valid displayTimeStamp values must
be passed to ICMCompressionSessionEncodeFrame
,
because they are used to index the compressor’s stored state.
During an analysis pass (kICMCompressionPassMode_WriteToMultiPassStorage
),
the compressor does not output encoded frames but records compressor-private
information for each frame. During repeated analysis passes and
the encoding pass (kICMCompressionPassMode_ReadFromMultiPassStorage
),
the compressor may refer to this information for other frames and
use it to improve encoding. During an encoding pass (kICMCompressionPassMode_OutputEncodedFrames
),
the compressor must output encoded frames. If the compressor sets
the kICMCompressionPassMode_NoSourceFrames
flag
for the pass, the client may pass NULL
pixel
buffers to ICMCompressionSessionEncodeFrame
.
By default, the ICM provides local storage that lasts only until the compression session is disposed. If the client provides custom multipass storage, passes may be performed at different times or on different machines; segments of each pass may even be distributed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Forces a compression session to complete encoding frames.
OSStatus ICMCompressionSessionCompleteFrames ( ICMCompressionSessionRef session, Boolean completeAllFrames, TimeValue64 completeUntilDisplayTimeStamp, TimeValue64 nextDisplayTimeStamp );
A reference to a video compression session,
returned by a previous call to ICMCompressionSessionCreate
.
Pass TRUE
to
direct the session to complete all pending frames.
A 64-bit time value that represents the display
time up to which to complete frames. This value is ignored if completeAllFrames is TRUE
.
A 64-bit time value that represents the display
time of the next frame that should be passed to EncodeFrame
.
This value is ignored unless ICMCompressionSessionOptionsSetDurationsNeeded
set TRUE
and kICMValidTime_DisplayDurationIsValid
was
0 in validTimeFlags in the last call
to ICMCompressionSessionEncodeFrame
.
Returns an error code, or 0 if there is no error. The function may return before frames are completed if the encoded frame callback routine returns an error.
Call this function to force a compression session to complete
encoding frames. Set completeAllFrames to
direct the session to complete all pending frames. If completeAllFrames is
false, only frames with display time stamps up to and including
the time passed in completeUntilDisplayTimeStamp will
be encoded. If ICMCompressionSessionOptionsSetDurationsNeeded
set TRUE
and
you are passing valid display timestamps but not display durations
to ICMCompressionSessionEncodeFrame
, pass
in nextDisplayTimeStamp the display
timestamp of the next frame that would be passed to EncodeFrame
.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Creates a compression session for a specified codec type.
OSStatus ICMCompressionSessionCreate ( CFAllocatorRef allocator, int width, int height, CodecType cType, TimeScale timescale, ICMCompressionSessionOptionsRef compressionOptions, CFDictionaryRef sourcePixelBufferAttributes, ICMEncodedFrameOutputRecord *encodedFrameOutputRecord, ICMCompressionSessionRef *compressionSessionOut );
An allocator for the session. Pass NULL
to
use the default allocator.
The width of frames. Pass 0 to let the compressor control the width.
The height of frames. Pass 0 to let the compressor control the height.
The codec type.
The timescale to be used for all time stamps and durations used in the session.
A reference to a settings object that configures
the session. You create such an object by calling ICMCompressionSessionOptionsCreate
.
You can then use these constants to set its properties:
kICMUnlimitedFrameDelayCount
No limit on the number of frames in the compression window.
kICMUnlimitedFrameDelayTime
No time limit on the frames in the compression window.
kICMUnlimitedCPUTimeBudget
No CPU time limit on compression.
Required attributes for source pixel buffers,
used when creating a pixel buffer pool for source frames. If you
do not want the ICM to create one for you, pass NULL
.
Using pixel buffers not allocated by the ICM may increase the chance
that it will be necessary to copy image data.
The callback that will receive encoded frames.
Points to a variable to receive the created session object.
An error code. Returns noErr
if
there is no error.
Some compressors do not support arbitrary source dimensions, and may override the suggested width and height.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Presents video frames to a compression session.
OSStatus ICMCompressionSessionEncodeFrame ( ICMCompressionSessionRef session, CVPixelBufferRef pixelBuffer, TimeValue64 displayTimeStamp, TimeValue64 displayDuration, ICMValidTimeFlags validTimeFlags, ICMCompressionFrameOptionsRef frameOptions, ICMSourceTrackingCallbackRecord *sourceTrackingCallback, void *sourceFrameRefCon );
A reference to a video compression session,
returned by a previous call to ICMCompressionSessionCreate
.
A reference to a buffer containing a source
image to be compressed, which must have a nonzero reference count.
The session will retain it as long as necessary. The client should
not modify the pixel buffer’s pixels until the pixel buffer release
callback is called. In a multipass encoding session pass, where
the compressor suggested the flag kICMCompressionPassMode_NoSourceFrames
,
you may pass NULL
in
this parameter.
A 64-bit time value that represents the display
time of the frame, using the time scale passed to ICMCompressionSessionCreate
.
If you pass a valid value, set the kICMValidTime_DisplayTimeStampIsValid
flag
in the validTimeFlags parameter (below).
A 64-bit time value that represents the display
duration of the frame, using the time scale passed to ICMCompressionSessionCreate
.
If you pass a valid value, set the kICMValidTime_DisplayDurationIsValid
flag
in the validTimeFlags parameter (below).
Flags to indicate which of the values passed in displayTimeStamp and displayDuration are valid:
kICMValidTime_DisplayTimeStampIsValid
The time value passed in displayTimeStamp is valid.
kICMValidTime_DisplayDurationIsValid
The time value passed in displayDuration is valid.
Options for this frame. Currently not used;
pass NULL
.
A pointer to a callback to be notified about
the status of this source frame. Pass NULL
if
you do not require notification.
A reference constant to be passed to your callback. Use this parameter to point to a data structure containing any information your callback needs.
Returns an error code, or 0 if there is no error. Encoded frames may or may not be output before the function returns.
The session will retain the pixel buffer as long as necessary,
and the client should not modify the pixel data until the session
releases it. The most practical way to deal with this is by allocating
pixel buffers from a pool. The client may fill in both, either,
or neither of displayTimeStamp and displayDuration,
but should set the appropriate flags to indicate which are valid.
If the client needs to track the progress of a source frame, it
should provide a source tracking callback. If multipass compression
is enabled, calls to this function must be bracketed by calls to ICMCompressionSessionBeginPass
and ICMCompressionSessionEndPass
.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Announces the end of a pass.
OSStatus ICMCompressionSessionEndPass ( ICMCompressionSessionRef session );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the image description for a video compression session.
OSStatus ICMCompressionSessionGetImageDescription ( ICMCompressionSessionRef session, ImageDescriptionHandle *imageDescOut );
A reference to a video compression session,
returned by a previous call to ICMCompressionSessionCreate
.
A handle to an ImageDescription
structure.
The caller must not dispose of this handle;
the ICM will dispose of it when the compression session is disposed.
Returns an error code, or 0 if there is no error. For some codecs, this function may fail if called before the first frame is compressed.
Multiple calls to this function return the same handle.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Returns a pool that can provide ideal source pixel buffers for a compression session.
CVPixelBufferPoolRef ICMCompressionSessionGetPixelBufferPool ( ICMCompressionSessionRef session );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
A reference to a pool
of pixel buffers. The compression session creates this pixel buffer
pool based on the compressor’s pixel buffer attributes and any pixel
buffer attributes passed to ICMCompressionSessionCreate
.
A new compression session builds this pixel buffer pool based
on the compressor’s pixel buffer attributes and any pixel buffer
attributes passed in to ICMCompressionSessionCreate
.
If the source pixel buffer attributes and the compressor pixel buffer
attributes cannot be reconciled, the pool is based on the source
pixel buffer attributes and the ICM converts each pixel buffer internally.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a compression session.
OSStatus ICMCompressionSessionGetProperty ( ICMCompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to a variable to receive the returned property’s value.
On return, a pointer to the number of bytes actually used to store the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about properties of a compression session.
OSStatus ICMCompressionSessionGetPropertyInfo ( ICMCompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the time scale for a compression session.
TimeScale ICMCompressionSessionGetTimeScale ( ICMCompressionSessionRef session );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
The time scale for the compression session.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current compression session.
CFTypeID ICMCompressionSessionGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates a compression session options object.
OSStatus ICMCompressionSessionOptionsCreate ( CFAllocatorRef allocator, ICMCompressionSessionOptionsRef *options );
An allocator. Pass NULL
to
use the default allocator.
On return, a reference to a new compression session options object.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Copies a compression session options object.
OSStatus ICMCompressionSessionOptionsCreateCopy ( CFAllocatorRef allocator, ICMCompressionSessionOptionsRef originalOptions, ICMCompressionSessionOptionsRef *copiedOptions );
An allocator. Pass NULL
to
use the default allocator.
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
On return, a reference to a copy of the compression session options object passed in originalOptions.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the allow frame reordering flag.
Boolean ICMCompressionSessionOptionsGetAllowFrameReordering ( ICMCompressionSessionOptionsRef options );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Returns TRUE
if
frame reordering is allowed, FALSE
otherwise.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the allow frame time changes flag.
Boolean ICMCompressionSessionOptionsGetAllowFrameTimeChanges ( ICMCompressionSessionOptionsRef options );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Returns TRUE
if
the compressor is allowed to modify frame times, FALSE
otherwise.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the allow temporal compression flag.
Boolean ICMCompressionSessionOptionsGetAllowTemporalCompression ( ICMCompressionSessionOptionsRef options );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Returns TRUE
if
temporal compression is allowed, FALSE
otherwise.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the durations needed flag.
Boolean ICMCompressionSessionOptionsGetDurationsNeeded ( ICMCompressionSessionOptionsRef options );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Returns TRUE
if
the durations of outputted frames must be calculated, FALSE
otherwise.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the maximum key frame interval.
SInt32 ICMCompressionSessionOptionsGetMaxKeyFrameInterval ( ICMCompressionSessionOptionsRef options );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Returns the maximum key frame interval.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a compression session options object.
OSStatus ICMCompressionSessionOptionsGetProperty ( ICMCompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to a variable to receive the returned property’s value.
On return, a pointer to the number of bytes actually used to store the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about properties of a compression session options object.
OSStatus ICMCompressionSessionOptionsGetPropertyInfo ( ICMCompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current compression session options object.
CFTypeID ICMCompressionSessionOptionsGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a compression session options object.
void ICMCompressionSessionOptionsRelease ( ICMCompressionSessionOptionsRef options );
A reference to a compression session options
object. This reference is returned by ICMCompressionSessionOptionsCreate
.
If you pass NULL
, nothing
happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a compression session options object.
ICMCompressionSessionOptionsRef ICMCompressionSessionOptionsRetain ( ICMCompressionSessionOptionsRef options );
A reference to a compression session options
object. This reference is returned by ICMCompressionSessionOptionsCreate
.
If you pass NULL
, nothing
happens.
A copy of the object reference passed in options, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Enables frame reordering.
OSStatus ICMCompressionSessionOptionsSetAllowFrameReordering ( ICMCompressionSessionOptionsRef options, Boolean allowFrameReordering );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass TRUE
to
enable frame reordering, FALSE
to
disable it.
An error code. Returns noErr
if
there is no error.
To encode B-frames a compressor must reorder frames, which
means that the order in which they will be emitted and stored (the
decode order) is different from the order in which they were presented
to the compressor (the display order). By default, frame reordering
is disabled. To encode using B-frames, you must call this function,
passing TRUE
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Allows the compressor to modify frame times.
OSStatus ICMCompressionSessionOptionsSetAllowFrameTimeChanges ( ICMCompressionSessionOptionsRef options, Boolean allowFrameTimeChanges );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass TRUE
to
let the compressor to modify frame times, FALSE
to
prohibit it.
An error code. Returns noErr
if
there is no error.
Some compressors are able to identify and coalesce runs of identical frames and output single frames with longer durations, or output frames at a different frame rate from the original. This feature is controlled by the allow frame time changes flag. By default, this flag is set to false, which forces compressors to emit one encoded frame for every source frame and preserve frame display times.
This function replaces the practice of having compressors return special high similarity values to indicate that frames could be dropped.
If you want to let the compressor modify frame times in order to improve compression performance, you should allow frame time changes.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Enables temporal compression.
OSStatus ICMCompressionSessionOptionsSetAllowTemporalCompression ( ICMCompressionSessionOptionsRef options, Boolean allowTemporalCompression );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass TRUE
to
enable temporal compression, FALSE
to
disable it.
An error code. Returns noErr
if
there is no error.
By default, temporal compression is disabled. If you want
temporal compression for P-frames or B-frames you must call this
function and pass TRUE
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Indicates that the durations of outputted frames must be calculated.
OSStatus ICMCompressionSessionOptionsSetDurationsNeeded ( ICMCompressionSessionOptionsRef options, Boolean decodeDurationsNeeded );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass TRUE
to
indicate that durations must be calculated, FALSE
otherwise.
An error code. Returns noErr
if
there is no error.
If this flag is set and source frames are provided with times but not durations, then frames will be delayed so that durations can be calculated as the difference between one frame’s time stamp and the next frame’s time stamp. By default this flag is 0, so frames will not be delayed in order to calculate durations.
If you are passing encoded frames to AddMediaSampleFromEncodedFrame
,
you must call this function and pass TRUE
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the maximum interval between key frames.
OSStatus ICMCompressionSessionOptionsSetMaxKeyFrameInterval ( ICMCompressionSessionOptionsRef options, SInt32 maxKeyFrameInterval );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
The maximum interval between key frames, also known as the key frame rate.
An error code. Returns noErr
if
there is no error.
Compressors are allowed to generate key frames more frequently if this would result in more efficient compression. The default key frame interval is 0, which indicates that the compressor should choose where to place all key frames.
This is a break with previous practice, which used a key frame rate of 0 to disable temporal compression.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a compression session options object.
OSStatus ICMCompressionSessionOptionsSetProperty ( ICMCompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A compression session options reference. This
reference is returned by ICMCompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be set.
A pointer to the value of the property to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Lets the compressor perform processing between passes.
OSStatus ICMCompressionSessionProcessBetweenPasses ( ICMCompressionSessionRef session, UInt32 flags, Boolean *interpassProcessingDoneOut, ICMCompressionPassModeFlags *requestedNextPassModeFlagsOut );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Reserved. Set to 0.
A pointer to a Boolean
that
will be set to FALSE
if
this function should be called again, TRUE
if
not.
A pointer to ICMCompressionPassModeFlags
that
will be set to the codec’s recommended mode flags for the next
pass. kICMCompressionPassMode_OutputEncodedFrames
will
be set only if it recommends that the next pass be the final one:
kICMCompressionPassMode_OutputEncodedFrames
= 1L<<0
Output encoded frames.
kICMCompressionPassMode_NoSourceFrames
= 1L<<1
The client need not provide source frame buffers.
kICMCompressionPassMode_WriteToMultiPassStorage
= 1L<<2
The compressor may write private data to multipass storage.
kICMCompressionPassMode_ReadFromMultiPassStorage
= 1L<<3
The compressor may read private data from multipass storage.
An error code. Returns noErr
if
there is no error.
Call this function repeatedly until the compressor sets interpassProcessingDoneOut to TRUE
to
indicate that it is done with this round of interpass processing.
When done, the compressor will indicate its preferred mode for the
next pass. At this point the client may choose to begin an encoding
pass, by OR-combining the kICMCompressionPassMode_OutputEncodedFrames
flag,
regardless of the compressor’s request.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a compression session.
void ICMCompressionSessionRelease ( ICMCompressionSessionRef session );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
If you pass NULL
, nothing
happens.
If the retain count drops to 0, the session is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a compression session.
ICMCompressionSessionRef ICMCompressionSessionRetain ( ICMCompressionSessionRef session );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
If you pass NULL
, nothing
happens.
A reference to the object passed in session, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a compression session.
OSStatus ICMCompressionSessionSetProperty ( ICMCompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be set.
A pointer to the value of the property to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Queries whether a compression session supports multipass encoding.
Boolean ICMCompressionSessionSupportsMultiPassEncoding ( ICMCompressionSessionRef session, UInt32 multiPassStyleFlags, ICMCompressionPassModeFlags *firstPassModeFlagsOut );
A compression session reference. This reference
is returned by ICMCompressionSessionCreate
.
Reserved; set to 0.
A pointer to a variable to receive the session’s
requested mode flags for the first pass. The client may modify these
flags, but should not set kICMCompressionPassMode_NoSourceFrames
.
Pass NULL
if you do not
want this information.
Returns TRUE
if
the compression session supports multipass encoding, FALSE
otherwise.
Even if this function returns FALSE
,
if you passed TRUE
to ICMCompressionSessionOptionsSetMultiPass
,
you must call ICMCompressionSessionBeginPass
and ICMCompressionSessionEndPass
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Called by a compressor to notify the ICM that a source frame has been dropped and will not contribute to any encoded frames.
OSStatus ICMCompressorSessionDropFrame ( ICMCompressorSessionRef session, ICMCompressorSourceFrameRef sourceFrame );
A reference to the compression session between the ICM and an image compressor component.
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
If you pass NULL
, nothing happens.
An error code. Returns noErr
if
there is no error.
Calling this function does not automatically release the source
frame; if the compressor called ICMCompressorSourceFrameRetain
it
should still call ICMCompressorSourceFrameRelease
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Called by a compressor to output an encoded frame corresponding to one or more source frames.
OSStatus ICMCompressorSessionEmitEncodedFrame ( ICMCompressorSessionRef session, ICMMutableEncodedFrameRef encodedFrame, long numberOfSourceFrames, ICMCompressorSourceFrameRef sourceFrames[] );
A reference to the compression session between the ICM and an image compressor component.
A reference to an encoded frame object with write capabilities.
The number of source frames encoded in the encoded frame.
References to frames that have been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
An error code. Returns noErr
if
there is no error.
Encoded frames may correspond to more than one source frame
only if allowFrameTimeChanges
is
set in the compression session’s compressionSessionOptions
.
After calling this function, the compressor should release
the encoded frame by calling ICMEncodedFrameRelease
.
Calling this function does not automatically release the source frames;
if the compressor called ICMCompressorSourceFrameRetain
it
should still call ICMCompressorSourceFrameRelease
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves a source frames display number.
long ICMCompressorSourceFrameGetDisplayNumber ( ICMCompressorSourceFrameRef sourceFrame );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
The display number of the source frame.
The ICM tags source frames with display numbers in the order
that they are passed to ICMCompressionSessionEncodeFrame
.
The first display number is 1. Compressors may compare these numbers
to work out whether prediction is forward or backward, even when
display times are not provided.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the display time stamp and duration of a source frame.
OSStatus ICMCompressorSourceFrameGetDisplayTimeStampAndDuration ( ICMCompressorSourceFrameRef sourceFrame, TimeValue64 *displayTimeStampOut, TimeValue64 *displayDurationOut, TimeScale *timeScaleOut, ICMValidTimeFlags *validTimeFlagsOut );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
A pointer to the source frame’s display time stamp.
A pointer to the source frame’s display duration.
A pointer to the source frame’s display time scale.
A pointer to one of these display time flags for the source frame:
kICMValidTime_DisplayTimeStampIsValid
= 1L<<0
The value of displayTimeStamp is valid.
kICMValidTime_DisplayDurationIsValid
= 1L<<1
The value of displayDuration is valid.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the frame compression options for a source frame.
ICMCompressionFrameOptionsRef ICMCompressorSourceFrameGetFrameOptions ( ICMCompressorSourceFrameRef sourceFrame );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
A compression session
frame options reference representing options for this frame. A frame
options object is created by ICMCompressionFrameOptionsCreate
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves a source frames pixel buffer.
CVPixelBufferRef ICMCompressorSourceFrameGetPixelBuffer ( ICMCompressorSourceFrameRef sourceFrame );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
A reference to the pixel buffer containing the source frame’s image being compressed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current source frame object.
CFTypeID ICMCompressorSourceFrameGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a source frame object.
void ICMCompressorSourceFrameRelease ( ICMCompressorSourceFrameRef sourceFrame );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
If you pass NULL
, nothing happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a source frame object.
ICMCompressorSourceFrameRef ICMCompressorSourceFrameRetain ( ICMCompressorSourceFrameRef sourceFrame );
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
If you pass NULL
, nothing happens.
A reference to the object passed in sourceFrame, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates a frame decompression options object.
OSStatus ICMDecompressionFrameOptionsCreate ( CFAllocatorRef allocator, ICMDecompressionFrameOptionsRef *options );
An allocator. Pass NULL
to
use the default allocator.
On return, a reference to a frame decompression options object.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Copies a frame decompression options object.
OSStatus ICMDecompressionFrameOptionsCreateCopy ( CFAllocatorRef allocator, ICMDecompressionFrameOptionsRef originalOptions, ICMDecompressionFrameOptionsRef *copiedOptions );
An allocator. Pass NULL
to
use the default allocator.
A reference to a frame decompression options
object. You can create this object by calling ICMDecompressionFrameOptionsCreate
.
On return, a reference to a copy of the frame decompression options object passed in originalOptions.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a decompression frame options object.
OSStatus ICMDecompressionFrameOptionsGetProperty ( ICMDecompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A decompression frame options reference. This
reference is returned by ICMDecompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to a variable to receive the returned property’s value.
On return, a pointer to the number of bytes actually used to store the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about properties of a decompression frame options object.
OSStatus ICMDecompressionFrameOptionsGetPropertyInfo ( ICMDecompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A decompression frame options reference. This
reference is returned by ICMDecompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the frame option’s property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current frame decompression options object.
CFTypeID ICMDecompressionFrameOptionsGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a frame decompression options object.
void ICMDecompressionFrameOptionsRelease ( ICMDecompressionFrameOptionsRef options );
A reference to a frame decompression options
object. You can create this object by calling ICMDecompressionFrameOptionsCreate
.
If you pass NULL
, nothing
happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a frame decompression options object.
ICMDecompressionFrameOptionsRef ICMDecompressionFrameOptionsRetain ( ICMDecompressionFrameOptionsRef options );
A reference to a frame decompression options
object. You can create this object by calling ICMDecompressionFrameOptionsCreate
.
If you pass NULL
, nothing
happens.
A reference to the frame decompression options object passed in options, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a decompression frame options object.
OSStatus ICMDecompressionFrameOptionsSetProperty ( ICMDecompressionFrameOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A decompression frame options reference. This
reference is returned by ICMDecompressionFrameOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be set.
A pointer to the value of the property to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates a session for decompressing video frames.
OSStatus ICMDecompressionSessionCreate ( CFAllocatorRef allocator, ImageDescriptionHandle desc, ICMDecompressionSessionOptionsRef decompressionOptions, CFDictionaryRef destinationPixelBufferAttributes, ICMDecompressionTrackingCallbackRecord *trackingCallback, ICMDecompressionSessionRef *decompressionSessionOut );
An allocator for the session. Pass NULL
to
use the default allocator.
An image description for the source frames.
A decompression session options reference.
This reference is returned by ICMDecompressionSessionOptionsCreate
.
The session will retain the object. You may change some options
during the session by modifying the object. You may also pass NULL
.
Requirements for emitted pixel buffers. You
may pass NULL
.
A pointer to a structure that designates a
callback to be called for information about queued frames and pixel
buffers containing decompressed frames. See ICMDecompressionTrackingCallbackRecord
and ICMDecompressionTrackingCallbackProc
.
A pointer to a variable to receive a reference to the new decompression session.
An error code. Returns noErr
if
there is no error.
Frames are returned through calls to the callback pointed
to by trackingCallback
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates a session for decompressing video frames.
OSStatus ICMDecompressionSessionCreateForVisualContext ( CFAllocatorRef allocator, /*can be NULL */ ImageDescriptionHandle desc, ICMDecompressionSessionOptionsRef decompressionOptions, /*can be NULL */ QTVisualContextRef visualContext, ICMDecompressionTrackingCallbackRecord *trackingCallback, ICMDecompressionSessionRef *decompressionSessionOut );
An allocator for the session. Pass NULL
to
use the default allocator.
An image description for the source frames.
Options for the session. The session will retain this options object. You may change some options during the session by modifying the object.
The target visual context.
The callback to be called with information about queued frames, and pixel buffers containing the decompressed frames.
Points to a variable to receive the new decompression session.
An error code. Returns noErr
if
there is no error.
Frames will be output to a visual context. If desired, the trackingCallback may attach additional data to pixel buffers before they are sent to the visual context.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Queues a frame for decompression.
OSStatus ICMDecompressionSessionDecodeFrame ( ICMDecompressionSessionRef session, const UInt8 *data, ByteCount dataSize, ICMDecompressionFrameOptionsRef frameOptions, const ICMFrameTimeRecord *frameTime, void *sourceFrameRefCon );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
A pointer to the compressed data for this
frame. The data must remain in this location until ICMDecompressionTrackingCallbackProc
is
called with the kICMDecompressionTracking_ReleaseSourceData
flag
set in decompressionTrackingFlags.
The number of bytes of compressed data. You may not pass 0 in this parameter.
A reference to a frame decompression options
object containing options for this frame. You can create this object
by calling ICMDecompressionFrameOptionsCreate
.
A pointer to a structure describing the frame’s timing information.
Your reference value for the frame.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Flushes the frames queued for a decompression session.
OSStatus ICMDecompressionSessionFlush ( ICMDecompressionSessionRef session );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
An error code. Returns noErr
if
there is no error.
The tracking callback will be called for each frame with the result –1.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a decompression session.
OSStatus ICMDecompressionSessionGetProperty ( ICMDecompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to a variable to receive the returned property’s value.
On return, a pointer to the number of bytes actually used to store the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about the properties of a decompression session.
OSStatus ICMDecompressionSessionGetPropertyInfo ( ICMDecompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current decompression session.
CFTypeID ICMDecompressionSessionGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates a decompression session options object.
OSStatus ICMDecompressionSessionOptionsCreate ( CFAllocatorRef allocator, ICMDecompressionSessionOptionsRef *options );
An allocator. Pass NULL
to
use the default allocator.
On return, a reference to a decompression session options object.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Copies a decompression session options object.
OSStatus ICMDecompressionSessionOptionsCreateCopy ( CFAllocatorRef allocator, ICMDecompressionSessionOptionsRef originalOptions, ICMDecompressionSessionOptionsRef *copiedOptions );
An allocator. Pass NULL
to
use the default allocator.
A decompression session options reference.
This reference is returned by ICMDecompressionSessionOptionsCreate
.
On return, a reference to a copy of the decompression session options object passed in originalOptions.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves information about properties of a decompression session options object.
OSStatus ICMDecompressionSessionOptionsGetPropertyInfo ( ICMDecompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A decompression session options reference.
This reference is returned by ICMDecompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the value of a specific property of a decompression session options object.
OSStatus ICMDecompressionSessionOptionsGetProperty ( ICMDecompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A decompression session options reference.
This reference is returned by ICMDecompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be retrieved.
A pointer to a variable to hold the value of the property.
On return, a pointer to the number of bytes actually used to store the property value.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current decompression session options object.
CFTypeID ICMDecompressionSessionOptionsGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a decompression session options object.
void ICMDecompressionSessionOptionsRelease ( ICMDecompressionSessionOptionsRef options );
A reference to a decompression session options
object. This reference is returned by ICMDecompressionSessionOptionsCreate
.
If you pass NULL
, nothing
happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a decompression session options object.
ICMDecompressionSessionOptionsRef ICMDecompressionSessionOptionsRetain ( ICMDecompressionSessionOptionsRef options );
A reference to a decompression session options
object. This reference is returned by ICMDecompressionSessionOptionsCreate
.
If you pass NULL
, nothing
happens.
A copy of the object reference passed in options, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a decompression session options object.
OSStatus ICMDecompressionSessionOptionsSetProperty ( ICMDecompressionSessionOptionsRef options, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A decompression session options reference.
This reference is returned by ICMDecompressionSessionOptionsCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size of the property value to be set.
A pointer to the value of the property to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a decompression session.
ICMDecompressionSessionRef ICMDecompressionSessionRetain ( ICMDecompressionSessionRef session );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
If you pass NULL
, nothing
happens.
A copy of the reference passed in session, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a decompression session.
void ICMDecompressionSessionRelease ( ICMDecompressionSessionRef session );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
If you pass NULL
, nothing
happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the direction for non-scheduled display time.
OSStatus ICMDecompressionSessionSetNonScheduledDisplayDirection ( ICMDecompressionSessionRef session, Fixed rate );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
The display direction. Negative values represent backward display and positive values represent forward display.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the display time for a decompression session, and requests display of the non-scheduled queued frame at that display time, if there is one.
OSStatus ICMDecompressionSessionSetNonScheduledDisplayTime ( ICMDecompressionSessionRef session, TimeValue64 displayTime, TimeScale displayTimeScale, UInt32 flags );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
A display time. Usually this is the display time of a non-scheduled queued frame.
The timescale according to which displayTime should be interpreted.
Reserved; set to 0.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the value of a specific property of a decompression session.
OSStatus ICMDecompressionSessionSetProperty ( ICMDecompressionSessionRef session, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
A decompression session reference. This reference
is returned by ICMDecompressionSessionCreate
.
Pass the following constant to define the property class:
kComponentPropertyClassPropertyInfo =
'pnfo'
The property information class.
Pass one of these constants to define the property ID:
kComponentPropertyInfoList =
'list'
An array of CFData
values, one
for each property.
kComponentPropertyCacheSeed =
'seed'
A property cache seed value.
kComponentPropertyCacheFlags =
'flgs'
One of the kComponentPropertyCache
flags:
kComponentPropertyCacheFlagNotPersistent
Property metadata should not be saved in persistent cache.
kComponentPropertyCacheFlagIsDynamic
Property metadata should not cached at all.
kComponentPropertyExtendedInfo =
'meta'
A CFDictionary
with extended property
information.
The size in bytes of the property’s value.
A pointer to the property value to be set.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Gets the size of an encoded frame’s data buffer.
ByteCount ICMEncodedFrameGetBufferSize ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The physical size in bytes of the encoded frame’s data buffer.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Called by a compressor to create an encoded-frame token corresponding to a given source frame.
OSStatus ICMEncodedFrameCreateMutable ( ICMCompressorSessionRef session, ICMCompressorSourceFrameRef sourceFrame, ByteCount bufferSize, ICMMutableEncodedFrameRef *frameOut );
A reference to the compression session between the ICM and an image compressor component.
A reference to a frame that has been passed
in sourceFrameRefCon to ICMCompressionSessionEncodeFrame
.
The size of the frame buffer in bytes.
On return, a reference to an encoded frame object with write capabilities.
An error code. Returns noErr
if
there is no error.
The encoded frame will initially show 0 for mediaSampleFlags
;
if the frame is not a key frame, the compressor must call ICMEncodedFrameSetMediaSampleFlags
to
set mediaSampleNotSync
.
If the frame is droppable, the compressor should set mediaSampleDroppable
.
If the frame is a partial key frame, the compressor should set mediaSamplePartialSync
.
The encoded frame will initially have undefined decodeTimeStamp
and decodeDuration
values.
The compressor may set these directly by calling ICMEncodedFrameSetDecodeTimeStamp
and ICMEncodedFrameSetDecodeDuration
.
If these are not set by the compressor, the ICM will try to derive
values for them.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Gets the data buffer for an encoded frame.
UInt8 *ICMEncodedFrameGetDataPtr ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
A pointer to the object’s data buffer.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Gets the data size of the compressed frame in an encoded frame’s buffer.
ByteCount ICMEncodedFrameGetDataSize ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The logical size in bytes of the encoded frame’s data buffer, which may be less than the physical size of the buffer.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s decode duration.
TimeValue64 ICMEncodedFrameGetDecodeDuration ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s decode duration.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the decode number of an encoded frame.
UInt32 ICMEncodedFrameGetDecodeNumber ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The decode number of the encoded frame.
The ICM automatically stamps ascending decode numbers on frames after the compressor emits them. The first decode number in session is 1. Compressors should not call this function.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s decode time stamp.
TimeValue64 ICMEncodedFrameGetDecodeTimeStamp ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s decode time stamp.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s display duration.
TimeValue64 ICMEncodedFrameGetDisplayDuration ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s display duration.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s display offset.
TimeValue64 ICMEncodedFrameGetDisplayOffset ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s display offset. This is the time offset from decode time stamp to display time stamp.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s display time stamp.
TimeValue64 ICMEncodedFrameGetDisplayTimeStamp ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s display time stamp.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the frame
type
for an encoded frame.
ICMFrameType ICMEncodedFrameGetFrameType ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s frame type (see below).
This function returns one of these values:
kICMFrameType_I
= 'I'
An I frame.
kICMFrameType_P
= 'P'
A P frame.
kICMFrameType_B
= 'B'
A B frame.
kICMFrameType_Unknown
= 0
A frame of unknown type.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the image description of an encoded frame.
OSStatus ICMEncodedFrameGetImageDescription ( ICMEncodedFrameRef frame, ImageDescriptionHandle *imageDescOut );
A reference to an encoded frame object.
A pointer to a handle containing the encoded frame’s image description. The caller should not dispose of this handle.
An error code. Returns noErr
if
there is no error.
This function returns the same image description handle as ICMCompressionSessionGetImageDescription
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the media sample flags for an encoded frame.
MediaSampleFlags ICMEncodedFrameGetMediaSampleFlags ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The object’s media
sample flags. These flags are listed in the header file Movies.h
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the similarity value for an encoded frame.
Float32 ICMEncodedFrameGetSimilarity ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The encoded frame’s similarity value. 1.0 means identical; 0.0 means not at all alike. The default value is –1.0, which means unknown.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the reference value of an encoded frame’s source frame.
void *ICMEncodedFrameGetSourceFrameRefCon ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The source frame’s reference value is copied from the session’s sourceFrameRefCon parameter
that was passed to ICMCompressionSessionEncodeFrame
.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves the timescale of an encoded frame.
TimeScale ICMEncodedFrameGetTimeScale ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
The time scale of an encoded frame. This is always the same as the time scale of the compression session.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current encoded frame object.
CFTypeID ICMEncodedFrameGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Retrieves an encoded frame’s flags indicating which of its time stamps and durations are valid.
ICMValidTimeFlags ICMEncodedFrameGetValidTimeFlags ( ICMEncodedFrameRef frame );
A reference to an encoded frame object.
One of the constants listed below.
This function returns one of these values:
kICMValidTime_DisplayTimeStampIsValid
= 1L<<0
The value of displayTimeStamp is valid.
kICMValidTime_DisplayDurationIsValid
= 1L<<1
The value of displayDuration is valid.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of an encoded frame object.
void ICMEncodedFrameRelease ( ICMEncodedFrameRef frame );
A reference to an encoded frame object. If
you pass NULL
, nothing happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of an encoded frame object.
ICMEncodedFrameRef ICMEncodedFrameRetain ( ICMEncodedFrameRef frame );
A reference to an encoded frame object. If
you pass NULL
, nothing happens.
A reference to the object passed in frame, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the data size of the compressed frame in an encoded frame’s buffer.
OSStatus ICMEncodedFrameSetDataSize ( ICMMutableEncodedFrameRef frame, ByteCount dataSize );
A reference to an encoded frame object with write capabilities.
The data size of the compressed frame in the encoded frame object’s buffer.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets an encoded frame’s decode duration.
OSStatus ICMEncodedFrameSetDecodeDuration ( ICMMutableEncodedFrameRef frame, TimeValue64 decodeDuration );
A reference to an encoded frame object with write capabilities.
The encoded frame’s decode duration.
An error code. Returns noErr
if
there is no error.
This function automatically sets the kICMValidTime_DecodeDurationIsValid
flag.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets an encoded frame’s decode time stamp.
OSStatus ICMEncodedFrameSetDecodeTimeStamp ( ICMMutableEncodedFrameRef frame, TimeValue64 decodeTimeStamp );
A reference to an encoded frame object with write capabilities.
The encoded frame’s decode time stamp.
An error code. Returns noErr
if
there is no error.
This function automatically sets the kICMValidTime_DecodeTimeStampIsValid
flag.
If the display time stamp is valid, it also sets the kICMValidTime_DisplayOffsetIsValid
flag.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets an encoded frame’s display duration.
OSStatus ICMEncodedFrameSetDisplayDuration ( ICMMutableEncodedFrameRef frame, TimeValue64 displayDuration );
A reference to an encoded frame object with write capabilities.
The encoded frame’s display duration.
An error code. Returns noErr
if
there is no error.
This function automatically sets the kICMValidTime_DisplayDurationIsValid
flag.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets an encoded frame’s display time stamp.
OSStatus ICMEncodedFrameSetDisplayTimeStamp ( ICMMutableEncodedFrameRef frame, TimeValue64 displayTimeStamp );
A reference to an encoded frame object with write capabilities.
The encoded frame’s display time stamp.
An error code. Returns noErr
if
there is no error.
This function automatically sets the kICMValidTime_DisplayTimeStampIsValid
flag.
If the decode time stamp is valid, it also sets the kICMValidTime_DisplayOffsetIsValid
flag.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets an encoded frame’s flags that indicate which of its time stamps and durations are valid.
OSStatus ICMEncodedFrameSetValidTimeFlags ( ICMMutableEncodedFrameRef frame, ICMValidTimeFlags validTimeFlags );
A reference to an encoded frame object with write capabilities.
One of the following constants:
kICMValidTime_DisplayTimeStampIsValid
= 1L<<0
The value of displayTimeStamp is valid.
kICMValidTime_DisplayDurationIsValid
= 1L<<1
The value of displayDuration is valid.
An error code. Returns noErr
if
there is no error.
Setting an encoded frame’s decode or display time stamp
or duration automatically sets the corresponding valid time flags.
For example, calling ICMEncodedFrameSetDecodeTimeStamp
sets kICMValidTime_DisplayTimeStampIsValid
.
If both the encoded frame’s decode time stamp and display time
stamp are valid, kICMValidTime_DisplayOffsetIsValid
is
automatically set.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the media sample flags for an encoded frame.
OSStatus ICMEncodedFrameSetMediaSampleFlags ( ICMMutableEncodedFrameRef frame, MediaSampleFlags mediaSampleFlags );
A reference to an encoded frame object with write capabilities.
The object’s media sample flags. These flags
are listed in the header file Movies.h
.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the frame
type
for an encoded frame.
OSStatus ICMEncodedFrameSetFrameType ( ICMMutableEncodedFrameRef frame, ICMFrameType frameType );
A reference to an encoded frame object with write capabilities.
The frame type to be set:
kICMFrameType_I
= 'I'
An I frame.
kICMFrameType_P
= 'P'
A P frame.
kICMFrameType_B
= 'B'
A B frame.
kICMFrameType_Unknown
= 0
A frame of unknown type.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Sets the similarity for an encoded frame.
OSStatus ICMEncodedFrameSetSimilarity ( ICMMutableEncodedFrameRef frame, Float32 similarity );
A reference to an encoded frame object with write capabilities.
The encoded frame’s similarity value to be set. 1.0 means identical; 0.0 means not at all alike. The default value is –1.0, which means unknown.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns a particular property of a image description handle.
OSStatus ICMImageDescriptionGetProperty ( ImageDescriptionHandle inDesc, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ComponentValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
The image description handle being interrogated.
The class of property being requested.
The ID of the property being requested.
The size of the property value buffer.
Points to the buffer to receive the property value.
Points to a variable to receive the actual
size of returned property value. (This can be NULL
).
An error code. Returns noErr
if
there is no error.
This routine returns a particular property of a image description handle.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Returns information about a particular property of a image description.
OSStatus ICMImageDescriptionGetPropertyInfo ( ImageDescriptionHandle inDesc, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ComponentValueType *outPropType, /*can be NULL */ ByteCount *outPropValueSize, /*can be NULL */ UInt32 *outPropertyFlags );
The image description handle being interrogated.
The class of property being requested.
The ID of the property being requested.
The type of property is returned here. (This
can be NULL
).
The size of property is returned here. (This
can be NULL
).
The property flags are returned here. (This
can be NULL
).
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Sets a particular property of a image description handle.
OSStatus ICMImageDescriptionSetProperty ( ImageDescriptionHandle inDesc, ComponentPropertyClass inPropClass, ComponentPropertyID inPropID, ByteCount inPropValueSize, ConstComponentValuePtr inPropValueAddress );
The image description handle being modified.
The class of property being set.
The ID of the property being set.
The size of property value.
Points to the property value buffer.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Called by a multipass-capable compressor to retrieve data at a given time stamp.
OSStatus ICMMultiPassStorageCopyDataAtTimeStamp ( ICMMultiPassStorageRef multiPassStorage, TimeValue64 timeStamp, long index, CFMutableDataRef *dataOut );
The multipass storage object.
The time stamp at which the value should be retrieved.
An index by which multiple values may be stored at a time stamp. The meaning of individual indexes is private to the compressor.
A pointer to memory to receive the data at the time stamp.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Assembles a multipass storage mechanism from callbacks.
OSStatus ICMMultiPassStorageCreateWithCallbacks ( CFAllocatorRef allocator, ICMMultiPassStorageCallbacks *callbacks, ICMMultiPassStorageRef *multiPassStorageOut );
An allocator for this task. Pass NULL
to
use the default allocator.
A structure containing a collection of callbacks
for creating a custom multipass storage object. See ICMMultiPassStorageCallbacks
.
A reference to the new multipass storage object.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Creates multipass storage using a temporary file.
OSStatus ICMMultiPassStorageCreateWithTemporaryFile ( CFAllocatorRef allocator, FSRef *directoryRef, CFStringRef fileName, ICMMultiPassStorageCreationFlags flags, ICMMultiPassStorageRef *multiPassStorageOut );
An allocator for this task. Pass NULL
to
use the default allocator.
A reference to a file directory. If you pass NULL
,
the ICM will use the user’s Temporary Items folder.
A file name to use for the storage. If you
pass NULL
, the ICM will
pick a unique name. If you pass the name of a file that already
exists, the ICM will assume you are continuing a previous multipass
session where you left off. This file will be deleted when the multipass
storage is released, unless you set the kICMMultiPassStorage_DoNotDeleteWhenDone
flag.
Flag controlling this process:
kICMMultiPassStorage_DoNotDeleteWhenDone
= 1L<<0
The temporary file should not be deleted when the multipass storage is released.
A reference to the new multipass storage.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Called by a multipass-capable compressor to retrieve a time stamp for which a value is stored.
OSStatus ICMMultiPassStorageGetTimeStamp ( ICMMultiPassStorageRef multiPassStorage, TimeValue64 fromTimeStamp, ICMMultiPassStorageStep step, TimeValue64 *timeStampOut );
The multipass storage object.
The initial time stamp. This value is ignored for some values of step.
Indicates the kind of time stamp search to perform:
kICMMultiPassStorage_GetFirstTimeStamp
= 1
Requests the first time stamp at which a value is stored.
kICMMultiPassStorage_GetPreviousTimeStamp
= 2
Requests the previous time stamp before the time stamp specified in fromTimeStamp at which a value is stored.
kICMMultiPassStorage_GetNextTimeStamp
= 3
Requests the next time stamp after the time stamp specified in fromTimeStamp at which a value is stored.
kICMMultiPassStorage_GetLastTimeStamp
= 4
Requests the last time stamp at which a value is stored.
A pointer to a TimeValue64
value
to receive the found time stamp. It will be set to –1 if no time
stamp is found.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Returns the type ID for the current multipass storage object.
CFTypeID ICMMultiPassStorageGetTypeID ( void );
A CFTypeID
value.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Decrements the retain count of a multipass storage object.
void ICMMultiPassStorageRelease ( ICMMultiPassStorageRef multiPassStorage );
A reference to a multipass storage object.
You can create this object using ICMMultiPassStorageCreateWithTemporaryFile
or ICMMultiPassStorageCreateWithCallbacks
.
If you pass NULL
, nothing happens.
If the retain count drops to 0, the object is disposed.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Increments the retain count of a multipass storage object.
ICMMultiPassStorageRef ICMMultiPassStorageRetain ( ICMMultiPassStorageRef multiPassStorage );
A reference to a multipass storage object.
You can create this object using ICMMultiPassStorageCreateWithTemporaryFile
or ICMMultiPassStorageCreateWithCallbacks
.
If you pass NULL
, nothing happens.
A reference to the object passed in multiPassStorage, for convenience.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Called by a multipass-capable compressor to store data at a given time stamp.
OSStatus ICMMultiPassStorageSetDataAtTimeStamp ( ICMMultiPassStorageRef multiPassStorage, TimeValue64 timeStamp, long index, CFDataRef data );
The multipass storage object.
The time stamp at which the value should be stored.
An index by which multiple values may be stored at a time stamp. The meaning of individual indexes is private to the compressor.
The data to be stored, or NULL
to
delete the value.
An error code. Returns noErr
if
there is no error.
The new data replaces any previous data held at that time
stamp. If the value of data is NULL
,
the data for that time stamp is deleted. The format of the data
is private to the compressor.
Introduced in QuickTime 7.
ImageCompression.h
ImageCompression.h
Notifies the compressor that it should operate in multipass mode and use the given multipass storage.
ComponentResult ImageCodecBeginPass ( ComponentInstance ci, ICMCompressionPassModeFlags passModeFlags, UInt32 flags, ICMMultiPassStorageRef multiPassStorage);
A component instance that identifies a connection to an image codec component.
Indicates how the compressor should operate
in this pass. If the kICMCompressionPassMode_WriteToMultiPassStorage
flag
is set, the compressor may gather information of interest and store
it in multiPassStorage
.
If the kICMCompressionPassMode_ReadFromMultiPassStorage
flag
is set, the compressor may retrieve information from multiPassStorage
.
If the kICMCompressionPassMode_OutputEncodedFrames
flag
is set, the compressor must encode or
drop every frame by calling ICMCompressorSessionDropFrame
or
ICMCompressorSessionEmitEncodedFrame
.
If that flag is not set, the compressor should not call these routines.
Reserved. Ignore this parameter.
The multipass storage object that the compressor should use to store and retrieve information between passes.
An error code, or noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Directs the compressor to finish with a queued source frame, either emitting or dropping it.
ComponentResult ImageCodecCompleteFrame ( ComponentInstance ci, ICMCompressorSourceFrameRef sourceFrame, UInt32 flags );
A component instance that identifies a connection to an image codec component.
The source frame that must be completed.
Reserved; ignore.
An error code, or noErr
if
there is no error.
This frame does not necessarily need to be the first or only
source frame emitted or dropped during this call, but the compressor
must call either ICMCompressorSessionDropFrame
or ICMCompressorSessionEmitEncodedFrame
with
this frame before returning. The ICM will call this function to
force frames to be encoded for the following reasons: (a) the maximum
frame delay count or maximum frame delay time in the compressionSessionOptions
does
not permit frames to be queued; (b) the client has called ICMCompressionSessionCompleteFrames
.
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Returns an ImageSubCodecDecompressRecord
structure
for an image codec component.
ComponentResult ImageCodecDecodeBand ( ComponentInstance ci, ImageSubCodecDecompressRecord *drp, unsigned long flags );
A component instance that identifies a connection to an image codec component.
A pointer to an ImageSubCodecDecompressRecord
structure.
Not used; set to 0.
An error code, or noErr
if
there is no error.
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Presents the compressor with a frame to encode.
ComponentResult ImageCodecEncodeFrame ( ComponentInstance ci, ICMCompressorSourceFrameRef sourceFrame, unsigned long flags );
A component instance that identifies a connection to an image codec component.
The source frame to encode.
Reserved; ignore.
An error code, or noErr
if
there is no error.
The compressor may encode the frame immediately or queue it
for later encoding. If the compressor queues the frame for later
decode, it must retain it (by calling ICMCompressorSourceFrameRetain
)
and release it when it is done with it (by calling ICMCompressorSourceFrameRelease
).
Pixel buffers are guaranteed to conform to the pixel buffer attributes
returned by ImageCodecPrepareToCompressFrames
.
During multipass encoding, if the compressor requested the kICMCompressionPassMode_NoSourceFrames
flag, the
source frame pixel buffers may be NULL
.
(Note: this replaces ImageCodecBandCompress
.)
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Prepares the compressor to receive frames.
ComponentResult ImageCodecPrepareToCompressFrames ( ComponentInstance ci, ICMCompressorSessionRef session, ICMCompressionSessionOptionsRef compressionSessionOptions, ImageDescriptionHandle imageDescription, void *reserved, CFDictionaryRef *compressorPixelBufferAttributesOut);
A component instance that identifies a connection to an image codec component.
The compressor session reference. The compressor
should store this in its globals; it will need it when calling the
ICM back (for example, to call ICMEncodedFrameCreateMutable
and ICMCompressorSessionEmitEncodedFrame
).
This is not a CF type. Do not call CFRetain
or CFRelease
on
it.
The session options from the client. The compressor should retain this and use the settings to guide compression.
The image description. The compressor may add image description extensions.
Reserved for future use. Ignore this parameter.
The compressor should create a pixel buffer
attributes dictionary and set compressorPixelBufferAttributesOut
to
it. The ICM will release it.
An error code, or noErr
if
there is no error.
The compressor should record session and retain compressionSessionOptions
for
use in later calls. The compressor may modify imageDescription
at
this point. The compressor should create and return pixel buffer
attributes, which the ICM will release. (Note: this replaces ImageCodecPreCompress
.)
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Provides the compressor with an opportunity to perform processing between passes.
ComponentResult ImageCodecProcessBetweenPasses ( ComponentInstance ci, ICMMultiPassStorageRef multiPassStorage, Boolean *interpassProcessingDoneOut, ICMCompressionPassModeFlags *requestedNextPassModeFlagsOut );
A component instance that identifies a connection to an image codec component.
The multipass storage object that the compressor should use to store and retrieve information between passes.
Points to a Boolean. Set this to FALSE
if
you want your ImageCodecProcessBetweenPasses
function
to be called again to perform more processing, TRUE
if
not.
Set *requestedNextPassModeFlagsOut
to
indicate the type of pass that should be performed next: To recommend
a repeated analysis pass, set it to kICMCompressionPassMode_ReadFromMultiPassStorage| kICMCompressionPassMode_WriteToMultiPassStorage
.
To recommend a final encoding pass, set it to kICMCompressionPassMode_ReadFromMultiPassStorage
| kICMCompressionPassMode_OutputEncodedFrames
.
If source frame buffers are not necessary for the recommended pass
(for example, because all the required data has been copied into
multipass storage), set kICMCompressionPassMode_NoSourceFrames
.
An error code, or noErr
if
there is no error.
This function will be called repeatedly until it returns TRUE
in
*interpassProcessingDoneOut
.
The compressor may read and write to multiPassStorage
.
The compressor should indicate which type of pass it would prefer
to perform next by setting *requestedNextPassTypeOut
.
Introduced in QuickTime 7.
ImageCodec.h
ImageCodec.h
Invokes the specified property listener of a track.
void InvokeQTTrackPropertyListenerUPP ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, void *inUserData, QTTrackPropertyListenerUPP userUPP );
The track of this operation.
A property class.
A property ID.
A pointer to user data that will be passed to the callback.
A QTTrackPropertyListenerUPP
pointer.
Introduced in QuickTime 7
Movies.h
Movies.h
Tests whether a media contains display offsets.
Boolean MediaContainsDisplayOffsets ( Media theMedia );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
TRUE
if
the media is valid and contains at least one sample with a nonzero display
offset; FALSE
otherwise.
Introduced in QuickTime 7.
Movies.h
Movies.h
Finds the sample for a specified decode time.
void MediaDecodeTimeToSampleNum ( Media theMedia, TimeValue64 decodeTime, SInt64 *sampleNum, TimeValue64 *sampleDecodeTime, TimeValue64 *sampleDecodeDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the decode time for which you are retrieving sample information. You must specify this value in the media's time scale.
A pointer to a variable that is to receive the sample number. The function returns the sample number that identifies the sample that contains data for the specified decode time, or 0 if it is not found.
A pointer to a time value. The function updates
this time value to indicate the decode time of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media’s time scale. Set this parameter
to NULL
if you do not
want this information.
A pointer to a time value. The function updates
this time value to indicate the decode duration of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media’s time scale. Set this parameter
to NULL
if you do not
want this information.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
It returns paramErr
if there is a bad
parameter value, invalidTime
if sampleDecodeTime is
out of the decode time range, or noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Fnds the sample number for a specified display time.
void MediaDisplayTimeToSampleNum ( Media theMedia, TimeValue64 displayTime, SInt64 *sampleNum, TimeValue64 *sampleDisplayTime, TimeValue64 *sampleDisplayDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit time value that represents the display time for which you are retrieving sample information. You must specify this value in the media’s time scale.
A pointer to a long integer that is to receive the sample number. The function returns the sample number that identifies the sample for the specified display time, or 0 if it is not found.
A pointer to a time value. The function updates
this time value to indicate the display time of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media’s time scale. Set this parameter
to NULL
if you do not
want this information.
A pointer to a time value. The function updates
this time value to indicate the display duration of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media’s time scale. Set this parameter
to NULL
if you do not
want this information.
You can access this function's error returns through GetMoviesError
and GetMoviesStickyError
.
It returns paramErr
if there is a bad
parameter value, invalidTime if sampleDisplayTime is
out of the display time range, or noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Begins a movie audio extraction session and will return badCallOrderErr
if
the specified movie is not Active.
OSStatus MovieAudioExtractionBegin ( Movie m, UInt32 flags, MovieAudioExtractionRef *outSession );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
Reserved; must be 0.
A pointer to an opaque session object.
An error code. Returns noErr
if
there is no error.
You must call this function before doing any movie audio extraction,
because you will pass the object returned by outSession to
the other movie audio extraction functions. The format of the extracted
audio defaults to the summary channel layout of the movie (all right
channels mixed together, all left surround channels mixed together,
and so on.), 32-bit float, de-interleaved, with the sample rate
set to the highest sample rate found in the movie. You can set the
audio format to be something else, as long as it is uncompressed and
you do it before your first call to MovieAudioExtractionFillBuffer
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Ends a movie audio extraction session.
OSStatus MovieAudioExtractionEnd ( MovieAudioExtractionRef session );
The session object returned by MovieAudioExtractionBegin
.
An error code. Returns noErr
if
there is no error.
You must call this function when movie audio extraction is complete.
Introduced in QuickTime 7.
Movies.h
Movies.h
Extracts audio from a movie.
OSStatus MovieAudioExtractionFillBuffer ( MovieAudioExtractionRef session, UInt32 *ioNumFrames, AudioBufferList *ioData, UInt32 *outFlags );
The session object returned by MovieAudioExtractionBegin
.
A pointer to the number of PCM frames to be extracted.
A pointer to an AudioBufferList allocated by the caller to hold the extracted audio data.
A bit flag that indicates when extraction is complete:
kMovieAudioExtractionComplete
The extraction process is complete. Value is (1L
<< 0)
.
An error code. Returns noErr
if
there is no error.
You call this function repeatedly; each call continues extracting
audio where the last call left off. The function will extract as
many of the requested PCM frames as it can, given the limits of
the buffer supplied and the limits of the input movie. ioNumFrames will
be updated with the exact number of valid frames being returned.
When there is no more audio to extract from the movie, the function
will continue to return noErr
but
will return no further audio data. In this case, the outFlags parameter
will have its kMovieAudioExtractionComplete
bit
set. It is possible that the kMovieAudioExtractionComplete
bit
will accompany the last buffer of valid data.
Introduced in QuickTime 7.
Movies.h
Movies.h
Gets a property of a movie audio extrraction session.
OSStatus MovieAudioExtractionGetProperty ( MovieAudioExtractionRef session, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed);
The session object returned by MovieAudioExtractionBegin
.
Pass the following constant to define the
property class: Property of an audio presentation; value is 'audi'
.
The property ID.
The size of the buffer allocated to receive the property value.
A pointer to the buffer allocated to receive the property value.
The actual size of the property value.
An error code. Returns noErr
if
there is no error.
You can get and set more than just the channel layout. There
are four properties, discussed below, all of which are gettable
and settable (with some having restrictions on not setting after
first calling MovieAudioExtractionFillBuffer
).
Properties of the movie that is extracted from kQTPropertyClass_MovieAudioExtraction_Movie
include
the following movie class IDs:
kQTMovieAudioExtractionMoviePropertyID_CurrentTime
.
The value is a TimeRecord
, which
you can set and get. When setting, you set the timescale to anything
you want (for example, the output audio sample rate or the movie
timescale). When getting, the timescale will be output audio sample
rate for best accuracy.
kQTMovieAudioExtractionMoviePropertyID_AllChannelsDiscrete
.
The value is Boolean (which is settable and gettable). Set to implement
export of all audio channels without mixing. When this is set and
the extraction audio stream basic description (ASBD) or channel
layout are read back, you get information relating to the re-mapped movie.
kQTMovieAudioExtractionMoviePropertyID_CurrentTime
= ‘time’
. The value is a TimeRecord
,
which is gettable and settable.
Properties of the output audio extracted from kQTPropertyClass_MovieAudioExtraction_Audio
include
the following output audio class properties:
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription
.
The value is an AudioStreamBasicDescription
.
You can get any time and set before first the MovieAudioExtractionFillBuffer
call.
If you get this property immediately after beginning an audio extraction
session, it will tell you the default extraction format for the
movie. This will include the number of channels in the default movie
mix. If you set the output AudioStreamBasicDescription
,
it is recommended that you also set the output channel layout.
If your output ASBD has a different number of channels than the
default extraction mix, you must set the output channel layout.
You can only set PCM output formats. Setting a compressed output
format will fail.
:kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout
.
The value is AudioChannelLayout
,
which you can get any time and set before first the MovieAudioExtractionFillBuffer
call.
If you get this property immediately after beginning an audio extraction
session, it tells you what the channel layout is for the default
extraction mix.
The information in this discussion also applies to the following functions:
Introduced in QuickTime 7.
Movies.h
Movies.h
Gets information about a property of a movie audio extraction session.
OSStatus MovieAudioExtractionGetPropertyInfo ( MovieAudioExtractionRef session, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
The session object returned by MovieAudioExtractionBegin
.
Pass the following constant to define the
property class: Property of an audio presentation; value is 'audi
The property ID.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the item’s property.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets a property of a movie audio extraction session.
OSStatus MovieAudioExtractionSetProperty ( MovieAudioExtractionRef session, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
The session object returned by MovieAudioExtractionBegin
.
Pass the following constant to define the
property class: Property of an audio presentation; value is 'audi'
.
Pass one of these constants to define the property ID:
kQTAudioPropertyID_SummaryChannelLayout
The summary audio channel layout of a movie, or any
other grouping of audio streams. All like-labeled channels are combined,
without duplicates. For example, if there is a stereo (L/R) track,
5 single-channel tracks marked Left, Right, Left Surround, Right
Surround and Center, and a 4-channel track marked L/R/Ls/Rs, then
the summary AudioChannelLayout will be L/R/Ls/Rs/C, not L/R/L/R/Ls/Rs/C/L/R/Ls/Rs.
The value of this constant is 'clay'
.
The size of the property value.
A const void pointer that points to the property value.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Allocates a new Universal Procedure Pointer for a MovieExportStageReachedCallbackProc
callback.
MovieExportStageReachedCallbackUPP NewMovieExportStageReachedCallbackUPP ( MovieExportStageReachedCallbackProcPtr userRoutine );
A pointer to your application-defined callback
function; see ICMDecompressionTrackingCallbackProc
.
A new Universal Procedure Pointer that you will use to invoke your callback.
Introduced in QuickTime 7.
QuickTimeComponents.h
QuickTimeComponents.h
Creates a new movie using movie properties.
OSStatus NewMovieFromProperties ( ItemCount inputPropertyCount, QTNewMoviePropertyElement *inputProperties, ItemCount outputPropertyCount, QTNewMoviePropertyElement *outputProperties, Movie *theMovie );
The number of properties in the array passed in inputProperties.
A pointer to a property array describing how
to instantiate the movie. See QTNewMoviePropertyElement
.
The number of properties in the array passed in outputProperties.
A pointer to a property array to receive output
parameters. See QTNewMoviePropertyElement
.
You may pass NULL
if
you don’t want this information. The caller is responsible for
calling the appropriate routines to dispose of any property values
returned here. Since callers specify the property classes and IDs,
they know who to call to dispose of the property values.
A pointer to a variable that receives the new movie.
An error code. Returns memFullErr
if
the function could not allocate memory, paramErr
if inputProperties or theMovie is NULL
,
or noErr
if there is no error.
This function can be used in all the cases where an existing NewMovieFrom...
call
is used. When calling this function, you supply a set of input properties
that describe the information required to instantiate the movie
(its data reference, audio context, visual context, and so on).
You can also supply a set of output properties that you may be interested
in; for example, information about whether the data reference was
changed. See “New Movie Property Codes.”
This function verifies its input properties is as follows.
First, the propStatus
field of both the input
and output property arrays is set to kQTPropertyUnprocessedErr
.
Then the input properties are checked one by one. If there is no
problem with a property, its propStatus
is
set to noErr
(0). If there is a problem,
the propStatus
for the property is set to 1
and the function returns paramErr
.
It is an error if a property is not recognized; paramErr
is returned
and the appropriate propStatus
is set to kQTPropertyNotSupportedErr
.
Another error is multiple data locations defined. In this case,
the property status for the second data location is set to paramErr
.
It is not considered a fatal error if this function does not recognize
an output property; the property’s propStatus
simply
remains kQTPropertyUnprocessedErr
.
The only output properties currently defined are those that
support the behavior of functions of the form NewMovieFrom...
.
For example, if you want to act upon the data reference being updated
during the opening process, you would pass in the kQTMovieInstantiationPropertyID_ResultDataLocationChanged
property.
This function must be used with kQTContextPropertyID_VisualContext
to
open a movie, for visual contexts to function with the movie. If
you want to use visual contexts with a movie but want to inspect
the movie prior to allocating the visual context to use (for instance
you want to get the movie box), use kQTContextPropertyID_VisualContext
with a NULL
value.
Otherwise, visual context calls with the movie will fail with an
error. Using GWorld
structures with the movie
will also fail.
To handle special situations where this function cannot be
used by your application, there is a method to switch a movie from
GWorld mode to visual context mode. SetMovieVisualContext
can
be used to set a NULL
visual
context, which will disassociate the movie from its current visual
context or GWorld. At this time, either SetMovieGWorld
or SetMovieVisualContext
can
be used. If a movie is associated with a GWorld, visual context
calls such as GetMovieVisualContext
will
fail. If a movie is a associated with a valid visual context, GWorld
calls such as GetMovieGWorld
will fail.
If a call to this function succeeds using a visual context or audio context, those objects will be explicitly retained for use by the movie. The movie object is responsible for releasing them. If you no longer need access to a context, it is safe to release it.
If no data location property is specified, then this function
will behave like NewMovie
, creating
an empty movie. Thus NewMovieFromProperties(0,
nil, 0, nil, &movie)
is functionally equivalent
to movie = NewMovie(0)
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Creates a new callback to monitor a track property.
QTTrackPropertyListenerUPP NewQTTrackPropertyListenerUPP ( QTTrackPropertyListenerProcPtr userRoutine );
A pointer to a QTTrackPropertyListenerProcPtr callback.
A new UPP; see Universal
Procedure Pointers in the QuickTime API Reference
.
This routine creates a new callback to monitor a track property.
Introduced in QuickTime 7
Movies.h
Movies.h
Installs a callback to monitor a track property.
OSErr QTAddTrackPropertyListener ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, QTTrackPropertyListenerUPP inListenerProc, void *inUserData );
The track for this operation.
A property class.
A property ID.
A Universal Procedure Pointer to a QTTrackPropertyListenerProc callback.
A pointer to user data that will be passed to the callback.
An error code. Returns noErr
if
there is no error.
This routine installs a callback to monitor a track property.
Introduced in QuickTime 7
Movies.h
Movies.h
Creates a QTAudioContext object that encapsulates a connection to a CoreAudio output device.
OSStatus QTAudioContextCreateForAudioDevice ( CFAllocatorRef allocator, CFStringRef coreAudioDeviceUID, CFDictionaryRef options, QTAudioContextRef *newAudioContextOut );
Allocator used to create the audio context.
CoreAudio device UID. NULL
means
the default device.
Reserved. Pass NULL
.
Points to a variable to receive the new audio context.
An error code. Returns noErr
if
there is no error.
This routine creates a QTAudioContext object that encapsulates
a connection to a CoreAudio output device. This object is suitable
for passing to SetMovieAudioContext
or NewMovieFromProperties
,
which targets the audio output of the movie to that device. A QTAudioContext
object cannot be associated with more than one movie. Each movie needs
its own connection to the device. In order to play more than one
movie to a particular device, create a QTAudioContext object for
each movie. You are responsible for releasing the QTAudioContext
object created by this routine. After calling SetMovieAudioContext
or NewMovieFromProperties
,
you can release the object since these APIs will retain it for their
own use. On Windows, the audioDeviceUID
is
the GUID of a DirectSound device, stringified using such Win32 functions
as StringFromCLSID
or StringFromGUID2
,
then wrapped in a CFStringRef using CFStringCreateWithCharacters
. After
passing the audioDeviceUID
CFStringRef
to QTAudioContextCreateForAudioDevice
,
remember to CFRelease
the CFStringRef
you created.
Introduced in QuickTime 7
Movies.h
Movies.h
Retains a movie’s metadata object and returns it.
OSStatus QTCopyMovieMetaData ( Movie inMovie, QTMetaDataRef *outMetaData );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
A pointer to an opaque metadata object wrapper associated with the movie passed in inMovie.
Returns invalidMovie
if
the movie passed in inMovie is invalid,
or noErr
if there is no error.
This function returns the metadata object associated with
a movie. The object has retain/release semantics. It has already
been retained before returning, but you should call QTMetaDataRelease
when
you are done. Because the movie can be disposed of at any time, the QTMetaDataRef
may
be valid when the movie no longer exists. In this case, the function will
fail with a kQTMetaDataInvalidMetaDataErr
error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Retains a track’s metadata object and returns it.
OSStatus QTCopyTrackMetaData ( Track inTrack, QTMetaDataRef *outMetaData );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
A pointer to an opaque metadata object wrapper associated with the track passed in inTrack.
Returns invalidMedia
if
the track passed in inTrack is invalid,
or noErr
if there is no error.
This function returns the metadata object associated with
a track. The object has retain/release semantics. It has already
been retained before returning, but you should call QTMetaDataRelease
when
you are done. Because the track can be disposed of at any time, the QTMetaDataRef
may
be valid when the track no longer exists. In this case, the function will
fail with a kQTMetaDataInvalidMetaDataErr
error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Retains a media’s metadata object and returns it.
OSStatus QTCopyMediaMetaData ( Media inMedia, QTMetaDataRef *outMetaData );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A pointer to an opaque metadata object wrapper associated with the media passed in inMedia.
Returns invalidMedia
if
the media passed in inMedia is invalid,
or noErr
if there is no error.
This function returns the metadata object associated with
a media. The object has retain/release semantics. It has already
been retained before returning, but you should call QTMetaDataRelease
when
you are done. Because the media can be disposed of at any time, the QTMetaDataRef
may
be valid when the media no longer exists. In this case, the function will
fail with a kQTMetaDataInvalidMetaDataErr
error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the value of a specific track property.
OSErr QTGetTrackProperty ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
The track for this operation.
A property class.
A property ID.
The size of the buffer allocated to hold the property value.
A pointer to the buffer allocated to hold the property value.
On return, the actual size of the value written to the buffer.
An error code. Returns noErr
if
there is no error.
This routine returns the value of a specific track property.
Introduced in QuickTime 7
Movies.h
Movies.h
Returns information about the properties of a track.
OSErr QTGetTrackPropertyInfo ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
The track for this operation.
A property class.
A property ID.
A pointer to memory allocated to hold the property
type
on return.
A pointer to memory allocated to hold the size of the property value on return.
A pointer to memory allocated to hold property flags on return.
An error code. Returns noErr
if
there is no error.
This routine returns information about the properties of a track.
Introduced in QuickTime 7
Movies.h
Movies.h
Finds and loads a QuickTime library DLL.
HINSTANCE QTLoadLibrary ( const char *szDLL );
The name, not the full path for this operation.
If the function succeeds, the return value is the instance handle.
This routine takes the name of the QuickTime DLL and searches all the places where it can be installed.
Introduced in QuickTime 7 for Windows.
QTLoadLibraryUtils.h
Adds an inline metadata item to the metadata storage format.
OSStatus QTMetaDataAddItem ( QTMetaDataRef inMetaData, QTMetaDataStorageFormat inMetaDataFormat, QTMetaDataKeyFormat inKeyFormat, const UInt8 *inKeyPtr, ByteCount inKeySize, const UInt8 *inValuePtr, ByteCount inValueSize, UInt32 inDataType, QTMetaDataItem *outItem);
The metadata object for this operation.
The metadata storage format used by the object
passed in inMetaData. The format
may be UserData
storage, iTunes metadata storage,
or QuickTime metadata storage. Not all objects will include all
forms of storage, and other storage formats may appear in the future.
You cannot pass kQTMetaDataStorageFormatWildcard
to
target all storage formats.
The format of the key.
A pointer to the key of the item to be fetched
next. You may pass NULL
in this
parameter if you are not interested in any specific key.
The size of the key in bytes.
A pointer to the value to be added. This can
be NULL
if inValueSize is
0.
The size of inValuePtr in bytes. Pass 0 if you want to add an item with no value.
A data type from the following list:
kQTMetaDataTypeBinary = 0, |
kQTMetaDataTypeUTF8 = 1, |
kQTMetaDataTypeUTF16BE = 2, |
kQTMetaDataTypeMacEncodedText = 3, |
kQTMetaDataTypeSignedIntegerBE = 21, |
kQTMetaDataTypeUnsignedIntegerBE = 22, |
kQTMetaDataTypeFloat32BE = 23, |
kQTMetaDataTypeFloat64BE = 24 |
With kQTMetaDataTypeSignedIntegerBE
and kQTMetaDataTypeUnsignedIntegerBE
,
the size of the integer is determined by the value size.
On return, a pointer to an opaque, unique UInt64
identifier
of the newly added item. Your application can use this to identify
the metadata item within a metadata object for other metadata functions.
You may pass NULL
if
you are not interested in the identifier of the newly added item.
This identifier does not need to be disposed of.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidStorageFormatErr
if
the metatada storage format is invalid, kQTMetaDataInvalidKeyErr
if
the key or its format is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
The data type of the metadata item is assumed to be binary.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the number of items in a metadata storage format with a certain key.
OSStatus QTMetaDataGetItemCountWithKey ( QTMetaDataRef inMetaData, QTMetaDataStorageFormat inMetaDataFormat, QTMetaDataKeyFormat inKeyFormat, const UInt8 *inKeyPtr, ByteCount inKeySize, ItemCount *outCount);
The metadata object for this operation.
The metadata storage format used by the object
passed in inMetaData. The format
may be UserData
storage, iTunes metadata storage,
or QuickTime metadata storage. Not all objects will include all
forms of storage, and other storage formats may appear in the future.
You cannot pass kQTMetaDataStorageFormatWildcard
to
target all storage formats.
The format of the key.
A pointer to the key of the item to be fetched
next. You may pass NULL
in this
parameter if you are not interested in any specific key.
The size of the key in bytes.
The number of items in the metadata storage format that have the specified key.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidStorageFormatErr
if
the metatada storage format is invalid, kQTMetaDataInvalidKeyErr
if
the key or its format is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns a property of a metadata item.
OSStatus QTMetaDataGetItemProperty ( QTMetaDataRef inMetaData, QTMetaDataItem inItem, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application obtains
this item identifier from such functions as QTMetaDataAddItem
and QTMetaDataGetNextItem
.
The class of the property being asked about.
The ID of the property being asked about.
Size of the buffer allocated to receive the property value.
A pointer to the buffer allocated to receive the item’s property value.
On return, the actual size of buffer space used.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, errPropNotSupported
if
the metatada object does not support the property being asked about, buffersTooSmall
if
the allocated buffer is too small to hold the property, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns information about a property of a metadata item.
OSStatus QTMetaDataGetItemPropertyInfo ( QTMetaDataRef inMetaData, QTMetaDataItem inItem, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropFlags );
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application obtains
this item identifier from such functions as QTMetaDataAddItem
and QTMetaDataGetNextItem
.
The class of the property being asked about.
The ID of the property being asked about.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the item’s property.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, errPropNotSupported
if
the metatada object does not support the item property being asked
about, or noErr
if there is no error.
See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the value of a metadata item from an item identifier.
OSStatus QTMetaDataGetItemValue ( QTMetaDataRef inMetaData, QTMetaDataItem inItem, UInt8 *outValuePtr, ByteCount inValueSize, ByteCount *outActualSize );
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application can obtain
this item identifier from such functions as QTMetaDataAddItem
.
A pointer to the first value of the item.
You may pass NULL
in
this parameter if you just want to find out the size of the buffer
needed.
The number of bytes in the outValuePtr buffer. You may pass 0 if you just want to find out the size of the buffer needed.
The actual size of the value if this parameter
is not NULL
.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
You can use this function to get the value of a metadata item that has a known item identifier.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the next metadata item corresponding to a specified key.
OSStatus QTMetaDataGetNextItem ( QTMetaDataRef inMetaData, QTMetaDataStorageFormat inMetaDataFormat, QTMetaDataItem inCurrentItem, QTMetaDataKeyFormat inKeyFormat, const UInt8 *inKeyPtr, ByteCount inKeySize, QTMetaDataItem *outNextItem );
The metadata object for this operation.
The metadata storage format used by the object
passed in inMetaData. The format
may be UserData
storage, iTunes metadata storage,
or QuickTime metadata storage. Not all objects will include all
forms of storage, and other storage formats may appear in the future.
Pass kQTMetaDataStorageFormatWildcard
to
target all storage formats.
The opaque, unique UInt64
identifier
of the current metadata item to start the search. Your application
obtains this item identifier from such functions as QTMetaDataAddItem
.
The format of the key.
A pointer to the key of the item to be fetched
next. You may pass NULL
in this
parameter if you are not interested in any specific key.
The size of the key in bytes.
The ID of the next metadata item after the item specified by inCurrentItem that has the specified key.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, kQTMetaDataInvalidStorageFormatErr
if
the metatada storage format is invalid, kQTMetaDataInvalidKeyErr
if
the key or its format is invalid, kQTMetaDataNoMoreItemErr
if
the last item has been fetched, or noErr
if
there is no error. See “Metadata Error Codes”
.
If the item designated by inCurrentItem is kQTMetaDataItemUninitialized
,
the function returns the first item with the specified key in the
storage format. If it refers to a valid item in the storage format,
the function will return the next item with the key after the item designated
by inCurrentItem.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns a property of a metadata object.
OSStatus QTMetaDataGetProperty ( QTMetaDataRef inMetaData, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
The metadata object for this operation.
The class of the property being asked about.
The ID of the property being asked about.
Size of the buffer allocated to receive the property value.
A pointer to the buffer allocated to receive the property value.
On return, the actual size of buffer space used.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, errPropNotSupported
if
the metatada object does not support the property being asked about, buffersTooSmall
if
the allocated buffer is too small to hold the property, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns information about a property of a metadata object.
OSStatus QTMetaDataGetPropertyInfo ( QTMetaDataRef inMetaData, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropFlags );
The metadata object for this operation.
The class of the property being asked about.
The ID of the property being asked about.
A pointer to the type of the returned property’s value.
A pointer to the size of the returned property’s value.
On return, a pointer to flags representing the requested information about the property.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, errPropNotSupported
if
the metatada object does not support the property being asked about,
or noErr
if there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Increments the retain count of a metadata object.
QTMetaDataRef QTMetaDataRetain ( QTMetaDataRef inMetaData );
A metadata object that you want to retain.
If successful, returns a metadata object that is the same as that passed in inMetaData.
This function retains a metadata object by incrementing its
reference count. You should retain every metadata object when you
receive it from elsewhere and you want it to persist. If you retain
a metadata object you are responsible for releasing it by calling QTMetaDataRelease
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Decrements the retain count of a metadata object.
void QTMetaDataRelease ( QTMetaDataRef inMetaData );
This function releases a metadata object by decrementing its reference count. When the count becomes 0 the memory allocated to the object is freed and the object is destroyed. If you retain a metadata object you are responsible for releasing it when you no longer need it.
Introduced in QuickTime 7.
Movies.h
Movies.h
Removes a metadata item from a storage format.
OSStatus QTMetaDataRemoveItem ( QTMetaDataRef inMetaData, QTMetaDataItem inItem );
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application obtains
this item identifier from such functions as QTMetaDataAddItem
and QTMetaDataGetNextItem
.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Removes metadata items with a specific key from the storage format.
OSStatus QTMetaDataRemoveItemsWithKey ( QTMetaDataRef inMetaData, QTMetaDataStorageFormat inMetaDataFormat, QTMetaDataKeyFormat inKeyFormat, const UInt8 *inKeyPtr, ByteCount inKeySize);
The metadata object for this operation.
The metadata storage format used by the object
passed in inMetaData. The format
may be UserData
storage, iTunes metadata storage,
or QuickTime metadata storage. Not all objects will include all
forms of storage, and other storage formats may appear in the future.
You can pass kQTMetaDataStorageFormatWildcard
to
target all storage formats.
The format of the key.
A pointer to the key of the item to be removed.
You may pass NULL
in
this parameter if you want to remove all items.
The size of the key in bytes.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidStorageFormatErr
if
the metatada storage format is invalid, kQTMetaDataInvalidKeyErr
if
the key or its format is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the value of the metadata item from the item identifier.
OSStatus QTMetaDataSetItem ( QTMetaDataRef inMetaData, QTMetaDataItem inItem, UInt8 *inValuePtr, ByteCount inValueSize, UInt32 inDataType);
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application obtains
this item identifier from such functions as QTMetaDataAddItem
and QTMetaDataGetNextItem
.
A pointer to the value to be set. This can
be NULL
if inValueSize is
0.
The size of inValuePtr in bytes. Pass 0 if you want to set an item with no value.
A data type from the following list:
kQTMetaDataTypeBinary = 0, |
kQTMetaDataTypeUTF8 = 1, |
kQTMetaDataTypeUTF16BE = 2, |
kQTMetaDataTypeMacEncodedText = 3, |
kQTMetaDataTypeSignedIntegerBE = 21, |
kQTMetaDataTypeUnsignedIntegerBE = 22, |
kQTMetaDataTypeFloat32BE = 23, |
kQTMetaDataTypeFloat64BE = 24 |
With kQTMetaDataTypeSignedIntegerBE and kQTMetaDataTypeUnsignedIntegerBE, the size of the integer is determined by the value size.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, or noErr
if
there is no error. See “Metadata Error Codes”
.
You can use this function to set the value of the metadata item with a given item identifier. You can set an item with an empty value by passing 0 in inValueSize.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets a property of a metadata item.
OSStatus QTMetaDataSetItemProperty ( QTMetaDataRef inMetaData, QTMetaDataItem inItem, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
The metadata object for this operation.
The opaque, unique UInt64
identifier
of the metadata item for this operation. Your application obtains
this item identifier from such functions as QTMetaDataAddItem
and QTMetaDataGetNextItem
.
The class of the property being set.
The ID of the property being set.
Size of the buffer containing the property value being set.
A pointer to the buffer containing the item property value being set.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, kQTMetaDataInvalidItemErr
if
the metatada item ID is invalid, errPropNotSupported
if
the metatada object does not support the property being set, qtReadOnlyErr
if
the property being set is read-only, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets a property of a metadata object.
OSStatus QTMetaDataSetProperty ( QTMetaDataRef inMetaData, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress);
The metadata object for this operation.
The class of the property being set.
The ID of the property being set.
Size of the buffer containing the property value being set.
A pointer to the buffer containing the property value being set.
Returns kQTMetaDataInvalidMetaDataErr
if
the metadata object or its reference is invalid, errPropNotSupported
if
the metatada object does not support the property being set, qtReadOnlyErr
if
the property being set is read-only, or noErr
if
there is no error. See “Metadata Error Codes”
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Creates a new OpenGL texture context for a specified OpenGL context and pixel format.
OSStatus QTOpenGLTextureContextCreate ( CFAllocatorRef allocator, CGLContextObj cglContext, CGLPixelFormatObj cglPixelFormat, CFDictionaryRef attributes, QTOpenGLTextureContextRef *newTextureContext );
The allocator used to create the texture context.
A pointer to an opaque CGLPContextObj
structure
representing the OpenGL context used to create textures. You can
create this structure using CGLCreateContext
.
The pixel format object that specifies buffer types and other attributes of the new context.
A dictionary of attributes.
A pointer to a variable to receive the new OpenGL texture context.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Creates a new pixel buffer context with the given attributes.
OSStatus QTPixelBufferContextCreate ( CFAllocatorRef allocator, CFDictionaryRef attributes, QTVisualContextRef *newPixelBufferContext );
Allocator used to create the pixel buffer context.
Dictionary of attributes.
Points to a variable to receive the new pixel buffer context.
An error code. Returns noErr
if
there is no error.
This routine creates a new pixel buffer context with the given attributes.
Introduced in QuickTime 7
ImageCompression.h
ImageCompression.h
Removes a track property monitoring callback
OSErr QTRemoveTrackPropertyListener ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, QTTrackPropertyListenerUPP inListenerProc, void *inUserData );
The track for this operation.
A property class.
A property ID.
A Universal Procedure Pointer to a QTTrackPropertyListenerProc callback.
User data to be passed to the callback.
An error code. Returns noErr
if
there is no error.
This routine removes a track property monitoring callback.
Introduced in QuickTime 7
Movies.h
Movies.h
Adds a sample description to a sample table, returning a sample description ID that can be used to refer to it.
OSStatus QTSampleTableAddSampleDescription ( QTMutableSampleTableRef sampleTable, SampleDescriptionHandle sampleDescriptionH, long mediaSampleDescriptionIndex, QTSampleDescriptionID *sampleDescriptionIDOut );
A reference to an opaque sample table object.
A handle to a SampleDescription
structure.
QuickTime will make its own copy of this handle.
The sample description index of this sample description in a media. Pass 0 for sample descriptions you add to sample tables, to indicate that this was not retrieved from a media.
A pointer to a variable to receive a sample description ID.
An error code. Returns noErr
if
there is no error.
You can use the returned sample description ID when adding samples to the sample table.
Sample description IDs are local to each sample table. The same sample description handle may have different IDs when referenced in different sample tables.
Introduced in QuickTime 7.
Movies.h
Movies.h
Adds sample references to a sample table.
OSStatus QTSampleTableAddSampleReferences ( QTMutableSampleTableRef sampleTable, SInt64 dataOffset, ByteCount dataSizePerSample, TimeValue64 decodeDurationPerSample, TimeValue64 displayOffset, SInt64 numberOfSamples, MediaSampleFlags sampleFlags, QTSampleDescriptionID sampleDescriptionID, SInt64 *newSampleNumOut );
A reference to an opaque sample table object.
A 64-bit signed integer that specifies the offset at which the first sample begins.
The number of bytes of data per sample. You must pass the data size per sample, not the total size of all the samples as with some other APIs.
A 64-bit time value that specifies the decode duration of each sample.
A 64-bit time value that specifies the offset from decode time to display time of each sample. If the decode times and display times are the same, pass 0.
A 64-bit signed integer, which must be greater than 0, that specifies the number of samples.
Flags that indicate the sync
status
of all samples:
mediaSampleNotSync
If set to 1, indicates that the sample to be added is not a sync sample. Set this flag to 0 if the sample is a sync sample.
mediaSampleShadowSync
If set to 1, the sample is a shadow sync sample.
The ID of a sample description that has been
added to the sample table with QTSampleTableAddSampleDescription
.
A 64-bit signed integer that points to a variable
to receive the sample number of the first sample that was added.
Pass NULL
if you don't
want this information.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Retrieves a sample description from a sample table.
OSStatus QTSampleTableCopySampleDescription ( QTSampleTableRef sampleTable, QTSampleDescriptionID sampleDescriptionID, long *mediaSampleDescriptionIndexOut, SampleDescriptionHandle *sampleDescriptionHOut );
A reference to an opaque sample table object.
The sample description ID.
A pointer to a variable to receive a media
sample description index. If the sample description came from a
media, this is the index that could be passed to GetMediaSampleDescription
to
retrieve the same sample description handle. The index will be 0
if the sample description did not come directly from a media. Pass NULL
if
you do not want to receive this information.
A pointer to a variable to receive a newly
allocated sample description handle. Pass NULL
if
you do not want one. The caller is responsible for disposing the
returned sample description handle using DisposeHandle
.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Creates a new, empty sample table.
OSStatus QTSampleTableCreateMutable ( CFAllocatorRef allocator, TimeScale timescale, void *hints, QTMutableSampleTableRef *newSampleTable );
The allocator to use for the new sample table.
A long integer that represents the timescale to use for durations and display offsets.
Reserved; pass NULL
.
A pointer to a variable that receives a new reference to an opaque sample table object.
An error code. Returns memFullErr
if
it could not allocate memory, paramErr
if
the time scale is not positive or newSampleTable is NULL
,
or noErr
if there is no error.
The newly created sample table contains no sample references. When sample references are added, their durations and display offsets are interpreted according to the sample table’s current timescale.
Introduced in QuickTime 7.
Movies.h
Movies.h
Copies a sample table.
OSStatus QTSampleTableCreateMutableCopy ( CFAllocatorRef allocator, QTSampleTableRef sampleTable, void *hints, QTMutableSampleTableRef *newSampleTable );
The allocator to use for the new sample table.
A reference to an opaque sample table object to copy.
Reserved; set to NULL
.
A pointer to a variable that receives a reference to an opaque sample table object.
An error code. Returns memFullErr
if
it could not allocate memory, paramErr
if
the time scale is not positive or newSampleTable is NULL
,
or noErr
if there is no error.
All the sample references and sample descriptions in the sample table are copied.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the data offset of a sample.
SInt64 QTSampleTableGetDataOffset ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents a sample number. The first sample’s number is 1.
A 64-bit signed integer
that represents the offset to the sample. Returns 0 if sampleTable is NULL
or
if the sample number is out of range.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the data size of a sample.
ByteCount QTSampleTableGetDataSizePerSample ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents the sample number. The first sample’s number is 1.
The size of the sample
in bytes. Returns 0 if samplTable is NULL
or
if the sample number is out of range.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the decode duration of a sample.
TimeValue64 QTSampleTableGetDecodeDuration ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents the sample number. The first sample’s number is 1.
A 64-bit time value
that represents the decode duration of the sample. Returns 0 if samplTable is NULL
or
if the sample number is out of range.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the offset from decode time to display time of a sample.
TimeValue64 QTSampleTableGetDisplayOffset ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents the sample number. The first sample’s number is 1.
A 64-bit time value
that represents the offset from decode time to display time of the
sample. Returns 0 if samplTable is NULL
or
if the sample number is out of range.
Introduced in QuickTime 7.
Movies.h
Movies.h
Finds the next sample number at which one or more of a set of given sample attributes change.
OSStatus QTSampleTableGetNextAttributeChange ( QTSampleTableRef sampleTable, SInt64 startSampleNum, QTSampleTableAttribute attributeMask, SInt64 *sampleNumOut );
A reference to an opaque sample table object.
A 64-bit signed integer that contains the sample number to start searching from.
An unsigned 32-bit integer that contains flags indicating which kinds of attribute changes to search for:
kQTSampleTableAttribute_DiscontiguousData
= 1L << 0
Set this flag to find the first sample number num such
that samples num-1 and num are
not adjacent; that is, dataOffset
of num-1
+ dataSize
of num-1 !=
dataOffset
of num
.
kQTSampleTableAttribute_DataSizePerSampleChange
= 1L << 1
Set this flag to find the first sample with data size per sample different from that of the starting sample.
kQTSampleTableAttribute_DecodeDurationChange
= 1L << 2
Set this flag to find the first sample with decode duration different from that of the starting sample.
kQTSampleTableAttribute_DisplayOffsetChange
= 1L << 3
Set this flag to find the first sample with display offset different from that of the starting sample.
kQTSampleTableAttribute_SampleDescriptionIDChange
= 1L << 4
Set this flag to find the first sample with sample description ID different from that of the starting sample.
kQTSampleTableAttribute_SampleFlagsChange
= 1L << 5
Set this flag to find the first sample with any media sample flags different from those of the starting sample.
kQTSampleTableAnyAttributeChange
= 0
If no flags are set, find the first sample with any attribute different from the starting sample.
A 64-bit signed integer that points to a variable to receive the next sample number after startSampleNum at which any of the requested attributes change. If no attribute changes are found, this variable is set to 0.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the number of samples in a sample table.
SInt64 QTSampleTableGetNumberOfSamples ( QTSampleTableRef sampleTable );
A reference to an opaque sample table object.
A 64-bit signed integer
that contains the number of samples, or 0 if sampleTable is NULL
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the value of a specific sample table property.
OSStatus QTSampleTableGetProperty ( QTSampleTableRef sampleTable, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed );
A reference to an opaque sample table object.
Pass the following constant to define the property class:
kQTPropertyClass_SampleTable
= 'qtst'
Property of a sample table.
Pass one of these constants to define the property ID:
kQTSampleTablePropertyID_TotalDecodeDuration
= 'tded'
The total decode duration of all samples in the sample table. Read-only.
kQTSampleTablePropertyID_MinDisplayOffset
= '<ddd'
The least display offset in the table. Negative offsets are less than positive offsets. Read-only.
kQTSampleTablePropertyID_MaxDisplayOffset
= '>ddd'
The greatest display offset in the table. Positive offsets are greater than negative offsets. Read-only.
kQTSampleTablePropertyID_MinRelativeDisplayTime
= '<dis'
The least display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
kQTSampleTablePropertyID_MaxRelativeDisplayTime
= '>dis'
The greatest display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
The size of the buffer allocated to receive the property value.
A pointer to the buffer allocated to receive the property value.
On return, the actual size of the property value written to the buffer.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns information about the properties of a sample table.
OSStatus QTSampleTableGetPropertyInfo ( QTSampleTableRef sampleTable, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags );
A reference to an opaque sample table object.
Pass the following constant to define the property class:
kQTPropertyClass_SampleTable
= 'qtst'
Property of a sample table.
Pass one of these constants to define the property ID:
kQTSampleTablePropertyID_TotalDecodeDuration
= 'tded'
The total decode duration of all samples in the sample table. Read-only.
kQTSampleTablePropertyID_MinDisplayOffset
= '<ddd'
The least display offset in the table. Negative offsets are less than positive offsets. Read-only.
kQTSampleTablePropertyID_MaxDisplayOffset
= '>ddd'
The greatest display offset in the table. Positive offsets are greater than negative offsets. Read-only.
kQTSampleTablePropertyID_MinRelativeDisplayTime
= '<dis'
The least display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
kQTSampleTablePropertyID_MaxRelativeDisplayTime
= '>dis'
The greatest display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
A pointer to memory allocated to hold the
property type on return: Pass NULL
if
you do not want this information.
A pointer to memory allocated to hold the
size of the property value on return. Pass NULL
if
you do not want this information.
A pointer to memory allocated to hold property
flags on return. Pass NULL
if
you do not want this information.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the sample description ID of a sample.
QTSampleDescriptionID QTSampleTableGetSampleDescriptionID ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents the sample number. The first sample’s number is 1.
The sample’s sample
description ID. Returns 0 if samplTable is NULL
or if
the sample number is out of range.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the media sample flags of a sample.
MediaSampleFlags QTSampleTableGetSampleFlags ( QTSampleTableRef sampleTable, SInt64 sampleNum );
A reference to an opaque sample table object.
A 64-bit signed integer that represents the sample number. The first sample’s number is 1.
A constant that describes
characteristics of the sample (see below). Returns 0 if samplTable is NULL
or
if the sample number is out of range.
This function can return one or more of the following constants:
mediaSampleNotSync
Sample is not a sync sample (for example, it is is frame differenced).
mediaSampleShadowSync
Sample is a shadow sync sample.
mediaSampleDroppable
Sample does not need to be decoded for later samples to be decoded properly.
mediaSamplePartialSync
Sample is a partial sync sample (for example, 1 frame after open GOP).
mediaSampleHasRedundantCoding
Sample is known to contain redundant coding.
mediaSampleHasNoRedundantCoding
Sample is known not to contain redundant coding.
mediaSampleIsDependedOnByOthers
One or more other samples depend on this sample being decoded.
mediaSampleIsNotDependedOnByOthers
Synonym for mediaSampleDroppable
.
mediaSampleDependsOnOthers
Decoding this sample depends on decoding other samples.
mediaSampleDoesNotDependOnOthers
Decoding this sample does not depend on decoding other samples.
mediaSampleEarlierDisplayTimesAllowed
Samples later in decode order may have earlier display times.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the timescale of a sample table.
TimeScale QTSampleTableGetTimeScale ( QTSampleTableRef sampleTable );
A reference to an opaque sample table object.
A long integer that
represents the sample’s time scale, or 0 if sampleTable is NULL
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Returns the CFTypeID
value
for the current sample table.
CFTypeID QTSampleTableGetTypeID ( void );
A CFTypeID
value.
You could use this to test whether a CFTypeRef
that
was extracted from a CF container such as a CFArray
is
a QTSampleTableRef
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Decrements the retain count of a sample table.
void QTSampleTableRelease ( QTSampleTableRef sampleTable );
A reference to an opaque sample table object.
If you pass NULL
in this parameter,
nothing happens.
If the retain count decreases to zero, the sample table is disposed.
Introduced in QuickTime 7.
Movies.h
Movies.h
Replaces a range of samples in a sample table with a range of samples from another sample table.
OSStatus QTSampleTableReplaceRange ( QTMutableSampleTableRef destSampleTable, SInt64 destStartingSampleNum, SInt64 destSampleCount, QTSampleTableRef sourceSampleTable, SInt64 sourceStartingSampleNum, SInt64 sourceSampleCount );
A reference to an opaque sample table object to be modified.
A 64-bit signed integer that represents the first sample number in destSampleTable to be replaced or deleted, or the sample number at which samples should be inserted.
A 64-bit signed integer that represents the number of samples to be removed from destSampleTable. Pass 0 to insert samples without removing samples.
A reference to an opaque sample table object
from which samples should be copied, or NULL
to
delete samples.
A 64-bit signed integer that represents the first sample number to be copied. This parameter is ignored when deleting samples.
A 64-bit signed integer that represents the number of samples which should be copied. Pass 0 to delete samples.
An error code. Returns noErr
if
there is no error.
This function removes destSampleCount samples from destSampleTable starting with destStartingSampleNum, and then inserts sourceSampleCount samples from sourceSampleTable starting with sourceStartingSampleNum where the removed samples were. Sample descriptions will be copied if necessary and new sample description IDs defined. This function can also be used to delete a range of samples, or to insert samples without removing any.
Introduced in QuickTime 7.
Movies.h
Movies.h
Increments the retain count of a sample table.
QTSampleTableRef QTSampleTableRetain ( QTSampleTableRef sampleTable );
A reference to an opaque sample table object.
If you pass NULL
in this parameter,
nothing happens.
A pointer to the OpaqueQTSampleTable
structure
that is returned for your convenience, or NULL
if
the function fails.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the value of a specific sample table property.
OSStatus QTSampleTableSetProperty ( QTSampleTableRef sampleTable, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
A reference to an opaque sample table object.
Pass the following constant to define the property class:
kQTPropertyClass_SampleTable
= 'qtst'
Property of a sample table.
Pass one of these constants to define the property ID:
kQTSampleTablePropertyID_TotalDecodeDuration
= 'tded'
The total decode duration of all samples in the sample table. Read-only.
kQTSampleTablePropertyID_MinDisplayOffset
= '<ddd'
The least display offset in the table. Negative offsets are less than positive offsets. Read-only.
kQTSampleTablePropertyID_MaxDisplayOffset
= '>ddd'
The greatest display offset in the table. Positive offsets are greater than negative offsets. Read-only.
kQTSampleTablePropertyID_MinRelativeDisplayTime
= '<dis'
The least display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
kQTSampleTablePropertyID_MaxRelativeDisplayTime
= '>dis'
The greatest display time of all samples in the table, relative to the decode time of the first sample in the table. Read-only.
Pass the size of the property value.
Pass a const void pointer to the property value.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Changes the timescale of a sample table.
OSStatus QTSampleTableSetTimeScale ( QTMutableSampleTableRef sampleTable, TimeScale newTimeScale );
A reference to an opaque sample table object.
A long integer whose value is the time scale to be set.
An error code. Returns paramErr
if
the time scale is not positive or sampleTable is NULL
,
or noErr
if there is no error.
The durations and display offsets of all the sample references in the sample table are scaled from the old timescale to the new timescale. No durations are scaled to a value less than 1. Display offsets are adjusted to avoid display time collisions.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the value of a specific track property.
OSErr QTSetTrackProperty ( Track inTrack, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
The track for this operation.
A property class.
A property ID.
The size of the property value.
A pointer to the the property value.
An error code. Returns noErr
if
there is no error.
This routine sets the value of a specific track property.
Introduced in QuickTime 7
Movies.h
Movies.h
Converts a sound description from one version to another.
OSStatus QTSoundDescriptionConvert ( QTSoundDescriptionKind fromKind, SoundDescriptionHandle fromDescription, QTSoundDescriptionKind toKind, SoundDescriptionHandle *toDescription );
Reserved. Set to kSoundDescriptionKind_Movie_AnyVersion
.
A handle to the sound description to be converted.
The version you want fromDescription to be.
A reference to the resulting SoundDescription
structure.
You must dispose of the reference using DisposeHandle
.
An error code. Returns noErr
if
there is no error.
The fromKind parameter is reserved
for future expansion; at present you must set it to kSoundDescriptionKind_Movie_AnyVersion
.
Depending on the value you pass in toKind, you
can specify that you would like a specific SoundDescription
version,
the lowest possible version (given the constraints of the format
described by fromDescription), or any
version at all.
Introduced in QuickTime 7.
Movies.h
Movies.h
Creates a sound description structure of the requested
kind from an AudioStreamBasicDescription
,
optional audio channel layout, and optional magic cookie.
OSStatus QTSoundDescriptionCreate ( AudioStreamBasicDescription *inASBD, AudioChannelLayout *inLayout, ByteCount inLayoutSize, void *inMagicCookie ByteCount inMagicCookieSize QTSoundDescriptionKind inRequestedKind SoundDescriptionHandle *outSoundDesc );
A description of the format.
The audio channel layout (can be NULL
if
there isn’t one).
The size of the audio channel layout (should
be 0 if inLayout is NULL
).
The magic cookie for the decompressor (can
be NULL
if the decompressor doesn’t
require one).
The size of the magic cookie (should be 0
if the inMagicCookie parameter is NULL
).
The kind of sound description to create.
The resulting sound description. The caller
must dispose of it with DisposeHandle
.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Gets information about a particular property of a sound description.
OSStatus QTSoundDescriptionGetPropertyInfo ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, QTPropertyValueType *outPropType, ByteCount *outPropValueSize, UInt32 *outPropertyFlags);
The sound description being interrogated.
The class of the property being requested.
The ID of the property being requested.
The type of the property returned here (can
be NULL
).
The size of the property returned here (can
be NULL
).
The property flags returned here (can be NULL
).
An error code. Returns noErr
if
there is no error.
The following constants identify sound description properties.
enum { |
kQTSoundDescriptionPropertyID_AudioChannelLayout = 'clay', |
kQTSoundDescriptionPropertyID_MagicCookie = 'kuki', |
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription = 'asbd', |
kQTSoundDescriptionPropertyID_UserReadableText = 'text' |
}; |
kQTSoundDescriptionPropertyID_AudioChannelLayout
= 'clay'
Used to get or set an AudioChannelLayout
value.
This is a variable-size property because it may contain an array
of Channel Descriptions. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_MagicCookie
= 'kuki'
Used to get or set opaque bytes. This is a variable-size
property, because it is completely defined by the codec that uses
the cookie. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription
= 'asbd'
Used to get an AudioStreamBasicDescription
value.
kQTSoundDescriptionPropertyID_UserReadableText
= 'text'
Used to get a CFStringRef
value. QTSoundDescriptionGetProperty
does
a CFRetain
of the returned CFString
on
behalf of the caller, so the caller is responsible for calling CFRelease
on
the returned CFString
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Gets a particular property of a sound description.
OSStatus QTSoundDescriptionGetProperty ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, QTPropertyValuePtr outPropValueAddress, ByteCount *outPropValueSizeUsed);
The sound description being interrogated.
The class of the property being requested.
The ID of the property being requested.
The size of the property value buffer.
A pointer to the property value buffer.
The actual size of the returned property value
(can be NULL
).
An error code. Returns noErr
if
there is no error.
The following constants identify sound description properties.
enum { |
kQTSoundDescriptionPropertyID_AudioChannelLayout = 'clay', |
kQTSoundDescriptionPropertyID_MagicCookie = 'kuki', |
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription = 'asbd', |
kQTSoundDescriptionPropertyID_UserReadableText = 'text' |
}; |
kQTSoundDescriptionPropertyID_AudioChannelLayout
= 'clay'
Used to get or set an AudioChannelLayout
value.
This is a variable-size property because it may contain an array
of Channel Descriptions. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_MagicCookie
= 'kuki'
Used to get or set opaque bytes. This is a variable-size
property, because it is completely defined by the codec that uses
the cookie. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription
= 'asbd'
Used to get an AudioStreamBasicDescription
value.
kQTSoundDescriptionPropertyID_UserReadableText
= 'text'
Used to get a CFStringRef
value. QTSoundDescriptionGetProperty
does
a CFRetain
of the returned CFString
on
behalf of the caller, so the caller is responsible for calling CFRelease
on
the returned CFString
.
kQTAudioPropertyID_FormatString
= 'fstr'
Used with kQTPropertyClass_Audio
to
get a CFStringRef
value containing a localized,
human readable string that describes an audio format; for example,
“MPEG Layer 3.” You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or from
a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_ChannelLayoutString
= 'lstr'
Used with kQTPropertyClass_Audio
to
get a CFStringRef
value containing a localized,
human readable string that describes an audio channel layout; for
example, “5.0 (L R C Ls Rs).” You may get this property from
a SoundDescription
handle by calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SampleRateString
= 'rstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio sample rate; for example, “44.100 kHz.” You may get this
property from a SoundDescription
handle by
calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SampleSizeString
= 'sstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio sample size; for example, “24-bit.” This property will
return a valid string only if the audio format is uncompressed (LPCM).
You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_BitRateString
= 'bstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio bit rate; for example, “12 kbps.” You may get this property
from a StandardAudioCompression
(scdi
or audi
) component
instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SummaryString
= 'asum'
Used to get a CFStringRef
value
containing a localized, human readable string that summarizes an
audio format; for example, “16-bit Integer (Big Endian), Stereo
(L R), 48.000 kHz.” You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or from
a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets a particular property of a sound description.
OSStatus QTSoundDescriptionSetProperty ( SoundDescriptionHandle inDesc, QTPropertyClass inPropClass, QTPropertyID inPropID, ByteCount inPropValueSize, ConstQTPropertyValuePtr inPropValueAddress );
The sound description being modified.
The class of the property being set.
The ID of the property being set.
The size of the property value buffer.
A pointer to the property value buffer.
An error code. Returns noErr
if
there is no error.
The following constants identify sound description properties.
enum { |
kQTSoundDescriptionPropertyID_AudioChannelLayout = 'clay', |
kQTSoundDescriptionPropertyID_MagicCookie = 'kuki', |
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription = 'asbd', |
kQTSoundDescriptionPropertyID_UserReadableText = 'text' |
}; |
kQTSoundDescriptionPropertyID_AudioChannelLayout
= 'clay'
Used to get or set an AudioChannelLayout
value.
This is a variable-size property because it may contain an array
of Channel Descriptions. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_MagicCookie
= 'kuki'
Used to get or set opaque bytes. This is a variable-size
property, because it is completely defined by the codec that uses
the cookie. You must get the size by calling QTSoundDescriptionGetPropertyInfo
,
allocate a structure of that size, and then get the property.
kQTSoundDescriptionPropertyID_AudioStreamBasicDescription
= 'asbd'
Used to get an AudioStreamBasicDescription
value.
kQTSoundDescriptionPropertyID_UserReadableText
= 'text'
Used to get a CFStringRef
value. QTSoundDescriptionGetProperty
does
a CFRetain
of the returned CFString
on
behalf of the caller, so the caller is responsible for calling CFRelease
on
the returned CFString
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Finds the decode time for a specified sample.
void SampleNumToMediaDecodeTime ( Media theMedia, SInt64 logicalSampleNum, TimeValue64 *sampleDecodeTime, TimeValue64 *sampleDecodeDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit signed integer that contains the sample number.
A pointer to a time value. The function updates
this time value to indicate the decode time of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media's time scale. Set this parameter
to NULL
if you do not
want this information.
A pointer to a time value. The function updates
this time value to indicate the decode duration of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media's time scale. Set this parameter
to NULL
if you do not
want this information.
You can access this function’s error returns through GetMoviesError
and GetMoviesStickyError
.
It returns paramErr
if there is a bad
parameter value, or noErr
if there
is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Finds the display time for a specified sample.
void SampleNumToMediaDisplayTime ( Media theMedia, SInt64 logicalSampleNum, TimeValue64 *sampleDisplayTime, TimeValue64 *sampleDisplayDuration );
The media for this operation. You obtain this
media identifier from such functions as NewTrackMedia
and GetTrackMedia
.
A 64-bit signed integer that contains the sample number.
A pointer to a time value. The function updates
this time value to indicate the display time of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media's time scale. Set this parameter
to NULL
if you do not
want this information.
A pointer to a time value. The function updates
this time value to indicate the display duration of the sample specified
by the logicalSampleNum parameter.
This time value is expressed in the media’s time scale. Set this parameter
to NULL
if you do not
want this information.
You can access this function’s error returns through GetMoviesError
and GetMoviesStickyError
.
It returns paramErr
if there is a bad
parameter value, or noErr
if there
is no error.
Introduced in QuickTime 7.
Movies.h
Movies.h
Invokes the legacy code options dialog of an audio codec component.
ComponentResult SCAudioInvokeLegacyCodecOptionsDialog ( ComponentInstance ci );
A component instance that identifies a connection to an audio codec component.
An error code, or noErr
if
there is no error.
Introduced in QuickTime 7.
QuickTimeComponents.h
QuickTimeComponents.h
Creates a compression session options object based upon the settings in the Standard Compression component.
ComponentResult SCCopyCompressionSessionOptions ( ComponentInstance ci, ICMCompressionSessionOptionsRef *outOptions );
A component instance of Standard Compression component.
On return, a reference to a new compression session options object.
An error code. Returns noErr
if
there is no error. paramErr if
the client did not set the scAllowEncodingWithCompressionSession
preference
flag.
This function creates a new compression session options object
using the compression settings of the Standard Compression component
instance. You can use other Standard Compression component calls
to set up the compression settings. Then you call this function
to extract the compression settings in the form of a compression
session options object. The returned object can be used to create
a compression session object through ICMCompressionSessionCreate()
.
The caller must indicate that he or she intends to use the
new ICM compression session API to perform the compression operation,
by setting the scAllowEncodingWithCompressionSession
preference
flag through SCSetInfo()
with
the scPreferenceFlagsType
selector.
The caller of this function is expected to release the returned
compression session options object through ICMCompressionSessionOptionsRelease
when
it is done.
Introduced in QuickTime 7
QuickTimeComponents.h
QuickTimeComponents.h
Sets the display direction for a decompress sequence.
OSErr SetDSequenceNonScheduledDisplayDirection ( ImageSequence sequence, Fixed rate );
Contains the unique sequence identifier that
was returned by the DecompressSequenceBegin
function.
The display direction to be set. Negative values represent backward display and positive values represent forward display.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
QuickTimeComponents.h
ImageCompression.h
Sets the display time for a decompression sequence.
OSErr SetDSequenceNonScheduledDisplayTime ( ImageSequence sequence, TimeValue64 displayTime, TimeScale displayTimeScale, UInt32 flags );
Contains the unique sequence identifier that
was returned by the DecompressSequenceBegin
function.
The display time to be set.
The display time scale to be set.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
Introduced in QuickTime 7.
QuickTimeComponents.h
ImageCompression.h
Sets the balance level for the mixed audio output of a movie.
OSStatus SetMovieAudioBalance ( Movie m, Float32 leftRight, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
A pointer to the new balance setting for the movie. The balance setting is a 32-bit floating-point value that controls the relative volume of the left and right sound channels. A value of 0 sets the balance to neutral. Positive values up to 1.0 shift the balance to the right channel, negative values up to –1.0 to the left channel.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie’s balance setting is not stored in the movie;
it is used only until the movie is closed. See GetMovieAudioBalance
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Targets a movie to render into an audio context.
OSStatus SetMovieAudioContext ( Movie movie, QTAudioContextRef audioContext;
The movie.
The audio context that the movie will render into.
An error code. Returns noErr
if
there is no error. .
Introduced in QuickTime 7.
Movies.h
Movies.h
Configures frequency metering for a particular audio mix in a movie.
OSStatus SetMovieAudioFrequencyMeteringNumBands ( Movie m, FourCharCode whatMixToMeter, UInt32 *ioNumBands );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
A pointer to memory that stores the number
of bands being metered. On calling this function, you specify the
number of frequency bands you want to meter. If that number is higher
than is possible (determined by factors such as the sample rate
of the audio being metered), the function will return the number
of bands it is actually going to meter. You can pass NIL
or
a pointer to 0 to disable metering.
An error code. Returns noErr
if
there is no error.
See GetMovieAudioFrequencyMeteringNumBands
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the audio gain level for the mixed audio output of a movie, altering the perceived volume of the movie’s playback.
OSStatus SetMovieAudioGain ( Movie m, Float32 gain, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
A 32-bit floating-point gain value of 0 or greater. 0.0 is silent, 0.5 is –6 dB, 1.0 is 0 dB (the audio from the movie is not modified), 2.0 is +6 dB, etc. The gain level can be set higher than 1.0 to allow quiet movies to be boosted in volume. Gain settings higher than 1.0 may result in audio clipping.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie gain setting is not stored in the movie; it is used
only until the movie is closed. See GetMovieAudioGain
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the mute value for the audio mix of a movie currently playing.
OSStatus SetMovieAudioMute ( Movie m, Boolean muted, UInt32 flags );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
Pass TRUE
to
mute the movie audio, FALSE
otherwise.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The movie mute setting is not stored in the movie; it is used
only until the movie is closed. See GetMovieAudioMute
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Enables or disables volume metering of a particular audio mix of a movie.
OSStatus SetMovieAudioVolumeMeteringEnabled ( Movie m, FourCharCode whatMixToMeter, Boolean enabled );
The movie for this operation. Your application
obtains this movie identifier from such functions as NewMovie
, NewMovieFromProperties
, NewMovieFromFile
,
and NewMovieFromHandle
.
The applicable mix of audio channels in the
movie; see “Movie Audio Mixes”
.
Pass TRUE
to
enable audio volume metering; pass FALSE
to
disable it.
An error code. Returns noErr
if
there is no error.
See GetMovieAudioVolumeMeteringEnabled
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Sets the audio gain level for the audio output of a track, altering the perceived volume of the track’s playback.
OSStatus SetTrackAudioGain ( Track t, Float32 gain, UInt32 flags );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
A 32-bit floating-point gain value of 0 or greater. 0.0 is silent, 0.5 is –6 dB, 1.0 is 0 dB (the audio from the track is not modified), 2.0 is +6 dB, etc. The gain level can be set higher than 1.0 to allow quiet tracks to be boosted in volume. Gain settings higher than 1.0 may result in audio clipping.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The track’s gain setting is not stored in the movie; it
is used only until the movie is closed. See GetTrackAudioGain
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Mutes or unmutes the audio output of a track.
OSStatus SetTrackAudioMute ( Track t, Boolean muted, UInt32 flags );
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
Pass TRUE
to
mute the track’s audio, FALSE
to
unmute it.
Not used; set to 0.
An error code. Returns noErr
if
there is no error.
The track mute setting is not stored in the movie; it is used
only until the movie is closed. See GetTrackAudioMute
.
Introduced in QuickTime 7.
Movies.h
Movies.h
Converts a track’s time value to a display time value that is appropriate to the track’s media, using the track’s edit list.
TimeValue64 TrackTimeToMediaDisplayTime ( TimeValue64 value, Track theTrack );
A 64-bit time value that represents the track’s time value; it must be expressed in the time scale of the movie that contains the track.
A track identifier, which your application
obtains from such functions as NewMovieTrack
and GetMovieTrack
.
A 64-bit time value that represents the corresponding time in media display time, in the media's time coordinate system. If the track time corresponds to empty space, this function returns a value of –1.
This function maps the track time through the track’s edit list to come up with the media time. This time value contains the track’s time value according to the media’s time coordinate system. If the time you specified lies outside of the movie’s active segment or corresponds to empty space in the track, this function returns a value of –1. Hence you can use it to determine whether a specified track edit is empty.
Introduced in QuickTime 7. This function is a 64-bit replacement
for TrackTimeToMediaTime
.
Movies.h
Movies.h
The callback functions new to the QuickTime 7 API are documented alphabetically in this section.
The callback through which a client of an ICM decompression session receives decoded frames and information about decoding.
typedef void (*ICMDecompressionTrackingCallback)( void *decompressionTrackingRefCon, OSStatus result, ICMDecompressionTrackingFlags decompressionTrackingFlags, CVPixelBufferRef pixelBuffer, TimeValue64 displayTime, TimeValue64 displayDuration, ICMValidTimeFlags validTimeFlags, void *sourceFrameRefCon, void *reserved); // Declaration of a typical application-defined function Boolean MyICMDecompressionTrackingCallbackProc ( void *decompressionTrackingRefCon, OSStatus result, ICMDecompressionTrackingFlags decompressionTrackingFlags, CVPixelBufferRef pixelBuffer, TimeValue64 displayTime, TimeValue64 displayDuration, ICMValidTimeFlags validTimeFlags, void *sourceFrameRefCon, void *reserved );
The callback’s reference value, copied from
the decompressionTrackingRefCon field
of an ICMDecompressionTrackingCallbackRecord
structure.
Indicates whether there was an error in decompression.
One or more flags describing the a frame's state transitions:
kICMDecompressionTracking_LastCall
= 1L<<0
This is the last call for this sourceFrameRefCon.
kICMDecompressionTracking_ReleaseSourceData
= 1L<<1
The session no longer needs the source data pointer.
kICMDecompressionTracking_EmittingFrame
= 1L<<2
A frame is being emitted. The pixelBuffer parameter contains the decompressed frame. If the decompression session is targetting a visual context, the frame has not yet been sent to the visual context but will be sent after the callback returns.
kICMDecompressionTracking_FrameDecoded
= 1L<<3
This frame was decoded.
kICMDecompressionTracking_FrameDropped
= 1L<<4
The codec decided to drop this frame.
kICMDecompressionTracking_FrameNeedsRequeueing
= 1L<<5
This frame will not be able to be displayed unless it
is queued for redecode ( this constant is also known as FrameNotDisplayable
).
When the kICMDecompressionTracking_EmittingFrame
flag
is set in decompressionTrackingFlags,
this parameter must reference a pixel buffer containing the decompressed
frame.
If kICMValidTime_DisplayTimeStampIsValid
is
set in validTimeFlags, this parameter
must pass the display time of the frame.
If kICMValidTime_DisplayDurationIsValid
is
set in validTimeFlags, this parameter
must pass the display duration of the frame.
Indicates which of displayTime and displayDuration is valid:
kICMValidTime_DisplayTimeStampIsValid
The time value passed in displayTimeStamp is valid.
kICMValidTime_DisplayDurationIsValid
The time value passed in displayDuration is valid.
The frame’s reference value, copied from
the sourceFrameRefCon parameter passed
to ICMDecompressionSessionDecodeFrame
.
Reserved for future use.
This callback is referenced by an ICMDecompressionTrackingCallbackRecord
.
Installed by NewMovieExportStageReachedCallbackUPP
.
typedef OSErr (*MovieExportStageReachedCallbackProcPtr)(OSType inStage, Movie inMovie, ComponentInstance inDataHandler, Handle inDataRef, OSType inDataRefType, void *refCon); // Declaration of a typical application-defined function Boolean MyMovieExportStageReachedCallbackProc ( OSType inStage, Movie inMovie, ComponentInstance inDataHandler, Handle inDataRef, OSType inDataRefType, void *refCon );
A movie export stage.
A movie.
A data handler component.
A handle to a data reference.
The type of the data reference.
A reference constant to be passed to the callback
specified in NewMovieExportStageReachedCallbackUPP
.
Use this parameter to point to a data structure containing any information
your callback needs.
Provides access to a SGAudioMediaType
channel’s
data at various point along the signal flow.
typedef OSStatus (*SGAudioCallbackProcPtr) (SGChannel c, void *inRefCon, SGAudioCallbackFlags *ioFlags, const AudioTimeStamp *inTimeStamp, const UInt32 *inNumberPackets, const AudioBufferList *inData, const AudioStreamPacketDescription *inPacketDescriptions); // Declaration of a typical application-defined function OSStatus MySGAudioCallbackProc ( SGChannel c, void *inRefCon, SGAudioCallbackFlags *ioFlags, const AudioTimeStamp *inTimeStamp, const UInt32 *inNumberPackets, const AudioBufferList *inData, const AudioStreamPacketDescription *inPacketDescriptions );
The sequence grabber channel that has originating this callback.
A reference constant passed by the caller. Use this parameter to point to a data structure containing any information your callback needs.
Currently not used.
The time stamp associated with the first sample passed in inData.
The number of data packets held in inData. With LPCM formats the number of packets is the same as number of frames.
A bufferlist containing the requested sample data.
If the packets contained in inData are of variable size, this parameter should pass an array of inNumberPackets packet descriptions.
Use QTSetComponentProperty
with kQTPropertyClass_SGAudio
and
any of the following property IDs to specify which callback you
would like to receive:
kQTSGAudioPropertyID_PreMixCallback
kQTSGAudioPropertyID_PostMixCallback
kQTSGAudioPropertyID_PreConversionCallback
kQTSGAudioPropertyID_PostConversionCallback
Pass an SGAudioCallbackStruct
as
the data payload. Clients define an SGAudioCallbackProc
in
order to tap into a SGAudioMediaType
channel,
gaining access to its data at various points along the signal flow
chain. Clients should be aware that they may be called back on threads
other than the thread on which they registered for the callback.
They should do as little work as possible inside their callback,
returning control as soon as possible to the channel.
Receives notifications when a new OpenGL texture becomes available.
typedef void (*QTOpenGLTextureAvailableCallback)( QTOpenGLTextureContextRef textureContext, const CVTimeStamp *timeStamp, void *refCon ); // Declaration of a typical application-defined function OSStatus MyQTOpenGLTextureAvailableCallback ( QTOpenGLTextureContextRef textureContext, const CVTimeStamp *timeStamp, void *refCon );
The OpenGL texture context invoking the callback.
Time for which a new texture has become available.
A reference constant passed by the caller. Use this parameter to point to a data structure containing any information your callback needs.
Due to unpredictible activity, such as user seeks or the arrival of streaming video packets from a network, new textures may become available for times supposedly occupied by previous textures. Responsive applications, therefore, should use this callback to discover as soon as possible when a movie needs to be updated.
The public data structures new to the QuickTime 7 API are documented alphabetically in this section. Certain other data structures are referenced by QuickTime 7 functions but are opaque.
Designates a tracking callback for an ICM decompression session.
struct ICMDecompressionTrackingCallbackRecord { ICMDecompressionTrackingCallback decompressionTrackingCallback; void *decompressionTrackingRefCon; };
decompressionTrackingCallback
The callback function pointer. See ICMDecompressionTrackingCallbackProc
.
decompressionTrackingRefCon
The callback’s reference value.
Introduced in QuickTime 7.
ImageCompression.h
Designates a collection of callbacks for creating a custom multipass storage object.
struct ICMMultiPassStorageCallbacks { UInt32 version; void *storageRefCon; ICMMultiPassSetDataAtTimeStampCallback setDataAtTimeStampCallback; ICMMultiPassGetTimeStampCallback getTimeStampCallback; ICMMultiPassCopyDataAtTimeStampCallback copyDataAtTimeStampCallback; ICMMultiPassReleaseCallback releaseCallback; };
version
The version of this structure. Set to kICMMultiPassStorageCallbacksVersionOne
.
storageRefCon
A pointer to a reference constant. Use this parameter to point to a data structure containing any information your callback needs.
setDataAtTimeStampCallback
A callback for storing values.
getTimeStampCallback
A callback for finding time stamps.
copyDataAtTimeStampCallback
A callback for retrieving values.
releaseCallback
A callback for disposing the callback's state when done.
This structure is used by ICMMultiPassStorageCreateWithCallbacks
.
Introduced in QuickTime 7.
ImageCompression.h
Stores the frequency meter level settings for the audio channels in a movie mix.
struct QTAudioFrequencyLevels { UInt32 numChannels; UInt32 numFrequencyBands; Float32 level[1]; };
numChannels
The number of audio channels.
numFrequencyBands
The number of frequency bands for each channel.
level
A 32-bit floating-point value for each frequency
band. The frequency bands for each channel are stored contiguously,
with all the band levels for the first channel first, all the band
levels for the second channel next, etc. The total number of 32-bit
values in this field equals numFrequencyBands
times numChannels
.
Introduced in QuickTime 7.
Movies.h
Associated function: GetMovieAudioFrequencyLevels
Stores the volume level settings for the audio channels in a movie mix.
struct QTAudioVolumeLevels { UInt32 numChannels; Float32 level; };
numChannels
The number of audio channels.
level
A 32-bit floating-point value for each channel’s volume.
Note that these are variable-sized structures that must be allocated large enough.
Introduced in QuickTime 7.
Movies.h
Associated function: GetMovieAudioVolumeLevels
Stores a movie property for NewMovieFromProperties
.
struct QTNewMoviePropertyElement { QTPropertyClass propClass; QTPropertyID propID; ByteCount propValueSize; QTPropertyValuePtr propValueAddress; OSStatus propStatus; };
propClass
A four-character code designating the class of a movie property. See “New Movie Property Codes.”
propID
The ID of the property.
propValueSize
The size in bytes of the property passed in propValueAddress
.
propValueAddress
A pointer to a movie property. Since the data type is fixed for each element’s property class and ID, these is no ambiguity about the data type for its property value.
propStatus
Indicates any problems with the property. For
example, if a property is not understood by the function it is passed
to, this field is set appropriately. See the discussion in NewMovieFromProperties
.
When you call NewMovieFromProperties
,
you allocate and own arrays of these elements to pass to it, as
well as the property values that each element points to. You are
responsible for disposing of all of these memory allocations.
Introduced in QuickTime 7.
Movies.h
Associated function: NewMovieFromProperties
Used to call an SGAudioCallbackProc
.
struct SGAudioCallbackStruct { SGAudioCallback inputProc; void *inputProcRefCon; };
inputProc
inputProcRefCon
A reference constant. Use this parameter to point to a data structure containing any information your callback needs.
Introduced in QuickTime 7.
Movies.h
Provides version 2 of the SoundDescription
data
structure.
struct SoundDescriptionV2 { SInt32 descSize; OSType dataFormat; SInt32 resvd1; SInt16 resvd2; SInt16 dataRefIndex; SInt16 version; SInt16 revlevel; SInt32 vendor; SInt16 always3; SInt16 always16; SInt16 alwaysMinus2; SInt16 always0; UInt32 always65536; UInt32 sizeOfStructOnly; Float64 audioSampleRate; UInt32 numAudioChannels; SInt32 always7F000000; UInt32 constBitsPerChannel; UInt32 formatSpecificFlags; UInt32 constBytesPerAudioPacket; UInt32 constLPCMFramesPerAudioPacket; /* additional atom-based extensions ([long size, long type, some data], repeat) */ };
descSize
Total size of this structure, including extra data.
dataFormat
Set to'lpcm'
for
uncompressed data; otherwise set to the compression type. For a
list of compression type codes, see the QuickTime API Reference.
resvd1
Reserved; set to 0.
resvd2
Reserved; set to 0.
dataRefIndex
Reserved; set to 0.
version
Version of this structure; set to 2.
revlevel
Set to codec version number.
always3
Reserved; set to 3.
always16
Reserved; set to 16 (0x0010).
alwaysMinus2
Reserved; set to –2 (0xFFFE).
always0
Reserved; set to 0.
always65536
Reserved; set to 65536 (0x00010000).
sizeOfStructOnly
Set to sizeof(SoundDescriptionV2)
,
equivalent to the offset to any structure extensions.
audioSampleRate
Set to a 64-bit floating-point number representing the number of audio frames per second; for example, 44100.0.
numAudioChannels
Set to the number of audio channels; any channel assignment info will be in an extension.
always7F000000
Reserved; set to 7F000000.
constBitsPerChannel
Set to the number of bits per channel only if this value is constant and the audio is uncompressed. Otherwise set to 0.
formatSpecificFlags
See LPCM flag definitions in CoreAudioTypes.h
.
constBytesPerAudioPacket
Set to the number of bytes per packet only if this value is constant. Otherwise set to 0.
constLPCMFramesPerAudioPacket
Set to the number of PCM frames per packet only if this value is constant. Otherwise set to 0.
Introduced in QuickTime 7.
Movies.h
You should never have to know this definition, except for debugging purposes. Use the new QuickTime sound description APIs to treat sound descriptions as if they are opaque.
This section lists constants that are newly defined in QuickTime 7.
The following values are used to select options for ICM compression session objects:
kQTPropertyClass_ICMCompressionSessionOptions = 'icso', |
kICMCompressionSessionOptionsPropertyID_AllowAsyncCompletion = 'asok', |
kICMCompressionSessionOptionsPropertyID_AllowFrameReordering = 'b ok', |
kICMCompressionSessionOptionsPropertyID_AllowFrameTimeChanges = '+ ok', |
kICMCompressionSessionOptionsPropertyID_AllowTemporalCompression = 'p ok', |
kICMCompressionSessionOptionsPropertyID_AverageDataRate = 'aver', |
kICMCompressionSessionOptionsPropertyID_ColorTable = 'clut', |
kICMCompressionSessionOptionsPropertyID_CompressorComponent = 'imco', |
kICMCompressionSessionOptionsPropertyID_CompressorSettings = 'cost', |
kICMCompressionSessionOptionsPropertyID_CPUTimeBudget = 'cput', |
kICMCompressionSessionOptionsPropertyID_DataRateLimitCount = 'har#', |
kICMCompressionSessionOptionsPropertyID_DataRateLimits = 'hard', |
kICMCompressionSessionOptionsPropertyID_Depth = 'deep', |
kICMCompressionSessionOptionsPropertyID_DurationsNeeded = 'need', |
kICMCompressionSessionOptionsPropertyID_MaxDataRateLimits = 'mhar', |
kICMCompressionSessionOptionsPropertyID_MaxFrameDelayCount = 'cwin', |
kICMCompressionSessionOptionsPropertyID_MaxFrameDelayTime = 'cwit', |
kICMCompressionSessionOptionsPropertyID_MaxKeyFrameInterval = 'kyfr', |
kICMCompressionSessionOptionsPropertyID_MultiPassStorage = 'imps', |
kICMCompressionSessionOptionsPropertyID_Quality = 'qual', |
kICMCompressionSessionOptionsPropertyID_SourceFrameCount = 'frco', |
kICMCompressionSessionOptionsPropertyID_WasCompressed = 'wasc' |
kQTPropertyClass_ICMCompressionSessionOptions
= 'icso'
Class identifier for compression session option object properties.
kICMCompressionSessionOptionsPropertyID_AllowAsyncCompletion
= 'asok'
Enables the compressor to call the encoded-frame callback
from a different thread. By default this option is FALSE
,
which means that the compressor must call the encoded-frame callback
from the same thread as ICMCompressionSessionEncodeFrame
and ICMCompressionSessionCompleteFrames
.
kICMCompressionSessionOptionsPropertyID_AllowFrameReordering
= 'b ok'
Enables frame reordering. To encode B-frames a compressor
must reorder frames, which may mean that the order in which they
are emitted and stored (the decode order) may be different from
the order in which they are presented to the compressor (the display
order). By default, frame reordering is disabled. To encode using
B-frames, you must enable frame reordering by passing TRUE
in
this property.
kICMCompressionSessionOptionsPropertyID_AllowFrameTimeChanges
= '+ ok'
Enables the compressor to modify frame times, improving
its performance. Some compressors are able to identify and coalesce
runs of identical frames and emit single frames with longer duration,
or emit frames at a different frame rate from the original. By default,
this flag is set to FALSE
,
which forces the compressor to emit one encoded frame for every
source frame and to preserve frame display times. This option replaces
the practice of having compressors return special high similarity
values to indicate that frames can be dropped.
kICMCompressionSessionOptionsPropertyID_AllowTemporalCompression
= 'p ok'
Enables temporal compression of P-frames and B-frames. By default, temporal compression is disabled.
kICMCompressionSessionOptionsPropertyID_AverageDataRate
= 'aver'
The long-term desired average data rate in bytes per
second. This is not an absolute limit. The default data rate is
zero, indicating that the setting of kICMCompressionSessionOptionsPropertyID_Quality
should
determine the size of compressed data. Data rate settings have effect
only when timing information is provided for source frames. Some
codecs do not accept limiting to specified data rates.
kICMCompressionSessionOptionsPropertyID_ColorTable
= 'clut'
The color table for compression, used with indexed-color
depths. Clients who are passed this property are responsible for
disposing the returned CTabHandle
.
kICMCompressionSessionOptionsPropertyID_CompressorComponent
= 'imco'
Sets a specific compressor component or component instance
to be used, or passes one of the wildcards anyCodec
, bestSpeedCodec
, bestFidelityCodec
,
or bestCompressionCodec
. Pass this
option to force the Image Compression Manager to use a specific
compressor component or compressor component instance. To allow
the Image Compression Manager to choose the compressor component,
set the compressorComponent to anyCodec
(the
default), bestSpeedCodec
, bestFidelityCodec
,
or bestCompressionCodec
. If you pass
in a component instance that you opened, the ICM will not close
that instance; you must do so after the compression session is released.
kICMCompressionSessionOptionsPropertyID_CompressorSettings
= 'cost'
A handle containing compressor settings. The compressor
will be configured with these settings (by a call to ImageCodecSetSettings
)
during the ICMCompressionSessionCreate
process.
kICMCompressionSessionOptionsPropertyID_CPUTimeBudget
= 'cput'
Recommends a CPU time budget for a compressor in microseconds
per frame. Zero means to go as fast as possible. By default, this
is set to kICMUnlimitedCPUTimeBudget
,
which sets no limit. This option provides only an advisory hint,
and some compressors may ignore it. Compressors are not compelled
to use the full time budget if they complete ahead of time. Multithreaded
compressors may use this amount of CPU time on each processor.
kICMCompressionSessionOptionsPropertyID_DataRateLimitCount
= 'har#'
The current number of data rate limits.
kICMCompressionSessionOptionsPropertyID_DataRateLimits
= 'hard'
Zero, one, or two hard limits on data rate. Each hard
limit is described by a data size in bytes and a duration in seconds.
It requires that the total size of compressed data for any contiguous
segment of that duration (in decode time) must not exceed the data
size. By default, no data rate limits are set. When setting this
property, the inPropValueSize parameter
should be the number of data rate limits multiplied by sizeof(ICMDataRateLimit)
.
Data rate settings have an effect only when timing information
is provided for source frames. Some codecs do not accept limiting
to specified data rates.
kICMCompressionSessionOptionsPropertyID_Depth
= 'deep'
The depth for compression. If a compressor does not
support a specific depth, the closest supported depth will be used,
preferring deeper depths to shallower depths. The default depth
is k24RGBPixelFormat
.
kICMCompressionSessionOptionsPropertyID_DurationsNeeded
= 'need'
Indicates that durations of emitted frames are needed.
If this option is set and source frames are provided with times
but not durations, then frames will be delayed so that durations
can be calculated as the difference between one frame’s time stamp
and the next frame’s time stamp. By default, this flag is FALSE
,
so frames will not be delayed in order to calculate durations. If
you pass encoded frames to AddMediaSampleFromEncodedFrame
,
you must set this flag to TRUE
.
kICMCompressionSessionOptionsPropertyID_MaxDataRateLimits
= 'mhar'
The maximum allowed number of data rate limits, currently 2.
kICMCompressionSessionOptionsPropertyID_MaxFrameDelayCount
= 'cwin'
The maximum frame delay count is the maximum number
of frames that a compressor is allowed to hold before it must output
a compressed frame. This value limits the number of frames that
may be held in the “compression window.” If the maximum frame
delay count is M, then before the call to encode frame N returns,
frame N-M must have been emitted. The default value is kICMUnlimitedFrameDelayCount
,
which sets no limit on the compression window.
kICMCompressionSessionOptionsPropertyID_MaxFrameDelayTime
= 'cwit'
The maximum frame delay time is the maximum difference
between a source frame’s display time and the corresponding encoded
frame»s decode time. This value limits the span of display time
that may be held in the “compression window.” If the maximum
frame delay time is TM, then before the call to encode a frame with
display time TN returns, all frames with display times up to and
including TN-TM must have been emitted. The default value is kICMUnlimitedFrameDelayTime
,
which sets no time limit on the compression window.
kICMCompressionSessionOptionsPropertyID_MaxKeyFrameInterval
= 'kyfr'
The maximum interval between key frames, also known as the key frame rate. Compressors are allowed to generate key frames more frequently if this would result in more efficient compression. The default key frame interval is 0, which indicates that the compressor should choose where to place all key frames. This differs from previous practice, in which a key frame rate of zero disabled temporal compression.
kICMCompressionSessionOptionsPropertyID_MultiPassStorage
= 'imps'
A multipass compression client must provide a storage
location for multipass data. Pass ICMMultiPassStorageCreateWithTemporaryFile
to make
the ICM store multipass data in a temporary file. Pass ICMMultiPassStorageCreateWithCallbacks
to
manage the storage yourself. Note that the amount of multipass data
to be stored can be substantial; it could be greater than the size
of the output movie file. If this property is not NULL
,
the client must call ICMCompressionSessionBeginPass
and ICMCompressionSessionEndPass
around
groups of calls to ICMCompressionSessionEncodeFrame
.
By default, this property is NULL
and
multipass compression is not enabled. The compression session options
object retains the multipass storage object when one is set.
kICMCompressionSessionOptionsPropertyID_Quality
= 'qual'
The compression quality. This value is always used to
set the spatial quality; if temporal compression is enabled, it
is also used to set temporal quality. The default quality is codecNormalQuality
.
kICMCompressionSessionOptionsPropertyID_SourceFrameCount
= 'frco'
Indicates the number of source frames, if known. If
nonzero, this value should equal the exact number of times that
the client calls ICMCompressionSessionEncodeFrame
in
each pass. The default is 0, which indicates that the number of
source frames is not known.
kICMCompressionSessionOptionsPropertyID_WasCompressed
= 'wasc'
Indicates that the source was previously compressed.
This property is an optional information hint to the compressor;
by default it is FALSE
.
The following constants represent properties of ICM compression sessions:
kQTPropertyClass_ICMCompressionSession = 'icse', |
kICMCompressionSessionPropertyID_CompressorPixelBufferAttributes = 'batt', |
kICMCompressionSessionPropertyID_ImageDescription = 'idsc', |
kICMCompressionSessionPropertyID_PixelBufferPool = 'pool', |
kICMCompressionSessionPropertyID_TimeScale = 'tscl' |
kQTPropertyClass_ICMCompressionSession
= 'icse'
Class identifier for compression session properties.
kICMCompressionSessionPropertyID_CompressorPixelBufferAttributes
= 'batt'
The compressor’s pixel buffer attributes for the compression
session. You can use these to create a pixel buffer pool for source
pixel buffers. This is not the same as the sourcePixelBufferAttributes
property
passed to ICMCompressionSessionCreate
.
Getting this property does not change its retain count.
kICMCompressionSessionPropertyID_ImageDescription
= 'idsc'
The image description for a compression session. For some codecs, the image description may not be available before the first frame is compressed. Multiple calls to retrieve this property will return the same handle. The ICM will dispose of this handle when the compression session is disposed; the caller must not dispose of it.
kICMCompressionSessionPropertyID_PixelBufferPool
= 'pool'
A pool that can provide ideal source pixel buffers for
a compression session. The compression session creates this pixel
buffer pool based on the compressor’s pixel buffer attributes
and any pixel buffer attributes passed in to ICMCompressionSessionCreate
.
If the source pixel buffer attributes and the compressor pixel buffer
attributes can not be reconciled, the pool is based on the source
pixel buffer attributes and the ICM converts each CVPixelBuffer
internally.
kICMCompressionSessionPropertyID_TimeScale
= 'tscl'
The time scale for the compression session.
Three new four-character constants define the mix of audio channels for several functions:
kQTAudioMeter_StereoMix = 'stmx' |
kQTAudioMeter_MonoMix = 'momx' |
kQTAudioMeter_DeviceMix = kQTAudioPropertyID_DeviceChannelLayout = 'dcly' |
kQTAudioMeter_StereoMix
Meter a stereo (two-channel) mix of the enabled sound tracks in the movie. This option is offered only for MovieAudioFrequencyMetering.
kQTAudioMeter_MonoMix
Meter the movie as if it had been mixed to monaural. This option is offered only for MovieAudioFrequencyMetering.
kQTAudioMeter_DeviceMix
Meter the movie’s mix to the AudioChannelLayout
of
the device the movie is playing to.
The constants listed above are passed by the following QuickTime 7 functions:
The following values are used as ComponentPropertyID
selectors.
Use these with the StandardCompressionSubTypeAudio ('scdi'/'audi'
)
component. All property IDs are to be used in conjunction with the kQTPropertyClass_SCAudio
property
class.
kQTSCAudioPropertyID_AvailableCompressionFormatList
= 'acf#'
A read/listen C-style array of OSType
values
that specifies the list of available output compression formats.
This list includes all the kAudioEncoderComponentType
components
and kSoundCompressor
type components
on the user’s system. You can restrict the list by using the kQTSCAudioPropertyID_CompressionFormatList
property.
Use QTGetComponentPropertyInfo
to discover
the number of bytes you should allocate for this array.
kQTSCAudioPropertyID_ClientRestrictedCompressionFormatList
= 'crf#'
A read/write/listen C-style array of OSType
values
that specifies a client-restricted set of output compression formats
that you should list as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_AvailableCompressionFormatNamesList
= 'cnm#'
A read/write CFArrayRef
structure
of CFStringRef
structures that reference the
human-readable names of each item in a kQTSCAudioPropertyID_AvailableCompressionFormatList
.
The caller assumes responsibility for calling CFRelease
to
dispose of the CFArrayRef
structure.
kQTSCAudioPropertyID_HasLegacyCodecOptionsDialog
= 'opn?'
Some compression formats have format-specific properties
that are accessible only via a compressor-provided dialog. This
constant specifies a read/listen Boolean
value
that lets you know if the current compression format has such a
dialog.
kQTSCAudioPropertyID_ConstantBitRateFormatsOnly
= '!vbr'
By default, constant as well as variable bit rate compression
formats are shown in the available format list. This constant specifies
a read/write/listen Boolean
value
that lets you restrict the available formats to constant bit rate
formats by setting this property to TRUE
.
kQTSCAudioPropertyID_AvailableSampleRateList
= 'avr#'
A read/listen C-style array of AudioValueRange
values
that specifies a list of available output sample rates. This list
is specific to the compression format and takes into account any
restrictions imposed by a client using the kQTSCAudioPropertyID_ClientRestrictedSampleRateList
property.
Use QTGetComponentPropertyInfo
to discover
the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_SampleRateRecommended
= 'reco'
Clients not wishing to set an output sample rate manually
may set the output rate to the recommended rate. Some compressors
can perform rate conversion, and can pick optimal settings for a
desired bitrate (AAC is one example). For other formats, the recommended
rate is simply the closest output rate to the input rate that's
allowed by the output format. kQTSCAudioPropertyID_SampleRateIsRecommended
is
read-only. To set the sample rate to recommended, a client sets
the kQTSCAudioPropertyID_BasicDescription
with mSampleRate
=
0.0. To unset the sample rate as recommended, the client sets the kQTSCAudioPropertyID_BasicDescription
with
a non-zero mSampleRate
field.
kQTSCAudioPropertyID_ApplicableSampleRateList
= 'avr#'
A read/listen C-style array of AudioValueRange
values
that specifies which of the value ranges in the kQTSCAudioPropertyID_AvailableSampleRateList
are
currently applicable. The kQTSCAudioPropertyID_AvailableSampleRateList
takes
into account client restrictions, and a compression format's general
sample rate restrictions. kQTSCAudioPropertyID_ApplicableSampleRateList
further filters
the list to just those sample rates that are legal and valid given
the current codec configuration. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold the array.
kQTSCAudioPropertyID_ClientRestrictedSampleRateList
= 'crr#'
A read/write/listen C-style array of AudioValueRange
values
that specifies a client-restricted set of output sample rate ranges
that should be listed as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_InputMagicCookie
= 'ikki'
A read/write/listen opaque data structure that contains
an untyped codec-specific data structure (a “magic cookie”),
which some decompressors use to decode their input. Cookies are
variable size, so you must call QTGetComponentPropertyInfo
to
discover the size of the buffer you should allocate to hold the
cookie.
kQTSCAudioPropertyID_MagicCookie
= 'kuki'
A read/write/listen opaque data structure that contains
an untyped codec-specific data structure (a “magic cookie”),
which some decompressors use to configure their output. Cookies
are variable size, so you must call QTGetComponentPropertyInfo
to
discover the size of the buffer you should allocate to hold the
cookie.
kQTSCAudioPropertyID_ClientRestrictedLPCMBitsPerChannelList
= 'crb#'
Specifies a client-restricted set of output bits per
channel that should be listed as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold the array.
kQTSCAudioPropertyID_AvailableLPCMBitsPerChannelList
= 'avb#'
A read/listen C-style array of UInt32
values
that contains a list of available bits per audio channel. This list
is specific to LPCM, and takes into account any restrictions imposed
by a client using the kQTSCAudioPropertyID_LPCMBitsPerChannelList
property.
Use QTGetComponentPropertyInfo
to discover
the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_ApplicableLPCMBitsPerChannelList
= 'apb#'
Specifies which of the values in the kQTSCAudioPropertyID_AvailableLPCMBitsPerChannelList
are
currently applicable. The kQTSCAudioPropertyID_AvailableLPCMBitsPerChannelList
takes
into account client restrictions, and LPCM’s general bits per
channel restrictions. kQTSCAudioPropertyID_ApplicableLPCMBitsPerChannelList
further
filters the list to just those bits per channel that are legal and
valid given the current LPCM configuration. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold the array.
kQTSCAudioPropertyID_LPCMBitsPerChannelList
= 'sbc#'
A read/write/listen C-style array of UInt32
values
that contains a client-restricted set of output bits per channel,
which you should list as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_AvailableNumChannelsList
= 'anc#'
A read/listen C-style array of UInt32
values
that contains a list of available numbers of channels. This list
is specific to the compression format and takes into account any
restrictions imposed by a client using the kQTSCAudioPropertyID_NumChannelsList
property.
Use QTGetComponentPropertyInfo
to discover
the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_NumChannelsList
= 'snc#'
A read/write/listen C-style array of UInt32
values
that contains a client-restricted set of numbers of channels that
you should list as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_InputChannelLayout
= 'icly'
A read/write/listen variable-size AudioChannelLayout
structure
that specifies the audio channel layout of the input description. AudioChannelLayout
is
a variable-size structure, so you must use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate for it.
kQTSCAudioPropertyID_InputChannelLayoutName
= 'icln'
A read-only CFStringRef
structure
that specifies the human-readable name for a kQTSCAudioPropertyID_InputChannelLayout
structure,
if one exists. The caller is responsible for calling CFRelease
to
dispose of the resulting string.
kQTSCAudioPropertyID_ChannelLayout
= 'clay'
A read/write/listen variable-size AudioChannelLayout
structure
that specifies the audio channel layout of the output description. AudioChannelLayout
is
a variable size structure, so you must use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate.
kQTSCAudioPropertyID_ChannelLayoutName
= 'clyn'
A read-only CFStringRef
structure
that specifies the human-readable name for a kQTSCAudioPropertyID_ChannelLayout
,
if one exists. The caller is responsible for calling CFRelease
to
dispose of the resulting string.
kQTSCAudioPropertyID_ClientRestrictedChannelLayoutTagList
= 'crl#'
Specifies a client-restricted set of channel layout
tags that should be listed as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold the array.
kQTSCAudioPropertyID_AvailableChannelLayoutTagList
= 'acl#'
A read/listen C-style array of AudioChannelLayoutTag
values
that specifies a list of available audio channel layout tags. This
list is specific to the compression format and takes into account
any restrictions imposed by a client using the kQTSCAudioPropertyID_ChannelLayoutTagList
property. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_ChannelLayoutTagList
= 'cly#'
A read/write C-style array of AudioChannelLayoutTag
values
that specifies a client-restricted set of channel layout tags, which
you should list as available. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold this array.
kQTSCAudioPropertyID_AvailableChannelLayoutTagNamesList
= 'cln#'
A read-only CFArrayRef
array that
specifies the human-readable names for the AudioChannelLayoutTag
values
in a kQTSCAudioPropertyID_AvailableChannelLayoutTagList
.
Each element in the array is a CFStringRef
structure.
The caller is responsible for calling CFRelease
to
dispose of this array.
kQTSCAudioPropertyID_ApplicableChannelLayoutTagNamesList
= 'apl#'
Specifies which of the values in the kQTSCAudioPropertyID_AvailableChannelLayoutTagList
are
currently applicable. The kQTSCAudioPropertyID_AvailableChannelLayoutTagList
takes
into account client restrictions, and the current output format’s general
channel layout restrictions. kQTSCAudioPropertyID_ApplicableChannelLayoutTagList
further
filters the list to just those channel layouts that are legal and
valid given the current codec configuration. Use QTGetComponentPropertyInfo
to
discover the number of bytes you should allocate to hold the array.
kQTSCAudioPropertyID_ClientRestrictedPCMFlags
= 'crip'
Specifies a client-restricted set of flags corresponding
to the mFormatFlags
fields in an AudioStreamBasicDescription
.
Data type is a SCAudioFormatFlagsRestrictions
struct.
For instance, if a client wishes to specify to the StandardAudioCompression
component that their file format requires little endian pcm data,
the client may set this property, with formatFlagsMask
set
to kAudioFormatFlagIsBigEndian
, and formatFlagsValues
set
to zero (indicating that the IsBigEndian bit should be interpreted
as LittleEndian only).
kQTSCAudioPropertyID_DiscreteChannelsOK
= 'dscr'
A read/write/listen Boolean
value
that lets you tell the StandardCompressionSubTypeAudio
dialog
to not show “Discrete” as an available option. Each AudioChannelLayout
structure
assigns specific spatial orientation to specific channels (for example,
Channel 1 = Left). “Discrete” is a special channel layout that
does not assign spatial characteristics to channels, but instead
labels them as distinct outputs. For example, the first channel
in the audio source is played through the first channel on the output
device, the second channel in the source is played through the second
channel, and so on. If this property is set to FALSE
,
the StandardCompressionSubTypeAudio
dialog
will not show “Discrete” as an available option.
kQTSCAudioPropertyID_LPCMSpecificFlagsMask
= 'sffm'
A read/write/listen UInt32
value
that specifies which flag fields in kQTSCAudioPropertyID_FormatSpecificFlags
should
be made available in the StandardCompressionSubTypeAudio
dialog.
For instance, a value of 0xFFFFFFFD
(all
bits except kAudioFormatFlagIsBigEndian
set)
tells the StandardCompressionSubTypeAudio
component
to disable any UI that would allow a choice between little and big
endian. This selector is valid only for PCM formats and is ignored
for others.
kQTSCAudioPropertyID_InputSoundDescription
= 'isdh'
A read/write SoundDescriptionHandle
value
that specifies the current input description as a SoundDescriptionHandle
(lowest
possible version for the current format). When calling QTGetComponentProperty
,
the caller passes a pointer to an unallocated Handle
and
assumes responsibility for calling DisposeHandle
when
done.
kQTSCAudioPropertyID_SoundDescription
= 'osdh'
A read/write SoundDescriptionHandle
value
that specifies the current output description as a SoundDescriptionHandle
(lowest
possible version for the current format). When calling QTGetComponentProperty
,
the caller passes a pointer to an unallocated Handle
and
assumes responsibility for calling DisposeHandle
when
done.
kQTSCAudioPropertyID_InputBasicDescription
= 'isbd'
A read/write/DataProc
/listen AudioStreamBasicDescription
value
that specifies that the current input description is an AudioStreamBasicDescription
value.
kQTSCAudioPropertyID_BasicDescription
= 'osbd'
A read/write/DataProc
/listen AudioStreamBasicDescription
value
that specifies that the current output description is an AudioStreamBasicDescription
value.
kQTSCAudioPropertyID_CodecSpecificSettingsArray
= 'cdst'
A read/write CFArrayRef
structure
that designates a CFArray
of CFDictionary
structures,
which describe various parameters specific to configuring a codec.
This array of dictionaries, which is published by some compressors,
can be parsed to generate UI information. When any value in the
array changes, a client should call QTSetComponentProperty
,
passing the entire array.
kQTSCAudioPropertyID_SettingsState
= scSettingsStateType
A read/write Handle
value that
is used to save the current state of the StandardCompressionSubTypeAudio
component,
so that its state may be restored at a later time with a single
call. A StandardCompressionSubTypeAudio
component
can accept a saved settings state from a legacy StandardCompressionSubTypeSound
component
as write-only.
kQTSCAudioPropertyID_ExtendedProcs
= scExtendedProcsType
A read/write/listen SCExtendedProcs
value
that is used to get or set an SCExtendedProcs
structure.
kQTSCAudioPropertyID_PreferenceFlags
= scPreferenceFlagsType
A read/write/listen SInt32
value
that is used to specify dialog preferences such as scUseMovableModal
.
kQTSCAudioPropertyID_WindowOptions
= scWindowOptionsType
A read/write/listen SCWindowSettings
structure
that is used to set an SCWindowSettings
structure,
which tells the dialog about its parent window so that it can draw
itself as a sheet on top of the parent.
The following constants are used by movie export getProperty
functions
only (not SCAudio
), so that variable
size properties can be handled in that API where there is no associated
size parameter. The getProperty
function
can be asked the size first, then the caller can allocate memory
for the associated SCAudio
property
and call getProperty
again to get the
property.
enum { |
movieExportChannelLayoutSize = 'clsz', /* UInt32 */ |
movieExportMagicCookieSize = 'mcsz', /* UInt32 */ |
movieExportUseHighResolutionAudioProperties = 'hrau' /* Boolean */ |
}; |
The movieExportUseHighResolutionAudioProperties
constant
is not a size. It is how the exporter asks a propertyProc if it
is prepared to deal with high-res properties.
The kPropertyClass_MovieExporter
constant
defines the movie exporter class:
enum { |
kPropertyClass_MovieExporter = 'spit' |
}; |
The kMovieExporterPropertyID_EnableHighResolutionAudioFeatures
constant
enables high-resolution audio features for kPropertyClass_MovieExporter
.
Its value is Boolean
:
enum { |
kMovieExporterPropertyID_EnableHighResolutionAudioFeatures = 'hrau' |
}; |
The following constants identify audio properties.
enum { |
kQTAudioPropertyID_Gain = 'gain', |
kQTAudioPropertyID_Mute = 'mute', |
kQTAudioPropertyID_Balance = 'bala', |
kQTAudioPropertyID_SummaryChannelLayout = 'clay', |
kQTAudioPropertyID_DeviceChannelLayout = 'dcly', |
kQTAudioPropertyID_FormatString = 'fstr', |
kQTAudioPropertyID_ChannelLayoutString = 'lstr', |
kQTAudioPropertyID_SampleRateString = 'rstr', |
kQTAudioPropertyID_SampleSizeString = 'sstr', |
kQTAudioPropertyID_BitRateString = 'bstr', |
kQTAudioPropertyID_SummaryString = 'asum' |
}; |
kQTAudioPropertyID_Gain
= 'gain'
Used to get and set a Float32
value
that represents the audio gain of a movie or track. The gain level
is multiplicative; eg. 0.0 is silent, 0.5 is –6dB, 1.0 is 0dB
(ie. the audio from the movie is not modified), 2.0 is +6dB, etc.
The gain level can be set higher than 1.0 in order to allow quiet
movies and tracks to be boosted in volume. Settings higher than
1.0 may result in audio clipping, of course. The setting is not
stored in the movie or track; it is used only until the movie or
track is disposed.
kQTAudioPropertyID_Mute
= 'mute'
Used to get and set a Boolean
value
that indicates the audio mute state of a movie or track. If TRUE,
the movie or track is muted. The setting is not stored in the movie
or track; it is used only until the movie or track is disposed.
kQTAudioPropertyID_Balance
= 'bala'
Used to get and set a Float32
value
that represents the audio balance of a movie. It is supported only
for movies, not tracks. –1.0 means full left, 0.0 means centered,
and 1.0 means full right. The setting is not stored in the movie;
it is used only until the movie is disposed.
kQTAudioPropertyID_SummaryChannelLayout
= 'clay'
Used to get an AudioChannelLayout
value
that represents the summary audio channel layout of a movie or other
grouping of audio streams. All like-labelled channels are combined,
so there are no duplicates. For example, if there is a stereo (L/R)
track, 5 single-channel tracks marked Left, Right, Left Surround,
Right Surround and Center, and a 4 channel track marked L/R/Ls/Rs,
then the summary AudioChannelLayout will be L/R/Ls/Rs/C—It will
_not_ be L/R/L/R/Ls/Rs/C/L/R/Ls/Rs. This is a variable-size property,
because it it may contain an array of channel descriptions. You
must get the size by calling a function such as QTGetMoviePropertyInfo
,
allocate a structure of that size, and then get the property.
kQTAudioPropertyID_DeviceChannelLayout
= 'dcly'
Used to get an AudioChannelLayout
value
that represents the audio channel layout of the device a movie is
playing to. This is a variable-size property, because it it may
contain an array of channel descriptions. You must get the size
by calling a function such as QTGetMoviePropertyInfo
, allocate
a structure of that size, and then get the property.
kQTAudioPropertyID_FormatString
= 'fstr'
Used with kQTPropertyClass_Audio
to
get a CFStringRef
value containing a localized,
human readable string that describes an audio format; for example,
“MPEG Layer 3.” You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or from
a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_ChannelLayoutString
= 'lstr'
Used with kQTPropertyClass_Audio
to
get a CFStringRef
value containing a localized,
human readable string that describes an audio channel layout; for
example, “5.0 (L R C Ls Rs).” You may get this property from
a SoundDescription
handle by calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SampleRateString
= 'rstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio sample rate; for example, “44.100 kHz.” You may get this
property from a SoundDescription
handle by
calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SampleSizeString
= 'sstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio sample size; for example, “24-bit.” This property will
return a valid string only if the audio format is uncompressed (LPCM).
You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or
from a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_BitRateString
= 'bstr'
Used to get a CFStringRef
value
containing a localized, human readable string that describes an
audio bit rate; for example, “12 kbps.” You may get this property
from a StandardAudioCompression
(scdi
or audi
) component
instance by calling QTGetComponentProperty
.
kQTAudioPropertyID_SummaryString
= 'asum'
Used to get a CFStringRef
value
containing a localized, human readable string that summarizes an
audio format; for example, “16-bit Integer (Big Endian), Stereo
(L R), 48.000 kHz.” You may get this property from a SoundDescription
handle
by calling QTSoundDescriptionGetProperty
or from
a StandardAudioCompression
(scdi
or audi
)
component instance by calling QTGetComponentProperty
.
The dictionary keys listed in this section
are used with c ertain of the property IDs. They may be used to
parse CF dictionaries returned by kQTSGAudioPropertyID_DeviceListWithAttributes
and kQTSGAudioPropertyID_DeviceAttributes
IDs
for SGAudioMediaType
channels.
kQTAudioDeviceAttribute_DeviceUIDKey
= 'uid '
A CFStringRef
containing a unique
identifier for a device.
kQTAudioDeviceAttribute_DeviceNameKey
= 'name'
A CFStringRef
containing a device’s
printable name, suitable for the user interface.
kQTAudioDeviceAttribute_DeviceManufacturerKey
= 'manu'
A CFStringRef
containing a device
manufacturer’s printable name, suitable for the user interface.
kQTAudioDeviceAttribute_DeviceTransportTypeKey
= 'tran'
A CFNumberRef
that wraps an OSType
;
for example, '1394'
for fw
.
See the file IOAudioTypes.h
.
kQTAudioDeviceAttribute_DeviceAliveKey
= 'aliv'
A CFBooleanRef
value that is TRUE
if
the device is present.
kQTAudioDeviceAttribute_DeviceCanRecordKey
= 'rec ' [last char = space]
A CFBooleanRef
value that is TRUE
if
the device can be used for recording (some devices can only play
back).
kQTAudioDeviceAttribute_DeviceCanPreviewKey
= 'prev'
A CFBooleanRef
value that is TRUE
if
the device can be used to preview a grabbed sequence.
kQTAudioDeviceAttribute_DeviceHoggedKey
= 'hogg'
A CFNumberRef
that wraps the unique
process ID that is hogging the device, or –1 if the device is
currently not being hogged. The process ID comes from a call to getpid
.
kQTAudioDeviceAttribute_DeviceInUseKey
= 'used'
A CFBooleanRef
value that is TRUE
if
the device is performing I/O in any process.
kQTAudioDeviceAttribute_DeviceSupportsHardwarePlaythruKey
= 'hard'
A CFBooleanRef
value that is TRUE
if
the device supports hardware playthrough of inputs to outputs.
kQTAudioDeviceAttribute_DefaultInputDeviceKey
= 'dIn ' [last char = space]
A CFBooleanRef
value that’s TRUE
if
the device is the user-selected default input in an audio MIDI setup.
kQTAudioDeviceAttribute_DefaultOutputDeviceKey
= 'dOut'
A CFBooleanRef
value that’s TRUE
if
the device is the user-selected default output in an audio MIDI
setup.
kQTAudioDeviceAttribute_DefaultSystemOutputDeviceKey
= 'sOut'
A CFBooleanRef
value that’s TRUE
if
the device is the user-selected device where system alerts play.
kQTAudioDeviceAttribute_IsCoreAudioDeviceKey
= 'hal!'
A CFBooleanRef
value that’s TRUE
if
the device is a Core Audio device.
The following dictionary keys may be used
to parse CF dictionaries returned by kQTSGAudioPropertyID_DeviceListWithAttributes
and kQTSGAudioPropertyID_DeviceAttributes
IDs
for SGAudioMediaType
channels.
kQTAudioDeviceAttribute_DeviceInputID
= 'inID'
A CFNumberRef
that wraps an OSType
value.
kQTAudioDeviceAttribute_DeviceInputDescription
= 'inds'
A CFStringRef
that is suitable
for displaying to the user.
kQTAudioDeviceAttribute_DeviceOutputID
= 'otID'
A CFNumberRef
that wraps an OSType
value.
kQTAudioDeviceAttribute_DeviceOutputDescription
= 'otds'
A CFStringRef
that is suitable
for displaying to the user.
The format constants in this section are
used with functions of the form QTMetaData
...
Following are constants for the QTMetaDataStorageFormat
type:
kQTMetaDataStorageFormatQuickTime
= 'mdta'
The QuickTime metadata storage format
kQTMetaDataKeyFormatQuickTime
= 'mdta'
Reverse DNS format
kQTMetaDataStorageFormatiTunes
= 'itms'
The iTunes metadata storage format
Following are constants for the QTMetaDataKeyFormat
type:
kQTMetaDataKeyFormatiTunesShortForm
= 'itsk'
A four-character code
kQTMetaDataKeyFormatiTunesLongForm
= 'itlk'
Reverse DNS format
Following are constants for user data formats:
kQTMetaDataStorageFormatUserData
= 'udta'
User data storage format
kQTMetaDataKeyFormatUserData
= 'udta',
User data key storage format
The property IDs in this section are used
with functions of the form QTMetaData
...
Following are constants for the QTMetaDataRef
type:
kPropertyClass_QTMetaData
= 'meta'
The QuickTime metadata property class.
kQTMetaDataPropertyID_StorageFormats
= 'fmts'
The list of storage formats of type QTMetaDataStorageFormat
associated with
a QTMetaDataRef
object. The read-only return
value is a C-style array of OSType
values.
kQTMetaDataPropertyID_OwnerType
= 'ownt'
The owner type associated with a QTMetaDataRef
object.
The read-only return value is an OSType
(QT_MOVIE_TYPE
, QT_TRACK_TYPE
,
or QT_MEDIA_TYPE
).
kQTMetaDataPropertyID_Owner
= 'ownr'
The owner associated with a QTMetaDataRef
object,
which does not necessarily need an owner. The read-only return value
is type Movie
, Track
,
or Media
.
Following are constants for the QTMetaDataItem
type:
kPropertyClass_QTMetaDataItem
= 'mdit'
The metadata item property class ID
kQTMetaDataItemPropertyID_Value
= 'valu'
The value of the metadata item. The read-only return
value is a C-style array of values of type UInt8
.
kQTMetaDataItemPropertyID_DataType
= 'dtyp'
The value type of the metadata item. The read/write
return value is type UInt32
.
kQTMetaDataItemPropertyID_StorageFormat
= 'sfmt'
The storage format of the metadata item. The read-only
return value is type QTMetaDataStorageFormat
.
kQTMetaDataItemPropertyID_Key
= 'key '
[last char is space]The key associated with the metadata item. The read/write
return value is a C-style array of values of type UInt8
.
kQTMetaDataItemPropertyID_KeyFormat
= 'keyf'
The format of the metadata item key. The read/write
return value is type OSType
.
kQTMetaDataItemPropertyID_Locale
= 'loc '
The locale identifier based on the naming convention
defined by the International Components for Unicode (ICU). The identifier
consists of two pieces of ordered information: a language code and
a region code. The language code is based on the ISO 639-1 standard,
which defines two-character codes, such as en
and fr
,
for the world’s most commonly used languages. If a two-letter
code is not available, then ISO 639-2 three-letter identifiers are
accepted as well; for example, haw
for
Hawaiian. The region code is defined by ISO 3166-1. It is all uppercase
and is appended, with an underscore, after the language code; for
example en_US
, en_GB
,
and fr_FR
. The read/write return
value is a C string of type UInt32
.
The following key constants are used with
functions of the form QTMetaData
...
// Pre-defined common keys |
kQTMetaDataCommonKeyAuthor = 'auth' |
kQTMetaDataCommonKeyComment = 'cmmt' |
kQTMetaDataCommonKeyCopyright = 'cprt' |
kQTMetaDataCommonKeyDirector = 'dtor' |
kQTMetaDataCommonKeyDisplayName = 'name' |
kQTMetaDataCommonKeyInformation = 'info' |
kQTMetaDataCommonKeyKeywords = 'keyw' |
kQTMetaDataCommonKeyProducer = 'prod' |
// Mapping from common keys to user data identifiers: |
kQTMetaDataCommonKeyAuthor -> kUserDataTextAuthor |
kQTMetaDataCommonKeyComment -> kUserDataTextComment |
kQTMetaDataCommonKeyCopyright -> kUserDataTextCopyright |
kQTMetaDataCommonKeyDirector -> kUserDataTextDirector |
kQTMetaDataCommonKeyDisplayName -> kUserDataTextFullName |
kQTMetaDataCommonKeyInformation -> kUserDataTextInformation |
kQTMetaDataCommonKeyKeywords -> kUserDataTextKeywords |
kQTMetaDataCommonKeyProducer -> kUserDataTextProducer |
The following error codes are returned by
functions of the form QTMetaData
...
kQTMetaDataInvalidMetaDataErr = -2173 |
kQTMetaDataInvalidItemErr = -2174 |
kQTMetaDataInvalidStorageFormatErr = -2175 |
kQTMetaDataInvalidKeyFormatErr = -2176 |
kQTMetaDataNoMoreItemsErr = -2177 |
The following codes are stored in the propClass fields
of QTNewMoviePropertyElement
data
structures, which pass them to NewMovieFromProperties
.
kQTPropertyClass_DataLocation = 'dloc', |
kQTDataLocationPropertyID_DataReference = 'dref', |
// DataReferenceRecord * |
kQTDataLocationPropertyID_CFStringNativePath = 'cfnp', |
// CFStringRef * |
kQTDataLocationPropertyID_CFStringPosixPath = 'cfpp', |
// CFStringRef * |
kQTDataLocationPropertyID_CFStringHFSPath = 'cfhp', |
// CFStringRef * |
kQTDataLocationPropertyID_CFStringWindowsPath = 'cfwp', |
// CFStringRef * |
kQTDataLocationPropertyID_CFURL = 'cfur', |
// CFURLRef * |
kQTDataLocationPropertyID_QTDataHandler = 'qtdh', |
// DataHandler * |
kQTDataLocationPropertyID_Scrap = 'scrp', |
// NULL |
kQTDataLocationPropertyID_LegacyMovieResourceHandle = 'rezh', |
// Handle * |
kQTDataLocationPropertyID_MovieUserProc = 'uspr', |
// QTNewMovieUserProcRecord * |
kQTDataLocationPropertyID_ResourceFork = 'rfrk', |
// SInt16 * |
kQTDataLocationPropertyID_DataFork = 'dfrk', |
// SInt16 * |
kQTPropertyClass_Audio = 'audi', |
kQTAudioPropertyID_RateChangesPreservePitch = 'aucp', // Boolean * |
kQTPropertyClass_Context = 'ctxt', |
kQTContextPropertyID_AudioContext = 'audi', |
// QTAudioContextRef * |
kQTContextPropertyID_VisualContext = 'visu', |
// QTVisualContextRef * |
kQTPropertyClass_MovieResourceLocator = 'rloc', |
kQTMovieResourceLocatorPropertyID_LegacyResID = 'rezi', |
// SInt16 * (input/output property) |
kQTMovieResourceLocatorPropertyID_LegacyResName = 'rezn', |
// Str255 (output property) |
kQTMovieResourceLocatorPropertyID_FileOffset = 'foff', |
// UInt64 * |
kQTMovieResourceLocatorPropertyID_Callback = 'calb', |
// User-defined |
kQTPropertyClass_MovieInstantiation = 'mins', |
kQTMovieInstantiationPropertyID_DontResolveDataRefs = 'rdrn', |
// Boolean * |
kQTMovieInstantiationPropertyID_DontAskUnresolvedDataRefs = 'aurn', |
// Boolean * |
kQTMovieInstantiationPropertyID_DontAutoAlternates = 'aaln', |
// Boolean * |
kQTMovieInstantiationPropertyID_DontUpdateForeBackPointers = 'fbpn', |
// Boolean * |
kQTMovieInstantiationPropertyID_AsyncOK = 'asok', |
// Boolean * |
kQTMovieInstantiationPropertyID_IdleImportOK = 'imok', |
// Boolean * |
kQTMovieInstantiationPropertyID_DontAutoUpdateClock = 'aucl', |
// Boolean * |
kQTMovieInstantiationPropertyID_ResultDataLocationChanged = 'dlch', |
// Boolean * (output property) |
kQTPropertyClass_NewMovieProperty = 'mprp', |
kQTNewMoviePropertyID_DefaultDataRef = 'ddrf', |
// DataReferenceRecord * |
kQTNewMoviePropertyID_Active = 'actv', |
// Boolean * |
kQTNewMoviePropertyID_DontInteractWithUser = 'intn', |
// Boolean * |
© 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-11-09)