| 1396 | } |
| 1397 | |
| 1398 | XnStatus xnCreateMetaData(XnInternalNodeData* pNodeData) |
| 1399 | { |
| 1400 | if (pNodeData->pTypeHierarchy->IsSet(XN_NODE_TYPE_DEPTH)) |
| 1401 | { |
| 1402 | pNodeData->pMetaData.Depth = xnAllocateDepthMetaData(); |
| 1403 | XN_VALIDATE_ALLOC_PTR(pNodeData->pMetaData.Depth); |
| 1404 | pNodeData->pbMetaDataIsNewFlag = &pNodeData->pMetaData.Depth->pMap->pOutput->bIsNew; |
| 1405 | } |
| 1406 | else if (pNodeData->pTypeHierarchy->IsSet(XN_NODE_TYPE_IMAGE)) |
| 1407 | { |
| 1408 | pNodeData->pMetaData.Image = xnAllocateImageMetaData(); |
| 1409 | XN_VALIDATE_ALLOC_PTR(pNodeData->pMetaData.Image); |
| 1410 | pNodeData->pbMetaDataIsNewFlag = &pNodeData->pMetaData.Image->pMap->pOutput->bIsNew; |
| 1411 | } |
| 1412 | else if (pNodeData->pTypeHierarchy->IsSet(XN_NODE_TYPE_IR)) |
| 1413 | { |
| 1414 | pNodeData->pMetaData.IR = xnAllocateIRMetaData(); |
| 1415 | XN_VALIDATE_ALLOC_PTR(pNodeData->pMetaData.IR); |
| 1416 | pNodeData->pbMetaDataIsNewFlag = &pNodeData->pMetaData.IR->pMap->pOutput->bIsNew; |
| 1417 | } |
| 1418 | else if (pNodeData->pTypeHierarchy->IsSet(XN_NODE_TYPE_AUDIO)) |
| 1419 | { |
| 1420 | pNodeData->pMetaData.Audio = xnAllocateAudioMetaData(); |
| 1421 | XN_VALIDATE_ALLOC_PTR(pNodeData->pMetaData.Audio); |
| 1422 | pNodeData->pbMetaDataIsNewFlag = &pNodeData->pMetaData.Audio->pOutput->bIsNew; |
| 1423 | } |
| 1424 | else if (pNodeData->pTypeHierarchy->IsSet(XN_NODE_TYPE_SCENE)) |
| 1425 | { |
| 1426 | pNodeData->pMetaData.Scene = xnAllocateSceneMetaData(); |
| 1427 | XN_VALIDATE_ALLOC_PTR(pNodeData->pMetaData.Scene); |
| 1428 | pNodeData->pbMetaDataIsNewFlag = &pNodeData->pMetaData.Scene->pMap->pOutput->bIsNew; |
| 1429 | } |
| 1430 | |
| 1431 | xnUpdateMetaData(pNodeData); |
| 1432 | |
| 1433 | return (XN_STATUS_OK); |
| 1434 | } |
| 1435 | |
| 1436 | XnStatus xnCreatePrivateData(XnInternalNodeData* pNodeData) |
| 1437 | { |
no test coverage detected