Close Stream and Exit
About 97 wordsLess than 1 minute
2024-11-08
Caution
- The variables such as pDeviceInfo mentioned in this article are defined as global variables. For details, refer to: Initialization to Stream Opening
Stop the Stream
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);
}
}
Release Resources and Exit
errorCode = Synexens::UnInitSDK();
if (errorCode != Synexens::SYERRORCODE_SUCCESS)
{
PrintCodeInfo("UnInitSDK", errorCode);
return 0;
}