MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnConfigureRecorderDestination

Function xnConfigureRecorderDestination

Source/OpenNI/XnXmlScriptNode.cpp:325–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325XnStatus xnConfigureRecorderDestination(XnNodeHandle hNode, const TiXmlElement* pOpcode)
326{
327 XnStatus nRetVal = XN_STATUS_OK;
328
329 XnRecordMedium medium = XN_RECORD_MEDIUM_FILE; // default
330
331 if (pOpcode->Attribute("medium") != NULL)
332 {
333 const XnChar* strMedium;
334 nRetVal = xnXmlReadStringAttribute(pOpcode, "medium", &strMedium);
335 XN_IS_STATUS_OK(nRetVal);
336
337 if (strcmp(strMedium, "File") == 0)
338 {
339 medium = XN_RECORD_MEDIUM_FILE;
340 }
341 else
342 {
343 XN_LOG_ERROR_RETURN(XN_STATUS_CORRUPT_FILE, XN_MASK_OPEN_NI, "Unknown recording medium: '%s'", strMedium);
344 }
345 }
346
347 const XnChar* strName;
348 nRetVal = xnXmlReadStringAttribute(pOpcode, "name", &strName);
349 XN_IS_STATUS_OK(nRetVal);
350
351 nRetVal = xnSetRecorderDestination(hNode, medium, strName);
352 XN_IS_STATUS_OK(nRetVal);
353
354 return (XN_STATUS_OK);
355}
356
357XnStatus xnConfigureAddNodeToRecording(XnNodeHandle hNode, const TiXmlElement* pOpcode)
358{

Callers 1

xnConfigureSetOpcodeFunction · 0.85

Calls 3

xnXmlReadStringAttributeFunction · 0.85
xnSetRecorderDestinationFunction · 0.85
AttributeMethod · 0.80

Tested by

no test coverage detected