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


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

本文整理汇总了C++中ImgBufQueNode::getRotation方法的典型用法代码示例。如果您正苦于以下问题:C++ ImgBufQueNode::getRotation方法的具体用法?C++ ImgBufQueNode::getRotation怎么用?C++ ImgBufQueNode::getRotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ImgBufQueNode的用法示例。


在下文中一共展示了ImgBufQueNode::getRotation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _l


//.........这里部分代码省略.........
                                                            node.getImgBuf()->getImgWidth(),
                                                            node.getImgBuf()->getImgHeight()), 
                                                        bufStridesInBytes, 
                                                        bufBoundaryInBytes, 
                                                        Format::queryPlaneCount(Format::queryImageFormat(node.getImgBuf()->getImgFormat().string())));
        PortBufInfo_v1 portBufInfo = PortBufInfo_v1(
                                        node.getImgBuf()->getIonFd(),
                                        (MUINTPTR)node.getImgBuf()->getVirAddr(),
                                        0,
                                        node.getImgBuf()->getBufSecu(), 
                                        node.getImgBuf()->getBufCohe());
        //
        sp<ImageBufferHeap> pHeap = ImageBufferHeap::create(
                                                        LOG_TAG,
                                                        imgParam,
                                                        portBufInfo,
                                                        mbEnableIImageBufferLog);
        if(pHeap == 0)
        {
            MY_LOGE("pHeap is NULL");
            return MFALSE;
        }
        //
        IImageBuffer* tempBuffer = pHeap->createImageBuffer();
        tempBuffer->incStrong(tempBuffer);
        tempBuffer->lockBuf(
                        LOG_TAG,
                        eBUFFER_USAGE_HW_CAMERA_READWRITE | eBUFFER_USAGE_SW_READ_OFTEN);

        if( doCacheInvalid )
        {
            if( !tempBuffer->syncCache(eCACHECTRL_INVALID) )
                MY_LOGE("invalid cache failed imgbuf 0x%x", tempBuffer);
        }

        pImgReq->mBuffer = tempBuffer;
        if(mbIsForceRotation)
        {
            pImgReq->mTransform  = mRotationAnagle == 0 ? 0 
                                 : mRotationAnagle == 90 ? eTransform_ROT_90
                                 : mRotationAnagle == 180 ? eTransform_ROT_180 : eTransform_ROT_270;
        }
        else
        {
            pImgReq->mTransform  = node.getRotation() == 0 ? 0 
                                 : node.getRotation() == 90 ? eTransform_ROT_90
                                 : node.getRotation() == 180 ? eTransform_ROT_180 : eTransform_ROT_270;
        }
        //
        #if 0
        MY_LOGD("Node:DE(%d),VA(0x%08X),S(%d),Id(%d)",
                node.getCookieDE(),
                (MUINT32)node.getImgBuf()->getVirAddr(),
                node.getImgBuf()->getBufSize(),
                node.getImgBuf()->getIonFd());
        MY_LOGD("Node:F(%s),W(%d),H(%d),Str(%d,%d,%d),Rot(%d)",
                node.getImgBuf()->getImgFormat().string(),
                node.getImgBuf()->getImgWidth(),
                node.getImgBuf()->getImgHeight(),
                GET_IIMGBUF_IMG_W_STRIDE(node.getImgBuf(), 0),
                GET_IIMGBUF_IMG_W_STRIDE(node.getImgBuf(), 1),
                GET_IIMGBUF_IMG_W_STRIDE(node.getImgBuf(), 2),
                node.getRotation());
        #endif
        //
        #if 1
        MY_LOGD("buf(%p),heap(%p),VA(0x%08X/0x%08X/0x%08X),PA(0x%08X/0x%08X/0x%08X),BS(%d=%d+%d+%d),Id(%d),F(0x%08X),S(%dx%d),Str(%d,%d,%d),R(%d),U(%d)", 
                pImgReq->mBuffer,
                pImgReq->mBuffer->getImageBufferHeap(),
                GET_IIMAGEBUFFER_BUF_VA(pImgReq->mBuffer, 0),
                GET_IIMAGEBUFFER_BUF_VA(pImgReq->mBuffer, 1),
                GET_IIMAGEBUFFER_BUF_VA(pImgReq->mBuffer, 2),
                GET_IIMAGEBUFFER_BUF_PA(pImgReq->mBuffer, 0),
                GET_IIMAGEBUFFER_BUF_PA(pImgReq->mBuffer, 1),
                GET_IIMAGEBUFFER_BUF_PA(pImgReq->mBuffer, 2),
                (   GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 0)+
                    GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 1)+
                    GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 2)),
                GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 0),
                GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 1),
                GET_IIMAGEBUFFER_BUF_SIZE(pImgReq->mBuffer, 2),
                pImgReq->mBuffer->getFD(),
                pImgReq->mBuffer->getImgFormat(),
                pImgReq->mBuffer->getImgSize().w,
                pImgReq->mBuffer->getImgSize().h,
                GET_IIMAGEBUFFER_BUF_STRIDE_IN_BYTE(pImgReq->mBuffer, 0),
                GET_IIMAGEBUFFER_BUF_STRIDE_IN_BYTE(pImgReq->mBuffer, 1),
                GET_IIMAGEBUFFER_BUF_STRIDE_IN_BYTE(pImgReq->mBuffer, 2),
                pImgReq->mTransform,
                pImgReq->mUsage);
        #endif
        //
        return MTRUE;
    }
    //
    #if 0
    MY_LOGD("empty data(0x%08X)",data);
    #endif
    return MFALSE;
}
开发者ID:rombaby,项目名称:MT6735_Longcheer,代码行数:101,代码来源:EngBufHandler.cpp


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