本文整理汇总了C++中sp::getBufHndlPtr方法的典型用法代码示例。如果您正苦于以下问题:C++ sp::getBufHndlPtr方法的具体用法?C++ sp::getBufHndlPtr怎么用?C++ sp::getBufHndlPtr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sp
的用法示例。
在下文中一共展示了sp::getBufHndlPtr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: profile
void
DisplayClient::
enquePrvOps(sp<StreamImgBuf>const& rpImgBuf)
{
mProfile_enquePrvOps.pulse();
if ( mProfile_enquePrvOps.getDuration() >= ::s2ns(2) ) {
mProfile_enquePrvOps.updateFps();
mProfile_enquePrvOps.showFps();
mProfile_enquePrvOps.reset();
}
//
status_t err = 0;
//
CamProfile profile(__FUNCTION__, "DisplayClient");
profile.print_overtime(
((1<=miLogLevel) ? 0 : 1000),
"+ locked buffer count(%d), rpImgBuf(%p,%p), Timestamp(%lld)",
mStreamBufList.size(), rpImgBuf.get(), rpImgBuf->getVirAddr(), rpImgBuf->getTimestamp()
);
//
// [1] unlock buffer before sending to display
GraphicBufferMapper::get().unlock(rpImgBuf->getBufHndl());
profile.print_overtime(1, "GraphicBufferMapper::unlock");
//
// [2] Dump image if wanted.
dumpImgBuf_If(rpImgBuf);
//
// [3] set timestamp.
err = mpStreamOps->set_timestamp(mpStreamOps, rpImgBuf->getTimestamp());
profile.print_overtime(2, "mpStreamOps->set_timestamp, Timestamp(%lld)", rpImgBuf->getTimestamp());
if ( err )
{
MY_LOGE(
"mpStreamOps->set_timestamp failed: status[%s(%d)], rpImgBuf(%p), Timestamp(%lld)",
::strerror(-err), -err, rpImgBuf.get(), rpImgBuf->getTimestamp()
);
}
//
// [4] set gralloc buffer type & dirty
#if ('1'==MTKCAM_HAVE_GRALLOC_EXTRA)
::gralloc_extra_setBufParameter(
rpImgBuf->getBufHndl(),
GRALLOC_EXTRA_MASK_TYPE | GRALLOC_EXTRA_MASK_DIRTY,
GRALLOC_EXTRA_BIT_TYPE_CAMERA | GRALLOC_EXTRA_BIT_DIRTY
);
#endif
//
// [5] unlocks and post the buffer to display.
err = mpStreamOps->enqueue_buffer(mpStreamOps, rpImgBuf->getBufHndlPtr());
profile.print_overtime(10, "mpStreamOps->enqueue_buffer, Timestamp(%lld)", rpImgBuf->getTimestamp());
if ( err )
{
MY_LOGE(
"mpStreamOps->enqueue_buffer failed: status[%s(%d)], rpImgBuf(%p,%p)",
::strerror(-err), -err, rpImgBuf.get(), rpImgBuf->getVirAddr()
);
}
}