| 237 | } |
| 238 | |
| 239 | XnStatus RecorderNode::OnNodeGeneralPropChanged(const XnChar* strNodeName, const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer) |
| 240 | { |
| 241 | m_nConfigurationID++; |
| 242 | |
| 243 | RecordedNodeInfo* pRecordedNodeInfo = NULL; |
| 244 | XnUInt64 nUndoRecordPos = 0; |
| 245 | XnStatus nRetVal = UpdateNodePropInfo(strNodeName, strPropName, pRecordedNodeInfo, nUndoRecordPos); |
| 246 | XN_IS_STATUS_OK(nRetVal); |
| 247 | GeneralPropRecord record(m_pRecordBuffer, RECORD_MAX_SIZE, FALSE); |
| 248 | record.SetNodeID(pRecordedNodeInfo->nNodeID); |
| 249 | record.SetPropName(strPropName); |
| 250 | record.SetPropData(pBuffer); |
| 251 | record.SetPropDataSize(nBufferSize); |
| 252 | record.SetUndoRecordPos(nUndoRecordPos); |
| 253 | nRetVal = record.Encode(); |
| 254 | if (nRetVal != XN_STATUS_OK) |
| 255 | { |
| 256 | xnLogWarning(XN_MASK_OPEN_NI, "Failed to encode General Property record: %s", xnGetStatusString(nRetVal)); |
| 257 | XN_ASSERT(FALSE); |
| 258 | return nRetVal; |
| 259 | } |
| 260 | |
| 261 | nRetVal = WriteRecordToStream(strNodeName, record); |
| 262 | if (nRetVal != XN_STATUS_OK) |
| 263 | { |
| 264 | xnLogWarning(XN_MASK_OPEN_NI, "Failed to write General Property to file: %s", xnGetStatusString(nRetVal)); |
| 265 | XN_ASSERT(FALSE); |
| 266 | return nRetVal; |
| 267 | } |
| 268 | return XN_STATUS_OK; |
| 269 | } |
| 270 | |
| 271 | XnStatus RecorderNode::OnNodeStateReady(const XnChar* strNodeName) |
| 272 | { |
no test coverage detected