本文整理汇总了C++中IAAFMob::GetCreateTime方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFMob::GetCreateTime方法的具体用法?C++ IAAFMob::GetCreateTime怎么用?C++ IAAFMob::GetCreateTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFMob
的用法示例。
在下文中一共展示了IAAFMob::GetCreateTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadAAFFile
static HRESULT ReadAAFFile(aafWChar * pFileName)
{
IAAFDictionary *pDictionary = NULL;
IAAFFile *pFile = NULL;
bool bFileOpen = false;
IAAFHeader *pHeader = NULL;
IEnumAAFMobs *mobIter = NULL;
IAAFMob *aMob = NULL;
IEnumAAFMobSlots *slotIter = NULL;
IAAFMobSlot *slot = NULL;
aafNumSlots_t numMobs, n, s;
HRESULT hr = S_OK;
aafUInt32 bufLen = 0;
aafUInt32 bytesRead = 0;
aafUInt32 numFound = 0;
aafWChar value[500];
IEnumAAFTaggedValues *enumTaggedVal = NULL;
IAAFTaggedValue *taggedVal = NULL;
aafUID_t testKey;
IEnumAAFKLVData *klvEnum = NULL;
IAAFKLVData *pKLVData = NULL;
IAAFTypeDef* pBaseType = NULL;
IAAFSourceClip *pSourceClip = NULL;
IAAFSourceReference *pSourceRef = NULL;
IAAFSegment *pSegment = NULL;
aafMobID_t sourceID;
int i;
try
{
// Open the file
checkResult(AAFFileOpenExistingRead(pFileName, 0, &pFile));
bFileOpen = true;
// We can't really do anthing in AAF without the header.
checkResult(pFile->GetHeader(&pHeader));
checkResult(pHeader->GetDictionary(&pDictionary));
CAAFBuiltinDefs defs (pDictionary);
checkResult(pHeader->CountMobs(kAAFAllMob, &numMobs));
checkExpression(1 == numMobs, AAFRESULT_TEST_FAILED);
aafSearchCrit_t criteria;
criteria.searchTag = kAAFNoSearch;
checkResult(pHeader->GetMobs (&criteria, &mobIter));
for(n = 0; n < numMobs; n++)
{
aafWChar name[500], slotName[500];
aafNumSlots_t numSlots;
aafMobID_t mobID;
aafSlotID_t trackID;
aafUInt32 nameBufLen = 0;
checkResult(mobIter->NextOne (&aMob));
// Check GetNameBufLen and GetName
checkExpression(aMob->GetNameBufLen(NULL) == AAFRESULT_NULL_PARAM, AAFRESULT_TEST_FAILED);
checkResult(aMob->GetNameBufLen(&nameBufLen));
checkExpression(((wcslen(mobName) + 1) * sizeof(aafCharacter)) == nameBufLen, AAFRESULT_TEST_FAILED);
checkExpression(aMob->GetName (NULL, nameBufLen) == AAFRESULT_NULL_PARAM, AAFRESULT_TEST_FAILED);
checkExpression(aMob->GetName (name, 4) == AAFRESULT_SMALLBUF, AAFRESULT_TEST_FAILED);
checkResult(aMob->GetName (name, nameBufLen));
checkExpression (wcscmp(mobName, name) == 0, AAFRESULT_TEST_FAILED);
// Check GetMobID
checkExpression(aMob->GetMobID (NULL) == AAFRESULT_NULL_PARAM, AAFRESULT_TEST_FAILED);
checkResult(aMob->GetMobID (&mobID));
checkExpression(memcmp(&MOBTestID, &mobID, sizeof(mobID)) == 0, AAFRESULT_TEST_FAILED);
// Check the time stamps
aafTimeStamp_t created = { {0,0,0}, {0,0,0,0} };
checkExpression(aMob->GetCreateTime(NULL) == AAFRESULT_NULL_PARAM, AAFRESULT_TEST_FAILED);
checkResult(aMob->GetCreateTime(&created));
checkTimeStampsAreEqual(creationTimeStamp, created);
aafTimeStamp_t modified = { {0,0,0}, {0,0,0,0} };
checkExpression(aMob->GetModTime(NULL) == AAFRESULT_NULL_PARAM, AAFRESULT_TEST_FAILED);
checkResult(aMob->GetModTime(&modified));
checkTimeStampsAreEqual(modificationTimeStamp, modified);
// Check the GetMobInfo data.
memset(&created, 0, sizeof(created));
memset(&modified, 0, sizeof(modified));
checkExpression(aMob->GetMobInfo(NULL, &created,
name, sizeof(name)) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
checkExpression(aMob->GetMobInfo(&modified, NULL,
name, sizeof(name)) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
checkExpression(aMob->GetMobInfo(&modified, &created,
NULL, sizeof(name)) == AAFRESULT_NULL_PARAM,
AAFRESULT_TEST_FAILED);
checkExpression(aMob->GetMobInfo(&modified, &created,
name, 1) == AAFRESULT_SMALLBUF,
AAFRESULT_TEST_FAILED);
checkResult(aMob->GetMobInfo(&modified, &created, name, sizeof(name)));
checkTimeStampsAreEqual(creationTimeStamp, created);
//.........这里部分代码省略.........