本文整理汇总了C++中openni::VideoFrameRef::release方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoFrameRef::release方法的具体用法?C++ VideoFrameRef::release怎么用?C++ VideoFrameRef::release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openni::VideoFrameRef
的用法示例。
在下文中一共展示了VideoFrameRef::release方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toggleStreamState
void toggleStreamState(openni::VideoStream& stream, openni::VideoFrameRef& frame, bool& isOn, openni::SensorType type, const char* name)
{
openni::Status nRetVal = openni::STATUS_OK;
if (!stream.isValid())
{
nRetVal = stream.create(g_device, type);
if (nRetVal != openni::STATUS_OK)
{
displayError("Failed to create %s stream:\n%s", name, openni::OpenNI::getExtendedError());
return;
}
}
if (isOn)
{
stream.stop();
frame.release();
}
else
{
nRetVal = stream.start();
if (nRetVal != openni::STATUS_OK)
{
displayError("Failed to start %s stream:\n%s", name, openni::OpenNI::getExtendedError());
return;
}
}
isOn = !isOn;
}
示例2: setIRVideoMode
void setIRVideoMode(int mode)
{
bool bIsStreamOn = g_bIsIROn;
if (bIsStreamOn)
{
g_bIsIROn = false;
g_irStream.stop();
}
g_irFrame.release();
g_irStream.setVideoMode(g_irSensorInfo->getSupportedVideoModes()[mode]);
if (bIsStreamOn)
{
g_irStream.start();
g_bIsIROn = true;
}
}
示例3: toggleIRState
void toggleIRState(int )
{
if (g_irStream.isValid())
{
if(g_bIsIROn)
{
g_irStream.stop();
g_irFrame.release();
}
else
{
openni::Status nRetVal = g_irStream.start();
if (nRetVal != openni::STATUS_OK)
{
displayError("Failed to start IR stream:\n%s", openni::OpenNI::getExtendedError());
return;
}
}
g_bIsIROn = !g_bIsIROn;
}
}