本文整理汇总了C++中IAAFMob::ChangeRef方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFMob::ChangeRef方法的具体用法?C++ IAAFMob::ChangeRef怎么用?C++ IAAFMob::ChangeRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFMob
的用法示例。
在下文中一共展示了IAAFMob::ChangeRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadAAFFile
//.........这里部分代码省略.........
AAFRESULT_TEST_FAILED);
for (s = 0; s < numSlots; ++s)
{
checkResult(aMob->GetSlotAt(s, &slot));
checkResult(slot->GetNameBufLen(&bufLen));
checkResult(slot->GetName(slotName, bufLen));
checkResult(slot->GetSlotID(&trackID));
checkExpression(wcscmp(slotName, slotNames[s]) == 0, AAFRESULT_TEST_FAILED);
checkExpression(trackID == (s+1), AAFRESULT_TEST_FAILED);
if ( 0 < s && s < 5 ) // These are the SourceClips
{
checkResult(slot->GetSegment(&pSegment));
checkResult(pSegment->QueryInterface (IID_IAAFSourceClip, (void **)&pSourceClip));
checkResult(pSourceClip->QueryInterface (IID_IAAFSourceReference, (void **)&pSourceRef));
checkResult(pSourceRef->GetSourceID(&sourceID));
checkExpression(memcmp(&sourceID, &MOBTestID3, sizeof(aafMobID_t)) == 0,
AAFRESULT_TEST_FAILED);
pSourceRef->Release();
pSourceRef = NULL;
pSourceClip->Release();
pSourceClip = NULL;
pSegment->Release();
pSegment = NULL;
}
slot->Release();
slot = NULL;
bufLen = 0;
trackID = 0;
}
// ChangeRef
checkResult(aMob->ChangeRef(MOBTestID3, MOBTestID4));
for (s = 1; s < 5; ++s) // These are the SourceClips
{
checkResult(aMob->GetSlotAt(s, &slot));
checkResult(slot->GetSegment(&pSegment));
checkResult(pSegment->QueryInterface (IID_IAAFSourceClip, (void **)&pSourceClip));
checkResult(pSourceClip->QueryInterface (IID_IAAFSourceReference, (void **)&pSourceRef));
checkResult(pSourceRef->GetSourceID(&sourceID));
checkExpression(memcmp(&sourceID, &MOBTestID4, sizeof(aafMobID_t)) == 0,
AAFRESULT_TEST_FAILED);
pSourceRef->Release();
pSourceRef = NULL;
pSourceClip->Release();
pSourceClip = NULL;
pSegment->Release();
pSegment = NULL;
slot->Release();
slot = NULL;
}
// try it again with a MobID it won't find. Make sure nothing changes
checkResult(aMob->ChangeRef(MOBTestID3, MOBTestID2));
for (s = 1; s < 5; ++s) // These are the SourceClips
{
checkResult(aMob->GetSlotAt(s, &slot));
checkResult(slot->GetSegment(&pSegment));
checkResult(pSegment->QueryInterface (IID_IAAFSourceClip, (void **)&pSourceClip));
checkResult(pSourceClip->QueryInterface (IID_IAAFSourceReference, (void **)&pSourceRef));
checkResult(pSourceRef->GetSourceID(&sourceID));
checkExpression(memcmp(&sourceID, &MOBTestID4, sizeof(aafMobID_t)) == 0,
AAFRESULT_TEST_FAILED);