| 194 | } |
| 195 | |
| 196 | static XnBool xnIsMapOutputModeSupported(XnNodeHandle hNode, const XnMapOutputMode* pQuery) |
| 197 | { |
| 198 | XnUInt32 nModes = xnGetSupportedMapOutputModesCount(hNode); |
| 199 | if (nModes == 0) |
| 200 | { |
| 201 | return (FALSE); |
| 202 | } |
| 203 | |
| 204 | XnMapOutputMode* aModes = (XnMapOutputMode*)xnOSCalloc(nModes, sizeof(XnMapOutputMode)); |
| 205 | if (aModes == NULL) |
| 206 | { |
| 207 | return (FALSE); |
| 208 | } |
| 209 | |
| 210 | if (XN_STATUS_OK != xnGetSupportedMapOutputModes(hNode, aModes, &nModes)) |
| 211 | { |
| 212 | xnOSFree(aModes); |
| 213 | return (FALSE); |
| 214 | } |
| 215 | |
| 216 | for (XnUInt i = 0; i < nModes; ++i) |
| 217 | { |
| 218 | if (pQuery->nXRes != (XnUInt32)(-1) && pQuery->nXRes == aModes[i].nXRes && |
| 219 | pQuery->nYRes != (XnUInt32)(-1) && pQuery->nYRes == aModes[i].nYRes && |
| 220 | pQuery->nFPS != (XnUInt32)(-1) && pQuery->nFPS == aModes[i].nFPS) |
| 221 | { |
| 222 | xnOSFree(aModes); |
| 223 | return (TRUE); |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | xnOSFree(aModes); |
| 228 | return (FALSE); |
| 229 | } |
| 230 | |
| 231 | static XnBool xnIsInfoQueryMatch(const XnNodeQuery* pQuery, XnNodeInfo* pNodeInfo) |
| 232 | { |
no test coverage detected