本文整理汇总了C++中IAAFMob::CloneExternal方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFMob::CloneExternal方法的具体用法?C++ IAAFMob::CloneExternal怎么用?C++ IAAFMob::CloneExternal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFMob
的用法示例。
在下文中一共展示了IAAFMob::CloneExternal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateAAFFile
//.........这里部分代码省略.........
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;
}
// Cleanup and return
if (enumTaggedVal)
enumTaggedVal->Release();
if (newSlot)
newSlot->Release();
if (newStaticSlot)
newStaticSlot->Release();
if (seg)
seg->Release();
if (pComponent)
pComponent->Release();
if (sclp)
sclp->Release();
if (pMob)
pMob->Release();