本文整理汇总了C++中IAAFFile::GetRevision方法的典型用法代码示例。如果您正苦于以下问题:C++ IAAFFile::GetRevision方法的具体用法?C++ IAAFFile::GetRevision怎么用?C++ IAAFFile::GetRevision使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAAFFile
的用法示例。
在下文中一共展示了IAAFFile::GetRevision方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadAAFFile
static void ReadAAFFile(aafWChar * pFileName)
{
HRESULT hr = S_OK;
IAAFFile * pFile = NULL;
hr = AAFFileOpenExistingRead (pFileName, AAF_FILE_MODE_LAZY_LOADING, &pFile);
if (SUCCEEDED(hr))
{
IAAFHeader * pHeader = NULL;
hr = pFile->GetHeader(&pHeader);
check(hr); // display error message
if (SUCCEEDED(hr))
{
IAAFIdentification * pIdent = NULL;
hr = pHeader->GetLastIdentification(&pIdent);
check(hr); // display error message
if (SUCCEEDED(hr))
{
printIdentification(pIdent);
pIdent->Release();
pIdent = NULL;
// count Mobs
aafNumSlots_t n;
hr = pHeader->CountMobs(kAAFAllMob, &n);
check(hr);
printf("\nNumber of Mobs = %d\n", n);
// Header::Version, Header::ObjectModelVersion
aafVersionType_t version = {0};
check(pHeader->GetFileRevision (&version) );
printf("\nHeader::Version = %d.%d\n", version.major, version.minor);
aafFileRev_t fileVersion = kAAFRev1;
check(pFile->GetRevision (&fileVersion) );
printf("\nHeader::ObjectModelVersion = %d", fileVersion);
if (fileVersion == kAAFRev1)
printf(" (recognized as kAAFRev1)\n");
else if (fileVersion == kAAFRev2)
printf(" (recognized as kAAFRev2)\n");
else
printf("\n");
// Show datadefs, with version
IEnumAAFDataDefsSP pEnumDataDef;
IAAFDictionarySP pDictionary;
check(pHeader->GetDictionary(&pDictionary));
check(pDictionary->GetDataDefs(&pEnumDataDef));
IAAFDataDef* pDataDef;
printf("\nDatadefs = ");
while (SUCCEEDED(pEnumDataDef->NextOne(&pDataDef)))
{
IAAFDefObjectSP pDefObject;
check(pDataDef->QueryInterface(IID_IAAFDefObject, (void**)&pDefObject));
pDataDef->Release();
pDataDef = NULL;
aafUID_t id = {0};
check(pDefObject->GetAUID(&id));
aafWChar wchName[500];
char chName[1000];
check( pDefObject->GetName(wchName, sizeof (wchName)) );
convert(chName, sizeof(chName), wchName);
if (memcmp( &id, &kAAFDataDef_LegacyPicture, sizeof(id)) == 0)
printf("\"%s\" (recognized as legacy Picture)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Picture, sizeof(id)) == 0)
printf("\"%s\" (recognized as Picture)\n", chName);
else if (memcmp( &id, &kAAFDataDef_LegacySound, sizeof(id)) == 0)
printf("\"%s\" (recognized as legacy Sound)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Sound, sizeof(id)) == 0)
printf("\"%s\" (recognized as Sound)\n", chName);
else if (memcmp( &id, &kAAFDataDef_LegacyTimecode, sizeof(id)) == 0)
printf("\"%s\" (recognized as legacy Timecode)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Timecode, sizeof(id)) == 0)
printf("\"%s\" (recognized as Timecode)\n", chName);
else if (memcmp( &id, &kAAFDataDef_PictureWithMatte, sizeof(id)) == 0)
printf("\"%s\" (recognized as PictureWithMatte)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Edgecode, sizeof(id)) == 0)
printf("\"%s\" (recognized as Edgecode)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Auxiliary, sizeof(id)) == 0)
printf("\"%s\" (recognized as Auxiliary)\n", chName);
else if (memcmp( &id, &kAAFDataDef_DescriptiveMetadata, sizeof(id)) == 0)
printf("\"%s\" (recognized as DescriptiveMetadata)\n", chName);
else if (memcmp( &id, &kAAFDataDef_Matte, sizeof(id)) == 0)
printf("\"%s\" (recognized as Matte)\n", chName);
else
printf("\"%s\"\n", chName);
printf(" ");
}
// Check if file contains TypeDefs known to cause a v1.0 reader to assert.
// Known instances of this are UInt32Set and AUIDSet added to the v1.1 SDK.
// Cannot use Dictionary::LookupTypeDef to check for them, because this
//.........这里部分代码省略.........