| 494 | } |
| 495 | |
| 496 | XnStatus MapWatcher::NotifySupportedOutputModes() |
| 497 | { |
| 498 | XnUInt32 nOutputModes = m_mapGenerator.GetSupportedMapOutputModesCount(); |
| 499 | if (nOutputModes == 0) |
| 500 | { |
| 501 | return XN_STATUS_ERROR; |
| 502 | } |
| 503 | |
| 504 | XnStatus nRetVal = NotifyIntPropChanged(XN_PROP_SUPPORTED_MAP_OUTPUT_MODES_COUNT, nOutputModes); |
| 505 | XN_IS_STATUS_OK(nRetVal); |
| 506 | XnMapOutputMode *pOutputModes = XN_NEW_ARR(XnMapOutputMode, nOutputModes); |
| 507 | XN_VALIDATE_ALLOC_PTR(pOutputModes); |
| 508 | nRetVal = m_mapGenerator.GetSupportedMapOutputModes(pOutputModes, nOutputModes); |
| 509 | if (nRetVal != XN_STATUS_OK) |
| 510 | { |
| 511 | XN_DELETE_ARR(pOutputModes); |
| 512 | return nRetVal; |
| 513 | } |
| 514 | nRetVal = NotifyGeneralPropChanged(XN_PROP_SUPPORTED_MAP_OUTPUT_MODES, sizeof(pOutputModes[0]) * nOutputModes, pOutputModes); |
| 515 | if (nRetVal != XN_STATUS_OK) |
| 516 | { |
| 517 | XN_DELETE_ARR(pOutputModes); |
| 518 | return nRetVal; |
| 519 | } |
| 520 | |
| 521 | XN_DELETE_ARR(pOutputModes); |
| 522 | return XN_STATUS_OK; |
| 523 | } |
| 524 | |
| 525 | XnStatus MapWatcher::NotifyOutputMode() |
| 526 | { |
nothing calls this directly
no test coverage detected