From e20a981fb481346d68ce48768efa5dd4ccd001ea Mon Sep 17 00:00:00 2001 From: Riccardo Zaglia Date: Tue, 9 Jul 2024 13:12:31 +0200 Subject: [PATCH] feat(server): :sparkles: Split server into `_openvr` and `_core` --- .gitattributes | 12 +- Cargo.lock | 22 ++- Cargo.toml | 3 +- alvr/server/README.md | 3 - alvr/server/src/openvr/graphics.rs | 41 ----- alvr/{server => server_core}/Cargo.toml | 122 +++++++------- alvr/{server => server_core}/cbindgen.toml | 0 alvr/{server => server_core}/src/bitrate.rs | 0 .../src/body_tracking.rs | 0 alvr/{server => server_core}/src/c_api.rs | 150 +++--------------- .../{server => server_core}/src/connection.rs | 0 .../src/face_tracking.rs | 0 .../src/hand_gestures.rs | 0 alvr/{server => server_core}/src/haptics.rs | 0 .../src/input_mapping.rs | 0 alvr/{server => server_core}/src/lib.rs | 36 +++-- .../src/logging_backend.rs | 0 alvr/{server => server_core}/src/sockets.rs | 0 .../{server => server_core}/src/statistics.rs | 0 alvr/{server => server_core}/src/tracking.rs | 0 .../{server => server_core}/src/web_server.rs | 0 alvr/server_openvr/Cargo.toml | 30 ++++ alvr/{server => server_openvr}/LICENSE | 0 alvr/{server => server_openvr}/LICENSE-Valve | 0 alvr/{server => server_openvr}/build.rs | 0 .../cpp/ALVR-common/common-utils.cpp | 0 .../cpp/ALVR-common/common-utils.h | 0 .../cpp/ALVR-common/exception.cpp | 0 .../cpp/ALVR-common/exception.h | 0 .../cpp/ALVR-common/packet_types.h | 0 .../cpp/alvr_server/ChaperoneUpdater.cpp | 0 .../cpp/alvr_server/Controller.cpp | 0 .../cpp/alvr_server/Controller.h | 0 .../cpp/alvr_server/FakeViveTracker.cpp | 0 .../cpp/alvr_server/FakeViveTracker.h | 0 .../cpp/alvr_server/HMD.cpp | 0 .../cpp/alvr_server/HMD.h | 0 .../cpp/alvr_server/IDRScheduler.cpp | 0 .../cpp/alvr_server/IDRScheduler.h | 0 .../cpp/alvr_server/Logger.cpp | 0 .../cpp/alvr_server/Logger.h | 0 .../cpp/alvr_server/NalParsing.cpp | 0 .../cpp/alvr_server/Paths.cpp | 0 .../cpp/alvr_server/Paths.h | 0 .../cpp/alvr_server/PoseHistory.cpp | 0 .../cpp/alvr_server/PoseHistory.h | 0 .../cpp/alvr_server/Settings.cpp | 0 .../cpp/alvr_server/Settings.h | 0 .../cpp/alvr_server/TrackedDevice.cpp | 0 .../cpp/alvr_server/TrackedDevice.h | 0 .../cpp/alvr_server/Utils.h | 0 .../cpp/alvr_server/ViveTrackerProxy.cpp | 0 .../cpp/alvr_server/ViveTrackerProxy.h | 0 .../cpp/alvr_server/alvr_server.cpp | 0 .../cpp/alvr_server/bindings.h | 0 .../cpp/alvr_server/driverlog.cpp | 0 .../cpp/alvr_server/driverlog.h | 0 .../cpp/alvr_server/include/openvr_math.h | 0 .../cpp/alvr_server/include/picojson.h | 0 .../cpp/alvr_server/nvEncodeAPI.h | 0 .../shader/ColorCorrectionPixelShader.hlsl | 0 .../CompressAxisAlignedPixelShader.hlsl | 0 .../shader/FoveatedRendering.hlsli | 0 .../cpp/alvr_server/shader/FrameRender.fx | 0 .../cpp/alvr_server/shader/FrameRenderPS.hlsl | 0 .../cpp/alvr_server/shader/FrameRenderVS.hlsl | 0 .../cpp/alvr_server/shader/rgbtoyuv420.hlsl | 0 .../cpp/bin/.gitignore | 0 .../cpp/bin/windows/vcruntime140_1.dll | Bin .../cpp/platform/linux/CEncoder.cpp | 0 .../cpp/platform/linux/CEncoder.h | 0 .../cpp/platform/linux/CrashHandler.cpp | 0 .../cpp/platform/linux/EncodePipeline.cpp | 0 .../cpp/platform/linux/EncodePipeline.h | 0 .../platform/linux/EncodePipelineNvEnc.cpp | 0 .../cpp/platform/linux/EncodePipelineNvEnc.h | 0 .../cpp/platform/linux/EncodePipelineSW.cpp | 0 .../cpp/platform/linux/EncodePipelineSW.h | 0 .../platform/linux/EncodePipelineVAAPI.cpp | 0 .../cpp/platform/linux/EncodePipelineVAAPI.h | 0 .../cpp/platform/linux/FormatConverter.cpp | 0 .../cpp/platform/linux/FormatConverter.h | 0 .../cpp/platform/linux/FrameRender.cpp | 0 .../cpp/platform/linux/FrameRender.h | 0 .../cpp/platform/linux/Renderer.cpp | 0 .../cpp/platform/linux/Renderer.h | 0 .../cpp/platform/linux/ffmpeg_helper.cpp | 0 .../cpp/platform/linux/ffmpeg_helper.h | 0 .../cpp/platform/linux/protocol.h | 0 .../cpp/platform/linux/shader/color.comp | 0 .../cpp/platform/linux/shader/color.comp.spv | Bin .../cpp/platform/linux/shader/ffr.comp | 0 .../cpp/platform/linux/shader/ffr.comp.spv | Bin .../cpp/platform/linux/shader/quad.comp | 0 .../cpp/platform/linux/shader/quad.comp.spv | Bin .../platform/linux/shader/rgbtoyuv420.comp | 0 .../linux/shader/rgbtoyuv420.comp.spv | Bin .../cpp/platform/macos/CEncoder.h | 0 .../cpp/platform/macos/CrashHandler.cpp | 0 .../cpp/platform/win32/CEncoder.cpp | 0 .../cpp/platform/win32/CEncoder.h | 0 .../win32/ColorCorrectionPixelShader.cso | Bin .../win32/CompressAxisAlignedPixelShader.cso | Bin .../cpp/platform/win32/CrashHandler.cpp | 0 .../cpp/platform/win32/FFR.cpp | 0 .../cpp/platform/win32/FFR.h | 0 .../cpp/platform/win32/FrameRender.cpp | 0 .../cpp/platform/win32/FrameRender.h | 0 .../cpp/platform/win32/FrameRenderPS.cso | Bin .../cpp/platform/win32/FrameRenderVS.cso | Bin .../cpp/platform/win32/NvCodecUtils.h | 0 .../cpp/platform/win32/NvEncoder.cpp | 0 .../cpp/platform/win32/NvEncoder.h | 0 .../cpp/platform/win32/NvEncoderD3D11.cpp | 0 .../cpp/platform/win32/NvEncoderD3D11.h | 0 .../platform/win32/OvrDirectModeComponent.cpp | 0 .../platform/win32/OvrDirectModeComponent.h | 0 .../cpp/platform/win32/QuadVertexShader.cso | Bin .../cpp/platform/win32/VideoEncoder.cpp | 0 .../cpp/platform/win32/VideoEncoder.h | 0 .../cpp/platform/win32/VideoEncoderAMF.cpp | 0 .../cpp/platform/win32/VideoEncoderAMF.h | 0 .../cpp/platform/win32/VideoEncoderNVENC.cpp | 0 .../cpp/platform/win32/VideoEncoderNVENC.h | 0 .../cpp/platform/win32/VideoEncoderSW.cpp | 0 .../cpp/platform/win32/VideoEncoderSW.h | 0 .../d3d-render-utils/QuadVertexShader.hlsl | 0 .../win32/d3d-render-utils/RenderPipeline.cpp | 0 .../win32/d3d-render-utils/RenderPipeline.h | 0 .../d3d-render-utils/RenderPipelineYUV.cpp | 0 .../d3d-render-utils/RenderPipelineYUV.h | 0 .../win32/d3d-render-utils/RenderUtils.cpp | 0 .../win32/d3d-render-utils/RenderUtils.h | 0 .../cpp/platform/win32/rgbtoyuv420.cso | Bin .../cpp/platform/win32/shared/d3drender.cpp | 0 .../cpp/platform/win32/shared/d3drender.h | 0 .../shared/amf/public/common/AMFFactory.cpp | 0 .../cpp/shared/amf/public/common/AMFFactory.h | 0 .../cpp/shared/amf/public/common/AMFMath.h | 0 .../cpp/shared/amf/public/common/AMFSTL.cpp | 0 .../cpp/shared/amf/public/common/AMFSTL.h | 0 .../cpp/shared/amf/public/common/ByteArray.h | 0 .../cpp/shared/amf/public/common/CPUCaps.h | 0 .../amf/public/common/CurrentTimeImpl.cpp | 0 .../amf/public/common/CurrentTimeImpl.h | 0 .../cpp/shared/amf/public/common/DataStream.h | 0 .../amf/public/common/DataStreamFactory.cpp | 0 .../amf/public/common/DataStreamFile.cpp | 0 .../shared/amf/public/common/DataStreamFile.h | 0 .../amf/public/common/DataStreamMemory.cpp | 0 .../amf/public/common/DataStreamMemory.h | 0 .../shared/amf/public/common/IOCapsImpl.cpp | 0 .../cpp/shared/amf/public/common/IOCapsImpl.h | 0 .../shared/amf/public/common/InterfaceImpl.h | 0 .../shared/amf/public/common/ObservableImpl.h | 0 .../public/common/PropertyStorageExImpl.cpp | 0 .../amf/public/common/PropertyStorageExImpl.h | 0 .../amf/public/common/PropertyStorageImpl.h | 0 .../cpp/shared/amf/public/common/Thread.cpp | 0 .../cpp/shared/amf/public/common/Thread.h | 0 .../shared/amf/public/common/TraceAdapter.cpp | 0 .../shared/amf/public/common/TraceAdapter.h | 0 .../public/common/Windows/ThreadWindows.cpp | 0 .../include/components/Ambisonic2SRenderer.h | 0 .../public/include/components/AudioCapture.h | 0 .../amf/public/include/components/Capture.h | 0 .../amf/public/include/components/ChromaKey.h | 0 .../public/include/components/ColorSpace.h | 0 .../amf/public/include/components/Component.h | 0 .../public/include/components/ComponentCaps.h | 0 .../public/include/components/CursorCapture.h | 0 .../include/components/DisplayCapture.h | 0 .../include/components/FFMPEGAudioConverter.h | 0 .../include/components/FFMPEGAudioDecoder.h | 0 .../include/components/FFMPEGAudioEncoder.h | 0 .../include/components/FFMPEGComponents.h | 0 .../include/components/FFMPEGEncoderAV1.h | 0 .../include/components/FFMPEGEncoderH264.h | 0 .../include/components/FFMPEGEncoderHEVC.h | 0 .../include/components/FFMPEGFileDemuxer.h | 0 .../include/components/FFMPEGFileMuxer.h | 0 .../include/components/FFMPEGVideoDecoder.h | 0 .../amf/public/include/components/FRC.h | 0 .../amf/public/include/components/HQScaler.h | 0 .../public/include/components/MediaSource.h | 0 .../public/include/components/PreAnalysis.h | 0 .../public/include/components/PreProcessing.h | 0 .../include/components/SupportedCodecs.h | 0 .../public/include/components/VQEnhancer.h | 0 .../public/include/components/VideoCapture.h | 0 .../include/components/VideoConverter.h | 0 .../include/components/VideoDecoderUVD.h | 0 .../include/components/VideoEncoderAV1.h | 0 .../include/components/VideoEncoderHEVC.h | 0 .../include/components/VideoEncoderVCE.h | 0 .../public/include/components/VideoStitch.h | 0 .../include/components/ZCamLiveStream.h | 0 .../amf/public/include/core/AudioBuffer.h | 0 .../shared/amf/public/include/core/Buffer.h | 0 .../shared/amf/public/include/core/Compute.h | 0 .../amf/public/include/core/ComputeFactory.h | 0 .../shared/amf/public/include/core/Context.h | 0 .../amf/public/include/core/CurrentTime.h | 0 .../shared/amf/public/include/core/D3D12AMF.h | 0 .../cpp/shared/amf/public/include/core/Data.h | 0 .../shared/amf/public/include/core/Debug.h | 0 .../cpp/shared/amf/public/include/core/Dump.h | 0 .../shared/amf/public/include/core/Factory.h | 0 .../amf/public/include/core/Interface.h | 0 .../shared/amf/public/include/core/Plane.h | 0 .../shared/amf/public/include/core/Platform.h | 0 .../amf/public/include/core/PropertyStorage.h | 0 .../public/include/core/PropertyStorageEx.h | 0 .../shared/amf/public/include/core/Result.h | 0 .../shared/amf/public/include/core/Surface.h | 0 .../shared/amf/public/include/core/Trace.h | 0 .../shared/amf/public/include/core/Variant.h | 0 .../shared/amf/public/include/core/Version.h | 0 .../amf/public/include/core/VulkanAMF.h | 0 .../cpp/shared/backward.cpp | 0 .../cpp/shared/backward.hpp | 0 .../cpp/shared/threadtools.cpp | 0 .../cpp/shared/threadtools.h | 0 alvr/server_openvr/src/graphics.rs | 39 +++++ .../mod.rs => server_openvr/src/lib.rs} | 29 ++-- .../src/openvr => server_openvr/src}/props.rs | 13 +- .../openvr => server_openvr/src}/tracking.rs | 5 +- alvr/vrcompositor_wrapper/drm-lease-shim.cpp | 2 +- alvr/vulkan_layer/build.rs | 2 +- alvr/xtask/src/build.rs | 19 +-- alvr/xtask/src/format.rs | 2 +- alvr/xtask/src/main.rs | 2 +- alvr/xtask/src/packaging.rs | 2 +- alvr/xtask/src/version.rs | 14 +- 234 files changed, 235 insertions(+), 313 deletions(-) delete mode 100644 alvr/server/README.md delete mode 100644 alvr/server/src/openvr/graphics.rs rename alvr/{server => server_core}/Cargo.toml (74%) rename alvr/{server => server_core}/cbindgen.toml (100%) rename alvr/{server => server_core}/src/bitrate.rs (100%) rename alvr/{server => server_core}/src/body_tracking.rs (100%) rename alvr/{server => server_core}/src/c_api.rs (78%) rename alvr/{server => server_core}/src/connection.rs (100%) rename alvr/{server => server_core}/src/face_tracking.rs (100%) rename alvr/{server => server_core}/src/hand_gestures.rs (100%) rename alvr/{server => server_core}/src/haptics.rs (100%) rename alvr/{server => server_core}/src/input_mapping.rs (100%) rename alvr/{server => server_core}/src/lib.rs (94%) rename alvr/{server => server_core}/src/logging_backend.rs (100%) rename alvr/{server => server_core}/src/sockets.rs (100%) rename alvr/{server => server_core}/src/statistics.rs (100%) rename alvr/{server => server_core}/src/tracking.rs (100%) rename alvr/{server => server_core}/src/web_server.rs (100%) create mode 100644 alvr/server_openvr/Cargo.toml rename alvr/{server => server_openvr}/LICENSE (100%) rename alvr/{server => server_openvr}/LICENSE-Valve (100%) rename alvr/{server => server_openvr}/build.rs (100%) rename alvr/{server => server_openvr}/cpp/ALVR-common/common-utils.cpp (100%) rename alvr/{server => server_openvr}/cpp/ALVR-common/common-utils.h (100%) rename alvr/{server => server_openvr}/cpp/ALVR-common/exception.cpp (100%) rename alvr/{server => server_openvr}/cpp/ALVR-common/exception.h (100%) rename alvr/{server => server_openvr}/cpp/ALVR-common/packet_types.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/ChaperoneUpdater.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Controller.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Controller.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/FakeViveTracker.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/FakeViveTracker.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/HMD.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/HMD.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/IDRScheduler.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/IDRScheduler.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Logger.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Logger.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/NalParsing.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Paths.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Paths.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/PoseHistory.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/PoseHistory.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Settings.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Settings.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/TrackedDevice.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/TrackedDevice.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/Utils.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/ViveTrackerProxy.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/ViveTrackerProxy.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/alvr_server.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/bindings.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/driverlog.cpp (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/driverlog.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/include/openvr_math.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/include/picojson.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/nvEncodeAPI.h (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/ColorCorrectionPixelShader.hlsl (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/CompressAxisAlignedPixelShader.hlsl (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/FoveatedRendering.hlsli (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/FrameRender.fx (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/FrameRenderPS.hlsl (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/FrameRenderVS.hlsl (100%) rename alvr/{server => server_openvr}/cpp/alvr_server/shader/rgbtoyuv420.hlsl (100%) rename alvr/{server => server_openvr}/cpp/bin/.gitignore (100%) rename alvr/{server => server_openvr}/cpp/bin/windows/vcruntime140_1.dll (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/CEncoder.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/CEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/CrashHandler.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipeline.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipeline.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineNvEnc.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineNvEnc.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineSW.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineSW.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineVAAPI.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/EncodePipelineVAAPI.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/FormatConverter.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/FormatConverter.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/FrameRender.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/FrameRender.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/Renderer.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/Renderer.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/ffmpeg_helper.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/ffmpeg_helper.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/protocol.h (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/color.comp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/color.comp.spv (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/ffr.comp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/ffr.comp.spv (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/quad.comp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/quad.comp.spv (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/rgbtoyuv420.comp (100%) rename alvr/{server => server_openvr}/cpp/platform/linux/shader/rgbtoyuv420.comp.spv (100%) rename alvr/{server => server_openvr}/cpp/platform/macos/CEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/platform/macos/CrashHandler.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/CEncoder.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/CEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/ColorCorrectionPixelShader.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/CompressAxisAlignedPixelShader.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/CrashHandler.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FFR.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FFR.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FrameRender.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FrameRender.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FrameRenderPS.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/FrameRenderVS.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/NvCodecUtils.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/NvEncoder.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/NvEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/NvEncoderD3D11.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/NvEncoderD3D11.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/OvrDirectModeComponent.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/OvrDirectModeComponent.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/QuadVertexShader.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoder.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderAMF.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderAMF.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderNVENC.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderNVENC.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderSW.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/VideoEncoderSW.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/QuadVertexShader.hlsl (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderPipeline.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderPipeline.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderUtils.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/d3d-render-utils/RenderUtils.h (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/rgbtoyuv420.cso (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/shared/d3drender.cpp (100%) rename alvr/{server => server_openvr}/cpp/platform/win32/shared/d3drender.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/AMFFactory.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/AMFFactory.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/AMFMath.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/AMFSTL.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/AMFSTL.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/ByteArray.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/CPUCaps.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/CurrentTimeImpl.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/CurrentTimeImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStream.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStreamFactory.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStreamFile.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStreamFile.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStreamMemory.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/DataStreamMemory.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/IOCapsImpl.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/IOCapsImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/InterfaceImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/ObservableImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/PropertyStorageExImpl.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/PropertyStorageExImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/PropertyStorageImpl.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/Thread.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/Thread.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/TraceAdapter.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/TraceAdapter.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/common/Windows/ThreadWindows.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/Ambisonic2SRenderer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/AudioCapture.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/Capture.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/ChromaKey.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/ColorSpace.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/Component.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/ComponentCaps.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/CursorCapture.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/DisplayCapture.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGAudioConverter.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGAudioDecoder.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGAudioEncoder.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGComponents.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGEncoderAV1.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGEncoderH264.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGEncoderHEVC.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGFileDemuxer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGFileMuxer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FFMPEGVideoDecoder.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/FRC.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/HQScaler.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/MediaSource.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/PreAnalysis.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/PreProcessing.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/SupportedCodecs.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VQEnhancer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoCapture.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoConverter.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoDecoderUVD.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoEncoderAV1.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoEncoderHEVC.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoEncoderVCE.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/VideoStitch.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/components/ZCamLiveStream.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/AudioBuffer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Buffer.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Compute.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/ComputeFactory.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Context.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/CurrentTime.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/D3D12AMF.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Data.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Debug.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Dump.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Factory.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Interface.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Plane.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Platform.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/PropertyStorage.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/PropertyStorageEx.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Result.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Surface.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Trace.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Variant.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/Version.h (100%) rename alvr/{server => server_openvr}/cpp/shared/amf/public/include/core/VulkanAMF.h (100%) rename alvr/{server => server_openvr}/cpp/shared/backward.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/backward.hpp (100%) rename alvr/{server => server_openvr}/cpp/shared/threadtools.cpp (100%) rename alvr/{server => server_openvr}/cpp/shared/threadtools.h (100%) create mode 100644 alvr/server_openvr/src/graphics.rs rename alvr/{server/src/openvr/mod.rs => server_openvr/src/lib.rs} (94%) rename alvr/{server/src/openvr => server_openvr/src}/props.rs (98%) rename alvr/{server/src/openvr => server_openvr/src}/tracking.rs (97%) diff --git a/.gitattributes b/.gitattributes index c5ebf26c98..b8f70a660c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,12 +3,12 @@ alvr/client_core/cpp/VrApi_* linguist-vendored alvr/client_core/cpp/glm/** linguist-vendored alvr/client_core/cpp/tinygltf/** linguist-vendored -alvr/server/cpp/alvr_server/include/** linguist-vendored -alvr/server/cpp/alvr_server/nvEncodeAPI.h linguist-vendored -alvr/server/cpp/platform/win32/NvCodecUtils.h linguist-vendored -alvr/server/cpp/platform/win32/NvEncoder.cpp linguist-vendored -alvr/server/cpp/platform/win32/NvEncoder.h linguist-vendored -alvr/server/cpp/shared/** linguist-vendored +alvr/server_openvr/cpp/alvr_server/include/** linguist-vendored +alvr/server_openvr/cpp/alvr_server/nvEncodeAPI.h linguist-vendored +alvr/server_openvr/cpp/platform/win32/NvCodecUtils.h linguist-vendored +alvr/server_openvr/cpp/platform/win32/NvEncoder.cpp linguist-vendored +alvr/server_openvr/cpp/platform/win32/NvEncoder.h linguist-vendored +alvr/server_openvr/cpp/shared/** linguist-vendored # note: some of these folders contain ALVR code, but only a minor amount alvr/vulkan_layer/layer/** linguist-vendored alvr/vulkan_layer/util/** linguist-vendored diff --git a/Cargo.lock b/Cargo.lock index 4b03a9c9f8..4c3e360803 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -352,7 +352,7 @@ dependencies = [ ] [[package]] -name = "alvr_server" +name = "alvr_server_core" version = "21.0.0-dev01" dependencies = [ "alvr_audio", @@ -365,9 +365,7 @@ dependencies = [ "alvr_sockets", "ash 0.38.0+1.3.281", "bincode", - "bindgen", "bytes", - "cc", "chrono", "fern", "flume", @@ -375,7 +373,6 @@ dependencies = [ "headers", "hyper 0.14.28", "mdns-sd", - "pkg-config", "profiling", "reqwest 0.11.27", "rosc", @@ -385,7 +382,6 @@ dependencies = [ "tokio", "tokio-tungstenite", "tokio-util", - "walkdir", ] [[package]] @@ -404,6 +400,22 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alvr_server_openvr" +version = "21.0.0-dev01" +dependencies = [ + "alvr_common", + "alvr_filesystem", + "alvr_packets", + "alvr_server_core", + "alvr_server_io", + "alvr_session", + "bindgen", + "cc", + "pkg-config", + "walkdir", +] + [[package]] name = "alvr_session" version = "21.0.0-dev01" diff --git a/Cargo.toml b/Cargo.toml index 64a8d37421..9a24cc5b2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,11 +15,12 @@ alvr_client_core = { path = "alvr/client_core" } alvr_common = { path = "alvr/common" } alvr_events = { path = "alvr/events" } alvr_filesystem = { path = "alvr/filesystem" } +alvr_gui_common = { path = "alvr/gui_common" } alvr_packets = { path = "alvr/packets" } +alvr_server_core = { path = "alvr/server_core"} alvr_server_io = { path = "alvr/server_io" } alvr_session = { path = "alvr/session" } alvr_sockets = { path = "alvr/sockets" } -alvr_gui_common = { path = "alvr/gui_common" } [profile.release] debug = "limited" diff --git a/alvr/server/README.md b/alvr/server/README.md deleted file mode 100644 index 602d236bf3..0000000000 --- a/alvr/server/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# alvr_server - -SteamVR driver written in C++ and wrapped into a Rust library. The wrapping is done to use the same cross-patform build system of other ALVR compoents, and to allow to easily extend C++ code with Rust. diff --git a/alvr/server/src/openvr/graphics.rs b/alvr/server/src/openvr/graphics.rs deleted file mode 100644 index 2974b136dd..0000000000 --- a/alvr/server/src/openvr/graphics.rs +++ /dev/null @@ -1,41 +0,0 @@ -static FRAME_RENDER_VS_CSO: &[u8] = include_bytes!("../../cpp/platform/win32/FrameRenderVS.cso"); -static FRAME_RENDER_PS_CSO: &[u8] = include_bytes!("../../cpp/platform/win32/FrameRenderPS.cso"); -static QUAD_SHADER_CSO: &[u8] = include_bytes!("../../cpp/platform/win32/QuadVertexShader.cso"); -static COMPRESS_AXIS_ALIGNED_CSO: &[u8] = - include_bytes!("../../cpp/platform/win32/CompressAxisAlignedPixelShader.cso"); -static COLOR_CORRECTION_CSO: &[u8] = - include_bytes!("../../cpp/platform/win32/ColorCorrectionPixelShader.cso"); -static RGBTOYUV420_CSO: &[u8] = include_bytes!("../../cpp/platform/win32/rgbtoyuv420.cso"); - -static QUAD_SHADER_COMP_SPV: &[u8] = - include_bytes!("../../cpp/platform/linux/shader/quad.comp.spv"); -static COLOR_SHADER_COMP_SPV: &[u8] = - include_bytes!("../../cpp/platform/linux/shader/color.comp.spv"); -static FFR_SHADER_COMP_SPV: &[u8] = include_bytes!("../../cpp/platform/linux/shader/ffr.comp.spv"); -static RGBTOYUV420_SHADER_COMP_SPV: &[u8] = - include_bytes!("../../cpp/platform/linux/shader/rgbtoyuv420.comp.spv"); - -pub fn initialize_shaders() { - unsafe { - crate::openvr::FRAME_RENDER_VS_CSO_PTR = FRAME_RENDER_VS_CSO.as_ptr(); - crate::openvr::FRAME_RENDER_VS_CSO_LEN = FRAME_RENDER_VS_CSO.len() as _; - crate::openvr::FRAME_RENDER_PS_CSO_PTR = FRAME_RENDER_PS_CSO.as_ptr(); - crate::openvr::FRAME_RENDER_PS_CSO_LEN = FRAME_RENDER_PS_CSO.len() as _; - crate::openvr::QUAD_SHADER_CSO_PTR = QUAD_SHADER_CSO.as_ptr(); - crate::openvr::QUAD_SHADER_CSO_LEN = QUAD_SHADER_CSO.len() as _; - crate::openvr::COMPRESS_AXIS_ALIGNED_CSO_PTR = COMPRESS_AXIS_ALIGNED_CSO.as_ptr(); - crate::openvr::COMPRESS_AXIS_ALIGNED_CSO_LEN = COMPRESS_AXIS_ALIGNED_CSO.len() as _; - crate::openvr::COLOR_CORRECTION_CSO_PTR = COLOR_CORRECTION_CSO.as_ptr(); - crate::openvr::COLOR_CORRECTION_CSO_LEN = COLOR_CORRECTION_CSO.len() as _; - crate::openvr::RGBTOYUV420_CSO_PTR = RGBTOYUV420_CSO.as_ptr(); - crate::openvr::RGBTOYUV420_CSO_LEN = RGBTOYUV420_CSO.len() as _; - crate::openvr::QUAD_SHADER_COMP_SPV_PTR = QUAD_SHADER_COMP_SPV.as_ptr(); - crate::openvr::QUAD_SHADER_COMP_SPV_LEN = QUAD_SHADER_COMP_SPV.len() as _; - crate::openvr::COLOR_SHADER_COMP_SPV_PTR = COLOR_SHADER_COMP_SPV.as_ptr(); - crate::openvr::COLOR_SHADER_COMP_SPV_LEN = COLOR_SHADER_COMP_SPV.len() as _; - crate::openvr::FFR_SHADER_COMP_SPV_PTR = FFR_SHADER_COMP_SPV.as_ptr(); - crate::openvr::FFR_SHADER_COMP_SPV_LEN = FFR_SHADER_COMP_SPV.len() as _; - crate::openvr::RGBTOYUV420_SHADER_COMP_SPV_PTR = RGBTOYUV420_SHADER_COMP_SPV.as_ptr(); - crate::openvr::RGBTOYUV420_SHADER_COMP_SPV_LEN = RGBTOYUV420_SHADER_COMP_SPV.len() as _; - } -} diff --git a/alvr/server/Cargo.toml b/alvr/server_core/Cargo.toml similarity index 74% rename from alvr/server/Cargo.toml rename to alvr/server_core/Cargo.toml index 2411258e2d..00fc6b8459 100644 --- a/alvr/server/Cargo.toml +++ b/alvr/server_core/Cargo.toml @@ -1,66 +1,56 @@ -[package] -name = "alvr_server" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -authors = ["alvr-org", "Valve Corporation"] -license = "MIT" - -[lib] -crate-type = ["cdylib"] - -[features] -gpl = [] # Enable for FFmpeg support on Windows. Always enabled on Linux -trace-performance = ["profiling/profile-with-tracy"] - -[dependencies] -alvr_audio.workspace = true -alvr_common.workspace = true -alvr_events.workspace = true -alvr_filesystem.workspace = true -alvr_packets.workspace = true -alvr_server_io.workspace = true -alvr_session.workspace = true -alvr_sockets.workspace = true - -ash = "0.38" -bincode = "1" -bytes = "1" -chrono = "0.4" -fern = "0.6" -flume = "0.11" -futures = "0.3" -headers = "0.3" -hyper = { version = "0.14", features = [ - "http2", - "server", - "stream", - "runtime", - "tcp", -] } -mdns-sd = "0.11" -profiling = { version = "1", optional = true } -reqwest = "0.11" # not used but webserver does not work without it. todo: investigate -rosc = "0.10" -tokio = { version = "1", features = [ - "rt-multi-thread", - "macros", - "process", - "io-util", - "net", - "fs", -] } -tokio-tungstenite = "0.20" -tokio-util = { version = "0.7", features = ["codec"] } -serde = "1" -serde_json = "1" -sysinfo = { version = "0.30", default-features = false } - -[build-dependencies] -alvr_filesystem = { path = "../filesystem" } -bindgen = "0.69" -cc = { version = "1", features = ["parallel"] } -walkdir = "2" - -[target.'cfg(target_os = "linux")'.build-dependencies] -pkg-config = "0.3" +[package] +name = "alvr_server_core" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors = ["alvr-org", "Valve Corporation"] +license = "MIT" + +[lib] +crate-type = ["rlib", "cdylib"] + +[features] +trace-performance = ["profiling/profile-with-tracy"] + +[dependencies] +alvr_audio.workspace = true +alvr_common.workspace = true +alvr_events.workspace = true +alvr_filesystem.workspace = true +alvr_packets.workspace = true +alvr_server_io.workspace = true +alvr_session.workspace = true +alvr_sockets.workspace = true + +ash = "0.38" +bincode = "1" +bytes = "1" +chrono = "0.4" +fern = "0.6" +flume = "0.11" +futures = "0.3" +headers = "0.3" +hyper = { version = "0.14", features = [ + "http2", + "server", + "stream", + "runtime", + "tcp", +] } +mdns-sd = "0.11" +profiling = { version = "1", optional = true } +reqwest = "0.11" # not used but webserver does not work without it. todo: investigate +rosc = "0.10" +tokio = { version = "1", features = [ + "rt-multi-thread", + "macros", + "process", + "io-util", + "net", + "fs", +] } +tokio-tungstenite = "0.20" +tokio-util = { version = "0.7", features = ["codec"] } +serde = "1" +serde_json = "1" +sysinfo = { version = "0.30", default-features = false } diff --git a/alvr/server/cbindgen.toml b/alvr/server_core/cbindgen.toml similarity index 100% rename from alvr/server/cbindgen.toml rename to alvr/server_core/cbindgen.toml diff --git a/alvr/server/src/bitrate.rs b/alvr/server_core/src/bitrate.rs similarity index 100% rename from alvr/server/src/bitrate.rs rename to alvr/server_core/src/bitrate.rs diff --git a/alvr/server/src/body_tracking.rs b/alvr/server_core/src/body_tracking.rs similarity index 100% rename from alvr/server/src/body_tracking.rs rename to alvr/server_core/src/body_tracking.rs diff --git a/alvr/server/src/c_api.rs b/alvr/server_core/src/c_api.rs similarity index 78% rename from alvr/server/src/c_api.rs rename to alvr/server_core/src/c_api.rs index fd98dc8f25..6b6176001c 100644 --- a/alvr/server/src/c_api.rs +++ b/alvr/server_core/src/c_api.rs @@ -1,4 +1,5 @@ #![allow(dead_code, unused_variables)] +#![allow(clippy::missing_safety_doc)] use crate::{logging_backend, ServerCoreContext, ServerCoreEvent, SERVER_DATA_MANAGER}; use alvr_common::{ @@ -198,22 +199,22 @@ pub unsafe extern "C" fn alvr_log_error(string_ptr: *const c_char) { alvr_common::show_e(CStr::from_ptr(string_ptr).to_string_lossy()); } -pub fn log(level: log::Level, string_ptr: *const c_char) { - unsafe { log::log!(level, "{}", CStr::from_ptr(string_ptr).to_string_lossy()) }; +pub unsafe fn log(level: log::Level, string_ptr: *const c_char) { + log::log!(level, "{}", CStr::from_ptr(string_ptr).to_string_lossy()); } #[no_mangle] -pub extern "C" fn alvr_log_warn(string_ptr: *const c_char) { +pub unsafe extern "C" fn alvr_log_warn(string_ptr: *const c_char) { log(log::Level::Warn, string_ptr); } #[no_mangle] -pub extern "C" fn alvr_log_info(string_ptr: *const c_char) { +pub unsafe extern "C" fn alvr_log_info(string_ptr: *const c_char) { log(log::Level::Info, string_ptr); } #[no_mangle] -pub extern "C" fn alvr_log_debug(string_ptr: *const c_char) { +pub unsafe extern "C" fn alvr_log_debug(string_ptr: *const c_char) { log(log::Level::Debug, string_ptr); } @@ -403,7 +404,7 @@ pub extern "C" fn alvr_advance_tracking_queue() { /// Call with null out_entries to get the buffer length /// call with non-null out_entries to get the buttons and advanced the internal queue #[no_mangle] -pub extern "C" fn alvr_get_buttons(out_entries: *mut AlvrButtonEntry) -> u64 { +pub unsafe extern "C" fn alvr_get_buttons(out_entries: *mut AlvrButtonEntry) -> u64 { let entries_count = BUTTONS_QUEUE.lock().front().map(|e| e.len()).unwrap_or(0) as u64; if out_entries.is_null() { @@ -412,13 +413,11 @@ pub extern "C" fn alvr_get_buttons(out_entries: *mut AlvrButtonEntry) -> u64 { if let Some(button_entries) = BUTTONS_QUEUE.lock().pop_front() { for (i, entry) in button_entries.into_iter().enumerate() { - unsafe { - let out_entry = &mut (*out_entries.add(i)); - out_entry.id = entry.path_id; - match entry.value { - ButtonValue::Binary(value) => out_entry.value.scalar = value, - ButtonValue::Scalar(value) => out_entry.value.float = value, - } + let out_entry = &mut (*out_entries.add(i)); + out_entry.id = entry.path_id; + match entry.value { + ButtonValue::Binary(value) => out_entry.value.scalar = value, + ButtonValue::Scalar(value) => out_entry.value.float = value, } } @@ -446,7 +445,7 @@ pub extern "C" fn alvr_send_haptics( } #[no_mangle] -pub extern "C" fn alvr_set_video_config_nals( +pub unsafe extern "C" fn alvr_set_video_config_nals( codec: AlvrCodecType, buffer_ptr: *const u8, len: i32, @@ -459,7 +458,7 @@ pub extern "C" fn alvr_set_video_config_nals( let mut config_buffer = vec![0; len as usize]; - unsafe { ptr::copy_nonoverlapping(buffer_ptr, config_buffer.as_mut_ptr(), len as usize) }; + ptr::copy_nonoverlapping(buffer_ptr, config_buffer.as_mut_ptr(), len as usize); if let Some(context) = &*SERVER_CORE_CONTEXT.read() { context.set_video_config_nals(config_buffer, codec); @@ -467,19 +466,19 @@ pub extern "C" fn alvr_set_video_config_nals( } #[no_mangle] -pub extern "C" fn alvr_send_video_nal( +pub unsafe extern "C" fn alvr_send_video_nal( timestamp_ns: u64, buffer_ptr: *mut u8, len: i32, is_idr: bool, ) { if let Some(context) = &*SERVER_CORE_CONTEXT.read() { - let buffer = unsafe { std::slice::from_raw_parts(buffer_ptr, len as usize) }; + let buffer = std::slice::from_raw_parts(buffer_ptr, len as usize); context.send_video_nal(Duration::from_nanos(timestamp_ns), buffer.to_vec(), is_idr); } } -// Returns true if updated +/// Returns true if updated #[no_mangle] pub unsafe extern "C" fn alvr_get_dynamic_encoder_params( out_params: *mut AlvrDynamicEncoderParams, @@ -520,10 +519,10 @@ pub extern "C" fn alvr_report_present(timestamp_ns: u64, offset_ns: u64) { /// Retrun true if a valid value is provided #[no_mangle] -pub extern "C" fn alvr_duration_until_next_vsync(out_ns: *mut u64) -> bool { +pub unsafe extern "C" fn alvr_duration_until_next_vsync(out_ns: *mut u64) -> bool { if let Some(context) = &*SERVER_CORE_CONTEXT.read() { if let Some(duration) = context.duration_until_next_vsync() { - unsafe { *out_ns = duration.as_nanos() as u64 }; + *out_ns = duration.as_nanos() as u64; true } else { false @@ -544,114 +543,3 @@ pub unsafe extern "C" fn alvr_restart() { pub unsafe extern "C" fn alvr_shutdown() { SERVER_CORE_CONTEXT.write().take(); } - -// // Device API: - -// // Use the two-call pattern to first get the array length then the array data. -// #[no_mangle] -// pub unsafe extern "C" fn alvr_get_devices(out_device_configs: *mut AlvrDeviceConfig) -> u64 { -// todo!() -// } - -// // After this call, previous button and tracking data is discarded -// #[no_mangle] -// pub unsafe extern "C" fn alvr_update_inputs(device_id: u64) { -// todo!() -// } - -// // Use the two-call pattern to first get the array length then the array data. -// // Data is updated after a call to alvr_update_inputs. -// #[no_mangle] -// pub unsafe extern "C" fn alvr_get_inputs( -// device_id: u64, -// out_inputs_arr: *mut AlvrInput, -// out_timestamp_ns: u64, -// ) -> u64 { -// todo!() -// } - -// // pose_id is something like /user/hand/left/input/grip/pose -// #[no_mangle] -// pub unsafe extern "C" fn alvr_get_tracked_pose( -// pose_id: u64, -// timestamp_ns: u64, -// out_relation: *mut AlvrSpaceRelation, -// ) { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_get_hand_tracking( -// device_id: u64, -// timestamp_ns: u64, -// out_joint_set: *mut AlvrJointSet, -// ) { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_view_poses( -// out_head_relation: *mut AlvrSpaceRelation, -// out_fov_arr: *mut AlvrFov, // 2 elements -// out_relative_pose_arr: *mut AlvrPose, // 2 elements -// ) { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_destroy_device(device_id: u64) { -// todo!() -// } - -// // Compositor target API: - -// This should reflect the client current framerate -// #[no_mangle] -// pub unsafe extern "C" fn alvr_get_framerate() -> f32 { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_pre_vulkan() { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_post_vulkan() { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_create_vk_target_swapchain( -// width: u32, -// height: u32, -// vk_color_format: i32, -// vk_color_space: i32, -// vk_image_usage: u32, -// vk_present_mode: i32, -// image_count: u64, -// ) { -// todo!() -// } - -// // returns vkResult -// #[no_mangle] -// pub unsafe extern "C" fn alvr_acquire_image(out_swapchain_index: u64) -> i32 { -// todo!() -// } - -// // returns vkResult -// #[no_mangle] -// pub unsafe extern "C" fn alvr_present( -// vk_queue: u64, -// swapchain_index: u64, -// timeline_semaphore_value: u64, -// timestamp_ns: u64, -// ) -> i32 { -// todo!() -// } - -// #[no_mangle] -// pub unsafe extern "C" fn alvr_destroy_vk_target_swapchain() { -// todo!() -// } diff --git a/alvr/server/src/connection.rs b/alvr/server_core/src/connection.rs similarity index 100% rename from alvr/server/src/connection.rs rename to alvr/server_core/src/connection.rs diff --git a/alvr/server/src/face_tracking.rs b/alvr/server_core/src/face_tracking.rs similarity index 100% rename from alvr/server/src/face_tracking.rs rename to alvr/server_core/src/face_tracking.rs diff --git a/alvr/server/src/hand_gestures.rs b/alvr/server_core/src/hand_gestures.rs similarity index 100% rename from alvr/server/src/hand_gestures.rs rename to alvr/server_core/src/hand_gestures.rs diff --git a/alvr/server/src/haptics.rs b/alvr/server_core/src/haptics.rs similarity index 100% rename from alvr/server/src/haptics.rs rename to alvr/server_core/src/haptics.rs diff --git a/alvr/server/src/input_mapping.rs b/alvr/server_core/src/input_mapping.rs similarity index 100% rename from alvr/server/src/input_mapping.rs rename to alvr/server_core/src/input_mapping.rs diff --git a/alvr/server/src/lib.rs b/alvr/server_core/src/lib.rs similarity index 94% rename from alvr/server/src/lib.rs rename to alvr/server_core/src/lib.rs index c9942873bb..95ee586172 100644 --- a/alvr/server/src/lib.rs +++ b/alvr/server_core/src/lib.rs @@ -7,12 +7,16 @@ mod hand_gestures; mod haptics; mod input_mapping; mod logging_backend; -mod openvr; mod sockets; mod statistics; mod tracking; mod web_server; +pub use c_api::*; +pub use input_mapping::REGISTERED_BUTTON_SET; +pub use logging_backend::init_logging; +pub use tracking::get_hand_skeleton_offsets; + use crate::connection::VideoPacket; use alvr_common::{ error, @@ -153,7 +157,7 @@ pub fn settings() -> Settings { SERVER_DATA_MANAGER.read().settings().clone() } -struct ServerCoreContext { +pub struct ServerCoreContext { lifecycle_state: Arc>, is_restarting: RelaxedAtomic, connection_context: Arc, @@ -162,7 +166,7 @@ struct ServerCoreContext { } impl ServerCoreContext { - fn new() -> Self { + pub fn new() -> Self { if SERVER_DATA_MANAGER .read() .settings() @@ -203,7 +207,7 @@ impl ServerCoreContext { } } - fn start_connection(&self) { + pub fn start_connection(&self) { // Note: Idle state is not used on the server side *self.lifecycle_state.write() = LifecycleState::Resumed; @@ -214,11 +218,11 @@ impl ServerCoreContext { })); } - fn poll_event(&self) -> Option { + pub fn poll_event(&self) -> Option { self.connection_context.events_queue.lock().pop_front() } - fn send_haptics(&self, haptics: Haptics) { + pub fn send_haptics(&self, haptics: Haptics) { let haptics_config = { let data_manager_lock = SERVER_DATA_MANAGER.read(); @@ -252,7 +256,7 @@ impl ServerCoreContext { } } - fn set_video_config_nals(&self, config_buffer: Vec, codec: CodecType) { + pub fn set_video_config_nals(&self, config_buffer: Vec, codec: CodecType) { if let Some(sender) = &*self.connection_context.video_mirror_sender.lock() { sender.send(config_buffer.clone()).ok(); } @@ -267,7 +271,7 @@ impl ServerCoreContext { }); } - fn send_video_nal(&self, target_timestamp: Duration, nal_buffer: Vec, is_idr: bool) { + pub fn send_video_nal(&self, target_timestamp: Duration, nal_buffer: Vec, is_idr: bool) { // start in the corrupts state, the client didn't receive the initial IDR yet. static STREAM_CORRUPTED: AtomicBool = AtomicBool::new(true); static LAST_IDR_INSTANT: Lazy> = Lazy::new(|| Mutex::new(Instant::now())); @@ -351,7 +355,7 @@ impl ServerCoreContext { } } - fn get_dynamic_encoder_params(&self) -> Option { + pub fn get_dynamic_encoder_params(&self) -> Option { let pair = { let server_data_lock = SERVER_DATA_MANAGER.read(); self.connection_context @@ -371,13 +375,13 @@ impl ServerCoreContext { } } - fn report_composed(&self, target_timestamp: Duration, offset: Duration) { + pub fn report_composed(&self, target_timestamp: Duration, offset: Duration) { if let Some(stats) = &mut *self.connection_context.statistics_manager.lock() { stats.report_frame_composed(target_timestamp, offset); } } - fn report_present(&self, target_timestamp: Duration, offset: Duration) { + pub fn report_present(&self, target_timestamp: Duration, offset: Duration) { if let Some(stats) = &mut *self.connection_context.statistics_manager.lock() { stats.report_frame_present(target_timestamp, offset); } @@ -389,7 +393,7 @@ impl ServerCoreContext { .report_frame_present(&server_data_lock.settings().video.bitrate.adapt_to_framerate); } - fn duration_until_next_vsync(&self) -> Option { + pub fn duration_until_next_vsync(&self) -> Option { self.connection_context .statistics_manager .lock() @@ -397,13 +401,19 @@ impl ServerCoreContext { .map(|stats| stats.duration_until_next_vsync()) } - fn restart(self) { + pub fn restart(self) { self.is_restarting.set(true); // drop is called here for self } } +impl Default for ServerCoreContext { + fn default() -> Self { + Self::new() + } +} + impl Drop for ServerCoreContext { fn drop(&mut self) { // Invoke connection runtimes shutdown diff --git a/alvr/server/src/logging_backend.rs b/alvr/server_core/src/logging_backend.rs similarity index 100% rename from alvr/server/src/logging_backend.rs rename to alvr/server_core/src/logging_backend.rs diff --git a/alvr/server/src/sockets.rs b/alvr/server_core/src/sockets.rs similarity index 100% rename from alvr/server/src/sockets.rs rename to alvr/server_core/src/sockets.rs diff --git a/alvr/server/src/statistics.rs b/alvr/server_core/src/statistics.rs similarity index 100% rename from alvr/server/src/statistics.rs rename to alvr/server_core/src/statistics.rs diff --git a/alvr/server/src/tracking.rs b/alvr/server_core/src/tracking.rs similarity index 100% rename from alvr/server/src/tracking.rs rename to alvr/server_core/src/tracking.rs diff --git a/alvr/server/src/web_server.rs b/alvr/server_core/src/web_server.rs similarity index 100% rename from alvr/server/src/web_server.rs rename to alvr/server_core/src/web_server.rs diff --git a/alvr/server_openvr/Cargo.toml b/alvr/server_openvr/Cargo.toml new file mode 100644 index 0000000000..4f71252dc7 --- /dev/null +++ b/alvr/server_openvr/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "alvr_server_openvr" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors = ["alvr-org", "Valve Corporation"] +license = "MIT" + +[lib] +crate-type = ["cdylib"] + +[features] +gpl = [] # Enable for FFmpeg support on Windows. Always enabled on Linux + +[dependencies] +alvr_common.workspace = true +alvr_filesystem.workspace = true +alvr_packets.workspace = true +alvr_server_core.workspace = true +alvr_server_io.workspace = true +alvr_session.workspace = true + +[build-dependencies] +alvr_filesystem = { path = "../filesystem" } +bindgen = "0.69" +cc = { version = "1", features = ["parallel"] } +walkdir = "2" + +[target.'cfg(target_os = "linux")'.build-dependencies] +pkg-config = "0.3" diff --git a/alvr/server/LICENSE b/alvr/server_openvr/LICENSE similarity index 100% rename from alvr/server/LICENSE rename to alvr/server_openvr/LICENSE diff --git a/alvr/server/LICENSE-Valve b/alvr/server_openvr/LICENSE-Valve similarity index 100% rename from alvr/server/LICENSE-Valve rename to alvr/server_openvr/LICENSE-Valve diff --git a/alvr/server/build.rs b/alvr/server_openvr/build.rs similarity index 100% rename from alvr/server/build.rs rename to alvr/server_openvr/build.rs diff --git a/alvr/server/cpp/ALVR-common/common-utils.cpp b/alvr/server_openvr/cpp/ALVR-common/common-utils.cpp similarity index 100% rename from alvr/server/cpp/ALVR-common/common-utils.cpp rename to alvr/server_openvr/cpp/ALVR-common/common-utils.cpp diff --git a/alvr/server/cpp/ALVR-common/common-utils.h b/alvr/server_openvr/cpp/ALVR-common/common-utils.h similarity index 100% rename from alvr/server/cpp/ALVR-common/common-utils.h rename to alvr/server_openvr/cpp/ALVR-common/common-utils.h diff --git a/alvr/server/cpp/ALVR-common/exception.cpp b/alvr/server_openvr/cpp/ALVR-common/exception.cpp similarity index 100% rename from alvr/server/cpp/ALVR-common/exception.cpp rename to alvr/server_openvr/cpp/ALVR-common/exception.cpp diff --git a/alvr/server/cpp/ALVR-common/exception.h b/alvr/server_openvr/cpp/ALVR-common/exception.h similarity index 100% rename from alvr/server/cpp/ALVR-common/exception.h rename to alvr/server_openvr/cpp/ALVR-common/exception.h diff --git a/alvr/server/cpp/ALVR-common/packet_types.h b/alvr/server_openvr/cpp/ALVR-common/packet_types.h similarity index 100% rename from alvr/server/cpp/ALVR-common/packet_types.h rename to alvr/server_openvr/cpp/ALVR-common/packet_types.h diff --git a/alvr/server/cpp/alvr_server/ChaperoneUpdater.cpp b/alvr/server_openvr/cpp/alvr_server/ChaperoneUpdater.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/ChaperoneUpdater.cpp rename to alvr/server_openvr/cpp/alvr_server/ChaperoneUpdater.cpp diff --git a/alvr/server/cpp/alvr_server/Controller.cpp b/alvr/server_openvr/cpp/alvr_server/Controller.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/Controller.cpp rename to alvr/server_openvr/cpp/alvr_server/Controller.cpp diff --git a/alvr/server/cpp/alvr_server/Controller.h b/alvr/server_openvr/cpp/alvr_server/Controller.h similarity index 100% rename from alvr/server/cpp/alvr_server/Controller.h rename to alvr/server_openvr/cpp/alvr_server/Controller.h diff --git a/alvr/server/cpp/alvr_server/FakeViveTracker.cpp b/alvr/server_openvr/cpp/alvr_server/FakeViveTracker.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/FakeViveTracker.cpp rename to alvr/server_openvr/cpp/alvr_server/FakeViveTracker.cpp diff --git a/alvr/server/cpp/alvr_server/FakeViveTracker.h b/alvr/server_openvr/cpp/alvr_server/FakeViveTracker.h similarity index 100% rename from alvr/server/cpp/alvr_server/FakeViveTracker.h rename to alvr/server_openvr/cpp/alvr_server/FakeViveTracker.h diff --git a/alvr/server/cpp/alvr_server/HMD.cpp b/alvr/server_openvr/cpp/alvr_server/HMD.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/HMD.cpp rename to alvr/server_openvr/cpp/alvr_server/HMD.cpp diff --git a/alvr/server/cpp/alvr_server/HMD.h b/alvr/server_openvr/cpp/alvr_server/HMD.h similarity index 100% rename from alvr/server/cpp/alvr_server/HMD.h rename to alvr/server_openvr/cpp/alvr_server/HMD.h diff --git a/alvr/server/cpp/alvr_server/IDRScheduler.cpp b/alvr/server_openvr/cpp/alvr_server/IDRScheduler.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/IDRScheduler.cpp rename to alvr/server_openvr/cpp/alvr_server/IDRScheduler.cpp diff --git a/alvr/server/cpp/alvr_server/IDRScheduler.h b/alvr/server_openvr/cpp/alvr_server/IDRScheduler.h similarity index 100% rename from alvr/server/cpp/alvr_server/IDRScheduler.h rename to alvr/server_openvr/cpp/alvr_server/IDRScheduler.h diff --git a/alvr/server/cpp/alvr_server/Logger.cpp b/alvr/server_openvr/cpp/alvr_server/Logger.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/Logger.cpp rename to alvr/server_openvr/cpp/alvr_server/Logger.cpp diff --git a/alvr/server/cpp/alvr_server/Logger.h b/alvr/server_openvr/cpp/alvr_server/Logger.h similarity index 100% rename from alvr/server/cpp/alvr_server/Logger.h rename to alvr/server_openvr/cpp/alvr_server/Logger.h diff --git a/alvr/server/cpp/alvr_server/NalParsing.cpp b/alvr/server_openvr/cpp/alvr_server/NalParsing.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/NalParsing.cpp rename to alvr/server_openvr/cpp/alvr_server/NalParsing.cpp diff --git a/alvr/server/cpp/alvr_server/Paths.cpp b/alvr/server_openvr/cpp/alvr_server/Paths.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/Paths.cpp rename to alvr/server_openvr/cpp/alvr_server/Paths.cpp diff --git a/alvr/server/cpp/alvr_server/Paths.h b/alvr/server_openvr/cpp/alvr_server/Paths.h similarity index 100% rename from alvr/server/cpp/alvr_server/Paths.h rename to alvr/server_openvr/cpp/alvr_server/Paths.h diff --git a/alvr/server/cpp/alvr_server/PoseHistory.cpp b/alvr/server_openvr/cpp/alvr_server/PoseHistory.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/PoseHistory.cpp rename to alvr/server_openvr/cpp/alvr_server/PoseHistory.cpp diff --git a/alvr/server/cpp/alvr_server/PoseHistory.h b/alvr/server_openvr/cpp/alvr_server/PoseHistory.h similarity index 100% rename from alvr/server/cpp/alvr_server/PoseHistory.h rename to alvr/server_openvr/cpp/alvr_server/PoseHistory.h diff --git a/alvr/server/cpp/alvr_server/Settings.cpp b/alvr/server_openvr/cpp/alvr_server/Settings.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/Settings.cpp rename to alvr/server_openvr/cpp/alvr_server/Settings.cpp diff --git a/alvr/server/cpp/alvr_server/Settings.h b/alvr/server_openvr/cpp/alvr_server/Settings.h similarity index 100% rename from alvr/server/cpp/alvr_server/Settings.h rename to alvr/server_openvr/cpp/alvr_server/Settings.h diff --git a/alvr/server/cpp/alvr_server/TrackedDevice.cpp b/alvr/server_openvr/cpp/alvr_server/TrackedDevice.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/TrackedDevice.cpp rename to alvr/server_openvr/cpp/alvr_server/TrackedDevice.cpp diff --git a/alvr/server/cpp/alvr_server/TrackedDevice.h b/alvr/server_openvr/cpp/alvr_server/TrackedDevice.h similarity index 100% rename from alvr/server/cpp/alvr_server/TrackedDevice.h rename to alvr/server_openvr/cpp/alvr_server/TrackedDevice.h diff --git a/alvr/server/cpp/alvr_server/Utils.h b/alvr/server_openvr/cpp/alvr_server/Utils.h similarity index 100% rename from alvr/server/cpp/alvr_server/Utils.h rename to alvr/server_openvr/cpp/alvr_server/Utils.h diff --git a/alvr/server/cpp/alvr_server/ViveTrackerProxy.cpp b/alvr/server_openvr/cpp/alvr_server/ViveTrackerProxy.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/ViveTrackerProxy.cpp rename to alvr/server_openvr/cpp/alvr_server/ViveTrackerProxy.cpp diff --git a/alvr/server/cpp/alvr_server/ViveTrackerProxy.h b/alvr/server_openvr/cpp/alvr_server/ViveTrackerProxy.h similarity index 100% rename from alvr/server/cpp/alvr_server/ViveTrackerProxy.h rename to alvr/server_openvr/cpp/alvr_server/ViveTrackerProxy.h diff --git a/alvr/server/cpp/alvr_server/alvr_server.cpp b/alvr/server_openvr/cpp/alvr_server/alvr_server.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/alvr_server.cpp rename to alvr/server_openvr/cpp/alvr_server/alvr_server.cpp diff --git a/alvr/server/cpp/alvr_server/bindings.h b/alvr/server_openvr/cpp/alvr_server/bindings.h similarity index 100% rename from alvr/server/cpp/alvr_server/bindings.h rename to alvr/server_openvr/cpp/alvr_server/bindings.h diff --git a/alvr/server/cpp/alvr_server/driverlog.cpp b/alvr/server_openvr/cpp/alvr_server/driverlog.cpp similarity index 100% rename from alvr/server/cpp/alvr_server/driverlog.cpp rename to alvr/server_openvr/cpp/alvr_server/driverlog.cpp diff --git a/alvr/server/cpp/alvr_server/driverlog.h b/alvr/server_openvr/cpp/alvr_server/driverlog.h similarity index 100% rename from alvr/server/cpp/alvr_server/driverlog.h rename to alvr/server_openvr/cpp/alvr_server/driverlog.h diff --git a/alvr/server/cpp/alvr_server/include/openvr_math.h b/alvr/server_openvr/cpp/alvr_server/include/openvr_math.h similarity index 100% rename from alvr/server/cpp/alvr_server/include/openvr_math.h rename to alvr/server_openvr/cpp/alvr_server/include/openvr_math.h diff --git a/alvr/server/cpp/alvr_server/include/picojson.h b/alvr/server_openvr/cpp/alvr_server/include/picojson.h similarity index 100% rename from alvr/server/cpp/alvr_server/include/picojson.h rename to alvr/server_openvr/cpp/alvr_server/include/picojson.h diff --git a/alvr/server/cpp/alvr_server/nvEncodeAPI.h b/alvr/server_openvr/cpp/alvr_server/nvEncodeAPI.h similarity index 100% rename from alvr/server/cpp/alvr_server/nvEncodeAPI.h rename to alvr/server_openvr/cpp/alvr_server/nvEncodeAPI.h diff --git a/alvr/server/cpp/alvr_server/shader/ColorCorrectionPixelShader.hlsl b/alvr/server_openvr/cpp/alvr_server/shader/ColorCorrectionPixelShader.hlsl similarity index 100% rename from alvr/server/cpp/alvr_server/shader/ColorCorrectionPixelShader.hlsl rename to alvr/server_openvr/cpp/alvr_server/shader/ColorCorrectionPixelShader.hlsl diff --git a/alvr/server/cpp/alvr_server/shader/CompressAxisAlignedPixelShader.hlsl b/alvr/server_openvr/cpp/alvr_server/shader/CompressAxisAlignedPixelShader.hlsl similarity index 100% rename from alvr/server/cpp/alvr_server/shader/CompressAxisAlignedPixelShader.hlsl rename to alvr/server_openvr/cpp/alvr_server/shader/CompressAxisAlignedPixelShader.hlsl diff --git a/alvr/server/cpp/alvr_server/shader/FoveatedRendering.hlsli b/alvr/server_openvr/cpp/alvr_server/shader/FoveatedRendering.hlsli similarity index 100% rename from alvr/server/cpp/alvr_server/shader/FoveatedRendering.hlsli rename to alvr/server_openvr/cpp/alvr_server/shader/FoveatedRendering.hlsli diff --git a/alvr/server/cpp/alvr_server/shader/FrameRender.fx b/alvr/server_openvr/cpp/alvr_server/shader/FrameRender.fx similarity index 100% rename from alvr/server/cpp/alvr_server/shader/FrameRender.fx rename to alvr/server_openvr/cpp/alvr_server/shader/FrameRender.fx diff --git a/alvr/server/cpp/alvr_server/shader/FrameRenderPS.hlsl b/alvr/server_openvr/cpp/alvr_server/shader/FrameRenderPS.hlsl similarity index 100% rename from alvr/server/cpp/alvr_server/shader/FrameRenderPS.hlsl rename to alvr/server_openvr/cpp/alvr_server/shader/FrameRenderPS.hlsl diff --git a/alvr/server/cpp/alvr_server/shader/FrameRenderVS.hlsl b/alvr/server_openvr/cpp/alvr_server/shader/FrameRenderVS.hlsl similarity index 100% rename from alvr/server/cpp/alvr_server/shader/FrameRenderVS.hlsl rename to alvr/server_openvr/cpp/alvr_server/shader/FrameRenderVS.hlsl diff --git a/alvr/server/cpp/alvr_server/shader/rgbtoyuv420.hlsl b/alvr/server_openvr/cpp/alvr_server/shader/rgbtoyuv420.hlsl similarity index 100% rename from alvr/server/cpp/alvr_server/shader/rgbtoyuv420.hlsl rename to alvr/server_openvr/cpp/alvr_server/shader/rgbtoyuv420.hlsl diff --git a/alvr/server/cpp/bin/.gitignore b/alvr/server_openvr/cpp/bin/.gitignore similarity index 100% rename from alvr/server/cpp/bin/.gitignore rename to alvr/server_openvr/cpp/bin/.gitignore diff --git a/alvr/server/cpp/bin/windows/vcruntime140_1.dll b/alvr/server_openvr/cpp/bin/windows/vcruntime140_1.dll similarity index 100% rename from alvr/server/cpp/bin/windows/vcruntime140_1.dll rename to alvr/server_openvr/cpp/bin/windows/vcruntime140_1.dll diff --git a/alvr/server/cpp/platform/linux/CEncoder.cpp b/alvr/server_openvr/cpp/platform/linux/CEncoder.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/CEncoder.cpp rename to alvr/server_openvr/cpp/platform/linux/CEncoder.cpp diff --git a/alvr/server/cpp/platform/linux/CEncoder.h b/alvr/server_openvr/cpp/platform/linux/CEncoder.h similarity index 100% rename from alvr/server/cpp/platform/linux/CEncoder.h rename to alvr/server_openvr/cpp/platform/linux/CEncoder.h diff --git a/alvr/server/cpp/platform/linux/CrashHandler.cpp b/alvr/server_openvr/cpp/platform/linux/CrashHandler.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/CrashHandler.cpp rename to alvr/server_openvr/cpp/platform/linux/CrashHandler.cpp diff --git a/alvr/server/cpp/platform/linux/EncodePipeline.cpp b/alvr/server_openvr/cpp/platform/linux/EncodePipeline.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipeline.cpp rename to alvr/server_openvr/cpp/platform/linux/EncodePipeline.cpp diff --git a/alvr/server/cpp/platform/linux/EncodePipeline.h b/alvr/server_openvr/cpp/platform/linux/EncodePipeline.h similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipeline.h rename to alvr/server_openvr/cpp/platform/linux/EncodePipeline.h diff --git a/alvr/server/cpp/platform/linux/EncodePipelineNvEnc.cpp b/alvr/server_openvr/cpp/platform/linux/EncodePipelineNvEnc.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineNvEnc.cpp rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineNvEnc.cpp diff --git a/alvr/server/cpp/platform/linux/EncodePipelineNvEnc.h b/alvr/server_openvr/cpp/platform/linux/EncodePipelineNvEnc.h similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineNvEnc.h rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineNvEnc.h diff --git a/alvr/server/cpp/platform/linux/EncodePipelineSW.cpp b/alvr/server_openvr/cpp/platform/linux/EncodePipelineSW.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineSW.cpp rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineSW.cpp diff --git a/alvr/server/cpp/platform/linux/EncodePipelineSW.h b/alvr/server_openvr/cpp/platform/linux/EncodePipelineSW.h similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineSW.h rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineSW.h diff --git a/alvr/server/cpp/platform/linux/EncodePipelineVAAPI.cpp b/alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineVAAPI.cpp rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.cpp diff --git a/alvr/server/cpp/platform/linux/EncodePipelineVAAPI.h b/alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.h similarity index 100% rename from alvr/server/cpp/platform/linux/EncodePipelineVAAPI.h rename to alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.h diff --git a/alvr/server/cpp/platform/linux/FormatConverter.cpp b/alvr/server_openvr/cpp/platform/linux/FormatConverter.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/FormatConverter.cpp rename to alvr/server_openvr/cpp/platform/linux/FormatConverter.cpp diff --git a/alvr/server/cpp/platform/linux/FormatConverter.h b/alvr/server_openvr/cpp/platform/linux/FormatConverter.h similarity index 100% rename from alvr/server/cpp/platform/linux/FormatConverter.h rename to alvr/server_openvr/cpp/platform/linux/FormatConverter.h diff --git a/alvr/server/cpp/platform/linux/FrameRender.cpp b/alvr/server_openvr/cpp/platform/linux/FrameRender.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/FrameRender.cpp rename to alvr/server_openvr/cpp/platform/linux/FrameRender.cpp diff --git a/alvr/server/cpp/platform/linux/FrameRender.h b/alvr/server_openvr/cpp/platform/linux/FrameRender.h similarity index 100% rename from alvr/server/cpp/platform/linux/FrameRender.h rename to alvr/server_openvr/cpp/platform/linux/FrameRender.h diff --git a/alvr/server/cpp/platform/linux/Renderer.cpp b/alvr/server_openvr/cpp/platform/linux/Renderer.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/Renderer.cpp rename to alvr/server_openvr/cpp/platform/linux/Renderer.cpp diff --git a/alvr/server/cpp/platform/linux/Renderer.h b/alvr/server_openvr/cpp/platform/linux/Renderer.h similarity index 100% rename from alvr/server/cpp/platform/linux/Renderer.h rename to alvr/server_openvr/cpp/platform/linux/Renderer.h diff --git a/alvr/server/cpp/platform/linux/ffmpeg_helper.cpp b/alvr/server_openvr/cpp/platform/linux/ffmpeg_helper.cpp similarity index 100% rename from alvr/server/cpp/platform/linux/ffmpeg_helper.cpp rename to alvr/server_openvr/cpp/platform/linux/ffmpeg_helper.cpp diff --git a/alvr/server/cpp/platform/linux/ffmpeg_helper.h b/alvr/server_openvr/cpp/platform/linux/ffmpeg_helper.h similarity index 100% rename from alvr/server/cpp/platform/linux/ffmpeg_helper.h rename to alvr/server_openvr/cpp/platform/linux/ffmpeg_helper.h diff --git a/alvr/server/cpp/platform/linux/protocol.h b/alvr/server_openvr/cpp/platform/linux/protocol.h similarity index 100% rename from alvr/server/cpp/platform/linux/protocol.h rename to alvr/server_openvr/cpp/platform/linux/protocol.h diff --git a/alvr/server/cpp/platform/linux/shader/color.comp b/alvr/server_openvr/cpp/platform/linux/shader/color.comp similarity index 100% rename from alvr/server/cpp/platform/linux/shader/color.comp rename to alvr/server_openvr/cpp/platform/linux/shader/color.comp diff --git a/alvr/server/cpp/platform/linux/shader/color.comp.spv b/alvr/server_openvr/cpp/platform/linux/shader/color.comp.spv similarity index 100% rename from alvr/server/cpp/platform/linux/shader/color.comp.spv rename to alvr/server_openvr/cpp/platform/linux/shader/color.comp.spv diff --git a/alvr/server/cpp/platform/linux/shader/ffr.comp b/alvr/server_openvr/cpp/platform/linux/shader/ffr.comp similarity index 100% rename from alvr/server/cpp/platform/linux/shader/ffr.comp rename to alvr/server_openvr/cpp/platform/linux/shader/ffr.comp diff --git a/alvr/server/cpp/platform/linux/shader/ffr.comp.spv b/alvr/server_openvr/cpp/platform/linux/shader/ffr.comp.spv similarity index 100% rename from alvr/server/cpp/platform/linux/shader/ffr.comp.spv rename to alvr/server_openvr/cpp/platform/linux/shader/ffr.comp.spv diff --git a/alvr/server/cpp/platform/linux/shader/quad.comp b/alvr/server_openvr/cpp/platform/linux/shader/quad.comp similarity index 100% rename from alvr/server/cpp/platform/linux/shader/quad.comp rename to alvr/server_openvr/cpp/platform/linux/shader/quad.comp diff --git a/alvr/server/cpp/platform/linux/shader/quad.comp.spv b/alvr/server_openvr/cpp/platform/linux/shader/quad.comp.spv similarity index 100% rename from alvr/server/cpp/platform/linux/shader/quad.comp.spv rename to alvr/server_openvr/cpp/platform/linux/shader/quad.comp.spv diff --git a/alvr/server/cpp/platform/linux/shader/rgbtoyuv420.comp b/alvr/server_openvr/cpp/platform/linux/shader/rgbtoyuv420.comp similarity index 100% rename from alvr/server/cpp/platform/linux/shader/rgbtoyuv420.comp rename to alvr/server_openvr/cpp/platform/linux/shader/rgbtoyuv420.comp diff --git a/alvr/server/cpp/platform/linux/shader/rgbtoyuv420.comp.spv b/alvr/server_openvr/cpp/platform/linux/shader/rgbtoyuv420.comp.spv similarity index 100% rename from alvr/server/cpp/platform/linux/shader/rgbtoyuv420.comp.spv rename to alvr/server_openvr/cpp/platform/linux/shader/rgbtoyuv420.comp.spv diff --git a/alvr/server/cpp/platform/macos/CEncoder.h b/alvr/server_openvr/cpp/platform/macos/CEncoder.h similarity index 100% rename from alvr/server/cpp/platform/macos/CEncoder.h rename to alvr/server_openvr/cpp/platform/macos/CEncoder.h diff --git a/alvr/server/cpp/platform/macos/CrashHandler.cpp b/alvr/server_openvr/cpp/platform/macos/CrashHandler.cpp similarity index 100% rename from alvr/server/cpp/platform/macos/CrashHandler.cpp rename to alvr/server_openvr/cpp/platform/macos/CrashHandler.cpp diff --git a/alvr/server/cpp/platform/win32/CEncoder.cpp b/alvr/server_openvr/cpp/platform/win32/CEncoder.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/CEncoder.cpp rename to alvr/server_openvr/cpp/platform/win32/CEncoder.cpp diff --git a/alvr/server/cpp/platform/win32/CEncoder.h b/alvr/server_openvr/cpp/platform/win32/CEncoder.h similarity index 100% rename from alvr/server/cpp/platform/win32/CEncoder.h rename to alvr/server_openvr/cpp/platform/win32/CEncoder.h diff --git a/alvr/server/cpp/platform/win32/ColorCorrectionPixelShader.cso b/alvr/server_openvr/cpp/platform/win32/ColorCorrectionPixelShader.cso similarity index 100% rename from alvr/server/cpp/platform/win32/ColorCorrectionPixelShader.cso rename to alvr/server_openvr/cpp/platform/win32/ColorCorrectionPixelShader.cso diff --git a/alvr/server/cpp/platform/win32/CompressAxisAlignedPixelShader.cso b/alvr/server_openvr/cpp/platform/win32/CompressAxisAlignedPixelShader.cso similarity index 100% rename from alvr/server/cpp/platform/win32/CompressAxisAlignedPixelShader.cso rename to alvr/server_openvr/cpp/platform/win32/CompressAxisAlignedPixelShader.cso diff --git a/alvr/server/cpp/platform/win32/CrashHandler.cpp b/alvr/server_openvr/cpp/platform/win32/CrashHandler.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/CrashHandler.cpp rename to alvr/server_openvr/cpp/platform/win32/CrashHandler.cpp diff --git a/alvr/server/cpp/platform/win32/FFR.cpp b/alvr/server_openvr/cpp/platform/win32/FFR.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/FFR.cpp rename to alvr/server_openvr/cpp/platform/win32/FFR.cpp diff --git a/alvr/server/cpp/platform/win32/FFR.h b/alvr/server_openvr/cpp/platform/win32/FFR.h similarity index 100% rename from alvr/server/cpp/platform/win32/FFR.h rename to alvr/server_openvr/cpp/platform/win32/FFR.h diff --git a/alvr/server/cpp/platform/win32/FrameRender.cpp b/alvr/server_openvr/cpp/platform/win32/FrameRender.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/FrameRender.cpp rename to alvr/server_openvr/cpp/platform/win32/FrameRender.cpp diff --git a/alvr/server/cpp/platform/win32/FrameRender.h b/alvr/server_openvr/cpp/platform/win32/FrameRender.h similarity index 100% rename from alvr/server/cpp/platform/win32/FrameRender.h rename to alvr/server_openvr/cpp/platform/win32/FrameRender.h diff --git a/alvr/server/cpp/platform/win32/FrameRenderPS.cso b/alvr/server_openvr/cpp/platform/win32/FrameRenderPS.cso similarity index 100% rename from alvr/server/cpp/platform/win32/FrameRenderPS.cso rename to alvr/server_openvr/cpp/platform/win32/FrameRenderPS.cso diff --git a/alvr/server/cpp/platform/win32/FrameRenderVS.cso b/alvr/server_openvr/cpp/platform/win32/FrameRenderVS.cso similarity index 100% rename from alvr/server/cpp/platform/win32/FrameRenderVS.cso rename to alvr/server_openvr/cpp/platform/win32/FrameRenderVS.cso diff --git a/alvr/server/cpp/platform/win32/NvCodecUtils.h b/alvr/server_openvr/cpp/platform/win32/NvCodecUtils.h similarity index 100% rename from alvr/server/cpp/platform/win32/NvCodecUtils.h rename to alvr/server_openvr/cpp/platform/win32/NvCodecUtils.h diff --git a/alvr/server/cpp/platform/win32/NvEncoder.cpp b/alvr/server_openvr/cpp/platform/win32/NvEncoder.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/NvEncoder.cpp rename to alvr/server_openvr/cpp/platform/win32/NvEncoder.cpp diff --git a/alvr/server/cpp/platform/win32/NvEncoder.h b/alvr/server_openvr/cpp/platform/win32/NvEncoder.h similarity index 100% rename from alvr/server/cpp/platform/win32/NvEncoder.h rename to alvr/server_openvr/cpp/platform/win32/NvEncoder.h diff --git a/alvr/server/cpp/platform/win32/NvEncoderD3D11.cpp b/alvr/server_openvr/cpp/platform/win32/NvEncoderD3D11.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/NvEncoderD3D11.cpp rename to alvr/server_openvr/cpp/platform/win32/NvEncoderD3D11.cpp diff --git a/alvr/server/cpp/platform/win32/NvEncoderD3D11.h b/alvr/server_openvr/cpp/platform/win32/NvEncoderD3D11.h similarity index 100% rename from alvr/server/cpp/platform/win32/NvEncoderD3D11.h rename to alvr/server_openvr/cpp/platform/win32/NvEncoderD3D11.h diff --git a/alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/OvrDirectModeComponent.cpp rename to alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp diff --git a/alvr/server/cpp/platform/win32/OvrDirectModeComponent.h b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h similarity index 100% rename from alvr/server/cpp/platform/win32/OvrDirectModeComponent.h rename to alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h diff --git a/alvr/server/cpp/platform/win32/QuadVertexShader.cso b/alvr/server_openvr/cpp/platform/win32/QuadVertexShader.cso similarity index 100% rename from alvr/server/cpp/platform/win32/QuadVertexShader.cso rename to alvr/server_openvr/cpp/platform/win32/QuadVertexShader.cso diff --git a/alvr/server/cpp/platform/win32/VideoEncoder.cpp b/alvr/server_openvr/cpp/platform/win32/VideoEncoder.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoder.cpp rename to alvr/server_openvr/cpp/platform/win32/VideoEncoder.cpp diff --git a/alvr/server/cpp/platform/win32/VideoEncoder.h b/alvr/server_openvr/cpp/platform/win32/VideoEncoder.h similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoder.h rename to alvr/server_openvr/cpp/platform/win32/VideoEncoder.h diff --git a/alvr/server/cpp/platform/win32/VideoEncoderAMF.cpp b/alvr/server_openvr/cpp/platform/win32/VideoEncoderAMF.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderAMF.cpp rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderAMF.cpp diff --git a/alvr/server/cpp/platform/win32/VideoEncoderAMF.h b/alvr/server_openvr/cpp/platform/win32/VideoEncoderAMF.h similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderAMF.h rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderAMF.h diff --git a/alvr/server/cpp/platform/win32/VideoEncoderNVENC.cpp b/alvr/server_openvr/cpp/platform/win32/VideoEncoderNVENC.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderNVENC.cpp rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderNVENC.cpp diff --git a/alvr/server/cpp/platform/win32/VideoEncoderNVENC.h b/alvr/server_openvr/cpp/platform/win32/VideoEncoderNVENC.h similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderNVENC.h rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderNVENC.h diff --git a/alvr/server/cpp/platform/win32/VideoEncoderSW.cpp b/alvr/server_openvr/cpp/platform/win32/VideoEncoderSW.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderSW.cpp rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderSW.cpp diff --git a/alvr/server/cpp/platform/win32/VideoEncoderSW.h b/alvr/server_openvr/cpp/platform/win32/VideoEncoderSW.h similarity index 100% rename from alvr/server/cpp/platform/win32/VideoEncoderSW.h rename to alvr/server_openvr/cpp/platform/win32/VideoEncoderSW.h diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/QuadVertexShader.hlsl b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/QuadVertexShader.hlsl similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/QuadVertexShader.hlsl rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/QuadVertexShader.hlsl diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipeline.cpp b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipeline.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipeline.cpp rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipeline.cpp diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipeline.h b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipeline.h similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipeline.h rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipeline.h diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.cpp b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.cpp rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.cpp diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.h b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.h similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.h rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderPipelineYUV.h diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderUtils.cpp b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderUtils.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderUtils.cpp rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderUtils.cpp diff --git a/alvr/server/cpp/platform/win32/d3d-render-utils/RenderUtils.h b/alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderUtils.h similarity index 100% rename from alvr/server/cpp/platform/win32/d3d-render-utils/RenderUtils.h rename to alvr/server_openvr/cpp/platform/win32/d3d-render-utils/RenderUtils.h diff --git a/alvr/server/cpp/platform/win32/rgbtoyuv420.cso b/alvr/server_openvr/cpp/platform/win32/rgbtoyuv420.cso similarity index 100% rename from alvr/server/cpp/platform/win32/rgbtoyuv420.cso rename to alvr/server_openvr/cpp/platform/win32/rgbtoyuv420.cso diff --git a/alvr/server/cpp/platform/win32/shared/d3drender.cpp b/alvr/server_openvr/cpp/platform/win32/shared/d3drender.cpp similarity index 100% rename from alvr/server/cpp/platform/win32/shared/d3drender.cpp rename to alvr/server_openvr/cpp/platform/win32/shared/d3drender.cpp diff --git a/alvr/server/cpp/platform/win32/shared/d3drender.h b/alvr/server_openvr/cpp/platform/win32/shared/d3drender.h similarity index 100% rename from alvr/server/cpp/platform/win32/shared/d3drender.h rename to alvr/server_openvr/cpp/platform/win32/shared/d3drender.h diff --git a/alvr/server/cpp/shared/amf/public/common/AMFFactory.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/AMFFactory.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/AMFFactory.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/AMFFactory.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/AMFFactory.h b/alvr/server_openvr/cpp/shared/amf/public/common/AMFFactory.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/AMFFactory.h rename to alvr/server_openvr/cpp/shared/amf/public/common/AMFFactory.h diff --git a/alvr/server/cpp/shared/amf/public/common/AMFMath.h b/alvr/server_openvr/cpp/shared/amf/public/common/AMFMath.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/AMFMath.h rename to alvr/server_openvr/cpp/shared/amf/public/common/AMFMath.h diff --git a/alvr/server/cpp/shared/amf/public/common/AMFSTL.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/AMFSTL.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/AMFSTL.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/AMFSTL.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/AMFSTL.h b/alvr/server_openvr/cpp/shared/amf/public/common/AMFSTL.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/AMFSTL.h rename to alvr/server_openvr/cpp/shared/amf/public/common/AMFSTL.h diff --git a/alvr/server/cpp/shared/amf/public/common/ByteArray.h b/alvr/server_openvr/cpp/shared/amf/public/common/ByteArray.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/ByteArray.h rename to alvr/server_openvr/cpp/shared/amf/public/common/ByteArray.h diff --git a/alvr/server/cpp/shared/amf/public/common/CPUCaps.h b/alvr/server_openvr/cpp/shared/amf/public/common/CPUCaps.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/CPUCaps.h rename to alvr/server_openvr/cpp/shared/amf/public/common/CPUCaps.h diff --git a/alvr/server/cpp/shared/amf/public/common/CurrentTimeImpl.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/CurrentTimeImpl.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/CurrentTimeImpl.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/CurrentTimeImpl.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/CurrentTimeImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/CurrentTimeImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/CurrentTimeImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/CurrentTimeImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/DataStream.h b/alvr/server_openvr/cpp/shared/amf/public/common/DataStream.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStream.h rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStream.h diff --git a/alvr/server/cpp/shared/amf/public/common/DataStreamFactory.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFactory.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStreamFactory.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFactory.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/DataStreamFile.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFile.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStreamFile.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFile.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/DataStreamFile.h b/alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFile.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStreamFile.h rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStreamFile.h diff --git a/alvr/server/cpp/shared/amf/public/common/DataStreamMemory.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/DataStreamMemory.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStreamMemory.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStreamMemory.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/DataStreamMemory.h b/alvr/server_openvr/cpp/shared/amf/public/common/DataStreamMemory.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/DataStreamMemory.h rename to alvr/server_openvr/cpp/shared/amf/public/common/DataStreamMemory.h diff --git a/alvr/server/cpp/shared/amf/public/common/IOCapsImpl.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/IOCapsImpl.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/IOCapsImpl.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/IOCapsImpl.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/IOCapsImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/IOCapsImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/IOCapsImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/IOCapsImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/InterfaceImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/InterfaceImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/InterfaceImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/InterfaceImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/ObservableImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/ObservableImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/ObservableImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/ObservableImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/PropertyStorageExImpl.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageExImpl.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/PropertyStorageExImpl.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageExImpl.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/PropertyStorageExImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageExImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/PropertyStorageExImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageExImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/PropertyStorageImpl.h b/alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageImpl.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/PropertyStorageImpl.h rename to alvr/server_openvr/cpp/shared/amf/public/common/PropertyStorageImpl.h diff --git a/alvr/server/cpp/shared/amf/public/common/Thread.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/Thread.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/Thread.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/Thread.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/Thread.h b/alvr/server_openvr/cpp/shared/amf/public/common/Thread.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/Thread.h rename to alvr/server_openvr/cpp/shared/amf/public/common/Thread.h diff --git a/alvr/server/cpp/shared/amf/public/common/TraceAdapter.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/TraceAdapter.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/TraceAdapter.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/TraceAdapter.cpp diff --git a/alvr/server/cpp/shared/amf/public/common/TraceAdapter.h b/alvr/server_openvr/cpp/shared/amf/public/common/TraceAdapter.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/TraceAdapter.h rename to alvr/server_openvr/cpp/shared/amf/public/common/TraceAdapter.h diff --git a/alvr/server/cpp/shared/amf/public/common/Windows/ThreadWindows.cpp b/alvr/server_openvr/cpp/shared/amf/public/common/Windows/ThreadWindows.cpp similarity index 100% rename from alvr/server/cpp/shared/amf/public/common/Windows/ThreadWindows.cpp rename to alvr/server_openvr/cpp/shared/amf/public/common/Windows/ThreadWindows.cpp diff --git a/alvr/server/cpp/shared/amf/public/include/components/Ambisonic2SRenderer.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/Ambisonic2SRenderer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/Ambisonic2SRenderer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/Ambisonic2SRenderer.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/AudioCapture.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/AudioCapture.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/AudioCapture.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/AudioCapture.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/Capture.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/Capture.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/Capture.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/Capture.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/ChromaKey.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/ChromaKey.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/ChromaKey.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/ChromaKey.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/ColorSpace.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/ColorSpace.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/ColorSpace.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/ColorSpace.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/Component.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/Component.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/Component.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/Component.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/ComponentCaps.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/ComponentCaps.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/ComponentCaps.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/ComponentCaps.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/CursorCapture.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/CursorCapture.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/CursorCapture.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/CursorCapture.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/DisplayCapture.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/DisplayCapture.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/DisplayCapture.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/DisplayCapture.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioConverter.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioConverter.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioConverter.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioConverter.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioDecoder.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioDecoder.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioDecoder.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioDecoder.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioEncoder.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioEncoder.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGAudioEncoder.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGAudioEncoder.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGComponents.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGComponents.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGComponents.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGComponents.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderAV1.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderAV1.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderAV1.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderAV1.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderH264.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderH264.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderH264.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderH264.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderHEVC.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderHEVC.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGEncoderHEVC.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGEncoderHEVC.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGFileDemuxer.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGFileDemuxer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGFileDemuxer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGFileDemuxer.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGFileMuxer.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGFileMuxer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGFileMuxer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGFileMuxer.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FFMPEGVideoDecoder.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGVideoDecoder.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FFMPEGVideoDecoder.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FFMPEGVideoDecoder.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/FRC.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/FRC.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/FRC.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/FRC.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/HQScaler.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/HQScaler.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/HQScaler.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/HQScaler.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/MediaSource.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/MediaSource.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/MediaSource.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/MediaSource.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/PreAnalysis.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/PreAnalysis.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/PreAnalysis.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/PreAnalysis.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/PreProcessing.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/PreProcessing.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/PreProcessing.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/PreProcessing.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/SupportedCodecs.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/SupportedCodecs.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/SupportedCodecs.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/SupportedCodecs.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VQEnhancer.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VQEnhancer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VQEnhancer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VQEnhancer.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoCapture.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoCapture.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoCapture.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoCapture.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoConverter.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoConverter.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoConverter.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoConverter.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoDecoderUVD.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoDecoderUVD.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoDecoderUVD.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoDecoderUVD.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoEncoderAV1.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderAV1.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoEncoderAV1.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderAV1.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoEncoderHEVC.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderHEVC.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoEncoderHEVC.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderHEVC.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoEncoderVCE.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderVCE.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoEncoderVCE.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoEncoderVCE.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/VideoStitch.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/VideoStitch.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/VideoStitch.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/VideoStitch.h diff --git a/alvr/server/cpp/shared/amf/public/include/components/ZCamLiveStream.h b/alvr/server_openvr/cpp/shared/amf/public/include/components/ZCamLiveStream.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/components/ZCamLiveStream.h rename to alvr/server_openvr/cpp/shared/amf/public/include/components/ZCamLiveStream.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/AudioBuffer.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/AudioBuffer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/AudioBuffer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/AudioBuffer.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Buffer.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Buffer.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Buffer.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Buffer.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Compute.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Compute.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Compute.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Compute.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/ComputeFactory.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/ComputeFactory.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/ComputeFactory.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/ComputeFactory.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Context.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Context.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Context.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Context.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/CurrentTime.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/CurrentTime.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/CurrentTime.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/CurrentTime.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/D3D12AMF.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/D3D12AMF.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/D3D12AMF.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/D3D12AMF.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Data.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Data.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Data.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Data.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Debug.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Debug.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Debug.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Debug.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Dump.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Dump.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Dump.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Dump.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Factory.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Factory.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Factory.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Factory.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Interface.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Interface.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Interface.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Interface.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Plane.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Plane.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Plane.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Plane.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Platform.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Platform.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Platform.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Platform.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/PropertyStorage.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/PropertyStorage.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/PropertyStorage.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/PropertyStorage.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/PropertyStorageEx.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/PropertyStorageEx.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/PropertyStorageEx.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/PropertyStorageEx.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Result.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Result.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Result.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Result.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Surface.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Surface.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Surface.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Surface.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Trace.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Trace.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Trace.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Trace.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Variant.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Variant.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Variant.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Variant.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/Version.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/Version.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/Version.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/Version.h diff --git a/alvr/server/cpp/shared/amf/public/include/core/VulkanAMF.h b/alvr/server_openvr/cpp/shared/amf/public/include/core/VulkanAMF.h similarity index 100% rename from alvr/server/cpp/shared/amf/public/include/core/VulkanAMF.h rename to alvr/server_openvr/cpp/shared/amf/public/include/core/VulkanAMF.h diff --git a/alvr/server/cpp/shared/backward.cpp b/alvr/server_openvr/cpp/shared/backward.cpp similarity index 100% rename from alvr/server/cpp/shared/backward.cpp rename to alvr/server_openvr/cpp/shared/backward.cpp diff --git a/alvr/server/cpp/shared/backward.hpp b/alvr/server_openvr/cpp/shared/backward.hpp similarity index 100% rename from alvr/server/cpp/shared/backward.hpp rename to alvr/server_openvr/cpp/shared/backward.hpp diff --git a/alvr/server/cpp/shared/threadtools.cpp b/alvr/server_openvr/cpp/shared/threadtools.cpp similarity index 100% rename from alvr/server/cpp/shared/threadtools.cpp rename to alvr/server_openvr/cpp/shared/threadtools.cpp diff --git a/alvr/server/cpp/shared/threadtools.h b/alvr/server_openvr/cpp/shared/threadtools.h similarity index 100% rename from alvr/server/cpp/shared/threadtools.h rename to alvr/server_openvr/cpp/shared/threadtools.h diff --git a/alvr/server_openvr/src/graphics.rs b/alvr/server_openvr/src/graphics.rs new file mode 100644 index 0000000000..1e27d97a8b --- /dev/null +++ b/alvr/server_openvr/src/graphics.rs @@ -0,0 +1,39 @@ +static FRAME_RENDER_VS_CSO: &[u8] = include_bytes!("../cpp/platform/win32/FrameRenderVS.cso"); +static FRAME_RENDER_PS_CSO: &[u8] = include_bytes!("../cpp/platform/win32/FrameRenderPS.cso"); +static QUAD_SHADER_CSO: &[u8] = include_bytes!("../cpp/platform/win32/QuadVertexShader.cso"); +static COMPRESS_AXIS_ALIGNED_CSO: &[u8] = + include_bytes!("../cpp/platform/win32/CompressAxisAlignedPixelShader.cso"); +static COLOR_CORRECTION_CSO: &[u8] = + include_bytes!("../cpp/platform/win32/ColorCorrectionPixelShader.cso"); +static RGBTOYUV420_CSO: &[u8] = include_bytes!("../cpp/platform/win32/rgbtoyuv420.cso"); + +static QUAD_SHADER_COMP_SPV: &[u8] = include_bytes!("../cpp/platform/linux/shader/quad.comp.spv"); +static COLOR_SHADER_COMP_SPV: &[u8] = include_bytes!("../cpp/platform/linux/shader/color.comp.spv"); +static FFR_SHADER_COMP_SPV: &[u8] = include_bytes!("../cpp/platform/linux/shader/ffr.comp.spv"); +static RGBTOYUV420_SHADER_COMP_SPV: &[u8] = + include_bytes!("../cpp/platform/linux/shader/rgbtoyuv420.comp.spv"); + +pub fn initialize_shaders() { + unsafe { + crate::FRAME_RENDER_VS_CSO_PTR = FRAME_RENDER_VS_CSO.as_ptr(); + crate::FRAME_RENDER_VS_CSO_LEN = FRAME_RENDER_VS_CSO.len() as _; + crate::FRAME_RENDER_PS_CSO_PTR = FRAME_RENDER_PS_CSO.as_ptr(); + crate::FRAME_RENDER_PS_CSO_LEN = FRAME_RENDER_PS_CSO.len() as _; + crate::QUAD_SHADER_CSO_PTR = QUAD_SHADER_CSO.as_ptr(); + crate::QUAD_SHADER_CSO_LEN = QUAD_SHADER_CSO.len() as _; + crate::COMPRESS_AXIS_ALIGNED_CSO_PTR = COMPRESS_AXIS_ALIGNED_CSO.as_ptr(); + crate::COMPRESS_AXIS_ALIGNED_CSO_LEN = COMPRESS_AXIS_ALIGNED_CSO.len() as _; + crate::COLOR_CORRECTION_CSO_PTR = COLOR_CORRECTION_CSO.as_ptr(); + crate::COLOR_CORRECTION_CSO_LEN = COLOR_CORRECTION_CSO.len() as _; + crate::RGBTOYUV420_CSO_PTR = RGBTOYUV420_CSO.as_ptr(); + crate::RGBTOYUV420_CSO_LEN = RGBTOYUV420_CSO.len() as _; + crate::QUAD_SHADER_COMP_SPV_PTR = QUAD_SHADER_COMP_SPV.as_ptr(); + crate::QUAD_SHADER_COMP_SPV_LEN = QUAD_SHADER_COMP_SPV.len() as _; + crate::COLOR_SHADER_COMP_SPV_PTR = COLOR_SHADER_COMP_SPV.as_ptr(); + crate::COLOR_SHADER_COMP_SPV_LEN = COLOR_SHADER_COMP_SPV.len() as _; + crate::FFR_SHADER_COMP_SPV_PTR = FFR_SHADER_COMP_SPV.as_ptr(); + crate::FFR_SHADER_COMP_SPV_LEN = FFR_SHADER_COMP_SPV.len() as _; + crate::RGBTOYUV420_SHADER_COMP_SPV_PTR = RGBTOYUV420_SHADER_COMP_SPV.as_ptr(); + crate::RGBTOYUV420_SHADER_COMP_SPV_LEN = RGBTOYUV420_SHADER_COMP_SPV.len() as _; + } +} diff --git a/alvr/server/src/openvr/mod.rs b/alvr/server_openvr/src/lib.rs similarity index 94% rename from alvr/server/src/openvr/mod.rs rename to alvr/server_openvr/src/lib.rs index a728a7cd6e..03ef389645 100644 --- a/alvr/server/src/openvr/mod.rs +++ b/alvr/server_openvr/src/lib.rs @@ -14,16 +14,13 @@ mod bindings { } use bindings::*; -use crate::{ - input_mapping::REGISTERED_BUTTON_SET, logging_backend, ServerCoreContext, ServerCoreEvent, - SERVER_DATA_MANAGER, -}; use alvr_common::{ error, once_cell::sync::Lazy, parking_lot::RwLock, warn, BUTTON_INFO, HAND_LEFT_ID, HAND_RIGHT_ID, }; use alvr_filesystem as afs; use alvr_packets::{ButtonValue, Haptics}; +use alvr_server_core::{ServerCoreContext, ServerCoreEvent, REGISTERED_BUTTON_SET}; use alvr_session::CodecType; use std::{ ffi::{c_char, c_void, CString}, @@ -38,7 +35,7 @@ static FILESYSTEM_LAYOUT: Lazy = Lazy::new(|| { }); static SERVER_CORE_CONTEXT: Lazy>> = Lazy::new(|| { - logging_backend::init_logging(); + alvr_server_core::init_logging(); unsafe { g_sessionPath = CString::new(FILESYSTEM_LAYOUT.session().to_string_lossy().to_string()) @@ -57,12 +54,12 @@ static SERVER_CORE_CONTEXT: Lazy>> = Lazy::new( graphics::initialize_shaders(); unsafe { - LogError = Some(crate::c_api::alvr_log_error); - LogWarn = Some(crate::c_api::alvr_log_warn); - LogInfo = Some(crate::c_api::alvr_log_info); - LogDebug = Some(crate::c_api::alvr_log_debug); - LogPeriodically = Some(crate::c_api::alvr_log_periodically); - PathStringToHash = Some(crate::c_api::alvr_path_to_id); + LogError = Some(alvr_server_core::alvr_log_error); + LogWarn = Some(alvr_server_core::alvr_log_warn); + LogInfo = Some(alvr_server_core::alvr_log_info); + LogDebug = Some(alvr_server_core::alvr_log_debug); + LogPeriodically = Some(alvr_server_core::alvr_log_periodically); + PathStringToHash = Some(alvr_server_core::alvr_path_to_id); CppInit(); } @@ -145,8 +142,7 @@ extern "C" fn driver_ready_idle(set_default_chap: bool) { let controllers_config; let track_body; { - let data_lock = SERVER_DATA_MANAGER.read(); - let headset_config = &data_lock.settings().headset; + let headset_config = &alvr_server_core::settings().headset; controllers_config = headset_config.controllers.clone().into_option(); track_body = headset_config.body_tracking.enabled(); @@ -160,8 +156,7 @@ extern "C" fn driver_ready_idle(set_default_chap: bool) { let left_openvr_hand_skeleton; let right_openvr_hand_skeleton; { - let data_manager_lock = SERVER_DATA_MANAGER.read(); - let headset_config = &data_manager_lock.settings().headset; + let headset_config = &alvr_server_core::settings().headset; left_openvr_hand_skeleton = tracking.hand_skeletons[0].map(|s| { tracking::to_openvr_hand_skeleton(headset_config, *HAND_LEFT_ID, s) @@ -360,9 +355,7 @@ extern "C" fn report_present(timestamp_ns: u64, offset_ns: u64) { extern "C" fn wait_for_vsync() { // NB: don't sleep while locking SERVER_DATA_MANAGER or SERVER_CORE_CONTEXT - let sleep_duration = if SERVER_DATA_MANAGER - .read() - .settings() + let sleep_duration = if alvr_server_core::settings() .video .optimize_game_render_latency { diff --git a/alvr/server/src/openvr/props.rs b/alvr/server_openvr/src/props.rs similarity index 98% rename from alvr/server/src/openvr/props.rs rename to alvr/server_openvr/src/props.rs index 6567619d89..57fef8b9d5 100644 --- a/alvr/server/src/openvr/props.rs +++ b/alvr/server_openvr/src/props.rs @@ -2,12 +2,11 @@ // todo: fill out more properties for headset and controllers // todo: add more emulation modes -use crate::openvr::{ +use crate::{ FfiOpenvrProperty, FfiOpenvrPropertyType_Bool, FfiOpenvrPropertyType_Double, FfiOpenvrPropertyType_Float, FfiOpenvrPropertyType_Int32, FfiOpenvrPropertyType_String, FfiOpenvrPropertyType_Uint64, FfiOpenvrPropertyType_Vector3, FfiOpenvrPropertyValue, }; -use crate::SERVER_DATA_MANAGER; use alvr_common::{info, settings_schema::Switch, HAND_LEFT_ID, HAND_RIGHT_ID, HEAD_ID}; use alvr_session::{ ControllersEmulationMode, HeadsetEmulationMode, OpenvrPropValue, OpenvrProperty, @@ -59,8 +58,7 @@ pub fn to_ffi_openvr_prop(prop: OpenvrProperty) -> FfiOpenvrProperty { } fn serial_number(device_id: u64) -> String { - let data_manager_lock = SERVER_DATA_MANAGER.read(); - let settings = data_manager_lock.settings(); + let settings = alvr_server_core::settings(); if device_id == *HEAD_ID { match &settings.headset.emulation_mode { @@ -113,14 +111,13 @@ pub extern "C" fn get_serial_number(device_id: u64, out_str: *mut c_char) -> u64 pub extern "C" fn set_device_openvr_props(device_id: u64) { use OpenvrProperty::*; - let data_manager_lock = SERVER_DATA_MANAGER.read(); - let settings = data_manager_lock.settings(); + let settings = alvr_server_core::settings(); if device_id == *HEAD_ID { fn set_prop(prop: OpenvrProperty) { info!("Setting head OpenVR prop: {prop:?}"); unsafe { - crate::openvr::SetOpenvrProperty(*HEAD_ID, to_ffi_openvr_prop(prop)); + crate::SetOpenvrProperty(*HEAD_ID, to_ffi_openvr_prop(prop)); } } @@ -238,7 +235,7 @@ pub extern "C" fn set_device_openvr_props(device_id: u64) { } ); unsafe { - crate::openvr::SetOpenvrProperty(device_id, to_ffi_openvr_prop(prop)); + crate::SetOpenvrProperty(device_id, to_ffi_openvr_prop(prop)); } }; diff --git a/alvr/server/src/openvr/tracking.rs b/alvr/server_openvr/src/tracking.rs similarity index 97% rename from alvr/server/src/openvr/tracking.rs rename to alvr/server_openvr/src/tracking.rs index cdb0d43cd3..64bc36a0bb 100644 --- a/alvr/server/src/openvr/tracking.rs +++ b/alvr/server_openvr/src/tracking.rs @@ -1,5 +1,4 @@ -use crate::openvr::{FfiBodyTracker, FfiDeviceMotion, FfiHandSkeleton, FfiQuat}; -use crate::tracking; +use crate::{FfiBodyTracker, FfiDeviceMotion, FfiHandSkeleton, FfiQuat}; use alvr_common::{ glam::{EulerRot, Quat, Vec3}, once_cell::sync::Lazy, @@ -27,7 +26,7 @@ pub fn to_openvr_hand_skeleton( hand_skeleton: [Pose; 26], ) -> [Pose; 31] { let (left_hand_skeleton_offset, right_hand_skeleton_offset) = - tracking::get_hand_skeleton_offsets(config); + alvr_server_core::get_hand_skeleton_offsets(config); let id = device_id; // global joints diff --git a/alvr/vrcompositor_wrapper/drm-lease-shim.cpp b/alvr/vrcompositor_wrapper/drm-lease-shim.cpp index 6b174d98de..6d2a49c43b 100644 --- a/alvr/vrcompositor_wrapper/drm-lease-shim.cpp +++ b/alvr/vrcompositor_wrapper/drm-lease-shim.cpp @@ -10,7 +10,7 @@ #include #define PICOJSON_USE_INT64 -#include "../server/cpp/alvr_server/include/picojson.h" +#include "../server_openvr/cpp/alvr_server/include/picojson.h" #define LOAD_FN(f) \ if (!real_##f) { \ diff --git a/alvr/vulkan_layer/build.rs b/alvr/vulkan_layer/build.rs index d4db862492..905aa01980 100644 --- a/alvr/vulkan_layer/build.rs +++ b/alvr/vulkan_layer/build.rs @@ -5,7 +5,7 @@ fn main() { let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); let cpp_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); let server_cpp_dir = - PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("../server/cpp"); + PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("../server_openvr/cpp"); let vulkan = pkg_config::Config::new().probe("vulkan").unwrap(); let libunwind = pkg_config::Config::new().probe("libunwind").unwrap(); diff --git a/alvr/xtask/src/build.rs b/alvr/xtask/src/build.rs index c98605fd11..269004b901 100644 --- a/alvr/xtask/src/build.rs +++ b/alvr/xtask/src/build.rs @@ -30,7 +30,6 @@ impl Display for Profile { pub fn build_server_lib( profile: Profile, enable_messagebox: bool, - gpl: bool, root: Option, reproducible: bool, ) { @@ -49,10 +48,6 @@ pub fn build_server_lib( flags.push("--features"); flags.push("alvr_common/enable-messagebox"); } - if gpl { - flags.push("--features"); - flags.push("gpl"); - } if reproducible { flags.push("--locked"); } @@ -67,11 +62,11 @@ pub fn build_server_lib( sh.set_var("ALVR_ROOT_DIR", root); } - let _push_guard = sh.push_dir(afs::crate_dir("server")); + let _push_guard = sh.push_dir(afs::crate_dir("server_core")); cmd!(sh, "cargo build {flags_ref...}").run().unwrap(); sh.copy_file( - artifacts_dir.join(afs::dynlib_fname("alvr_server")), + artifacts_dir.join(afs::dynlib_fname("alvr_server_core")), &build_dir, ) .unwrap(); @@ -140,10 +135,10 @@ pub fn build_streamer( { let gpl_flag = gpl.then(|| vec!["--features", "gpl"]).unwrap_or_default(); let profiling_flag = profiling - .then(|| vec!["--features", "trace-performance"]) + .then(|| vec!["--features", "alvr_server_core/trace-performance"]) .unwrap_or_default(); - let _push_guard = sh.push_dir(afs::crate_dir("server")); + let _push_guard = sh.push_dir(afs::crate_dir("server_openvr")); cmd!( sh, "cargo build {common_flags_ref...} {gpl_flag...} {profiling_flag...}" @@ -152,14 +147,14 @@ pub fn build_streamer( .unwrap(); sh.copy_file( - artifacts_dir.join(afs::dynlib_fname("alvr_server")), + artifacts_dir.join(afs::dynlib_fname("alvr_server_openvr")), build_layout.openvr_driver_lib(), ) .unwrap(); if cfg!(windows) { sh.copy_file( - artifacts_dir.join("alvr_server.pdb"), + artifacts_dir.join("alvr_server_openvr.pdb"), build_layout .openvr_driver_lib_dir() .join("driver_alvr_server.pdb"), @@ -191,7 +186,7 @@ pub fn build_streamer( // Bring along the c++ runtime command::copy_recursive( &sh, - &afs::crate_dir("server").join("cpp/bin/windows"), + &afs::crate_dir("server_openvr").join("cpp/bin/windows"), &build_layout.openvr_driver_lib_dir(), ) .unwrap(); diff --git a/alvr/xtask/src/format.rs b/alvr/xtask/src/format.rs index ee91c52878..ef457bf0b8 100644 --- a/alvr/xtask/src/format.rs +++ b/alvr/xtask/src/format.rs @@ -6,7 +6,7 @@ use walkdir::WalkDir; use xshell::{cmd, Shell}; fn files_to_format_paths() -> Vec { - let cpp_dir = afs::crate_dir("server").join("cpp"); + let cpp_dir = afs::crate_dir("server_openvr").join("cpp"); WalkDir::new(cpp_dir) .into_iter() diff --git a/alvr/xtask/src/main.rs b/alvr/xtask/src/main.rs index d13ede79df..bb39c08881 100644 --- a/alvr/xtask/src/main.rs +++ b/alvr/xtask/src/main.rs @@ -197,7 +197,7 @@ fn main() { build::build_streamer(profile, true, gpl, None, false, profiling, keep_config) } "build-launcher" => build::build_launcher(profile, true, false), - "build-server-lib" => build::build_server_lib(profile, true, gpl, None, false), + "build-server-lib" => build::build_server_lib(profile, true, None, false), "build-client" => build::build_android_client(profile), "build-client-lib" => build::build_android_client_core_lib(profile, link_stdcpp), "build-client-xr-lib" => { diff --git a/alvr/xtask/src/packaging.rs b/alvr/xtask/src/packaging.rs index 0cfdc9f2cb..268d8b80b0 100644 --- a/alvr/xtask/src/packaging.rs +++ b/alvr/xtask/src/packaging.rs @@ -123,7 +123,7 @@ pub fn include_licenses(root_path: &Path, gpl: bool) { ) .unwrap(); sh.copy_file( - afs::crate_dir("server").join("LICENSE-Valve"), + afs::crate_dir("server_openvr").join("LICENSE-Valve"), licenses_dir.join("Valve.txt"), ) .unwrap(); diff --git a/alvr/xtask/src/version.rs b/alvr/xtask/src/version.rs index 7a3967ea28..64f199b49f 100644 --- a/alvr/xtask/src/version.rs +++ b/alvr/xtask/src/version.rs @@ -63,7 +63,7 @@ pub fn check_msrv() { .unwrap(); cmd!( sh, - "cargo msrv verify --output-format json --path alvr/server" + "cargo msrv verify --output-format json --path alvr/server_openvr" ) .run() .unwrap(); @@ -73,4 +73,16 @@ pub fn check_msrv() { ) .run() .unwrap(); + cmd!( + sh, + "cargo msrv verify --output-format json --path alvr/launcher" + ) + .run() + .unwrap(); + cmd!( + sh, + "cargo msrv verify --output-format json --path alvr/client_openxr" + ) + .run() + .unwrap(); }