本文整理汇总了C++中CAAFBuiltinDefs::cdTapeDescriptor方法的典型用法代码示例。如果您正苦于以下问题:C++ CAAFBuiltinDefs::cdTapeDescriptor方法的具体用法?C++ CAAFBuiltinDefs::cdTapeDescriptor怎么用?C++ CAAFBuiltinDefs::cdTapeDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAAFBuiltinDefs
的用法示例。
在下文中一共展示了CAAFBuiltinDefs::cdTapeDescriptor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateAAFFile
static HRESULT CreateAAFFile(
aafWChar * pFileName,
aafUID_constref fileKind,
testRawStorageType_t rawStorageType,
aafProductIdentification_constref productID)
{
IAAFFile* pFile = NULL;
bool bFileOpen = false;
IAAFHeader * pHeader = NULL;
IAAFDictionary* pDictionary = NULL;
IAAFMob* pMob = NULL;
IAAFMasterMob* pMasterMob = NULL;
IAAFSourceMob* pSrcMob = NULL;
IAAFSourceMob* pTapeMob = NULL;
IAAFEssenceDescriptor* pDesc = NULL;
IAAFMob* pTempMob = NULL;
HRESULT hr = S_OK;
long test;
aafSourceRef_t ref;
IAAFEssenceDescriptor* pEssDesc = NULL;
IAAFTapeDescriptor* pTapeDesc = NULL;
try
{
// Remove the previous test file if any.
RemoveTestFile(pFileName);
// Create the AAF file
checkResult(CreateTestFile( pFileName, fileKind, rawStorageType, productID, &pFile ));
bFileOpen = true;
// Get the AAF file header.
checkResult(pFile->GetHeader(&pHeader));
// Get the AAF Dictionary so that we can create valid AAF objects.
checkResult(pHeader->GetDictionary(&pDictionary));
CAAFBuiltinDefs defs (pDictionary);
// Create a Master Mob
checkResult(defs.cdMasterMob()->
CreateInstance(IID_IAAFMob,
(IUnknown **)&pMob));
// Set the IAAFMob properties
checkResult(pMob->SetMobID(TEST_Master_MobID));
checkResult(pMob->SetName(MobName));
checkResult(pMob->QueryInterface(IID_IAAFMasterMob, (void **) &pMasterMob));
// Create source mob to associate with our MasterMob.
checkResult(defs.cdSourceMob()->
CreateInstance(IID_IAAFSourceMob,
(IUnknown **)&pTapeMob));
hr = defs.cdTapeDescriptor()->
CreateInstance(IID_IAAFTapeDescriptor,
(IUnknown **)&pTapeDesc);
if (AAFRESULT_SUCCESS == hr)
{
hr = pTapeDesc->QueryInterface(IID_IAAFEssenceDescriptor, (void **)&pEssDesc);
if (AAFRESULT_SUCCESS == hr)
{
hr = pTapeMob->SetEssenceDescriptor(pEssDesc);
if (AAFRESULT_SUCCESS == hr)
{
hr = pTapeDesc->SetTapeManufacturer( Manufacturer );
if (AAFRESULT_SUCCESS == hr )
{
hr = pTapeDesc->SetTapeModel( Model );
if (AAFRESULT_SUCCESS == hr )
{
hr = pTapeDesc->SetTapeFormFactor( FormFactor );
if (AAFRESULT_SUCCESS == hr )
{
hr = pTapeDesc->SetSignalType( VideoSignalType );
if (AAFRESULT_SUCCESS == hr )
{
hr = pTapeDesc->SetTapeFormat( TapeFormat );
if (AAFRESULT_SUCCESS == hr )
hr = pTapeDesc->SetTapeLength( TapeLength );
}
}
}
}
}
pEssDesc->Release();
pEssDesc = NULL;
}
pTapeDesc->Release();
pTapeDesc = NULL;
}
for (test = 0; test < NumMobSlots; test++)
{
IAAFDataDefSP pDataDef;
checkResult (pDictionary->LookupDataDef (*slotDDefs[test], &pDataDef));
checkResult(pTapeMob->AddNilReference (test, TAPE_MOB_LENGTH_ARR[test], pDataDef, slotRates[test]));
}
checkResult(pTapeMob->QueryInterface(IID_IAAFMob, (void **) &pTempMob));
//.........这里部分代码省略.........