1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
|
diff -urN openni2-2.2.0.33+dfsg.old/Include/Linux-generic/OniPlatformLinux-generic.h openni2-2.2.0.33+dfsg/Include/Linux-generic/OniPlatformLinux-generic.h
--- openni2-2.2.0.33+dfsg.old/Include/Linux-generic/OniPlatformLinux-generic.h 1970-01-01 02:00:00.000000000 +0200
+++ openni2-2.2.0.33+dfsg/Include/Linux-generic/OniPlatformLinux-generic.h 2015-10-06 15:58:43.000000000 +0300
@@ -0,0 +1,36 @@
+/*****************************************************************************
+* *
+* OpenNI 2.x Alpha *
+* Copyright (C) 2012 PrimeSense Ltd. *
+* *
+* This file is part of OpenNI. *
+* *
+* Licensed under the Apache License, Version 2.0 (the "License"); *
+* you may not use this file except in compliance with the License. *
+* You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software *
+* distributed under the License is distributed on an "AS IS" BASIS, *
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
+* See the License for the specific language governing permissions and *
+* limitations under the License. *
+* *
+*****************************************************************************/
+#ifndef _ONI_PLATFORM_LINUX_GENERIC_H_
+#define _ONI_PLATFORM_LINUX_GENERIC_H_
+
+// Start with Linux-x86, and override what's different
+#include "../Linux-x86/OniPlatformLinux-x86.h"
+
+//---------------------------------------------------------------------------
+// Platform Basic Definition
+//---------------------------------------------------------------------------
+#undef ONI_PLATFORM
+#undef ONI_PLATFORM_STRING
+#define ONI_PLATFORM ONI_PLATFORM_LINUX_GENERIC
+#define ONI_PLATFORM_STRING "Linux-generic"
+
+#endif //_ONI_PLATFORM_LINUX_GENERIC_H_
+
diff -urN openni2-2.2.0.33+dfsg.old/Include/OniPlatform.h openni2-2.2.0.33+dfsg/Include/OniPlatform.h
--- openni2-2.2.0.33+dfsg.old/Include/OniPlatform.h 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/Include/OniPlatform.h 2015-10-06 16:00:13.000000000 +0300
@@ -27,6 +27,7 @@
#define ONI_PLATFORM_LINUX_ARM 3
#define ONI_PLATFORM_MACOSX 4
#define ONI_PLATFORM_ANDROID_ARM 5
+#define ONI_PLATFORM_LINUX_GENERIC 6
#if (defined _WIN32)
# ifndef RC_INVOKED
@@ -41,6 +42,8 @@
# include "Linux-x86/OniPlatformLinux-x86.h"
#elif (__linux__ && __arm__)
# include "Linux-Arm/OniPlatformLinux-Arm.h"
+#elif (__linux__)
+# include "Linux-generic/OniPlatformLinux-generic.h"
#elif _ARC
# include "ARC/OniPlaformARC.h"
#elif (__APPLE__)
diff -urN openni2-2.2.0.33+dfsg.old/Source/Drivers/PS1080/Sensor/XnDeviceSensorInit.h openni2-2.2.0.33+dfsg/Source/Drivers/PS1080/Sensor/XnDeviceSensorInit.h
--- openni2-2.2.0.33+dfsg.old/Source/Drivers/PS1080/Sensor/XnDeviceSensorInit.h 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/Source/Drivers/PS1080/Sensor/XnDeviceSensorInit.h 2015-10-06 16:03:01.000000000 +0300
@@ -57,7 +57,7 @@
#define XN_SENSOR_USB_MISC_BUFFER_SIZE 0x1000
#define XN_SENSOR_USB_MISC_BUFFERS 1
-#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
+#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM_LINUX_GENERIC)
#define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_ISO 32
#define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_BULK 40
#define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_LOWBAND_ISO 16
diff -urN openni2-2.2.0.33+dfsg.old/Source/Drivers/PSLink/LinkProtoLib/XnClientUSBInDataEndpoint.cpp openni2-2.2.0.33+dfsg/Source/Drivers/PSLink/LinkProtoLib/XnClientUSBInDataEndpoint.cpp
--- openni2-2.2.0.33+dfsg.old/Source/Drivers/PSLink/LinkProtoLib/XnClientUSBInDataEndpoint.cpp 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/Source/Drivers/PSLink/LinkProtoLib/XnClientUSBInDataEndpoint.cpp 2015-10-06 16:06:15.000000000 +0300
@@ -16,7 +16,7 @@
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_BUFFER_NUM_PACKETS_BULK = 120;
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_NUM_BUFFERS_BULK = 8;
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_TIMEOUT_BULK = 1000;
-#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
+#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM_LINUX_GENERIC )
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_BUFFER_NUM_PACKETS_ISO = 32;
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_NUM_BUFFERS_ISO = 16;
const XnUInt32 ClientUSBInDataEndpoint::READ_THREAD_TIMEOUT_ISO = 100;
diff -urN openni2-2.2.0.33+dfsg.old/Source/Drivers/PSLink/PS1200Device.cpp openni2-2.2.0.33+dfsg/Source/Drivers/PSLink/PS1200Device.cpp
--- openni2-2.2.0.33+dfsg.old/Source/Drivers/PSLink/PS1200Device.cpp 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/Source/Drivers/PSLink/PS1200Device.cpp 2015-10-06 16:04:19.000000000 +0300
@@ -43,7 +43,7 @@
// On all platforms other than Windows, prefer BULK
nRetVal = SetUsbAltInterface(0);
XN_IS_STATUS_OK_LOG_ERROR("Switch to ISO", nRetVal);
-#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
+#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM_LINUX_GENERIC)
// On all platforms other than Windows, prefer BULK
nRetVal = SetUsbAltInterface(1);
XN_IS_STATUS_OK_LOG_ERROR("Switch to BULK", nRetVal);
diff -urN openni2-2.2.0.33+dfsg.old/Source/Tools/NiViewer/NiViewer.cpp openni2-2.2.0.33+dfsg/Source/Tools/NiViewer/NiViewer.cpp
--- openni2-2.2.0.33+dfsg.old/Source/Tools/NiViewer/NiViewer.cpp 2015-10-06 16:52:52.000000000 +0300
+++ openni2-2.2.0.33+dfsg/Source/Tools/NiViewer/NiViewer.cpp 2015-10-06 16:08:39.000000000 +0300
@@ -89,7 +89,8 @@
#if (ONI_PLATFORM == ONI_PLATFORM_WIN32)
#include <conio.h>
#include <direct.h>
-#elif (ONI_PLATFORM == ONI_PLATFORM_LINUX_X86 || ONI_PLATFORM == ONI_PLATFORM_LINUX_ARM || ONI_PLATFORM == ONI_PLATFORM_MACOSX)
+#elif (ONI_PLATFORM == ONI_PLATFORM_LINUX_X86 || ONI_PLATFORM == ONI_PLATFORM_LINUX_ARM \
+ || ONI_PLATFORM == ONI_PLATFORM_MACOSX ||ONI_PLATFORM == ONI_PLATFORM_LINUX_GENERIC)
#define _getch() getchar()
#endif
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak 2015-10-06 16:52:52.000000000 +0300
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak 2015-10-05 16:29:38.000000000 +0300
@@ -21,7 +21,7 @@
else ifneq (,$(findstring arm,$(MACHINE)))
HOST_PLATFORM = Arm
else
- DUMMY:=$(error Can't determine host platform)
+ HOST_PLATFORM = generic
endif
# now check if this is a cross-compilation or not
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/BuildSystem/Platform.generic openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/BuildSystem/Platform.generic
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/BuildSystem/Platform.generic 1970-01-01 02:00:00.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/BuildSystem/Platform.generic 2015-10-05 15:18:40.000000000 +0300
@@ -0,0 +1,4 @@
+# some defaults
+export GLUT_SUPPORTED=1
+FLAGS += -O3 -fno-strict-aliasing
+
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/Linux-generic/XnPlatformLinux-generic.h openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/Linux-generic/XnPlatformLinux-generic.h
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/Linux-generic/XnPlatformLinux-generic.h 1970-01-01 02:00:00.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/Linux-generic/XnPlatformLinux-generic.h 2015-10-05 15:22:50.000000000 +0300
@@ -0,0 +1,36 @@
+/*****************************************************************************
+* *
+* PrimeSense PSCommon Library *
+* Copyright (C) 2012 PrimeSense Ltd. *
+* *
+* This file is part of PSCommon. *
+* *
+* Licensed under the Apache License, Version 2.0 (the "License"); *
+* you may not use this file except in compliance with the License. *
+* You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software *
+* distributed under the License is distributed on an "AS IS" BASIS, *
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
+* See the License for the specific language governing permissions and *
+* limitations under the License. *
+* *
+*****************************************************************************/
+#ifndef _XN_PLATFORM_LINUX_GENERIC_H_
+#define _XN_PLATFORM_LINUX_GENERIC_H_
+
+// Start with Linux-x86, and override what's different
+#include "../Linux-x86/XnPlatformLinux-x86.h"
+
+//---------------------------------------------------------------------------
+// Platform Basic Definition
+//---------------------------------------------------------------------------
+#undef XN_PLATFORM
+#undef XN_PLATFORM_STRING
+#define XN_PLATFORM XN_PLATFORM_LINUX_GENERIC
+#define XN_PLATFORM_STRING "Linux-generic"
+
+#endif //_XN_PLATFORM_LINUX_GENERIC_H_
+
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnOS.h openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnOS.h
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnOS.h 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnOS.h 2015-10-05 15:41:15.000000000 +0300
@@ -43,7 +43,7 @@
//---------------------------------------------------------------------------
#if (XN_PLATFORM == XN_PLATFORM_WIN32)
#include "Win32/XnOSWin32.h"
-#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
+#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_GENERIC)
#include "Linux-x86/XnOSLinux-x86.h"
#elif (XN_PLATFORM == XN_PLATFORM_MACOSX)
#include "MacOSX/XnOSMacOSX.h"
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h 2015-10-06 15:47:56.000000000 +0300
@@ -31,6 +31,7 @@
#define XN_PLATFORM_LINUX_ARM 7
#define XN_PLATFORM_MACOSX 8
#define XN_PLATFORM_ANDROID_ARM 9
+#define XN_PLATFORM_LINUX_GENERIC 10
#define XN_PLATFORM_IS_LITTLE_ENDIAN 1
#define XN_PLATFORM_IS_BIG_ENDIAN 2
@@ -53,6 +54,8 @@
#include "Linux-x86/XnPlatformLinux-x86.h"
#elif (__linux__ && __arm__)
#include "Linux-Arm/XnPlatformLinux-Arm.h"
+#elif (__linux__)
+#include "Linux-generic/XnPlatformLinux-generic.h"
#elif _ARC
#include "ARC/XnPlaformARC.h"
#elif (__APPLE__)
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnUSBDevice.h openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnUSBDevice.h
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Include/XnUSBDevice.h 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Include/XnUSBDevice.h 2015-10-05 15:42:37.000000000 +0300
@@ -47,7 +47,7 @@
#define USB_DT_DEVICE_SIZE 0
#define USB_DT_DEVICE 0
-#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM)
+#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_GENERIC)
#include <linux/usb/ch9.h>
typedef struct usb_endpoint_descriptor XnUSBEndpointDescriptor;
typedef struct usb_interface_descriptor XnUSBInterfaceDescriptor;
diff -urN openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Source/Linux/XnLinuxUSB.cpp openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Source/Linux/XnLinuxUSB.cpp
--- openni2-2.2.0.33+dfsg.old/ThirdParty/PSCommon/XnLib/Source/Linux/XnLinuxUSB.cpp 2013-11-12 16:12:23.000000000 +0200
+++ openni2-2.2.0.33+dfsg/ThirdParty/PSCommon/XnLib/Source/Linux/XnLinuxUSB.cpp 2015-10-05 15:43:24.000000000 +0300
@@ -36,7 +36,7 @@
#include <XnOSCpp.h>
#include <XnList.h>
-#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM)
+#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_GENERIC)
#include <libudev.h>
#define XN_USE_UDEV
#endif
|