OSVR-Core icon indicating copy to clipboard operation
OSVR-Core copied to clipboard

Add documentation for shared memory

Open VRguy opened this issue 9 years ago • 0 comments

The question was where is shared memory coded wrt the imager plugin. The imager used shared memory when possible to avoid large image copies between client and server when both are on the same machine. This also enables multiple clients to use the images from the same sensor

The imaging-specific code used internally:

https://github.com/OSVR/OSVR-Core/blob/master/inc/osvr/Common/ImagingComponent.h https://github.com/OSVR/OSVR-Core/blob/master/src/osvr/Common/ImagingComponent.cpp

when it can use the shared-memory path, it uses https://github.com/OSVR/OSVR-Core/blob/master/inc/osvr/Common/IPCRingBuffer.h and all the files that start with "IPC" in https://github.com/OSVR/OSVR-Core/tree/master/src/osvr/Common

On the plugin side, the code is identical between the two transports (with and without shared memory), the client side does have a little bit of a difference, since it has to keep a reference count to the shared memory buffer. that's handled here https://github.com/OSVR/OSVR-Core/blob/master/src/osvr/Client/ImagingRemoteFactory.cpp

VRguy avatar Apr 20 '16 16:04 VRguy