OpenKinect / libfreenect

Drivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
http://openkinect.org
3.58k stars 1.15k forks source link

Couldn't find function oniDriverStreamAddRefToFrame in libFreenectDriver.so #377

Open OscardR opened 10 years ago

OscardR commented 10 years ago

I've just compiled the latest version and tried to use the OpenNI2 driver it in my project, with this results:

1394622666223924 WARNING    LibraryHandler: Couldn't find function oniDriverStreamAddRefToFrame in libFreenectDriver.so. Stopping
1394622666223937 VERBOSE    Couldn't use file 'libFreenectDriver.so' as a device driver

Is it a bug on the libraries I'm using or are the drivers still incomplete and this function actually missing?

Thanks in advance, keep up the good work!

piedar commented 10 years ago

Do any of your external libraries embed an older version of OpenNI2? oniDriverStreamAddRefToFrame() was removed from the code 10 months ago.

OscardR commented 10 years ago

Hi @piedar, thanks for your support. Effectively, I'm using FORTH's Kinect 3D Hand Tracking Library which makes use of OpenNI2, but I'm using the latest version of OpenNI2 (2.2.33). It seems the library was written using an early version, but since I don't have access to the library's code, I think I will not be able to use libFreenectDriver with it :(

luizvnasc commented 10 years ago

@OscardR I had the same problem here, but I built again the library, now I'm having segmentation fault. I run a debugger and I'm getting this msg:

Program received signal SIGSEGV, Segmentation fault. 0x00007fffd21669d6 in FreenectDeviceNI::setProperty(int, void const*, int) () from /opt/HandTracker_0.4_linux_x64/Bin/OpenNI2/Drivers/libFreenectDriver.so

piedar commented 10 years ago

@OscardR What happens if you add this line to the bottom of VideoStream.hpp?

diff --git a/OpenNI2-FreenectDriver/src/VideoStream.hpp b/OpenNI2-FreenectDriver/src/VideoStream.hpp
index 0823e7e..a3b7a03 100644
--- a/OpenNI2-FreenectDriver/src/VideoStream.hpp
+++ b/OpenNI2-FreenectDriver/src/VideoStream.hpp
@@ -182,6 +182,8 @@ namespace FreenectDriver
   };
 }

+ONI_C_API_EXPORT void oniDriverStreamAddRefToFrame(oni::driver::StreamBase* pStream, OniDriverFrame* pFrame);
+

 /* image video modes reference
piedar commented 10 years ago

@luizvnasc The most obvious possibility is that someone passed nullptr rather than OniImageRegistrationMode* to setProperty().

OscardR commented 10 years ago

Hi @piedar, I've tried adding the ONI_C_API_EXPORT line, recompiling successfully, but I keep getting the same error message that this function cannot be found in libFreenectDriver :(

I'm afraid I will have to use an old version of OpenNI2 and use the code from that function, but I have no idea how that function works or what it does.

Thanks anyway, I'll post any updates.