本文整理汇总了C++中CAAFBuiltinDefs::cdConstantValue方法的典型用法代码示例。如果您正苦于以下问题:C++ CAAFBuiltinDefs::cdConstantValue方法的具体用法?C++ CAAFBuiltinDefs::cdConstantValue怎么用?C++ CAAFBuiltinDefs::cdConstantValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAAFBuiltinDefs
的用法示例。
在下文中一共展示了CAAFBuiltinDefs::cdConstantValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defs
IAAFParameter *AAFDomainUtils::AAFAddConstantVal(IAAFDictionary *dict, IAAFParameterDef *pParameterDef, long buflen, void *buf, IAAFOperationGroup *pGroup)
{
IAAFConstantValue *pCVal = NULL;
IAAFParameter *pParm = NULL;
// AAFRESULT rc;
CAAFBuiltinDefs defs (dict);
CHECKAAF(defs.cdConstantValue()->
CreateInstance(IID_IAAFConstantValue,
(IUnknown **)&pCVal));
CHECKAAF(pCVal->Initialize (pParameterDef, buflen, (unsigned char *)buf));
CHECKAAF(pCVal->QueryInterface(IID_IAAFParameter, (void **) &pParm));
CHECKAAF(pGroup->AddParameter(pParm));
//cleanup:
if(pParm)
pParm->Release();
if(pCVal)
pCVal->Release();
return(pParm);
}
示例2: CreateAAFFile
//.........这里部分代码省略.........
&pNewSlot));
// Create a Filler
checkResult(defs.cdFiller()->
CreateInstance(IID_IAAFFiller,
(IUnknown **) &pFiller));
// Get a component interface
checkResult(pFiller->QueryInterface(IID_IAAFComponent, (void **) &pComponent));
// Set values for the filler
checkResult(pFiller->Initialize(defs.ddkAAFPicture(), fillerLength));
// append the filler to the sequence
checkResult(pSequence->AppendComponent(pComponent));
// Release the component - because we need to reuse the pointer later
pFiller->Release();
pFiller = NULL;
pComponent->Release();
pComponent = NULL;
checkResult(defs.cdTransition()->
CreateInstance(IID_IAAFTransition,
(IUnknown **)&pTransition));
// Create an empty EffectGroup object !!
checkResult(defs.cdOperationGroup()->
CreateInstance(IID_IAAFOperationGroup,
(IUnknown **)&pOperationGroup));
checkResult(pOperationGroup->Initialize(defs.ddkAAFPicture(), transitionLength, pOperationDef));
// Create a constant value parameter.
checkResult(defs.cdConstantValue()->
CreateInstance(IID_IAAFConstantValue,
(IUnknown **)&pConstantValue));
aafRational_t testLevel = {1, 2};
checkResult(pConstantValue->Initialize (pParamDef, sizeof(testLevel), (aafDataBuffer_t)&testLevel));
checkResult(pConstantValue->QueryInterface (IID_IAAFParameter, (void **)&pParm));
checkResult(pOperationGroup->AddParameter (pParm));
pParm->Release();
pParm = NULL;
pConstantValue->Release();
pConstantValue = NULL;
checkResult(defs.cdFiller()->
CreateInstance(IID_IAAFSegment,
(IUnknown **) &pEffectFiller));
checkResult(pEffectFiller->QueryInterface(IID_IAAFComponent, (void **)&pComponent));
checkResult(pComponent->SetDataDef(defs.ddkAAFPicture()));
pComponent->Release();
pComponent = NULL;
checkResult(pOperationGroup->AppendInputSegment (pEffectFiller));
// release the filler
pEffectFiller->Release();
pEffectFiller = NULL;
checkResult(pOperationGroup->SetBypassOverride (1));
checkResult(defs.cdSourceClip()->
CreateInstance(IID_IAAFSourceClip,
(IUnknown **)&pSourceClip));
aafSourceRef_t sourceRef;
sourceRef.sourceID = zeroMobID;
sourceRef.sourceSlotID = 0;
sourceRef.startTime = 0;