From: Jochen Sprickerhof <jochen@sprickerhof.de>
Date: Tue, 6 Nov 2012 20:42:17 +0100
Subject: Add support for different frame rates and high resolution

taken from https://github.com/avin2/SensorKinect
---
 Source/XnDeviceSensorV2/XnFirmwareStreams.cpp      |   12 ------------
 Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp |    4 ----
 Source/XnDeviceSensorV2/XnSensorIRStream.cpp       |    2 ++
 3 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/Source/XnDeviceSensorV2/XnFirmwareStreams.cpp b/Source/XnDeviceSensorV2/XnFirmwareStreams.cpp
index eb2e45d..5d1f30b 100644
--- a/Source/XnDeviceSensorV2/XnFirmwareStreams.cpp
+++ b/Source/XnDeviceSensorV2/XnFirmwareStreams.cpp
@@ -110,12 +110,6 @@ XnStatus XnFirmwareStreams::CheckClaimStream(const XnChar* strType, XnResolution
 			{
 				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Cannot set depth stream to resolution %d when IR is set to resolution %d!", nRes, pIRStreamData->nRes);
 			}
-
-			// check FPS
-			if (pIRStreamData->nFPS != nFPS)
-			{
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
-			}
 		}
 	}
 	else if (strcmp(strType, XN_STREAM_TYPE_IR) == 0)
@@ -142,12 +136,6 @@ XnStatus XnFirmwareStreams::CheckClaimStream(const XnChar* strType, XnResolution
 			{
 				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Cannot set IR stream to resolution %d when Depth is set to resolution %d!", nRes, pDepthStreamData->nRes);
 			}
-
-			// check FPS
-			if (pDepthStreamData->nFPS != nFPS)
-			{
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
-			}
 		}
 	}
 	else if (strcmp(strType, XN_STREAM_TYPE_IMAGE) == 0)
diff --git a/Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp b/Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp
index 913fb6a..235da3b 100644
--- a/Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp
+++ b/Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp
@@ -510,10 +510,6 @@ XnStatus XnSensorFirmwareParams::SetImageResolution(XnUInt64 nValue)
 		case XN_RESOLUTION_VGA:
 			break;
 		case XN_RESOLUTION_SXGA:
-			if (m_pInfo->nFWVer < XN_SENSOR_FW_VER_5_3)
-			{
-				XN_LOG_WARNING_RETURN(XN_STATUS_IO_INVALID_STREAM_IMAGE_RESOLUTION, XN_MASK_DEVICE_SENSOR, "Image resolution is not supported by this firmware!");
-			}
 			break;
 		case XN_RESOLUTION_UXGA:
 			if (m_pInfo->nFWVer < XN_SENSOR_FW_VER_5_1)
diff --git a/Source/XnDeviceSensorV2/XnSensorIRStream.cpp b/Source/XnDeviceSensorV2/XnSensorIRStream.cpp
index ebf162a..73c50a1 100644
--- a/Source/XnDeviceSensorV2/XnSensorIRStream.cpp
+++ b/Source/XnDeviceSensorV2/XnSensorIRStream.cpp
@@ -87,6 +87,7 @@ XnStatus XnSensorIRStream::Init()
 		{ 0, XN_RESOLUTION_QVGA, 60 },
 		{ 0, XN_RESOLUTION_VGA, 30 },
 		{ 0, XN_RESOLUTION_SXGA, 30 },
+		{ 0, XN_RESOLUTION_SXGA, 15 },
 	};
 	nRetVal = AddSupportedModes(aSupportedModes, sizeof(aSupportedModes)/sizeof(aSupportedModes[0]));
 	XN_IS_STATUS_OK(nRetVal);
@@ -96,6 +97,7 @@ XnStatus XnSensorIRStream::Init()
 		XnCmosPreset aSupportedModesSXGA[] = 
 		{
 			{ 0, XN_RESOLUTION_SXGA, 30 },
+			{ 0, XN_RESOLUTION_SXGA, 15 },
 		};
 		nRetVal = AddSupportedModes(aSupportedModesSXGA, sizeof(aSupportedModesSXGA)/sizeof(aSupportedModesSXGA[0]));
 		XN_IS_STATUS_OK(nRetVal);
