关流退出
约 106 字小于 1 分钟
2024-11-08
警告
- 本文用到的pDeviceInfo等变量为定义全局变量,详情参考:初始化到开流
停流
for (int nDeviceIndex = 0; nDeviceIndex < nDeviceCount; nDeviceIndex++)
{
auto itStreamOpen = g_mapDeviceOpen.find(pDeviceInfo[nDeviceIndex].m_nDeviceID);
if (itStreamOpen->second)
errorCode = Synexens::StopStreaming(pDeviceInfo[nDeviceIndex].m_nDeviceID);
if (errorCode == Synexens::SYERRORCODE_SUCCESS)
{
printf("StopStreaming Success\n");
}
else
{
PrintCodeInfo("StopStreaming", errorCode);
}
}
释放资源退出
errorCode = Synexens::UnInitSDK();
if (errorCode != Synexens::SYERRORCODE_SUCCESS)
{
PrintCodeInfo("UnInitSDK", errorCode);
return 0;
}