本文整理汇总了C++中sp::getGenericBufPvdr方法的典型用法代码示例。如果您正苦于以下问题:C++ sp::getGenericBufPvdr方法的具体用法?C++ sp::getGenericBufPvdr怎么用?C++ sp::getGenericBufPvdr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sp
的用法示例。
在下文中一共展示了sp::getGenericBufPvdr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _l
MBOOL
EngBufHandlerImpl::
enqueBuffer(MUINT32 const data, IImageBuffer const * pImageBuffer)
{
Mutex::Autolock _l(mLock);
//
MINT32 i, bufQueIdx = mapNode2Dst(data);
ImgBufQueNode keepImgBufQueNode;
//
#if 0
MY_LOGD("data(0x%08X)",data);
#endif
//
if(bufQueIdx == -1)
{
return MFALSE;
}
//
if(bufQueIdx >= 0)
{
if(mvBufQueNode[bufQueIdx].size() > 0)
{
keepImgBufQueNode = mvBufQueNode[bufQueIdx][0];
}
else
{
MY_LOGE("mvBufQueNode[%d] size(%d) = 0",
bufQueIdx,
mvBufQueNode[bufQueIdx].size());
return MFALSE;
}
}
else
{
MY_LOGE("bufQueIdx(%d) < 0",bufQueIdx);
}
//
MUINTPTR keepAddr = (MUINTPTR)(mvBufQueNode[bufQueIdx][0].getImgBuf()->getVirAddr());
MUINTPTR enqueAddr = (MUINTPTR)(GET_IIMAGEBUFFER_BUF_VA(pImageBuffer, 0));
//
#if 0
MY_LOGD("Addr(0x%08X/0x%08X),Port(%d)",
keepAddr,
enqueAddr,
mvBufQueNode[bufQueIdx][0].getCookieDE());
#endif
//
if(keepAddr == enqueAddr)
{
MBOOL isAPClientFromFD = MFALSE;
sp<IImgBufProvider> bufProvider = NULL;
IImageBuffer* tempBuffer = const_cast<IImageBuffer*>(pImageBuffer);
//
switch(keepImgBufQueNode.getCookieDE())
{
case eBuf_Disp:
{
bufProvider = mspImgBufProvidersMgr->getDisplayPvdr();
break;
}
case eBuf_Rec:
{
bufProvider = mspImgBufProvidersMgr->getRecCBPvdr();
break;
}
case eBuf_AP:
{
bufProvider = mspImgBufProvidersMgr->getPrvCBPvdr();
const_cast<ImgBufQueNode*>(&keepImgBufQueNode)->setCookieDE(0); // 0 for preview
break;
}
case eBuf_Generic:
{
bufProvider = mspImgBufProvidersMgr->getGenericBufPvdr();
break;
}
case eBuf_FD:
{
bufProvider = mspImgBufProvidersMgr->getFDBufPvdr();
isAPClientFromFD = MTRUE;
break;
}
case eBuf_OT:
{
bufProvider = mspImgBufProvidersMgr->getOTBufPvdr();
break;
}
default:
{
MY_LOGE("unknown port(%d)",keepImgBufQueNode.getCookieDE());
return MFALSE;
}
}
//
if (bufProvider == NULL)
{
MY_LOGW("bufProvider(%d) is not available, drop it!", keepImgBufQueNode.getCookieDE());
tempBuffer->unlockBuf(LOG_TAG);
tempBuffer->decStrong(tempBuffer);
mvBufQueNode[bufQueIdx].erase(mvBufQueNode[bufQueIdx].begin());
//.........这里部分代码省略.........