예제 #1
0
MBOOL
StereoNodeImpl::
setupPort(MBOOL& cfgImgo, MBOOL& cfgFeo, MBOOL& cfgRgb)
{
    MBOOL dst   = isDataConnected(STEREO_DST);
    cfgImgo     = isDataConnected(STEREO_IMG);
    cfgFeo      = isDataConnected(STEREO_FEO);
    cfgRgb      = isDataConnected(STEREO_RGB);

    MY_LOGD("imgo %d, feo %d, rgb %d, dst %d", cfgImgo, cfgFeo, cfgRgb, dst);
    return MTRUE;
}
예제 #2
0
//-----------------------------------------------------------------------------
MBOOL 
CapBufNodeImp::
threadLoopUpdate()
{
    FUNC_START;
    handleNotify( PASS1_SOF, 0, 0 );
    //
    MUINT32 imgoAddr = 0;
    //
    if(isDataConnected(PASS1_FULLRAW))
    {
        if(mpCapBufMgr != NULL)
        {
            IImageBuffer* pImageBuffer = NULL;
            if(mpCapBufMgr->dequeBuf(pImageBuffer))
            {
                if(pImageBuffer != NULL)
                {
                    imgoAddr = (MUINT32)pImageBuffer;
                    //
                    {
                        Mutex::Autolock _l(mLock);
                        mlpDequeFullBuf.push_back(pImageBuffer);
                    }
                }
                else
                {
                    MY_LOGE("Deque NULL buffer");
                }
            }
            else
            {
                MY_LOGE("Deque fail");
            }
        }
        else
        if(mpImageBuffer != NULL)
        {
            imgoAddr = (MUINT32)mpImageBuffer;
            //
            {
                Mutex::Autolock _l(mLock);
                mlpDequeFullBuf.push_back(mpImageBuffer);
            }
        }
        else
        {
            MY_LOGE("mpCapBufMgr is NULL");
        }
    }
    else
    {
        MY_LOGE("Please connect PASS1_FULLRAW");
        usleep(10*1000);
    }
    //
    if(imgoAddr)
    {
        MUINT32 magicNum;
        MBOOL isRrzo;
        MVOID* pPrivateData;
        MUINT32 privateDataSize;
        //
        mpIspSyncCtrl->queryImgBufInfo(
                            (IImageBuffer*)imgoAddr,
                            magicNum,
                            isRrzo,
                            pPrivateData,
                            privateDataSize);
        //
        MY_LOGD("imgoAddr(0x%08X),MN(0x%08X)",
                imgoAddr,
                magicNum);
        //
        handleNotify(PASS1_EOF, -1, magicNum);
        handlePostBuffer(PASS1_FULLRAW, imgoAddr, 0);
    }
    else
    {
        MY_LOGE("imgoAddr is 0");
    }
    FUNC_END;
    return MTRUE;
}