本文整理汇总了C++中IAAFHeader::RemoveMob方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFHeader::RemoveMob方法的具体用法?C++ IAAFHeader::RemoveMob怎么用?C++ IAAFHeader::RemoveMob使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFHeader
的用法示例。
在下文中一共展示了IAAFHeader::RemoveMob方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateAAFFile
//.........这里部分代码省略.........
enumTaggedVal->Release();
enumTaggedVal = NULL;
// Check the Mob2 attribute and usage code implementations.
// Need IAAFMob2 for that;
checkResult( pMobInterface2->AppendAttribute( AttributeNames[0], AttributeValues[0] ) );
checkResult( pMobInterface2->AppendAttribute( AttributeNames[1], AttributeValues[1] ) );
checkResult( pMobInterface2->SetUsageCode( kAAFUsage_SubClip ) );
// Add the mob to the file.
checkResult(pHeader->AddMob(pMob));
// Test changing the mob id after the mob is attached to the
// content store. Change it, then reset to the original id.
checkResult(pMob->SetMobID(MOBTestID2));
checkResult(pMob->SetMobID(MOBTestID));
// Create another Mob, check mob count, then delete and recheck count
checkResult(defs.cdMasterMob()->
CreateInstance(IID_IAAFMob,
(IUnknown **)&pMob2));
checkResult(pMob2->SetMobID(MOBTestID2));
checkResult(pMob2->SetName(mobName));
checkResult(pMob2->SetCreateTime(creationTimeStamp));
checkResult(pMob2->SetModTime(modificationTimeStamp));
// Add the mob to the file.
checkResult(pHeader->AddMob(pMob2));
checkResult(pHeader->CountMobs(kAAFAllMob, &numMobs));
checkExpression(numMobs == 2, AAFRESULT_TEST_FAILED);
checkResult(pHeader->RemoveMob(pMob2));
checkResult(pHeader->CountMobs(kAAFAllMob, &numMobs));
checkExpression(numMobs == 1, AAFRESULT_TEST_FAILED);
//try Copy()
const aafCharacter *copy_name = L"Name of Copied Mob";
IAAFMobSP spCopiedMob;
checkResult(pMob->Copy(copy_name, &spCopiedMob));
checkResult(pHeader->CountMobs(kAAFAllMob, &numMobs));
checkExpression(numMobs == 2, AAFRESULT_TEST_FAILED);
checkResult(pHeader->RemoveMob(spCopiedMob));
checkResult(pHeader->CountMobs(kAAFAllMob, &numMobs));
checkExpression(numMobs == 1, AAFRESULT_TEST_FAILED);
//try CloneExternal
IAAFMobSP spClonedMob;
IAAFFileSP spDestFile;
aafCharacter dest_filename[128];
wcscpy(dest_filename, pFileName);
wcscat(dest_filename, L"_clone");
// Remove the previous test file if any.
RemoveTestFile(dest_filename);
checkResult(CreateTestFile( dest_filename, fileKind, rawStorageType, productID, &spDestFile ));
checkResult(pMob->CloneExternal(kAAFNoFollowDepend, kAAFNoIncludeMedia, spDestFile, &spClonedMob));
checkResult(spDestFile->Save());
checkResult(spDestFile->Close());
}
catch (HRESULT& rResult)
{
hr = rResult;
}