| 834 | } |
| 835 | |
| 836 | XnStatus PlayerNode::HandleNodeAddedImpl(XnUInt32 nNodeID, XnProductionNodeType type, const XnChar* strName, XnCodecID compression, XnUInt32 nNumberOfFrames, XnUInt64 /*nMinTimestamp*/, XnUInt64 nMaxTimestamp) |
| 837 | { |
| 838 | XN_VALIDATE_INPUT_PTR(m_pNodeNotifications); |
| 839 | |
| 840 | XnStatus nRetVal = XN_STATUS_OK; |
| 841 | |
| 842 | PlayerNodeInfo* pPlayerNodeInfo = GetPlayerNodeInfo(nNodeID); |
| 843 | XN_VALIDATE_PTR(pPlayerNodeInfo, XN_STATUS_CORRUPT_FILE); |
| 844 | |
| 845 | //Notify node was added |
| 846 | nRetVal = m_pNodeNotifications->OnNodeAdded(m_pNotificationsCookie, strName, type, compression); |
| 847 | XN_IS_STATUS_OK(nRetVal); |
| 848 | |
| 849 | pPlayerNodeInfo->compression = compression; |
| 850 | nRetVal = xnOSStrCopy(pPlayerNodeInfo->strName, strName, sizeof(pPlayerNodeInfo->strName)); |
| 851 | XN_IS_STATUS_OK(nRetVal); |
| 852 | |
| 853 | if (xnIsTypeGenerator(type)) |
| 854 | { |
| 855 | pPlayerNodeInfo->bIsGenerator = TRUE; |
| 856 | pPlayerNodeInfo->nFrames = nNumberOfFrames; |
| 857 | pPlayerNodeInfo->nMaxTimeStamp = nMaxTimestamp; |
| 858 | } |
| 859 | |
| 860 | //Mark this player node as valid |
| 861 | pPlayerNodeInfo->bValid = TRUE; |
| 862 | |
| 863 | //Loop until this node's state is ready. |
| 864 | //TODO: Check for eof |
| 865 | while (!pPlayerNodeInfo->bStateReady) |
| 866 | { |
| 867 | nRetVal = ProcessRecord(TRUE); |
| 868 | if (nRetVal != XN_STATUS_OK) |
| 869 | { |
| 870 | pPlayerNodeInfo->bValid = FALSE; |
| 871 | return nRetVal; |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | return (XN_STATUS_OK); |
| 876 | } |
| 877 | |
| 878 | XnStatus PlayerNode::HandleNodeAdded_1_0_0_4_Record(NodeAdded_1_0_0_4_Record record) |
| 879 | { |
nothing calls this directly
no test coverage detected