本文整理汇总了C++中IAAFMob::RemoveKLVData方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFMob::RemoveKLVData方法的具体用法?C++ IAAFMob::RemoveKLVData怎么用?C++ IAAFMob::RemoveKLVData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFMob
的用法示例。
在下文中一共展示了IAAFMob::RemoveKLVData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateAAFFile
//.........这里部分代码省略.........
// Try CountKLVData before any have been attached
numFound = 1;
checkResult(pMob->CountKLVData(&numFound));
checkExpression(numFound == 0, AAFRESULT_TEST_FAILED);
checkExpression(pMob->CountKLVData(NULL) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
// AppendKLVData - attach some objects
checkResult(pDictionary->LookupTypeDef (kAAFTypeID_UInt8Array, &pBaseType));
checkResult(pDictionary->RegisterKLVDataKey(TEST_KLV, pBaseType));
pBaseType->Release();
pBaseType = NULL;
checkExpression(pMob->AppendKLVData(NULL) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
checkResult(defs.cdKLVData()->
CreateInstance(IID_IAAFKLVData,
(IUnknown **)&pKLVData));
checkResult(pKLVData->Initialize(TEST_KLV, sizeof(KLVfrowney),
(unsigned char *)KLVfrowney));
checkResult(pMob->AppendKLVData(pKLVData));
pKLVData->Release();
pKLVData = NULL;
checkResult(defs.cdKLVData()->
CreateInstance(IID_IAAFKLVData,
(IUnknown **)&pKLVData));
checkResult(pKLVData->Initialize(TEST_KLV, sizeof(KLVfrowney),
(unsigned char *)KLVfrowney));
checkResult(pMob->AppendKLVData(pKLVData));
checkExpression(pMob->AppendKLVData(pKLVData) == AAFRESULT_OBJECT_ALREADY_ATTACHED,
AAFRESULT_TEST_FAILED);
// RemoveKLVData - remove object #2
checkExpression(pMob->RemoveKLVData(NULL) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
checkResult(pMob->CountKLVData(&numFound));
checkExpression(numFound == 2, AAFRESULT_TEST_FAILED);
checkResult(pMob->RemoveKLVData(pKLVData));
checkResult(pMob->CountKLVData(&numFound));
checkExpression(numFound == 1, AAFRESULT_TEST_FAILED);
pKLVData->Release();
pKLVData = NULL;
// Try removing an object that is not attached
checkResult(defs.cdKLVData()->
CreateInstance(IID_IAAFKLVData,
(IUnknown **)&pKLVData));
checkResult(pKLVData->Initialize(TEST_KLV, sizeof(KLVsmiley),
(unsigned char *)KLVsmiley));
checkExpression(pMob->RemoveKLVData(pKLVData) == AAFRESULT_OBJECT_NOT_ATTACHED,
AAFRESULT_TEST_FAILED);
// Attach it to replace the one removed
checkResult(pMob->AppendKLVData(pKLVData));
pKLVData->Release();
pKLVData = NULL;
// Comments
checkExpression(pMob->GetComments(&enumTaggedVal) == AAFRESULT_PROP_NOT_PRESENT,
AAFRESULT_TEST_FAILED);
// Check CountComments()
checkExpression(pMob->CountComments(NULL) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
numComments = 1;
checkResult(pMob->CountComments(&numComments));
checkExpression(numComments == 0, AAFRESULT_TEST_FAILED);