void XnDepthProcessor::OnStartOfFrame(const XnSensorProtocolResponseHeader* pHeader) { // call base XnFrameStreamProcessor::OnStartOfFrame(pHeader); m_nExpectedFrameSize = CalculateExpectedSize(); if (m_pDevicePrivateData->FWInfo.nFWVer >= XN_SENSOR_FW_VER_5_1 && pHeader->nTimeStamp != 0) { // PATCH: starting with v5.1, the timestamp field of the SOF packet, is the number of pixels // that should be prepended to the frame. XnUInt32 nPaddingPixelsOnStart = pHeader->nTimeStamp >> 16; m_nPaddingPixelsOnEnd = pHeader->nTimeStamp & 0x0000FFFF; PadPixels(nPaddingPixelsOnStart); }
void XnDepthProcessor::OnStartOfFrame(const XnSensorProtocolResponseHeader* pHeader) { // call base XnFrameStreamProcessor::OnStartOfFrame(pHeader); m_nExpectedFrameSize = CalculateExpectedSize(); m_applyRegistrationOnEnd = ( (GetStream()->GetOutputFormat() == ONI_PIXEL_FORMAT_DEPTH_1_MM || GetStream()->GetOutputFormat() == ONI_PIXEL_FORMAT_DEPTH_100_UM) && GetStream()->m_DepthRegistration.GetValue() == TRUE && GetStream()->m_FirmwareRegistration.GetValue() == FALSE); if (m_pDevicePrivateData->FWInfo.nFWVer >= XN_SENSOR_FW_VER_5_1 && pHeader->nTimeStamp != 0) { // PATCH: starting with v5.1, the timestamp field of the SOF packet, is the number of pixels // that should be prepended to the frame. XnUInt32 nPaddingPixelsOnStart = pHeader->nTimeStamp >> 16; m_nPaddingPixelsOnEnd = pHeader->nTimeStamp & 0x0000FFFF; PadPixels(nPaddingPixelsOnStart); }