MBOOL PipeImp:: onDataCallback(PipeDataInfo const& msg) const { MBOOL ret = MTRUE; // if ( mDataCb ) { mDataCb(mpCbUser, msg); ret = MTRUE; } else { PIPE_WRN("Data Callback is NULL"); ret = MFALSE; } return ret; }
MBOOL PipeImp:: onNotifyCallback(PipeNotifyInfo const& msg) const { MBOOL ret = MTRUE; // if ( mNotifyCb ) { mNotifyCb(mpCbUser, msg); ret = MTRUE; } else { PIPE_WRN("Notify Callback is NULL"); ret = MFALSE; } return ret; }
MBOOL CamIOPipe:: enqueOutBuf(PortID const portID, QBufInfo const& rQBufInfo) { MUINT32 dmaChannel = 0; stISP_BUF_INFO bufInfo; stISP_BUF_INFO exbufInfo; PIPE_DBG(":E:tid(%d) PortID:(type, index, inout)=(%d, %d, %d)", gettid(), portID.type, portID.index, portID.inout); PIPE_DBG("QBufInfo:(user, reserved, num)=(%x, %d, %d)", rQBufInfo.u4User, rQBufInfo.u4Reserved, rQBufInfo.vBufInfo.size()); if (EPortIndex_IMGO == portID.index) { dmaChannel = ISP_DMA_IMGO; } else if (EPortIndex_IMG2O == portID.index) { dmaChannel = ISP_DMA_IMG2O; } //enque buffer bufInfo.memID = rQBufInfo.vBufInfo[0].memID; bufInfo.size = rQBufInfo.vBufInfo[0].u4BufSize; bufInfo.base_vAddr = rQBufInfo.vBufInfo[0].u4BufVA; bufInfo.base_pAddr = rQBufInfo.vBufInfo[0].u4BufPA; bufInfo.bufSecu = rQBufInfo.vBufInfo[0].bufSecu; bufInfo.bufCohe = rQBufInfo.vBufInfo[0].bufCohe; bufInfo.next = (stISP_BUF_INFO*)NULL; // PIPE_DBG("bufInfo,(%d),(0x%08x),(0x%08x),(0x%08x),(%d/%d)", bufInfo.memID, bufInfo.size, bufInfo.base_vAddr, bufInfo.base_pAddr, bufInfo.bufSecu, bufInfo.bufCohe); //buffer wanna exchange. to replace original buffer. if ( 2 <= rQBufInfo.vBufInfo.size() ) { PIPE_WRN("exchange 1st buf. by 2nd buf. and enque it.:size(%d)",rQBufInfo.vBufInfo.size()); exbufInfo.memID = rQBufInfo.vBufInfo[1].memID; exbufInfo.size = rQBufInfo.vBufInfo[1].u4BufSize; exbufInfo.base_vAddr = rQBufInfo.vBufInfo[1].u4BufVA; exbufInfo.base_pAddr = rQBufInfo.vBufInfo[1].u4BufPA; exbufInfo.bufSecu = rQBufInfo.vBufInfo[1].bufSecu; exbufInfo.bufCohe = rQBufInfo.vBufInfo[1].bufCohe; exbufInfo.next = (stISP_BUF_INFO*)NULL; //set for original buffer info. bufInfo.next = (stISP_BUF_INFO*)&exbufInfo; // PIPE_DBG("exbufInfo,(%d),(0x%08x),(0x%08x),(0x%08x),(%d/%d)", exbufInfo.memID, exbufInfo.size, exbufInfo.base_vAddr, exbufInfo.base_pAddr, exbufInfo.bufSecu, exbufInfo.bufCohe); } // if ( 0 != this->m_CamPathPass1.enqueueBuf( dmaChannel, bufInfo ) ) { PIPE_ERR("ERROR:enqueueBuf"); return MFALSE; } PIPE_DBG(":X"); return MTRUE; }