本文整理汇总了C++中XnDeviceStream::Close方法的典型用法代码示例。如果您正苦于以下问题:C++ XnDeviceStream::Close方法的具体用法?C++ XnDeviceStream::Close怎么用?C++ XnDeviceStream::Close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XnDeviceStream
的用法示例。
在下文中一共展示了XnDeviceStream::Close方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CloseAllStreams
XnStatus XnDeviceBase::CloseAllStreams()
{
XnStatus nRetVal = XN_STATUS_OK;
xnLogVerbose(XN_MASK_DDK, "Closing all streams...");
// go over modules list, and look for closed streams
for (XnStringsHash::Iterator it = m_Modules.begin(); it != m_Modules.end(); ++it)
{
XnDeviceModuleHolder* pModuleHolder = (XnDeviceModuleHolder*)it.Value();
if (IsStream(pModuleHolder->GetModule()))
{
XnDeviceStream* pStream = (XnDeviceStream*)pModuleHolder->GetModule();
if (pStream->IsOpen())
{
nRetVal = pStream->Close();
XN_IS_STATUS_OK(nRetVal);
}
}
}
xnLogInfo(XN_MASK_DDK, "All streams are closed.");
return XN_STATUS_OK;
}
示例2: SetIsOpenCallback
XnStatus XN_CALLBACK_TYPE XnDeviceStream::SetIsOpenCallback(XnActualIntProperty* /*pSender*/, XnUInt64 nValue, void* pCookie)
{
XnDeviceStream* pStream = (XnDeviceStream*)pCookie;
if (nValue == TRUE)
{
return pStream->Open();
}
else
{
return pStream->Close();
}
}
示例3: CloseStream
XnStatus XnDeviceBase::CloseStream(const XnChar* StreamName)
{
XnStatus nRetVal = XN_STATUS_OK;
XN_VALIDATE_INPUT_PTR(StreamName);
xnLogVerbose(XN_MASK_DDK, "Closing stream %s...", StreamName);
// find this stream
XnDeviceStream* pStream;
nRetVal = FindStream(StreamName, &pStream);
XN_IS_STATUS_OK(nRetVal);
// close it
nRetVal = pStream->Close();
XN_IS_STATUS_OK(nRetVal);
xnLogInfo(XN_MASK_DDK, "Stream %s is closed.", StreamName);
return (XN_STATUS_OK);
}