本文整理汇总了C++中sp::enqueProcessor方法的典型用法代码示例。如果您正苦于以下问题:C++ sp::enqueProcessor方法的具体用法?C++ sp::enqueProcessor怎么用?C++ sp::enqueProcessor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sp
的用法示例。
在下文中一共展示了sp::enqueProcessor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PREVIEWFEATUREBuffer
bool
PREFEATUREABSE::
createWorkingBuffers(sp<IImgBufQueue>const & rpBufQueue)
{
bool ret = true;
//
//String8 const format = mpParamsMgr->getPreviewFormat();
String8 const format = String8(MtkCameraParameters::PIXEL_FORMAT_YUV420SP);
//
MY_LOGD("[PreviewFeature buffer] w: %d, h: %d, format: %s", bufWidth, bufHeight, format.string());
//
bufCnt = 2;
for (int i = 0; i < bufCnt; i++)
{
sp<PREVIEWFEATUREBuffer> one = new PREVIEWFEATUREBuffer(bufWidth, bufHeight,
FmtUtils::queryBitsPerPixel(format.string()),
FmtUtils::queryImgBufferSize(format.string(), bufWidth, bufHeight),
format,"PREVIEWFEATUREBuffer");
ret = rpBufQueue->enqueProcessor(
ImgBufQueNode(one, ImgBufQueNode::eSTATUS_TODO)
);
if ( ! ret )
{
MY_LOGW("enqueProcessor() fails");
}
}
return ret;
}
示例2: _l
bool
RecordClient::
prepareAllTodoBuffers(sp<IImgBufQueue>const& rpBufQueue, sp<RecBufManager>const& rpBufMgr)
{
bool ret = false, findEmpty = false;
uint32_t i, enqCount = 0, fillCount = 0, cbCount = 0;
sp<ICameraImgBuf> pCameraImgBuf = NULL;
//
Mutex::Autolock _l(mModuleMtx);
//
for(i = 0; i < mvRecBufInfo.size(); i++)
{
if(mvRecBufInfo[i].Sta == REC_BUF_STA_EMPTY)
{
pCameraImgBuf = rpBufMgr->getBuf(i);
MY_LOGD("EQ:idx(%d),VA(0x%08X)",i,(uint32_t)(pCameraImgBuf->getVirAddr()));
findEmpty = true;
mvRecBufInfo.editItemAt(i).Sta = REC_BUF_STA_ENQUE;
ret = rpBufQueue->enqueProcessor(
ImgBufQueNode(pCameraImgBuf, ImgBufQueNode::eSTATUS_TODO));
//
if(!ret)
{
MY_LOGW("enqueProcessor() fails");
goto lbExit;
}
}
else
if(mvRecBufInfo[i].Sta == REC_BUF_STA_ENQUE)
{
enqCount++;
}
else
if(mvRecBufInfo[i].Sta == REC_BUF_STA_FILL)
{
fillCount++;
}
else
if(mvRecBufInfo[i].Sta == REC_BUF_STA_CB)
{
cbCount++;
}
}
//
if(!findEmpty)
{
MY_LOGW("No EMPTY buf:Enq(%d),Fill(%d),CB(%d)",
enqCount,
fillCount,
cbCount);
}
//
ret = true;
lbExit:
//MY_LOGD_IF(ENABLE_LOG_PER_FRAME, "- ret(%d)", ret);
return ret;
}
示例3: FDBuffer
bool
FDClient::
createWorkingBuffers(sp<IImgBufQueue>const &rpBufQueue)
{
bool ret = true;
//
// [Seed FD buffer]
// use AP setting: format/width/height
//
int bufWidth = 0, bufHeight = 0;
mpParamsMgr->getPreviewSize(&bufWidth, &bufHeight);
// String8 const format = mpParamsMgr->getPreviewFormat();
String8 const format = String8(MtkCameraParameters::PIXEL_FORMAT_YUV420P);
// if rot equals to 90 or 270, width and height should be switched.
uint32_t rot = 0;
if (bufWidth < bufHeight)
{
rot = 90;
int tmp = bufWidth;
bufWidth = bufHeight;
bufHeight = tmp;
}
//
MY_LOGD("[seed FD buffer] w: %d, h: %d, format: %s, rot: %d", bufWidth, bufHeight, format.string(), rot);
//
for (int i = 0; i < FDClient::mBufCnt; i++)
{
sp<FDBuffer> one = new FDBuffer(bufWidth, bufHeight,
Format::queryImageBitsPerPixel(Format::queryImageFormat(format.string())),
FmtUtils::queryImgBufferSize(format.string(), bufWidth, bufHeight),
format, "FDBuffer");
ret = rpBufQueue->enqueProcessor(
ImgBufQueNode(one, ImgBufQueNode::eSTATUS_TODO)
);
if ( ! ret )
{
MY_LOGW("enqueProcessor() fails");
}
}
return ret;
}
示例4: ImgBufQueNode
bool
PREFEATUREABSE::
handleReturnBuffers(sp<IImgBufQueue>const& rpBufQueue, ImgBufQueNode const &rQueNode)
{
bool ret = true;
ret = rpBufQueue->enqueProcessor(
ImgBufQueNode(rQueNode.getImgBuf(), ImgBufQueNode::eSTATUS_TODO));
if ( ! ret )
{
MY_LOGE("enqueProcessor() fails");
ret = false;
}
return ret;
}