Proxynect to enable multiple low-latency Kinect clients #401
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
For a project I did, it was necessary to have one Kinect be used by two very separate programs.
The usual approach is to e.g. stream data over TCP. But this is rather slow with full-frame full-speed RGB/depth data.
Instead, I implemented an approach that uses shared memory IPC to share a single memory buffer with multiple clients. Synchronization and limited control over the depth stream are provided. The library works on POSIX systems supporting
shm_open, which should cover Linux and OS X. No solution for Windows yet, but Cygwin supportsshm_openwhich means that this should theoretically work under Windows if you're willing to use Cygwin.Usage is similar to using
fakenect. Launch theproxydaemonin the background, then have clients load libraries fromlib/proxynect.One final advantage is that this approach enables "keep-alive" of the Kinect, which reduces startup time (for programs that are not persistent). This helped me a lot when developing, since I could rerun my app without having to wait for the Kinect depth stream to settle.