本文整理汇总了C++中IAAFHeader::EnumEssenceData方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFHeader::EnumEssenceData方法的具体用法?C++ IAAFHeader::EnumEssenceData怎么用?C++ IAAFHeader::EnumEssenceData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFHeader
的用法示例。
在下文中一共展示了IAAFHeader::EnumEssenceData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openEssenceData
void EnumEssenceDataTest::openEssenceData()
{
assert(_pFile && _pHeader);
assert(NULL == _pEnumEssenceData);
assert(NULL == _pEssenceData);
assert(NULL == _pSourceMob);
aafUInt32 essenceDataCount = 0;
check(_pHeader->CountEssenceData(&essenceDataCount));
if (_maxMobCount != essenceDataCount)
check(AAFRESULT_TEST_FAILED);
check(_pHeader->EnumEssenceData(&_pEnumEssenceData));
for (aafUInt32 item = 0; item < essenceDataCount; ++item)
{
check(_pEnumEssenceData->NextOne(&_pEssenceData));
// Make sure that the essence data still references
// a valid mob.
check(_pEssenceData->GetFileMob(&_pSourceMob));
_pSourceMob->Release();
_pSourceMob = NULL;
_pEssenceData->Release();
_pEssenceData = NULL;
}
_pEnumEssenceData->Release();
_pEnumEssenceData = NULL;
}
示例2: openEssenceData
void EssenceDataTest::openEssenceData()
{
assert(_pFile && _pHeader);
assert(NULL == _pEnumEssenceData);
assert(NULL == _pEssenceData);
assert(NULL == _pSourceMob);
check(_pHeader->EnumEssenceData(&_pEnumEssenceData));
IAAFEssenceData* pNextEssenceData = NULL;
while (AAFRESULT_SUCCESS == (_hr = _pEnumEssenceData->NextOne(&pNextEssenceData)))
{
IAAFEssenceData2* pEssenceData2 = NULL;
check(pNextEssenceData->QueryInterface(IID_IAAFEssenceData2, (void**)&pEssenceData2));
check(pEssenceData2->GetPlainEssenceData(0, &_pEssenceData));
// Validate essence element key
IAAFKLVEssenceDataParameters* pParameters = NULL;
check(_pEssenceData->QueryInterface(IID_IAAFKLVEssenceDataParameters, (void **)&pParameters));
aafUID_t key;
AAFRESULT hr = pParameters->GetEssenceElementKey(&key);
checkExpression(AAFRESULT_SUCCEEDED(hr) || hr == AAFRESULT_OPERATION_NOT_PERMITTED,
AAFRESULT_TEST_FAILED);
checkExpression(AAFRESULT_FAILED(hr) || key == _essenceElementKey,
AAFRESULT_TEST_FAILED);
// Validate the essence.
// Validate the current essence size.
aafLength_t essenceSize = 0;
aafLength_t expectedEssenceSize = sizeof(_smiley) + sizeof(_frowney);
check(_pEssenceData->GetSize(&essenceSize));
checkExpression(essenceSize == expectedEssenceSize, AAFRESULT_TEST_FAILED);
// Validate that the correct data can be read back.
readEssenceData(_pEssenceData, (aafDataBuffer_t)_smiley, sizeof(_smiley));
readEssenceData(_pEssenceData, (aafDataBuffer_t)_frowney, sizeof(_frowney));
// Make sure that the essence data still references
// a valid mob.
check(_pEssenceData->GetFileMob(&_pSourceMob));
_pSourceMob->Release();
_pSourceMob = NULL;
pParameters->Release();
pParameters = NULL;
_pEssenceData->Release();
_pEssenceData = NULL;
pEssenceData2->Release();
pEssenceData2 = NULL;
pNextEssenceData->Release();
pNextEssenceData = NULL;
}
// It is ok to run out of objects.
checkExpression (AAFRESULT_NO_MORE_OBJECTS == _hr, _hr);
_hr = AAFRESULT_SUCCESS;
_pEnumEssenceData->Release();
_pEnumEssenceData = NULL;
}