本文整理汇总了C++中IAAFDictionary::GetInterpolationDefs方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFDictionary::GetInterpolationDefs方法的具体用法?C++ IAAFDictionary::GetInterpolationDefs怎么用?C++ IAAFDictionary::GetInterpolationDefs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFDictionary
的用法示例。
在下文中一共展示了IAAFDictionary::GetInterpolationDefs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadAAFFile
static HRESULT ReadAAFFile(aafWChar* pFileName)
{
IAAFFile* pFile = NULL;
IAAFHeader* pHeader = NULL;
IAAFDictionary* pDictionary = NULL;
IEnumAAFInterpolationDefs *pPlug = NULL;
IEnumAAFInterpolationDefs *pClonePlug = NULL;
IAAFDefObject* pDef = NULL;
IAAFInterpolationDef* pInterpolationDef = NULL;
IAAFInterpolationDef* pArray[2] = { NULL, NULL };
IAAFInterpolationDef** pArrayDef = pArray;
bool bFileOpen = false;
HRESULT hr = S_OK;
wchar_t testString[256];
aafUInt32 resultCount;
try
{
// Open the AAF file
checkResult(AAFFileOpenExistingRead(pFileName, 0, &pFile));
bFileOpen = true;
// Get the AAF file header.
checkResult(pFile->GetHeader(&pHeader));
checkResult(pHeader->GetDictionary(&pDictionary));
checkResult(pDictionary->GetInterpolationDefs(&pPlug));
/* Read and check the first element */
checkResult(pPlug->NextOne(&pInterpolationDef));
checkResult(pInterpolationDef->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName1) == 0, AAFRESULT_TEST_FAILED);
pInterpolationDef->Release();
pInterpolationDef = NULL;
pDef->Release();
pDef = NULL;
/* Read and check the second element */
checkResult(pPlug->NextOne(&pInterpolationDef));
checkResult(pInterpolationDef->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName2) == 0, AAFRESULT_TEST_FAILED);
pInterpolationDef->Release();
pInterpolationDef = NULL;
pDef->Release();
pDef = NULL;
/* Reset, and check the first element again*/
checkResult(pPlug->Reset());
checkResult(pPlug->NextOne(&pInterpolationDef));
checkResult(pInterpolationDef->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName1) == 0, AAFRESULT_TEST_FAILED);
pInterpolationDef->Release();
pInterpolationDef = NULL;
pDef->Release();
pDef = NULL;
/* Reset, Skip, and check the second element again*/
checkResult(pPlug->Reset());
checkResult(pPlug->Skip(1));
checkResult(pPlug->NextOne(&pInterpolationDef));
checkResult(pInterpolationDef->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName2) == 0, AAFRESULT_TEST_FAILED);
pInterpolationDef->Release();
pInterpolationDef = NULL;
pDef->Release();
pDef = NULL;
/* Reset, and read both elements */
checkResult(pPlug->Reset());
checkResult(pPlug->Next (2, (IAAFInterpolationDef **)&pArray, &resultCount));
checkExpression (resultCount == 2, AAFRESULT_TEST_FAILED);
checkResult(pArrayDef[0]->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName1) == 0, AAFRESULT_TEST_FAILED);
pDef->Release();
pDef = NULL;
checkResult(pArrayDef[1]->QueryInterface (IID_IAAFDefObject,
(void **)&pDef));
checkResult(pDef->GetName (testString, sizeof(testString)));
checkExpression (wcscmp(testString, sName2) == 0, AAFRESULT_TEST_FAILED);
pDef->Release();
pDef = NULL;
/* Read one past to make sure that it fails */
checkExpression(pPlug->NextOne(&pInterpolationDef) != AAFRESULT_SUCCESS, AAFRESULT_TEST_FAILED);
/* Clone the enumerator, and read one element */
checkResult(pPlug->Clone(&pClonePlug));
checkResult(pClonePlug->Reset());
checkResult(pClonePlug->NextOne(&pInterpolationDef));
//.........这里部分代码省略.........