本文整理汇总了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;
}