本文整理汇总了C++中android::sp::setStreamInfoSet方法的典型用法代码示例。如果您正苦于以下问题:C++ sp::setStreamInfoSet方法的具体用法?C++ sp::setStreamInfoSet怎么用?C++ sp::setStreamInfoSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android::sp
的用法示例。
在下文中一共展示了sp::setStreamInfoSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printf
void
prepareRequest(android::sp<IPipelineFrameControl> &pFrame)
{
printf("prepare request\n");
pFrame = IPipelineFrameControl::create(0);
pFrame->setPipelineNodeMap(getPipelineNodeMapControl());
pFrame->setPipelineDAG(getPipelineDAG());
pFrame->setStreamInfoSet(getStreamInfoSet());
//P2 Node
{
IPipelineNode::NodeId_T const nodeId = NODE_ID_NODE1;
//
IPipelineFrame::InfoIOMapSet aInfoIOMapSet;
IPipelineFrame::ImageInfoIOMapSet& rImageInfoIOMapSet = aInfoIOMapSet.mImageInfoIOMapSet;
IPipelineFrame::MetaInfoIOMapSet& rMetaInfoIOMapSet = aInfoIOMapSet.mMetaInfoIOMapSet;
//
//
sp<IPipelineNodeMapControl::INode> pNodeExt = getPipelineNodeMapControl()->getNodeFor(nodeId);
sp<IStreamInfoSet const> pInStream = pNodeExt->getInStreams();
sp<IStreamInfoSet const> pOutStream= pNodeExt->getOutStreams();
//
// Image
{
IPipelineFrame::ImageInfoIOMap& rMap =
rImageInfoIOMapSet.editItemAt(rImageInfoIOMapSet.add());
//
//Input
for (size_t i = 0; i < pInStream->getImageInfoNum(); i++)
{
sp<IImageStreamInfo> p = pInStream->getImageInfoAt(i);
rMap.vIn.add(p->getStreamId(), p);
}
//
//Output
for (size_t i = 0; i < pOutStream->getImageInfoNum(); i++)
{
sp<IImageStreamInfo> p = pOutStream->getImageInfoAt(i);
rMap.vOut.add(p->getStreamId(), p);
}
}
//
// Meta
{
IPipelineFrame::MetaInfoIOMap& rMap =
rMetaInfoIOMapSet.editItemAt(rMetaInfoIOMapSet.add());
//
//Input
for (size_t i = 0; i < pInStream->getMetaInfoNum(); i++)
{
sp<IMetaStreamInfo> p = pInStream->getMetaInfoAt(i);
rMap.vIn.add(p->getStreamId(), p);
}
//
//Output
for (size_t i = 0; i < pOutStream->getMetaInfoNum(); i++)
{
sp<IMetaStreamInfo> p = pOutStream->getMetaInfoAt(i);
rMap.vOut.add(p->getStreamId(), p);
}
}
//
//
pFrame->addInfoIOMapSet(nodeId, aInfoIOMapSet);
}
////////////////////////////////////////////////////////////////////////////
//
// pFrame->setStreamBufferSet(...);
//
////////////////////////////////////////////////////////////////////////////
//IAppPipeline::AppCallbackParams aAppCallbackParams;
//aAppCallbackParams.mpBuffersCallback = pAppSimulator;
sp<IStreamBufferSetControl> pBufferSetControl = IStreamBufferSetControl::create(
0, NULL
);
//
//
{
//
StreamId_T const streamId = STREAM_ID_IN_BAYER;
//
sp<IImageStreamInfo> pStreamInfo = getStreamInfoSet()->getImageInfoFor(streamId);
sp<HalImageStreamBuffer> pStreamBuffer;
//
//acquireFromPool
MY_LOGD("[acquireFromPool] + %s ", pStreamInfo->getStreamName());
MERROR err = mpPool_HalImageRaw->acquireFromPool(
"Tester", pStreamBuffer, ::s2ns(30)
);
MY_LOGD("[acquireFromPool] - %s %p err:%d", pStreamInfo->getStreamName(), pStreamBuffer.get(), err);
MY_LOGE_IF(OK!=err || pStreamBuffer==0, "pStreamBuffer==0");
//
ssize_t userGroupIndex = 0;
//User Group1
{
sp<IUsersManager::IUserGraph> pUserGraph = pStreamBuffer->createGraph();
IUsersManager::User user;
//.........这里部分代码省略.........