From dfb3520a7aaae6171295f2a55ecf3f513f5f727f Mon Sep 17 00:00:00 2001 From: rguillome Date: Tue, 13 Jun 2017 16:50:40 +0200 Subject: [PATCH 1/3] Fix the name of the generated fakenect library to avoid conflict in the dependency tree with libfreenect.so --- fakenect/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakenect/CMakeLists.txt b/fakenect/CMakeLists.txt index f1e36e39..40b67b4c 100644 --- a/fakenect/CMakeLists.txt +++ b/fakenect/CMakeLists.txt @@ -7,7 +7,7 @@ add_library (fakenect SHARED fakenect.c) set_target_properties ( fakenect PROPERTIES VERSION ${PROJECT_VER} SOVERSION ${PROJECT_APIVER} - OUTPUT_NAME freenect) + OUTPUT_NAME freenect_faked) target_link_libraries(fakenect ${MATH_LIB}) install (TARGETS fakenect From fe8d35b3824378275e14cab0244be18e9122c387 Mon Sep 17 00:00:00 2001 From: rguillome Date: Tue, 13 Jun 2017 16:51:19 +0200 Subject: [PATCH 2/3] Upgrade the dependent cmake version because of "target_include_directories" used in the configuration files --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bb06f99..9f5e4d5e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Notice: If you have the newer Kinect v2 (XBox One), use [OpenKinect/libfreenect2 To build libfreenect, you'll need - [libusb](http://libusb.info) >= 1.0.18 -- [CMake](http://cmake.org) >= 2.6 +- [CMake](http://cmake.org) >= 2.8.12 - [python](http://python.org) >= 2.7 or >= 3.3 (only if BUILD_PYTHON=ON or BUILD_PYTHON2=ON or BUILD_PYTHON3=ON or BUILD_REDIST_PACKAGE=OFF) For the examples, you'll need From 9c5a3285b89f070335ac014473ea10df550eb091 Mon Sep 17 00:00:00 2001 From: rguillome Date: Tue, 13 Jun 2017 17:01:24 +0200 Subject: [PATCH 3/3] Complete Readme to show fakenect read usage --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 9f5e4d5e..3ad9d4b1 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,19 @@ Wrappers are not guaranteed to be API stable or up to date. - actionscript - Java (JNA) +# Using Fakenect + +To use a fakenect recorded stream, just provide the fakenect lib as a pre loaded library with `LD_PRELOAD` and indicates the recorded files directory with `FAKENECT_PATH` + +- Sample with python wrappers : +```shell + LD_PRELOAD="/usr/local/lib/fakenect/libfreenect_faked.so" FAKENECT_PATH="./sample/hand1" python ./wrappers/python/demo_cv_sync.py +``` +- Sample with C bin : +```shell + LD_PRELOAD="/usr/local/lib/fakenect/libfreenect_faked.so" FAKENECT_PATH="./sample/hand1" freenect-glview +``` + # Code Contributions In order of importance: