The IAAFPCMDescriptor interface is implemented by objects which describe audio essence. More...
Public Member Functions | |
HRESULT | Initialize () |
Initializes a newly allocated, IAAFPCMDescriptor-supporting object. | |
HRESULT | SetBlockAlign ([in] aafUInt16 blockAlign) |
Sets the number of bytes used to store one sample of all channels. | |
HRESULT | GetBlockAlign ([out] aafUInt16 *pBlockAlign) |
Gets the number of bytes used to store one sample of all channels. | |
HRESULT | SetSequenceOffset ([in] aafUInt8 offset) |
Sets the frame number of the beginning of the essence data within a five-frame sequence. | |
HRESULT | GetSequenceOffset ([out] aafUInt8 *pOffset) |
Gets the frame number of the beginning of the essence data within a five-frame sequence. | |
HRESULT | SetAverageBPS ([in] aafUInt32 bps) |
Sets the average bytes per second of the essence stream. | |
HRESULT | GetAverageBPS ([out] aafUInt32 *pBps) |
Gets the average bytes per second of the essence stream. | |
HRESULT | SetChannelAssignment ([in, ref] aafUID_constref channelAssignment) |
Sets the channel assignment scheme. | |
HRESULT | GetChannelAssignment ([out] aafUID_t *pChannelAssignment) |
Gets the channel assignment scheme. | |
HRESULT | AreAllPeakEnvelopePropertiesPresent ([out] aafBoolean_t *pArePresent) |
Places TRUE into *pArePresent if the following optional properties are set on the descriptor: PeakEnvelopeVersion PeakEnvelopeFormat PointsPerPeakValue PeakEnvelopeBlockSize PeakChannels PeakFrames PeakOfPeaksPosition PeakEnvelopeTimestamp PeakEnvelopeData. | |
HRESULT | SetPeakEnvelopeVersion ([in] aafUInt32 version) |
Sets the version of the peak envelope data. | |
HRESULT | GetPeakEnvelopeVersion ([out] aafUInt32 *pVersion) |
Gets the version of the peak envelope data. | |
HRESULT | SetPeakEnvelopeFormat ([in] aafUInt32 format) |
Sets the format of the peak point. | |
HRESULT | GetPeakEnvelopeFormat ([out] aafUInt32 *pFormat) |
Gets the format of the peak point. | |
HRESULT | SetPointsPerPeakValue ([in] aafUInt32 pointCount) |
Sets the number of peak points per peak value. | |
HRESULT | GetPointsPerPeakValue ([out] aafUInt32 *pPointCount) |
Gets the number of peak points per peak value. | |
HRESULT | SetPeakEnvelopeBlockSize ([in] aafUInt32 blockSize) |
Sets the number of audio samples used to generate each peak frame. | |
HRESULT | GetPeakEnvelopeBlockSize ([out] aafUInt32 *pBlockSize) |
Gets the number of audio samples used to generate each peak frame. | |
HRESULT | SetPeakChannelCount ([in] aafUInt32 channelCount) |
Sets the number of peak channels. | |
HRESULT | GetPeakChannelCount ([out] aafUInt32 *pChannelCount) |
Gets the number of peak channels. | |
HRESULT | SetPeakFrameCount ([in] aafUInt32 frameCount) |
Sets the number of peak frames. | |
HRESULT | GetPeakFrameCount ([out] aafUInt32 *pFrameCount) |
Gets the number of peak frames. | |
HRESULT | SetPeakOfPeaksPosition ([in] aafPosition_t position) |
Sets the offset to the first audio sample whose absolute value is the maximum value of the entire audio file. | |
HRESULT | GetPeakOfPeaksPosition ([out] aafPosition_t *pPosition) |
Gets the offset to the first audio sample whose absolute value is the maximum value of the entire audio file. | |
HRESULT | SetPeakEnvelopeTimestamp ([in] aafTimeStamp_constref timeStamp) |
Sets the time stamp of the creation of the peak data. | |
HRESULT | GetPeakEnvelopeTimestamp ([out] aafTimeStamp_t *pTimeStamp) |
Gets the time stamp of the creation of the peak data. | |
HRESULT | SetPeakEnvelopeDataPosition ([in] aafPosition_t position) |
Sets the offset from the beginning of peak envelope data. | |
HRESULT | GetPeakEnvelopeDataPosition ([out] aafPosition_t *pPosition) |
Gets the offset from the beginning of peak envelope data. | |
HRESULT | GetPeakEnvelopeDataSize ([out] aafLength_t *pSize) |
Gets the size of peak envelope data. | |
HRESULT | WritePeakEnvelopeData ([in] aafUInt32 bytes,[out, size_is(bytes)] aafDataBuffer_t buffer,[out, ref] aafUInt32 *pBytesWritten) |
Write the specified bytes to the peak envelope data stream. | |
HRESULT | ReadPeakEnvelopeData ([in] aafUInt32 bytes,[out, size_is(bytes)] aafDataBuffer_t buffer,[out, ref] aafUInt32 *pBytesRead) |
Read the specified number of bytes from the peak envelope data stream into buffer. |
The IAAFPCMDescriptor interface is implemented by objects which describe audio essence.
In addition to the specific error results listed for each method, all methods in this interface may also return one of the following values:
AAFRESULT_NOMEMORY
HRESULT IAAFPCMDescriptor::AreAllPeakEnvelopePropertiesPresent | ( | [out] aafBoolean_t * | pArePresent | ) |
Places TRUE into *pArePresent if the following optional properties are set on the descriptor: PeakEnvelopeVersion PeakEnvelopeFormat PointsPerPeakValue PeakEnvelopeBlockSize PeakChannels PeakFrames PeakOfPeaksPosition PeakEnvelopeTimestamp PeakEnvelopeData.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pIsPresent.
This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:
AAFRESULT_SUCCESS
AAFRESULT_NULL_PARAM
pArePresent | [out] The flag indicating presence of the optional properties that form peak envelope. |
HRESULT IAAFPCMDescriptor::GetAverageBPS | ( | [out] aafUInt32 * | pBps | ) |
Gets the average bytes per second of the essence stream.
This property is required.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pBps.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
pBps | [out] Average bytes per second of the essence stream. |
HRESULT IAAFPCMDescriptor::GetBlockAlign | ( | [out] aafUInt16 * | pBlockAlign | ) |
Gets the number of bytes used to store one sample of all channels.
This property is required.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pBlockAlign.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
pBlockAlign | [out] The number of bytes used to store one sample of all channels. |
HRESULT IAAFPCMDescriptor::GetChannelAssignment | ( | [out] aafUID_t * | pChannelAssignment | ) |
Gets the channel assignment scheme.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pChannelAssignment.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pChannelAssignment | [out] The channel assignment in use. |
HRESULT IAAFPCMDescriptor::GetPeakChannelCount | ( | [out] aafUInt32 * | pChannelCount | ) |
Gets the number of peak channels.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pChannelCount.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pChannelCount | [out] The number of peak channels. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeBlockSize | ( | [out] aafUInt32 * | pBlockSize | ) |
Gets the number of audio samples used to generate each peak frame.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pBlockSize.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pBlockSize | [out] The number of audio samples used to generate each peak frame. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeDataPosition | ( | [out] aafPosition_t * | pPosition | ) |
Gets the offset from the beginning of peak envelope data.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pPosition.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
AAFRESULT_OBJECT_NOT_PERSISTENT
pPosition | [out] Offset from the beginning of peak envelope data. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeDataSize | ( | [out] aafLength_t * | pSize | ) |
Gets the size of peak envelope data.
PeakEnvelopeData is optional property.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pSize.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
AAFRESULT_OBJECT_NOT_PERSISTENT
pSize | [out] The size of peak envelope data. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeFormat | ( | [out] aafUInt32 * | pFormat | ) |
Gets the format of the peak point.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pFormat.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pFormat | [out] Format of the peak point. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeTimestamp | ( | [out] aafTimeStamp_t * | pTimeStamp | ) |
Gets the time stamp of the creation of the peak data.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pTimeStamp.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pTimeStamp | [out] The time stamp of the creation of the peak data. |
HRESULT IAAFPCMDescriptor::GetPeakEnvelopeVersion | ( | [out] aafUInt32 * | pVersion | ) |
Gets the version of the peak envelope data.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pVersion.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pVersion | [out] Version of the peak envelope data. |
HRESULT IAAFPCMDescriptor::GetPeakFrameCount | ( | [out] aafUInt32 * | pFrameCount | ) |
Gets the number of peak frames.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pFrameCount.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pFrameCount | [out] The number of peak frames. |
HRESULT IAAFPCMDescriptor::GetPeakOfPeaksPosition | ( | [out] aafPosition_t * | pPosition | ) |
Gets the offset to the first audio sample whose absolute value is the maximum value of the entire audio file.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pPosition.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pPosition | [out] The offset to peak of peaks. |
HRESULT IAAFPCMDescriptor::GetPointsPerPeakValue | ( | [out] aafUInt32 * | pPointCount | ) |
Gets the number of peak points per peak value.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pPointCount.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pPointCount | [out] The number of peak points per peak value. |
HRESULT IAAFPCMDescriptor::GetSequenceOffset | ( | [out] aafUInt8 * | pOffset | ) |
Gets the frame number of the beginning of the essence data within a five-frame sequence.
This property is optional.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pOffset.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
pOffset | [out] Zero-based ordinal frame number of the beginning of the essence data within a five-frame sequence. |
HRESULT IAAFPCMDescriptor::Initialize | ( | ) |
Initializes a newly allocated, IAAFPCMDescriptor-supporting object.
This method must be called after allocation, and before any other method can be called.
Succeeds if:
This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:
AAFRESULT_SUCCESS
AAFRESULT_ALREADY_INITIALIZED
HRESULT IAAFPCMDescriptor::ReadPeakEnvelopeData | ( | [in] aafUInt32 | bytes, |
[out, size_is(bytes)] aafDataBuffer_t | buffer, | ||
[out, ref] aafUInt32 * | pBytesRead | ||
) |
Read the specified number of bytes from the peak envelope data stream into buffer.
Succeeds if all of the following are true:
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_END_OF_DATA
AAFRESULT_NOT_INITIALIZED
AAFRESULT_INVALID_PARAM
AAFRESULT_NULL_PARAM
AAFRESULT_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
AAFRESULT_OBJECT_NOT_PERSISTENT
bytes | [in] Read this many bytes |
buffer | [out, size_is(bytes)] Buffer to read the data to |
pBytesRead | [out,ref] Number of bytes actually read. |
HRESULT IAAFPCMDescriptor::SetAverageBPS | ( | [in] aafUInt32 | bps | ) |
Sets the average bytes per second of the essence stream.
This property is required.
Succeeds if all of the following are true:
If this method fails the AverageBPS property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
bps | [in] Average bytes per second of the essence stream. |
HRESULT IAAFPCMDescriptor::SetBlockAlign | ( | [in] aafUInt16 | blockAlign | ) |
Sets the number of bytes used to store one sample of all channels.
This property is required.
Succeeds if all of the following are true:
If this method fails the BlockAlign property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
blockAlign | [in] The number of bytes used to store one sample of all channels. |
HRESULT IAAFPCMDescriptor::SetChannelAssignment | ( | [in, ref] aafUID_constref | channelAssignment | ) |
Sets the channel assignment scheme.
This property is optional.
Succeeds if all of the following are true:
If this method fails the ChannelAssignment property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
channelAssignment | [in, ref] The channel assignment to use. |
HRESULT IAAFPCMDescriptor::SetPeakChannelCount | ( | [in] aafUInt32 | channelCount | ) |
Sets the number of peak channels.
Succeeds if all of the following are true:
If this method fails the channel count will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
channelCount | [in] The number of peak channels. |
HRESULT IAAFPCMDescriptor::SetPeakEnvelopeBlockSize | ( | [in] aafUInt32 | blockSize | ) |
Sets the number of audio samples used to generate each peak frame.
Succeeds if all of the following are true:
If this method fails the PeakEnvelopeBlockSize property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
blockSize | [in] The number of audio samples used to generate each peak frame. |
HRESULT IAAFPCMDescriptor::SetPeakEnvelopeDataPosition | ( | [in] aafPosition_t | position | ) |
Sets the offset from the beginning of peak envelope data.
Succeeds if all of the following are true:
If this method fails the position will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
AAFRESULT_OBJECT_NOT_PERSISTENT
position | [in] Offset from the beginning of peak envelope data. |
HRESULT IAAFPCMDescriptor::SetPeakEnvelopeFormat | ( | [in] aafUInt32 | format | ) |
Sets the format of the peak point.
Succeeds if all of the following are true:
If this method fails the format will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
format | [in] Format of the peak point. |
HRESULT IAAFPCMDescriptor::SetPeakEnvelopeTimestamp | ( | [in] aafTimeStamp_constref | timeStamp | ) |
Sets the time stamp of the creation of the peak data.
Succeeds if all of the following are true:
If this method fails the time stamp will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
timeStamp | [in] The time stamp of the creation of the peak data. |
HRESULT IAAFPCMDescriptor::SetPeakEnvelopeVersion | ( | [in] aafUInt32 | version | ) |
Sets the version of the peak envelope data.
Succeeds if all of the following are true:
If this method fails the version will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
version | [in] Version of the peak envelope data. |
HRESULT IAAFPCMDescriptor::SetPeakFrameCount | ( | [in] aafUInt32 | frameCount | ) |
Sets the number of peak frames.
Succeeds if all of the following are true:
If this method fails the frame count will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
frameCount | [in] The number of peak frames. |
HRESULT IAAFPCMDescriptor::SetPeakOfPeaksPosition | ( | [in] aafPosition_t | position | ) |
Sets the offset to the first audio sample whose absolute value is the maximum value of the entire audio file.
Succeeds if all of the following are true:
If this method fails the PeakOfPeaksPosition property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
position | [in] The offset to peak of peaks |
HRESULT IAAFPCMDescriptor::SetPointsPerPeakValue | ( | [in] aafUInt32 | pointCount | ) |
Sets the number of peak points per peak value.
Succeeds if all of the following are true:
If this method fails the PointsPerPeakValue property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
pointCount | [in] The number of peak points per peak value. |
HRESULT IAAFPCMDescriptor::SetSequenceOffset | ( | [in] aafUInt8 | offset | ) |
Sets the frame number of the beginning of the essence data within a five-frame sequence.
This property is optional.
Succeeds if all of the following are true:
If this method fails the SequenceOffset property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_NOT_INITIALIZED
offset | [in] Zero-based ordinal frame number of the beginning of the essence data within a five-frame sequence. |
HRESULT IAAFPCMDescriptor::WritePeakEnvelopeData | ( | [in] aafUInt32 | bytes, |
[out, size_is(bytes)] aafDataBuffer_t | buffer, | ||
[out, ref] aafUInt32 * | pBytesWritten | ||
) |
Write the specified bytes to the peak envelope data stream.
Succeeds if all of the following are true:
If this method fails the PeakEnvelopeData property will not be changed.
This method will return the following codes:
AAFRESULT_SUCCESS
AAFRESULT_INVALID_PARAM
AAFRESULT_NULL_PARAM
AAFRESULT_NULL_PARAM
AAFRESULT_NOT_INITIALIZED
AAFRESULT_OBJECT_NOT_PERSISTENT
AAFRESULT_CONTAINERWRITE
bytes | [in] Write this many bytes |
buffer | [out, size_is(bytes)] Data to write |
pBytesWritten | [out,ref] Number of bytes actually written. |