本文整理汇总了C++中ImgBufQueNode::setCookieDE方法的典型用法代码示例。如果您正苦于以下问题:C++ ImgBufQueNode::setCookieDE方法的具体用法?C++ ImgBufQueNode::setCookieDE怎么用?C++ ImgBufQueNode::setCookieDE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImgBufQueNode
的用法示例。
在下文中一共展示了ImgBufQueNode::setCookieDE方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _l
MBOOL
EngBufHandlerImpl::
dequeBuffer(MUINT32 const data, ImgRequest * pImgReq)
{
Mutex::Autolock _l(mLock);
//
MBOOL isDequeProvider = MFALSE;
MBOOL doCacheInvalid = MFALSE;
MINT32 bufQueIdx = mapNode2Dst(data);
ImgBufQueNode node;
list<MAP_PORT_INFO>::iterator iterMapPort;
//
#if 0
MY_LOGD("data(0x%08X)",data);
#endif
//
if(bufQueIdx == -1)
{
return MFALSE;
}
//
for(iterMapPort = mlMapPort[bufQueIdx].begin(); iterMapPort != mlMapPort[bufQueIdx].end(); iterMapPort++)
{
#if 0
MY_LOGD("bufQueIdx(%d),data(%d,%d),bufType(%d)",
bufQueIdx,data,
(*iterMapPort).nodeType,
(*iterMapPort).bufType);
#endif
if(data == (*iterMapPort).nodeType)
{
sp<IImgBufProvider> bufProvider = NULL;
pImgReq->mUsage = NSIoPipe::EPortCapbility_None;
switch((*iterMapPort).bufType)
{
case eBuf_Disp:
{
bufProvider = mspImgBufProvidersMgr->getDisplayPvdr();
pImgReq->mUsage = NSIoPipe::EPortCapbility_Disp;
break;
}
case eBuf_Rec:
{
bufProvider = mspImgBufProvidersMgr->getRecCBPvdr();
pImgReq->mUsage = NSIoPipe::EPortCapbility_Rcrd;
break;
}
case eBuf_AP:
{
bufProvider = mspImgBufProvidersMgr->getPrvCBPvdr();
doCacheInvalid = MTRUE;
break;
}
case eBuf_Generic:
{
bufProvider = mspImgBufProvidersMgr->getGenericBufPvdr();
break;
}
case eBuf_FD:
{
bufProvider = mspImgBufProvidersMgr->getFDBufPvdr();
break;
}
case eBuf_OT:
{
bufProvider = mspImgBufProvidersMgr->getOTBufPvdr();
break;
}
default:
{
MY_LOGE("un-supported bufType(%d)",(*iterMapPort).bufType);
return MFALSE;
}
}
//
if(bufProvider != 0 && bufProvider->dequeProvider(node))
{
node.setCookieDE((*iterMapPort).bufType);
mvBufQueNode[bufQueIdx].push_back(node);
isDequeProvider = MTRUE;
break;
}
}
}
//
if(isDequeProvider)
{
size_t bufStridesInBytes[] = { GET_IIMGBUF_IMG_STRIDE_IN_BYTE(node.getImgBuf(), 0),
GET_IIMGBUF_IMG_STRIDE_IN_BYTE(node.getImgBuf(), 1),
GET_IIMGBUF_IMG_STRIDE_IN_BYTE(node.getImgBuf(), 2)};
size_t bufBoundaryInBytes[] = {0,0,0};
IImageBufferAllocator::ImgParam imgParam = IImageBufferAllocator::ImgParam(
Format::queryImageFormat(node.getImgBuf()->getImgFormat().string()),
MSize(
node.getImgBuf()->getImgWidth(),
node.getImgBuf()->getImgHeight()),
bufStridesInBytes,
bufBoundaryInBytes,
Format::queryPlaneCount(Format::queryImageFormat(node.getImgBuf()->getImgFormat().string())));
PortBufInfo_v1 portBufInfo = PortBufInfo_v1(
//.........这里部分代码省略.........