当前位置: 首页>>代码示例>>C++>>正文


C++ ImgBufQueNode::setCookieDE方法代码示例

本文整理汇总了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(
//.........这里部分代码省略.........
开发者ID:rombaby,项目名称:MT6735_Longcheer,代码行数:101,代码来源:EngBufHandler.cpp


注:本文中的ImgBufQueNode::setCookieDE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。