| 6930 | } |
| 6931 | |
| 6932 | XN_C_API XnStatus xnCreateScriptNode(XnContext* pContext, const XnChar* strFormat, XnNodeHandle* phScript) |
| 6933 | { |
| 6934 | XnStatus nRetVal = XN_STATUS_OK; |
| 6935 | |
| 6936 | // for now we only support OpenNI XML format |
| 6937 | if (strcmp(strFormat, XN_SCRIPT_FORMAT_XML) != 0) |
| 6938 | { |
| 6939 | return XN_STATUS_NOT_IMPLEMENTED; |
| 6940 | } |
| 6941 | |
| 6942 | XnNodeInfo* pInfo; |
| 6943 | XnProductionNodeDescription desc; |
| 6944 | GetOpenNIScriptNodeDescription(&desc); |
| 6945 | |
| 6946 | nRetVal = xnNodeInfoAllocate(&desc, NULL, NULL, &pInfo); |
| 6947 | XN_IS_STATUS_OK(nRetVal); |
| 6948 | |
| 6949 | nRetVal = xnCreateProductionTree(pContext, pInfo, phScript); |
| 6950 | XN_IS_STATUS_OK(nRetVal); |
| 6951 | |
| 6952 | return (XN_STATUS_OK); |
| 6953 | } |
| 6954 | |
| 6955 | XN_C_API const XnChar* xnScriptNodeGetSupportedFormat(XnNodeHandle hScript) |
| 6956 | { |
no test coverage detected