From 34d3576327fe75d118237ae8fa519461499a0d4f Mon Sep 17 00:00:00 2001 From: Nir-Az Date: Tue, 5 Apr 2022 16:29:30 +0300 Subject: [PATCH] move utilities to librealsense include dir --- common/CMakeLists.txt | 135 ++++--- common/metadata-helper.cpp | 2 +- common/model-views.cpp | 2 +- common/model-views.h | 4 +- common/on-chip-calib.h | 2 +- common/os.cpp | 2 +- common/output-model.h | 2 +- common/parser.hpp | 2 +- common/realsense-ui-advanced-mode.h | 2 +- common/rendering.h | 2 +- common/utilities/CMakeLists.txt | 9 - common/utilities/imgui/wrap.cpp | 2 +- common/utilities/time/l500/get-mfr-ww.h | 2 +- common/viewer.cpp | 2 +- common/windows-app-bootstrap.cpp | 2 +- include/CMakeLists.txt | 5 +- .../librealsense2/utilities/CMakeLists.txt | 9 + .../utilities/concurrency/CMakeLists.txt | 7 + .../utilities/concurrency}/concurrency.h | 0 .../utilities/concurrency}/dispatcher.cpp | 5 +- .../utilities/easylogging/CMakeLists.txt | 6 + .../utilities/easylogging}/easyloggingpp.h | 0 .../utilities/number/CMakeLists.txt | 6 + .../utilities/number/stabilized-value.h | 0 .../utilities/os/CMakeLists.txt | 0 .../librealsense2}/utilities/os/hresult.h | 2 +- .../utilities/string/CMakeLists.txt | 16 + .../librealsense2}/utilities/string/split.h | 0 .../utilities/string/string-utilities.h | 0 .../utilities/string/trim-newlines.h | 0 .../librealsense2}/utilities/string/windows.h | 0 .../utilities/time/CMakeLists.txt | 12 + .../librealsense2}/utilities/time/common.h | 0 .../utilities/time/periodic-timer.h | 0 .../librealsense2}/utilities/time/stopwatch.h | 0 .../librealsense2}/utilities/time/timer.h | 0 .../utilities/time/waiting-on.h | 346 +++++++++--------- .../utilities/time/work-week.cpp | 2 +- .../librealsense2/utilities/time/work-week.h | 0 scripts/api_check.sh | 4 +- src/CMakeLists.txt | 3 - src/algo.h | 2 +- src/error-handling.h | 2 +- src/gl/synthetic-stream-gl.h | 2 +- src/hid/hid-device.h | 2 +- src/l500/l500-device.cpp | 4 +- src/librealsense-exception.h | 2 +- src/libusb/context-libusb.h | 2 +- src/linux/udev-device-watcher.h | 2 +- src/media/playback/playback_device.h | 2 +- src/media/playback/playback_sensor.h | 2 +- src/media/record/record_device.h | 2 +- src/media/record/record_sensor.h | 2 +- src/mf/mf-hid.cpp | 2 +- src/mf/mf-uvc.cpp | 2 +- src/polling-device-watcher.h | 2 +- src/source.h | 2 +- src/types.h | 4 +- src/usbhost/messenger-usbhost.h | 2 +- src/uvc/uvc-device.h | 2 +- src/win/win-helpers.cpp | 2 +- src/win/win-helpers.h | 2 +- src/winusb/enumerator-winusb.cpp | 2 +- .../filesystem/glob.h | 2 +- tools/fw-logger/rs-fw-logger.cpp | 2 +- tools/terminal/CMakeLists.txt | 1 - tools/terminal/rs-terminal.cpp | 2 +- unit-tests/live/alt-ir/alt-ir-common.h | 2 +- unit-tests/live/hw-errors/error-common.h | 2 +- unit-tests/live/presets/presets-common.h | 2 +- .../unit-tests-post-processing-from-bag.cpp | 2 +- .../utilities/concurrency/test-dispatcher.cpp | 6 +- unit-tests/utilities/concurrency/test-scq.cpp | 6 +- .../number/stabilized/test-60-percent.cpp | 4 +- .../number/stabilized/test-change-percent.cpp | 4 +- .../number/stabilized/test-empty.cpp | 4 +- .../stabilized/test-flickering-value.cpp | 4 +- .../number/stabilized/test-illegal-input.cpp | 4 +- .../stabilized/test-multi-threading.cpp | 4 +- .../number/stabilized/test-not-full.cpp | 4 +- .../number/stabilized/test-same-value.cpp | 4 +- .../stabilized/test-stay-last-value.cpp | 4 +- .../number/stabilized/test-update-value.cpp | 4 +- unit-tests/utilities/string/test-split.cpp | 4 +- .../utilities/string/test-string-to-value.cpp | 2 +- .../utilities/string/test-trim-newlines.cpp | 2 +- unit-tests/utilities/time/test-l500-mfr.cpp | 6 +- .../utilities/time/test-periodic_timer.cpp | 4 +- unit-tests/utilities/time/test-stopwatch.cpp | 4 +- unit-tests/utilities/time/test-timer.cpp | 4 +- unit-tests/utilities/time/test-waiting-on.cpp | 4 +- unit-tests/utilities/time/test-work_week.cpp | 7 +- .../opencv/latency-tool/latency-detector.h | 2 +- wrappers/python/CMakeLists.txt | 2 +- 94 files changed, 393 insertions(+), 358 deletions(-) create mode 100644 include/librealsense2/utilities/CMakeLists.txt create mode 100644 include/librealsense2/utilities/concurrency/CMakeLists.txt rename {src => include/librealsense2/utilities/concurrency}/concurrency.h (100%) rename {src => include/librealsense2/utilities/concurrency}/dispatcher.cpp (97%) create mode 100644 include/librealsense2/utilities/easylogging/CMakeLists.txt rename {src => include/librealsense2/utilities/easylogging}/easyloggingpp.h (100%) create mode 100644 include/librealsense2/utilities/number/CMakeLists.txt rename {common => include/librealsense2}/utilities/number/stabilized-value.h (100%) rename {common => include/librealsense2}/utilities/os/CMakeLists.txt (100%) rename {common => include/librealsense2}/utilities/os/hresult.h (97%) create mode 100644 include/librealsense2/utilities/string/CMakeLists.txt rename {common => include/librealsense2}/utilities/string/split.h (100%) rename {common => include/librealsense2}/utilities/string/string-utilities.h (100%) rename {common => include/librealsense2}/utilities/string/trim-newlines.h (100%) rename {common => include/librealsense2}/utilities/string/windows.h (100%) create mode 100644 include/librealsense2/utilities/time/CMakeLists.txt rename {common => include/librealsense2}/utilities/time/common.h (100%) rename common/utilities/time/periodic_timer.h => include/librealsense2/utilities/time/periodic-timer.h (100%) rename {common => include/librealsense2}/utilities/time/stopwatch.h (100%) rename {common => include/librealsense2}/utilities/time/timer.h (100%) rename {common => include/librealsense2}/utilities/time/waiting-on.h (97%) rename common/utilities/time/work_week.cpp => include/librealsense2/utilities/time/work-week.cpp (99%) rename common/utilities/time/work_week.h => include/librealsense2/utilities/time/work-week.h (100%) rename {common/utilities => third-party}/filesystem/glob.h (99%) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index ef4f051ebb..3e3044d456 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -2,80 +2,71 @@ # Copyright(c) 2019 Intel Corporation. All Rights Reserved. set(COMMON_SRC - "${CMAKE_CURRENT_LIST_DIR}/animated.h" - "${CMAKE_CURRENT_LIST_DIR}/float2.h" - "${CMAKE_CURRENT_LIST_DIR}/float3.h" - "${CMAKE_CURRENT_LIST_DIR}/float4.h" - "${CMAKE_CURRENT_LIST_DIR}/matrix4.h" - "${CMAKE_CURRENT_LIST_DIR}/rect.h" - "${CMAKE_CURRENT_LIST_DIR}/rendering.h" - "${CMAKE_CURRENT_LIST_DIR}/model-views.h" - "${CMAKE_CURRENT_LIST_DIR}/model-views.cpp" - "${CMAKE_CURRENT_LIST_DIR}/notifications.h" - "${CMAKE_CURRENT_LIST_DIR}/notifications.cpp" - "${CMAKE_CURRENT_LIST_DIR}/calibration-model.h" - "${CMAKE_CURRENT_LIST_DIR}/calibration-model.cpp" - "${CMAKE_CURRENT_LIST_DIR}/viewer.h" - "${CMAKE_CURRENT_LIST_DIR}/viewer.cpp" - "${CMAKE_CURRENT_LIST_DIR}/ux-window.h" - "${CMAKE_CURRENT_LIST_DIR}/ux-window.cpp" - "${CMAKE_CURRENT_LIST_DIR}/ux-alignment.cpp" - "${CMAKE_CURRENT_LIST_DIR}/ux-alignment.h" - "${CMAKE_CURRENT_LIST_DIR}/opengl3.cpp" - "${CMAKE_CURRENT_LIST_DIR}/opengl3.h" - "${CMAKE_CURRENT_LIST_DIR}/rs-config.h" - "${CMAKE_CURRENT_LIST_DIR}/rs-config.cpp" - "${CMAKE_CURRENT_LIST_DIR}/os.h" - "${CMAKE_CURRENT_LIST_DIR}/os.cpp" - "${CMAKE_CURRENT_LIST_DIR}/fw-update-helper.h" - "${CMAKE_CURRENT_LIST_DIR}/fw-update-helper.cpp" - "${CMAKE_CURRENT_LIST_DIR}/metadata-helper.h" - "${CMAKE_CURRENT_LIST_DIR}/metadata-helper.cpp" - "${CMAKE_CURRENT_LIST_DIR}/output-model.h" - "${CMAKE_CURRENT_LIST_DIR}/output-model.cpp" - "${CMAKE_CURRENT_LIST_DIR}/skybox.h" - "${CMAKE_CURRENT_LIST_DIR}/skybox.cpp" - "${CMAKE_CURRENT_LIST_DIR}/measurement.h" - "${CMAKE_CURRENT_LIST_DIR}/measurement.cpp" - "${CMAKE_CURRENT_LIST_DIR}/on-chip-calib.h" - "${CMAKE_CURRENT_LIST_DIR}/on-chip-calib.cpp" - "${CMAKE_CURRENT_LIST_DIR}/decompress-huffman.h" - "${CMAKE_CURRENT_LIST_DIR}/updates-model.h" - "${CMAKE_CURRENT_LIST_DIR}/updates-model.cpp" - ) + "${CMAKE_CURRENT_LIST_DIR}/animated.h" + "${CMAKE_CURRENT_LIST_DIR}/float2.h" + "${CMAKE_CURRENT_LIST_DIR}/float3.h" + "${CMAKE_CURRENT_LIST_DIR}/float4.h" + "${CMAKE_CURRENT_LIST_DIR}/matrix4.h" + "${CMAKE_CURRENT_LIST_DIR}/rect.h" + "${CMAKE_CURRENT_LIST_DIR}/rendering.h" + "${CMAKE_CURRENT_LIST_DIR}/model-views.h" + "${CMAKE_CURRENT_LIST_DIR}/model-views.cpp" + "${CMAKE_CURRENT_LIST_DIR}/notifications.h" + "${CMAKE_CURRENT_LIST_DIR}/notifications.cpp" + "${CMAKE_CURRENT_LIST_DIR}/calibration-model.h" + "${CMAKE_CURRENT_LIST_DIR}/calibration-model.cpp" + "${CMAKE_CURRENT_LIST_DIR}/viewer.h" + "${CMAKE_CURRENT_LIST_DIR}/viewer.cpp" + "${CMAKE_CURRENT_LIST_DIR}/ux-window.h" + "${CMAKE_CURRENT_LIST_DIR}/ux-window.cpp" + "${CMAKE_CURRENT_LIST_DIR}/ux-alignment.cpp" + "${CMAKE_CURRENT_LIST_DIR}/ux-alignment.h" + "${CMAKE_CURRENT_LIST_DIR}/opengl3.cpp" + "${CMAKE_CURRENT_LIST_DIR}/opengl3.h" + "${CMAKE_CURRENT_LIST_DIR}/rs-config.h" + "${CMAKE_CURRENT_LIST_DIR}/rs-config.cpp" + "${CMAKE_CURRENT_LIST_DIR}/os.h" + "${CMAKE_CURRENT_LIST_DIR}/os.cpp" + "${CMAKE_CURRENT_LIST_DIR}/fw-update-helper.h" + "${CMAKE_CURRENT_LIST_DIR}/fw-update-helper.cpp" + "${CMAKE_CURRENT_LIST_DIR}/metadata-helper.h" + "${CMAKE_CURRENT_LIST_DIR}/metadata-helper.cpp" + "${CMAKE_CURRENT_LIST_DIR}/output-model.h" + "${CMAKE_CURRENT_LIST_DIR}/output-model.cpp" + "${CMAKE_CURRENT_LIST_DIR}/skybox.h" + "${CMAKE_CURRENT_LIST_DIR}/skybox.cpp" + "${CMAKE_CURRENT_LIST_DIR}/measurement.h" + "${CMAKE_CURRENT_LIST_DIR}/measurement.cpp" + "${CMAKE_CURRENT_LIST_DIR}/on-chip-calib.h" + "${CMAKE_CURRENT_LIST_DIR}/on-chip-calib.cpp" + "${CMAKE_CURRENT_LIST_DIR}/decompress-huffman.h" + "${CMAKE_CURRENT_LIST_DIR}/updates-model.h" + "${CMAKE_CURRENT_LIST_DIR}/updates-model.cpp" + ) - set(SW_UPDATE_FILES - "${CMAKE_CURRENT_LIST_DIR}/sw-update/http-downloader.h" - "${CMAKE_CURRENT_LIST_DIR}/sw-update/http-downloader.cpp" - "${CMAKE_CURRENT_LIST_DIR}/sw-update/dev-updates-profile.h" - "${CMAKE_CURRENT_LIST_DIR}/sw-update/dev-updates-profile.cpp" - "${CMAKE_CURRENT_LIST_DIR}/sw-update/versions-db-manager.h" - "${CMAKE_CURRENT_LIST_DIR}/sw-update/versions-db-manager.cpp" - ) +set(SW_UPDATE_FILES + "${CMAKE_CURRENT_LIST_DIR}/sw-update/http-downloader.h" + "${CMAKE_CURRENT_LIST_DIR}/sw-update/http-downloader.cpp" + "${CMAKE_CURRENT_LIST_DIR}/sw-update/dev-updates-profile.h" + "${CMAKE_CURRENT_LIST_DIR}/sw-update/dev-updates-profile.cpp" + "${CMAKE_CURRENT_LIST_DIR}/sw-update/versions-db-manager.h" + "${CMAKE_CURRENT_LIST_DIR}/sw-update/versions-db-manager.cpp" + ) - set(REFLECTIVITY_FILES - "${CMAKE_CURRENT_LIST_DIR}/reflectivity/reflectivity.h" - "${CMAKE_CURRENT_LIST_DIR}/reflectivity/reflectivity.cpp" - ) +set(REFLECTIVITY_FILES + "${CMAKE_CURRENT_LIST_DIR}/reflectivity/reflectivity.h" + "${CMAKE_CURRENT_LIST_DIR}/reflectivity/reflectivity.cpp" + ) - set(UTILITIES_FILES - "${CMAKE_CURRENT_LIST_DIR}/utilities/number/stabilized-value.h" - "${CMAKE_CURRENT_LIST_DIR}/utilities/string/split.h" - "${CMAKE_CURRENT_LIST_DIR}/utilities/string/string-utilities.h" - "${CMAKE_CURRENT_LIST_DIR}/utilities/string/trim-newlines.h" - "${CMAKE_CURRENT_LIST_DIR}/utilities/imgui/wrap.h" - "${CMAKE_CURRENT_LIST_DIR}/utilities/imgui/wrap.cpp" - ) -if (WIN32) - list(APPEND UTILITIES_FILES - "${CMAKE_CURRENT_LIST_DIR}/utilities/string/windows.h" - ) -endif() +set(UTILITIES_FILES + "${CMAKE_CURRENT_LIST_DIR}/utilities/imgui/wrap.h" + "${CMAKE_CURRENT_LIST_DIR}/utilities/imgui/wrap.cpp" + ) - set(COMMON_SRC - ${COMMON_SRC} - ${SW_UPDATE_FILES} - ${REFLECTIVITY_FILES} - ${UTILITIES_FILES} - ) +set(COMMON_SRC + ${COMMON_SRC} + ${SW_UPDATE_FILES} + ${REFLECTIVITY_FILES} + ${UTILITIES_FILES} + ) diff --git a/common/metadata-helper.cpp b/common/metadata-helper.cpp index 74ea81f981..a23ca2aefd 100644 --- a/common/metadata-helper.cpp +++ b/common/metadata-helper.cpp @@ -16,7 +16,7 @@ #include #include -#include "utilities/string/windows.h" +#include #define MAX_KEY_LENGTH 255 #define MAX_VALUE_NAME 16383 diff --git a/common/model-views.cpp b/common/model-views.cpp index c1d87e491d..2befdce546 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -32,7 +32,7 @@ #include "metadata-helper.h" #include "calibration-model.h" #include "sw-update/http-downloader.h" -#include "utilities/filesystem/glob.h" +#include "filesystem/glob.h" #include #include diff --git a/common/model-views.h b/common/model-views.h index c1069da1d2..03be8835c4 100644 --- a/common/model-views.h +++ b/common/model-views.h @@ -27,9 +27,9 @@ #include "fw-update-helper.h" #include "updates-model.h" #include "calibration-model.h" -#include +#include +#include #include "reflectivity/reflectivity.h" -#include ImVec4 from_rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a, bool consistent_color = false); ImVec4 operator+(const ImVec4& c, float v); diff --git a/common/on-chip-calib.h b/common/on-chip-calib.h index 476fee55d6..8c1f331b8e 100644 --- a/common/on-chip-calib.h +++ b/common/on-chip-calib.h @@ -4,7 +4,7 @@ #pragma once #include "notifications.h" -#include "../src/concurrency.h" +#include #include "../src/algo.h" #include diff --git a/common/os.cpp b/common/os.cpp index e28eda6970..95c7d1dd45 100644 --- a/common/os.cpp +++ b/common/os.cpp @@ -28,7 +28,7 @@ #include #include #include -#include "utilities/os/hresult.h" +#include #endif #if (defined(_WIN32) || defined(_WIN64)) diff --git a/common/output-model.h b/common/output-model.h index 366de39999..9f9c890d01 100644 --- a/common/output-model.h +++ b/common/output-model.h @@ -17,7 +17,7 @@ #include #include -#include "../src/concurrency.h" +#include namespace rs2 { diff --git a/common/parser.hpp b/common/parser.hpp index 9496c9ab4a..ec387d9bdc 100644 --- a/common/parser.hpp +++ b/common/parser.hpp @@ -16,7 +16,7 @@ #endif #include "../third-party/rapidxml/rapidxml.hpp" -#include "./utilities/string/string-utilities.h" +#include #define MAX_PARAMS 4 diff --git a/common/realsense-ui-advanced-mode.h b/common/realsense-ui-advanced-mode.h index b32e99d49e..809686bb70 100644 --- a/common/realsense-ui-advanced-mode.h +++ b/common/realsense-ui-advanced-mode.h @@ -6,7 +6,7 @@ #include #include #include -#include "utilities/string/string-utilities.h" +#include #define TEXT_BUFF_SIZE 1024 diff --git a/common/rendering.h b/common/rendering.h index 0f7d5b4d50..ef7e478aeb 100644 --- a/common/rendering.h +++ b/common/rendering.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include "matrix4.h" #include "float3.h" diff --git a/common/utilities/CMakeLists.txt b/common/utilities/CMakeLists.txt index 5fe75179e3..ed403f419d 100644 --- a/common/utilities/CMakeLists.txt +++ b/common/utilities/CMakeLists.txt @@ -3,15 +3,6 @@ target_sources(${LRS_TARGET} PRIVATE - "${CMAKE_CURRENT_LIST_DIR}/time/common.h" - "${CMAKE_CURRENT_LIST_DIR}/time/stopwatch.h" - "${CMAKE_CURRENT_LIST_DIR}/time/timer.h" - "${CMAKE_CURRENT_LIST_DIR}/time/periodic_timer.h" - "${CMAKE_CURRENT_LIST_DIR}/time/waiting-on.h" - "${CMAKE_CURRENT_LIST_DIR}/time/work_week.h" - "${CMAKE_CURRENT_LIST_DIR}/time/work_week.cpp" "${CMAKE_CURRENT_LIST_DIR}/time/l500/get-mfr-ww.h" "${CMAKE_CURRENT_LIST_DIR}/time/l500/get-mfr-ww.cpp" ) - -include(${CMAKE_CURRENT_LIST_DIR}/os/CMakeLists.txt) diff --git a/common/utilities/imgui/wrap.cpp b/common/utilities/imgui/wrap.cpp index 1d447e78d1..47efdb8e8d 100644 --- a/common/utilities/imgui/wrap.cpp +++ b/common/utilities/imgui/wrap.cpp @@ -5,7 +5,7 @@ #include #include #include "wrap.h" -#include "../common/utilities/string/split.h" +#include #include "../third-party/imgui/imgui.h" namespace utilities { diff --git a/common/utilities/time/l500/get-mfr-ww.h b/common/utilities/time/l500/get-mfr-ww.h index e020f2846a..46cea43309 100644 --- a/common/utilities/time/l500/get-mfr-ww.h +++ b/common/utilities/time/l500/get-mfr-ww.h @@ -4,7 +4,7 @@ #pragma once #include -#include "../work_week.h" +#include namespace utilities { diff --git a/common/viewer.cpp b/common/viewer.cpp index 1458517ba2..7f3961d884 100644 --- a/common/viewer.cpp +++ b/common/viewer.cpp @@ -20,7 +20,7 @@ #define ARCBALL_CAMERA_IMPLEMENTATION #include -#include "../common/utilities/string/trim-newlines.h" +#include #include "../common/utilities/imgui/wrap.h" namespace rs2 diff --git a/common/windows-app-bootstrap.cpp b/common/windows-app-bootstrap.cpp index 7f38c3fe1f..4c1efb3f6c 100644 --- a/common/windows-app-bootstrap.cpp +++ b/common/windows-app-bootstrap.cpp @@ -18,7 +18,7 @@ #include "os.h" #include "metadata-helper.h" #include "rendering.h" -#include "utilities/string/windows.h" +#include #include diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 81d8cdc93c..b938da626b 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -16,6 +16,7 @@ target_sources(${LRS_TARGET} "${CMAKE_CURRENT_LIST_DIR}/librealsense2/h/rs_internal.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/h/rs_pipeline.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/h/rs_config.h" + "${CMAKE_CURRENT_LIST_DIR}/librealsense2/h/rs_advanced_mode_command.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/hpp/rs_types.hpp" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/hpp/rs_context.hpp" @@ -33,5 +34,7 @@ target_sources(${LRS_TARGET} "${CMAKE_CURRENT_LIST_DIR}/librealsense2/rsutil.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/rs_advanced_mode.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense2/rs_advanced_mode.hpp" - "${CMAKE_CURRENT_LIST_DIR}/librealsense2/h/rs_advanced_mode_command.h" + ) + +include(${CMAKE_CURRENT_LIST_DIR}/librealsense2/utilities/CMakeLists.txt) diff --git a/include/librealsense2/utilities/CMakeLists.txt b/include/librealsense2/utilities/CMakeLists.txt new file mode 100644 index 0000000000..bab5379b82 --- /dev/null +++ b/include/librealsense2/utilities/CMakeLists.txt @@ -0,0 +1,9 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +include(${CMAKE_CURRENT_LIST_DIR}/easylogging/CMakeLists.txt) +include(${CMAKE_CURRENT_LIST_DIR}/concurrency/CMakeLists.txt) +include(${CMAKE_CURRENT_LIST_DIR}/time/CMakeLists.txt) +include(${CMAKE_CURRENT_LIST_DIR}/number/CMakeLists.txt) +include(${CMAKE_CURRENT_LIST_DIR}/os/CMakeLists.txt) +include(${CMAKE_CURRENT_LIST_DIR}/string/CMakeLists.txt) diff --git a/include/librealsense2/utilities/concurrency/CMakeLists.txt b/include/librealsense2/utilities/concurrency/CMakeLists.txt new file mode 100644 index 0000000000..c4a092e722 --- /dev/null +++ b/include/librealsense2/utilities/concurrency/CMakeLists.txt @@ -0,0 +1,7 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +target_sources(${LRS_TARGET} + PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/concurrency.h" + "${CMAKE_CURRENT_LIST_DIR}/dispatcher.cpp") diff --git a/src/concurrency.h b/include/librealsense2/utilities/concurrency/concurrency.h similarity index 100% rename from src/concurrency.h rename to include/librealsense2/utilities/concurrency/concurrency.h diff --git a/src/dispatcher.cpp b/include/librealsense2/utilities/concurrency/dispatcher.cpp similarity index 97% rename from src/dispatcher.cpp rename to include/librealsense2/utilities/concurrency/dispatcher.cpp index e286be8ddd..7e59d4c1a5 100644 --- a/src/dispatcher.cpp +++ b/include/librealsense2/utilities/concurrency/dispatcher.cpp @@ -2,9 +2,8 @@ // Copyright(c) 2021 Intel Corporation. All Rights Reserved. #include "concurrency.h" -#include "types.h" -#include "../common/utilities/time/waiting-on.h" - +#include +#include dispatcher::dispatcher( unsigned int cap, std::function< void( action ) > on_drop_callback ) : _queue( cap, on_drop_callback ) diff --git a/include/librealsense2/utilities/easylogging/CMakeLists.txt b/include/librealsense2/utilities/easylogging/CMakeLists.txt new file mode 100644 index 0000000000..1e81ac9995 --- /dev/null +++ b/include/librealsense2/utilities/easylogging/CMakeLists.txt @@ -0,0 +1,6 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +target_sources(${LRS_TARGET} + PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/easyloggingpp.h") diff --git a/src/easyloggingpp.h b/include/librealsense2/utilities/easylogging/easyloggingpp.h similarity index 100% rename from src/easyloggingpp.h rename to include/librealsense2/utilities/easylogging/easyloggingpp.h diff --git a/include/librealsense2/utilities/number/CMakeLists.txt b/include/librealsense2/utilities/number/CMakeLists.txt new file mode 100644 index 0000000000..4485fabd53 --- /dev/null +++ b/include/librealsense2/utilities/number/CMakeLists.txt @@ -0,0 +1,6 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +target_sources(${LRS_TARGET} + PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/stabilized-value.h") diff --git a/common/utilities/number/stabilized-value.h b/include/librealsense2/utilities/number/stabilized-value.h similarity index 100% rename from common/utilities/number/stabilized-value.h rename to include/librealsense2/utilities/number/stabilized-value.h diff --git a/common/utilities/os/CMakeLists.txt b/include/librealsense2/utilities/os/CMakeLists.txt similarity index 100% rename from common/utilities/os/CMakeLists.txt rename to include/librealsense2/utilities/os/CMakeLists.txt diff --git a/common/utilities/os/hresult.h b/include/librealsense2/utilities/os/hresult.h similarity index 97% rename from common/utilities/os/hresult.h rename to include/librealsense2/utilities/os/hresult.h index ccecc67981..f848a45364 100644 --- a/common/utilities/os/hresult.h +++ b/include/librealsense2/utilities/os/hresult.h @@ -7,7 +7,7 @@ #include #include #include -#include "../string/windows.h" +#include namespace utilities { namespace hresult { diff --git a/include/librealsense2/utilities/string/CMakeLists.txt b/include/librealsense2/utilities/string/CMakeLists.txt new file mode 100644 index 0000000000..c39306038c --- /dev/null +++ b/include/librealsense2/utilities/string/CMakeLists.txt @@ -0,0 +1,16 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +SET(STRING_TARGETS "${CMAKE_CURRENT_LIST_DIR}/split.h" + "${CMAKE_CURRENT_LIST_DIR}/string-utilities.h" + "${CMAKE_CURRENT_LIST_DIR}/trim-newlines.h") + +if(WIN32) + SET(STRING_TARGETS ${STRING_TARGETS} "${CMAKE_CURRENT_LIST_DIR}/windows.h") +endif() + + +target_sources(${LRS_TARGET} + PRIVATE + ${STRING_TARGETS}) + diff --git a/common/utilities/string/split.h b/include/librealsense2/utilities/string/split.h similarity index 100% rename from common/utilities/string/split.h rename to include/librealsense2/utilities/string/split.h diff --git a/common/utilities/string/string-utilities.h b/include/librealsense2/utilities/string/string-utilities.h similarity index 100% rename from common/utilities/string/string-utilities.h rename to include/librealsense2/utilities/string/string-utilities.h diff --git a/common/utilities/string/trim-newlines.h b/include/librealsense2/utilities/string/trim-newlines.h similarity index 100% rename from common/utilities/string/trim-newlines.h rename to include/librealsense2/utilities/string/trim-newlines.h diff --git a/common/utilities/string/windows.h b/include/librealsense2/utilities/string/windows.h similarity index 100% rename from common/utilities/string/windows.h rename to include/librealsense2/utilities/string/windows.h diff --git a/include/librealsense2/utilities/time/CMakeLists.txt b/include/librealsense2/utilities/time/CMakeLists.txt new file mode 100644 index 0000000000..351ab05a3d --- /dev/null +++ b/include/librealsense2/utilities/time/CMakeLists.txt @@ -0,0 +1,12 @@ +# License: Apache 2.0. See LICENSE file in root directory. +# Copyright(c) 2022 Intel Corporation. All Rights Reserved. + +target_sources(${LRS_TARGET} + PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/common.h" + "${CMAKE_CURRENT_LIST_DIR}/periodic-timer.h" + "${CMAKE_CURRENT_LIST_DIR}/stopwatch.h" + "${CMAKE_CURRENT_LIST_DIR}/timer.h" + "${CMAKE_CURRENT_LIST_DIR}/waiting-on.h" + "${CMAKE_CURRENT_LIST_DIR}/work-week.h" + "${CMAKE_CURRENT_LIST_DIR}/work-week.cpp") diff --git a/common/utilities/time/common.h b/include/librealsense2/utilities/time/common.h similarity index 100% rename from common/utilities/time/common.h rename to include/librealsense2/utilities/time/common.h diff --git a/common/utilities/time/periodic_timer.h b/include/librealsense2/utilities/time/periodic-timer.h similarity index 100% rename from common/utilities/time/periodic_timer.h rename to include/librealsense2/utilities/time/periodic-timer.h diff --git a/common/utilities/time/stopwatch.h b/include/librealsense2/utilities/time/stopwatch.h similarity index 100% rename from common/utilities/time/stopwatch.h rename to include/librealsense2/utilities/time/stopwatch.h diff --git a/common/utilities/time/timer.h b/include/librealsense2/utilities/time/timer.h similarity index 100% rename from common/utilities/time/timer.h rename to include/librealsense2/utilities/time/timer.h diff --git a/common/utilities/time/waiting-on.h b/include/librealsense2/utilities/time/waiting-on.h similarity index 97% rename from common/utilities/time/waiting-on.h rename to include/librealsense2/utilities/time/waiting-on.h index 93340ff8f2..bc15bafae7 100644 --- a/common/utilities/time/waiting-on.h +++ b/include/librealsense2/utilities/time/waiting-on.h @@ -1,173 +1,173 @@ -// License: Apache 2.0. See LICENSE file in root directory. -// Copyright(c) 2021 Intel Corporation. All Rights Reserved. - -#pragma once - -#include -#include -#include -#include - - -namespace utilities { -namespace time { - -// Helper class -- encapsulate a variable of type T that we want to wait on: another thread will set -// it and signal when we can continue... -// -// In order to synchronize the users predicate, we expect the user to provide his conditional variable and mutex used to set the predicate. -// As mentioned at the conditional variable documentation: (https://en.cppreference.com/w/cpp/thread/condition_variable) -// The thread that intends to modify the shared variable has to -// 1. acquire a std::mutex(typically via std::lock_guard) -// 2. perform the modification while the lock is held -// 3. execute notify_one or notify_all on the std::condition_variable(the lock does not need to be held for notification) -// For more detailed information see https://www.modernescpp.com/index.php/c-core-guidelines-be-aware-of-the-traps-of-condition-variables -template< class T > -class waiting_on -{ - // We need to be careful with timeouts: if we time out then the local waiting_on can go out of - // scope and then the thread cannot set anything or signal anyone! We get around this by using a - // shared_ptr & weak_ptr to manage access: - // -public: - class wait_state_t - { - T _value; - std::condition_variable &_cv; - std::mutex &_m; - std::atomic_bool _valid{ true }; - friend class waiting_on; - - public: - wait_state_t() = delete; // Do not allow default Ctor, we need the user's CV and Mutex - wait_state_t( std::condition_variable & cv, std::mutex & m ) - : _cv( cv ) - , _m( m ) - { - } - - wait_state_t( std::condition_variable &cv, std::mutex &m, T const & t ) - : _cv( cv ) - , _m( m ) - , _value( t ) - { - } - - operator T &() { return _value; } - operator T const &() const { return _value; } - - T* operator->() { return &_value; } - T const* operator->() const { return &_value; } - - // Set a new value and signal - void signal( T const & t ) - { - std::unique_lock locker(_m); - _value = t; - locker.unlock(); - signal(); - } - // Signal with the current value - void signal() - { - _cv.notify_one(); - } - // Invalidate the wait_state_t so the user will not use destroyed objects - void invalidate() - { - if ( _valid ) - { - _valid = false; - _cv.notify_all(); - } - } - }; -private: - std::shared_ptr< wait_state_t > _ptr; - - // When we declare the signalling lambda for the other thread, we need to pass it the weak_ptr. - // This class wraps it up nicely, so you can write: - // waiting_on< bool > invoked( false ) - // auto thread_function = [invoked = invoked.in_thread()]() { - // invoked.signal( true ); - // } - // -public: - class in_thread_ - { - std::weak_ptr< wait_state_t > const _ptr; - // We use an invalidator for invalidating the class when reference count is equal to Zero. - std::shared_ptr< std::nullptr_t > const _invalidator; - - public: - in_thread_( waiting_on const & local ) - : _ptr( local._ptr ) - , _invalidator( - nullptr, - [weak_ptr = std::weak_ptr< wait_state_t >( local._ptr )]( std::nullptr_t * ) { - // We get here when the lambda we're in is destroyed -- so either we've - // already run (and signalled once) or we've never run. We signal anyway - // if anything's waiting they'll get woken up; otherwise nothing'll happen... - if( auto wait_state = weak_ptr.lock() ) - wait_state->invalidate(); - } ) - { - } - - std::shared_ptr< wait_state_t > still_alive() const { return _ptr.lock(); } - - // Wake up the local function (which is using wait_until(), presumable) with a new - // T value - void signal( T const& t ) const - { - if( auto wait_state = still_alive() ) - wait_state->signal( t ); - } - }; - -public: - waiting_on( std::condition_variable & cv, std::mutex & m ) - : _ptr( std::make_shared< wait_state_t >( cv, m ) ) - { - } - waiting_on( std::condition_variable & cv, std::mutex & m, T const & value ) - : _ptr( std::make_shared< wait_state_t >( cv, m, value ) ) - { - } - - // Convert to the in-thread representation - in_thread_ in_thread() const { return in_thread_( *this ); } - - operator T const &() const { return *_ptr; } - - // struct value_t { double x; int k; }; - // waiting_on< value_t > output({ 1., -1 }); - // output->x = 2.; - T * operator->() { return &_ptr->_value; } - T const * operator->() const { return &_ptr->_value; } - - // Wait until either the timeout occurs, or the predicate evaluates to true. - // Equivalent to: - // while( ! pred() ) - // { - // wait( timeout ); - // if( timed-out ) - // break; - // } - template < class U, class L > - void wait_until( U const& timeout, L const& pred ) - { - // The CV must use the same lock that locks the predicate assignment value, otherwise it - // could miss the signal which is a known trap of conditional variables - std::unique_lock< std::mutex > locker(_ptr->_m); - _ptr->_cv.wait_for( locker, timeout, [&]() -> bool { - if( ! _ptr->_valid ) - return true; - return pred(); - } ); - } -}; - - -} // namespace time -} // namespace utilities +// License: Apache 2.0. See LICENSE file in root directory. +// Copyright(c) 2021 Intel Corporation. All Rights Reserved. + +#pragma once + +#include +#include +#include +#include + + +namespace utilities { +namespace time { + +// Helper class -- encapsulate a variable of type T that we want to wait on: another thread will set +// it and signal when we can continue... +// +// In order to synchronize the users predicate, we expect the user to provide his conditional variable and mutex used to set the predicate. +// As mentioned at the conditional variable documentation: (https://en.cppreference.com/w/cpp/thread/condition_variable) +// The thread that intends to modify the shared variable has to +// 1. acquire a std::mutex(typically via std::lock_guard) +// 2. perform the modification while the lock is held +// 3. execute notify_one or notify_all on the std::condition_variable(the lock does not need to be held for notification) +// For more detailed information see https://www.modernescpp.com/index.php/c-core-guidelines-be-aware-of-the-traps-of-condition-variables +template< class T > +class waiting_on +{ + // We need to be careful with timeouts: if we time out then the local waiting_on can go out of + // scope and then the thread cannot set anything or signal anyone! We get around this by using a + // shared_ptr & weak_ptr to manage access: + // +public: + class wait_state_t + { + T _value; + std::condition_variable &_cv; + std::mutex &_m; + std::atomic_bool _valid{ true }; + friend class waiting_on; + + public: + wait_state_t() = delete; // Do not allow default Ctor, we need the user's CV and Mutex + wait_state_t( std::condition_variable & cv, std::mutex & m ) + : _cv( cv ) + , _m( m ) + { + } + + wait_state_t( std::condition_variable &cv, std::mutex &m, T const & t ) + : _cv( cv ) + , _m( m ) + , _value( t ) + { + } + + operator T &() { return _value; } + operator T const &() const { return _value; } + + T* operator->() { return &_value; } + T const* operator->() const { return &_value; } + + // Set a new value and signal + void signal( T const & t ) + { + std::unique_lock locker(_m); + _value = t; + locker.unlock(); + signal(); + } + // Signal with the current value + void signal() + { + _cv.notify_one(); + } + // Invalidate the wait_state_t so the user will not use destroyed objects + void invalidate() + { + if ( _valid ) + { + _valid = false; + _cv.notify_all(); + } + } + }; +private: + std::shared_ptr< wait_state_t > _ptr; + + // When we declare the signalling lambda for the other thread, we need to pass it the weak_ptr. + // This class wraps it up nicely, so you can write: + // waiting_on< bool > invoked( false ) + // auto thread_function = [invoked = invoked.in_thread()]() { + // invoked.signal( true ); + // } + // +public: + class in_thread_ + { + std::weak_ptr< wait_state_t > const _ptr; + // We use an invalidator for invalidating the class when reference count is equal to Zero. + std::shared_ptr< std::nullptr_t > const _invalidator; + + public: + in_thread_( waiting_on const & local ) + : _ptr( local._ptr ) + , _invalidator( + nullptr, + [weak_ptr = std::weak_ptr< wait_state_t >( local._ptr )]( std::nullptr_t * ) { + // We get here when the lambda we're in is destroyed -- so either we've + // already run (and signalled once) or we've never run. We signal anyway + // if anything's waiting they'll get woken up; otherwise nothing'll happen... + if( auto wait_state = weak_ptr.lock() ) + wait_state->invalidate(); + } ) + { + } + + std::shared_ptr< wait_state_t > still_alive() const { return _ptr.lock(); } + + // Wake up the local function (which is using wait_until(), presumable) with a new + // T value + void signal( T const& t ) const + { + if( auto wait_state = still_alive() ) + wait_state->signal( t ); + } + }; + +public: + waiting_on( std::condition_variable & cv, std::mutex & m ) + : _ptr( std::make_shared< wait_state_t >( cv, m ) ) + { + } + waiting_on( std::condition_variable & cv, std::mutex & m, T const & value ) + : _ptr( std::make_shared< wait_state_t >( cv, m, value ) ) + { + } + + // Convert to the in-thread representation + in_thread_ in_thread() const { return in_thread_( *this ); } + + operator T const &() const { return *_ptr; } + + // struct value_t { double x; int k; }; + // waiting_on< value_t > output({ 1., -1 }); + // output->x = 2.; + T * operator->() { return &_ptr->_value; } + T const * operator->() const { return &_ptr->_value; } + + // Wait until either the timeout occurs, or the predicate evaluates to true. + // Equivalent to: + // while( ! pred() ) + // { + // wait( timeout ); + // if( timed-out ) + // break; + // } + template < class U, class L > + void wait_until( U const& timeout, L const& pred ) + { + // The CV must use the same lock that locks the predicate assignment value, otherwise it + // could miss the signal which is a known trap of conditional variables + std::unique_lock< std::mutex > locker(_ptr->_m); + _ptr->_cv.wait_for( locker, timeout, [&]() -> bool { + if( ! _ptr->_valid ) + return true; + return pred(); + } ); + } +}; + + +} // namespace time +} // namespace utilities diff --git a/common/utilities/time/work_week.cpp b/include/librealsense2/utilities/time/work-week.cpp similarity index 99% rename from common/utilities/time/work_week.cpp rename to include/librealsense2/utilities/time/work-week.cpp index 95be996a67..0fd4792aec 100644 --- a/common/utilities/time/work_week.cpp +++ b/include/librealsense2/utilities/time/work-week.cpp @@ -1,7 +1,7 @@ //// License: Apache 2.0. See LICENSE file in root directory. //// Copyright(c) 2020 Intel Corporation. All Rights Reserved. -#include "work_week.h" +#include "work-week.h" #include #include #include diff --git a/common/utilities/time/work_week.h b/include/librealsense2/utilities/time/work-week.h similarity index 100% rename from common/utilities/time/work_week.h rename to include/librealsense2/utilities/time/work-week.h diff --git a/scripts/api_check.sh b/scripts/api_check.sh index e42d9c1e07..6214987e51 100755 --- a/scripts/api_check.sh +++ b/scripts/api_check.sh @@ -2,7 +2,7 @@ # This script makes sure every API header can be included in isolation -for filename in $(find ../include/librealsense2 -name *.hpp); do +for filename in $(find ../include/librealsense2 -name *.hpp -not -path "../include/librealsense2/utilities/**"); do echo Checking that $filename is self-contained rm 1.cpp echo "#include \"$filename\"" >> 1.cpp @@ -12,7 +12,7 @@ for filename in $(find ../include/librealsense2 -name *.hpp); do echo done -for filename in $(find ../include/librealsense2 -name *.h); do +for filename in $(find ../include/librealsense2 -name *.h -not -path "../include/librealsense2/utilities/**"); do echo Checking that $filename is self-contained rm 1.c echo "#include \"$filename\"" >> 1.c diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 513e2f0fcd..a23a5260bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,7 +77,6 @@ target_sources(${LRS_TARGET} "${CMAKE_CURRENT_LIST_DIR}/context.cpp" "${CMAKE_CURRENT_LIST_DIR}/device.cpp" "${CMAKE_CURRENT_LIST_DIR}/device_hub.cpp" - "${CMAKE_CURRENT_LIST_DIR}/dispatcher.cpp" "${CMAKE_CURRENT_LIST_DIR}/environment.cpp" "${CMAKE_CURRENT_LIST_DIR}/error-handling.cpp" "${CMAKE_CURRENT_LIST_DIR}/firmware_logger_device.cpp" @@ -106,7 +105,6 @@ target_sources(${LRS_TARGET} "${CMAKE_CURRENT_LIST_DIR}/api.h" "${CMAKE_CURRENT_LIST_DIR}/archive.h" "${CMAKE_CURRENT_LIST_DIR}/backend.h" - "${CMAKE_CURRENT_LIST_DIR}/concurrency.h" "${CMAKE_CURRENT_LIST_DIR}/context.h" "${CMAKE_CURRENT_LIST_DIR}/device.h" "${CMAKE_CURRENT_LIST_DIR}/device_hub.h" @@ -144,7 +142,6 @@ target_sources(${LRS_TARGET} "${CMAKE_CURRENT_LIST_DIR}/depth-sensor.h" "${CMAKE_CURRENT_LIST_DIR}/color-sensor.h" "${CMAKE_CURRENT_LIST_DIR}/callback-invocation.h" - "${CMAKE_CURRENT_LIST_DIR}/easyloggingpp.h" "${CMAKE_CURRENT_LIST_DIR}/librealsense-exception.h" "${CMAKE_CURRENT_LIST_DIR}/polling-device-watcher.h" "${CMAKE_CURRENT_LIST_DIR}/small-heap.h" diff --git a/src/algo.h b/src/algo.h index 8cb8bf6f61..abe27423b9 100644 --- a/src/algo.h +++ b/src/algo.h @@ -3,7 +3,7 @@ #pragma once #include "sensor.h" -#include "concurrency.h" +#include #include "types.h" #include diff --git a/src/error-handling.h b/src/error-handling.h index b2fccaf42c..ae88058237 100644 --- a/src/error-handling.h +++ b/src/error-handling.h @@ -2,7 +2,7 @@ /* Copyright(c) 2019 Intel Corporation. All Rights Reserved. */ #pragma once -#include "concurrency.h" +#include #include "option.h" #include "types.h" diff --git a/src/gl/synthetic-stream-gl.h b/src/gl/synthetic-stream-gl.h index aee4e4302b..9664106562 100644 --- a/src/gl/synthetic-stream-gl.h +++ b/src/gl/synthetic-stream-gl.h @@ -13,7 +13,7 @@ #include "tiny-profiler.h" // common/ #include -#include "../concurrency.h" +#include #include #include #include diff --git a/src/hid/hid-device.h b/src/hid/hid-device.h index ce769203d2..edc7c5c4de 100644 --- a/src/hid/hid-device.h +++ b/src/hid/hid-device.h @@ -6,7 +6,7 @@ #include "hid-types.h" #include "../usb/usb-messenger.h" #include "../usb/usb-enumerator.h" -#include "../concurrency.h" +#include #include "stdio.h" #include "stdlib.h" diff --git a/src/l500/l500-device.cpp b/src/l500/l500-device.cpp index 7183f69ea7..e2ae03d01e 100644 --- a/src/l500/l500-device.cpp +++ b/src/l500/l500-device.cpp @@ -22,8 +22,8 @@ #include "proc/syncer-processing-block.h" #include "proc/rotation-transform.h" #include "../common/fw/firmware-version.h" -#include "../common/utilities/time/periodic_timer.h" -#include "../common/utilities/time/work_week.h" +#include +#include #include "../common/utilities/time/l500/get-mfr-ww.h" diff --git a/src/librealsense-exception.h b/src/librealsense-exception.h index a4c2314e18..9e7fe6d6d6 100644 --- a/src/librealsense-exception.h +++ b/src/librealsense-exception.h @@ -4,7 +4,7 @@ #pragma once #include -#include "easyloggingpp.h" +#include #include "basics.h" // LRS_EXTENSION_API #include diff --git a/src/libusb/context-libusb.h b/src/libusb/context-libusb.h index 9bf8312acc..ce1ea49054 100644 --- a/src/libusb/context-libusb.h +++ b/src/libusb/context-libusb.h @@ -4,7 +4,7 @@ #pragma once #include "usb/usb-types.h" -#include "../concurrency.h" +#include #include #include "libusb.h" diff --git a/src/linux/udev-device-watcher.h b/src/linux/udev-device-watcher.h index f703050934..0952b01af6 100644 --- a/src/linux/udev-device-watcher.h +++ b/src/linux/udev-device-watcher.h @@ -4,7 +4,7 @@ #pragma once #include "../backend.h" -#include "../concurrency.h" +#include #include "../callback-invocation.h" #include diff --git a/src/media/playback/playback_device.h b/src/media/playback/playback_device.h index 32bd04331d..98078d23b9 100644 --- a/src/media/playback/playback_device.h +++ b/src/media/playback/playback_device.h @@ -8,7 +8,7 @@ #include "../../core/serialization.h" #include "../../core/streaming.h" #include "../../archive.h" -#include "../../concurrency.h" +#include #include "../../sensor.h" #include "playback_sensor.h" diff --git a/src/media/playback/playback_sensor.h b/src/media/playback/playback_sensor.h index 68a126eff4..eaf795d18e 100644 --- a/src/media/playback/playback_sensor.h +++ b/src/media/playback/playback_sensor.h @@ -7,7 +7,7 @@ #include "../../core/serialization.h" #include "../../core/streaming.h" #include "../../archive.h" -#include "../../concurrency.h" +#include #include "../../sensor.h" #include "../../types.h" diff --git a/src/media/record/record_device.h b/src/media/record/record_device.h index 5ab3271ff4..76d3e30b02 100644 --- a/src/media/record/record_device.h +++ b/src/media/record/record_device.h @@ -7,7 +7,7 @@ #include #include "core/streaming.h" #include "archive.h" -#include "concurrency.h" +#include #include "sensor.h" #include "record_sensor.h" diff --git a/src/media/record/record_sensor.h b/src/media/record/record_sensor.h index 2e087880a2..50aff14ced 100644 --- a/src/media/record/record_sensor.h +++ b/src/media/record/record_sensor.h @@ -7,7 +7,7 @@ #include "core/serialization.h" #include "core/streaming.h" #include "archive.h" -#include "concurrency.h" +#include #include "sensor.h" namespace librealsense diff --git a/src/mf/mf-hid.cpp b/src/mf/mf-hid.cpp index 554d418f65..4ebd260f25 100644 --- a/src/mf/mf-hid.cpp +++ b/src/mf/mf-hid.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "../common/utilities/string/windows.h" +#include #pragma comment(lib, "Sensorsapi.lib") #pragma comment(lib, "PortableDeviceGuids.lib") diff --git a/src/mf/mf-uvc.cpp b/src/mf/mf-uvc.cpp index d01431ac8b..c75ed4e6b2 100644 --- a/src/mf/mf-uvc.cpp +++ b/src/mf/mf-uvc.cpp @@ -35,7 +35,7 @@ The library will be compiled without the metadata support!\n") #include #include // Metadata Extension #include -#include "../common/utilities/os/hresult.h" +#include #pragma comment(lib, "Shlwapi.lib") #pragma comment(lib, "mf.lib") diff --git a/src/polling-device-watcher.h b/src/polling-device-watcher.h index 7986488694..4570154dc2 100644 --- a/src/polling-device-watcher.h +++ b/src/polling-device-watcher.h @@ -4,7 +4,7 @@ #pragma once #include "backend.h" -#include "concurrency.h" +#include #include "callback-invocation.h" diff --git a/src/source.h b/src/source.h index b983d50d2b..a98ef73fd4 100644 --- a/src/source.h +++ b/src/source.h @@ -4,7 +4,7 @@ #pragma once #include "core/processing.h" -#include "concurrency.h" +#include #include "archive.h" #include "metadata-parser.h" #include "frame-archive.h" diff --git a/src/types.h b/src/types.h index a42690afca..24b716fd21 100644 --- a/src/types.h +++ b/src/types.h @@ -12,9 +12,9 @@ #include #include "backend.h" -#include "concurrency.h" +#include #include "librealsense-exception.h" -#include "easyloggingpp.h" +#include #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES diff --git a/src/usbhost/messenger-usbhost.h b/src/usbhost/messenger-usbhost.h index f47c90017b..19ac9b1cc1 100644 --- a/src/usbhost/messenger-usbhost.h +++ b/src/usbhost/messenger-usbhost.h @@ -12,7 +12,7 @@ #include "handle-usbhost.h" #include "endpoint-usbhost.h" -#include "../concurrency.h" +#include #include "request-usbhost.h" #include #include diff --git a/src/uvc/uvc-device.h b/src/uvc/uvc-device.h index c8e4c67780..7e15be13e1 100644 --- a/src/uvc/uvc-device.h +++ b/src/uvc/uvc-device.h @@ -6,7 +6,7 @@ #include "uvc-types.h" #include "../usb/usb-messenger.h" #include "../usb/usb-enumerator.h" -#include "../concurrency.h" +#include #include "../types.h" #include "uvc-parser.h" #include "uvc-streamer.h" diff --git a/src/win/win-helpers.cpp b/src/win/win-helpers.cpp index 5bb7b30cd9..11f1d75139 100644 --- a/src/win/win-helpers.cpp +++ b/src/win/win-helpers.cpp @@ -17,7 +17,7 @@ #include #include #include -#include "../common/utilities/string/windows.h" +#include #pragma comment(lib, "cfgmgr32.lib") #pragma comment(lib, "setupapi.lib") diff --git a/src/win/win-helpers.h b/src/win/win-helpers.h index da0db5bb5f..48326a58f3 100644 --- a/src/win/win-helpers.h +++ b/src/win/win-helpers.h @@ -12,7 +12,7 @@ #include #include -#include "../../common/utilities/os/hresult.h" +#include #define WAIT_FOR_MUTEX_TIME_OUT (5000) diff --git a/src/winusb/enumerator-winusb.cpp b/src/winusb/enumerator-winusb.cpp index c36c7dd6a9..0ef17d3100 100644 --- a/src/winusb/enumerator-winusb.cpp +++ b/src/winusb/enumerator-winusb.cpp @@ -8,7 +8,7 @@ #include "usb/usb-enumerator.h" #include "device-winusb.h" #include "interface-winusb.h" -#include "../common/utilities/os/hresult.h" +#include #include "types.h" #include diff --git a/common/utilities/filesystem/glob.h b/third-party/filesystem/glob.h similarity index 99% rename from common/utilities/filesystem/glob.h rename to third-party/filesystem/glob.h index ab27bd0797..fd6bcbb9e7 100644 --- a/common/utilities/filesystem/glob.h +++ b/third-party/filesystem/glob.h @@ -3,7 +3,7 @@ // of this distribution and at http://opencv.org/license.html. #pragma once - +#include #if defined _WIN32 || defined WINCE # include const char dir_separators[] = "/\\"; diff --git a/tools/fw-logger/rs-fw-logger.cpp b/tools/fw-logger/rs-fw-logger.cpp index d54fb51f3c..d16077d08c 100644 --- a/tools/fw-logger/rs-fw-logger.cpp +++ b/tools/fw-logger/rs-fw-logger.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include "tclap/CmdLine.h" diff --git a/tools/terminal/CMakeLists.txt b/tools/terminal/CMakeLists.txt index 2ad5535075..a834d7831d 100644 --- a/tools/terminal/CMakeLists.txt +++ b/tools/terminal/CMakeLists.txt @@ -14,7 +14,6 @@ set(RS_TERMINAL_SOURCES auto-complete.cpp auto-complete.h ../../common/parser.hpp - ../../common/utilities/string/string-utilities.h ) add_executable(rs-terminal ${RS_TERMINAL_SOURCES}) set_property(TARGET rs-terminal PROPERTY CXX_STANDARD 11) diff --git a/tools/terminal/rs-terminal.cpp b/tools/terminal/rs-terminal.cpp index 072b59df02..2b08f22f5c 100644 --- a/tools/terminal/rs-terminal.cpp +++ b/tools/terminal/rs-terminal.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include "tclap/CmdLine.h" #include "parser.hpp" #include "auto-complete.h" diff --git a/unit-tests/live/alt-ir/alt-ir-common.h b/unit-tests/live/alt-ir/alt-ir-common.h index 4edbe47098..3150a39e8f 100644 --- a/unit-tests/live/alt-ir/alt-ir-common.h +++ b/unit-tests/live/alt-ir/alt-ir-common.h @@ -2,7 +2,7 @@ // Copyright(c) 2020 Intel Corporation. All Rights Reserved. #include -#include +#include using namespace rs2; diff --git a/unit-tests/live/hw-errors/error-common.h b/unit-tests/live/hw-errors/error-common.h index 357f8a9f02..26a5234671 100644 --- a/unit-tests/live/hw-errors/error-common.h +++ b/unit-tests/live/hw-errors/error-common.h @@ -1,7 +1,7 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2021 Intel Corporation. All Rights Reserved. -#include +#include // This should be defined, per device type void trigger_error_or_exit( const rs2::device & dev, uint8_t num ); diff --git a/unit-tests/live/presets/presets-common.h b/unit-tests/live/presets/presets-common.h index 6e43053851..5d37bcbd6a 100644 --- a/unit-tests/live/presets/presets-common.h +++ b/unit-tests/live/presets/presets-common.h @@ -2,7 +2,7 @@ // Copyright(c) 2020 Intel Corporation. All Rights Reserved. #include "../live-common.h" -#include +#include #include #include #include diff --git a/unit-tests/unit-tests-post-processing-from-bag.cpp b/unit-tests/unit-tests-post-processing-from-bag.cpp index a1cfc9d0d7..7b1e03c02e 100644 --- a/unit-tests/unit-tests-post-processing-from-bag.cpp +++ b/unit-tests/unit-tests-post-processing-from-bag.cpp @@ -14,7 +14,7 @@ #include #include #include -#include "../common/utilities/time/timer.h" +#include # define SECTION_FROM_TEST_NAME space_to_underscore(Catch::getCurrentContext().getResultCapture()->getCurrentTestName()).c_str() diff --git a/unit-tests/utilities/concurrency/test-dispatcher.cpp b/unit-tests/utilities/concurrency/test-dispatcher.cpp index 6d9acaa33d..e753cd2dc7 100644 --- a/unit-tests/utilities/concurrency/test-dispatcher.cpp +++ b/unit-tests/utilities/concurrency/test-dispatcher.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2021 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../src/dispatcher.cpp +//#cmake:add-file ../../../include/librealsense2/utilities/concurrency/dispatcher.cpp #include -#include -#include +#include +#include #include #include diff --git a/unit-tests/utilities/concurrency/test-scq.cpp b/unit-tests/utilities/concurrency/test-scq.cpp index 56ccca6264..1b0dd86ed8 100644 --- a/unit-tests/utilities/concurrency/test-scq.cpp +++ b/unit-tests/utilities/concurrency/test-scq.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2021 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../src/dispatcher.cpp +//#cmake:add-file ../../../include/librealsense2/utilities/concurrency/dispatcher.cpp #include -#include -#include +#include +#include #include #include diff --git a/unit-tests/utilities/number/stabilized/test-60-percent.cpp b/unit-tests/utilities/number/stabilized/test-60-percent.cpp index b4528070e3..5563c87182 100644 --- a/unit-tests/utilities/number/stabilized/test-60-percent.cpp +++ b/unit-tests/utilities/number/stabilized/test-60-percent.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; // Test group description: diff --git a/unit-tests/utilities/number/stabilized/test-change-percent.cpp b/unit-tests/utilities/number/stabilized/test-change-percent.cpp index 2bf78fa8a4..b504713729 100644 --- a/unit-tests/utilities/number/stabilized/test-change-percent.cpp +++ b/unit-tests/utilities/number/stabilized/test-change-percent.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-empty.cpp b/unit-tests/utilities/number/stabilized/test-empty.cpp index 5ab4a453c5..2ac46f1951 100644 --- a/unit-tests/utilities/number/stabilized/test-empty.cpp +++ b/unit-tests/utilities/number/stabilized/test-empty.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include <../include/librealsense2/utilities/number/stabilized-value.h> using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-flickering-value.cpp b/unit-tests/utilities/number/stabilized/test-flickering-value.cpp index 8b1b42f2b1..5ad47c5f5e 100644 --- a/unit-tests/utilities/number/stabilized/test-flickering-value.cpp +++ b/unit-tests/utilities/number/stabilized/test-flickering-value.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-illegal-input.cpp b/unit-tests/utilities/number/stabilized/test-illegal-input.cpp index 89d7fe0c17..0b70fa1e2d 100644 --- a/unit-tests/utilities/number/stabilized/test-illegal-input.cpp +++ b/unit-tests/utilities/number/stabilized/test-illegal-input.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-multi-threading.cpp b/unit-tests/utilities/number/stabilized/test-multi-threading.cpp index 29ba28d619..fa3446d18f 100644 --- a/unit-tests/utilities/number/stabilized/test-multi-threading.cpp +++ b/unit-tests/utilities/number/stabilized/test-multi-threading.cpp @@ -1,12 +1,12 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include #include #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; // Test group description: diff --git a/unit-tests/utilities/number/stabilized/test-not-full.cpp b/unit-tests/utilities/number/stabilized/test-not-full.cpp index 5661cda2ee..b43fdde49d 100644 --- a/unit-tests/utilities/number/stabilized/test-not-full.cpp +++ b/unit-tests/utilities/number/stabilized/test-not-full.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-same-value.cpp b/unit-tests/utilities/number/stabilized/test-same-value.cpp index aa00424646..1bdbc69193 100644 --- a/unit-tests/utilities/number/stabilized/test-same-value.cpp +++ b/unit-tests/utilities/number/stabilized/test-same-value.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-stay-last-value.cpp b/unit-tests/utilities/number/stabilized/test-stay-last-value.cpp index 559fe36a02..66826085c6 100644 --- a/unit-tests/utilities/number/stabilized/test-stay-last-value.cpp +++ b/unit-tests/utilities/number/stabilized/test-stay-last-value.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/number/stabilized/test-update-value.cpp b/unit-tests/utilities/number/stabilized/test-update-value.cpp index 48f0852891..9872f55cc8 100644 --- a/unit-tests/utilities/number/stabilized/test-update-value.cpp +++ b/unit-tests/utilities/number/stabilized/test-update-value.cpp @@ -1,11 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../../common/utilities/number/stabilized-value.h +//#cmake:add-file ../../../../include/librealsense2/utilities/number/stabilized-value.h #include "../../../test.h" -#include <../common/utilities/number/stabilized-value.h> +#include using namespace utilities::number; diff --git a/unit-tests/utilities/string/test-split.cpp b/unit-tests/utilities/string/test-split.cpp index 8c14cfee36..b3be965c2c 100644 --- a/unit-tests/utilities/string/test-split.cpp +++ b/unit-tests/utilities/string/test-split.cpp @@ -1,10 +1,10 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../common/utilities/string/split.h +//#cmake:add-file ../../../include/librealsense2/utilities/string/split.h #include "common.h" -#include "../../../common/utilities/string/split.h" +#include using namespace utilities::string; diff --git a/unit-tests/utilities/string/test-string-to-value.cpp b/unit-tests/utilities/string/test-string-to-value.cpp index 7bdae08040..6873711a21 100644 --- a/unit-tests/utilities/string/test-string-to-value.cpp +++ b/unit-tests/utilities/string/test-string-to-value.cpp @@ -2,7 +2,7 @@ // Copyright(c) 2020 Intel Corporation. All Rights Reserved. #include "common.h" -#include +#include #include using namespace utilities::string; diff --git a/unit-tests/utilities/string/test-trim-newlines.cpp b/unit-tests/utilities/string/test-trim-newlines.cpp index 85f8bdd9c1..6793c6722b 100644 --- a/unit-tests/utilities/string/test-trim-newlines.cpp +++ b/unit-tests/utilities/string/test-trim-newlines.cpp @@ -2,7 +2,7 @@ // Copyright(c) 2020 Intel Corporation. All Rights Reserved. #include "common.h" -#include "../common/utilities/string/trim-newlines.h" +#include using namespace utilities::string; diff --git a/unit-tests/utilities/time/test-l500-mfr.cpp b/unit-tests/utilities/time/test-l500-mfr.cpp index 19f882caf4..6ad57dfeaf 100644 --- a/unit-tests/utilities/time/test-l500-mfr.cpp +++ b/unit-tests/utilities/time/test-l500-mfr.cpp @@ -4,14 +4,14 @@ // Unit Test Goals: // Test the get_manufacture_work_week function -//#cmake:add-file ../../../common/utilities/time/work_week.h -//#cmake:add-file ../../../common/utilities/time/work_week.cpp +//#cmake:add-file ../../../include/librealsense2/utilities/time/work-week.h +//#cmake:add-file ../../../include/librealsense2/utilities/time/work-week.cpp //#cmake:add-file ../../../common/utilities/time/l500/get-mfr-ww.h //#cmake:add-file ../../../common/utilities/time/l500/get-mfr-ww.cpp #include "common.h" -#include "../common/utilities/time/work_week.h" +#include #include "../common/utilities/time/l500/get-mfr-ww.h" #define INVALID_MESSAGE( serial, invalid ) "Invalid serial number \"" + serial + "\" " + invalid diff --git a/unit-tests/utilities/time/test-periodic_timer.cpp b/unit-tests/utilities/time/test-periodic_timer.cpp index 5d99371ec4..c5e97e33e0 100644 --- a/unit-tests/utilities/time/test-periodic_timer.cpp +++ b/unit-tests/utilities/time/test-periodic_timer.cpp @@ -4,10 +4,10 @@ // Unit Test Goals: // Test the timer utility classes: stopwatch, timer, periodic_timer. -//#cmake:add-file ../../../common/utilities/time/periodic_timer.h +//#cmake:add-file ../../../include/librealsense2/utilities/time/periodic-timer.h #include "common.h" -#include "../common/utilities/time/periodic_timer.h" +#include using namespace utilities::time; diff --git a/unit-tests/utilities/time/test-stopwatch.cpp b/unit-tests/utilities/time/test-stopwatch.cpp index a46834ddf3..ea1f0d818c 100644 --- a/unit-tests/utilities/time/test-stopwatch.cpp +++ b/unit-tests/utilities/time/test-stopwatch.cpp @@ -4,11 +4,11 @@ // Unit Test Goals: // Test the timer utility classes: stopwatch, timer, periodic_timer. -//#cmake:add-file ../../../common/utilities/time/stopwatch.h +//#cmake:add-file ../../../include/librealsense2/utilities/time/stopwatch.h #include "common.h" -#include "../common/utilities/time/stopwatch.h" +#include using namespace utilities::time; diff --git a/unit-tests/utilities/time/test-timer.cpp b/unit-tests/utilities/time/test-timer.cpp index 8041e81aa9..f97851f4a2 100644 --- a/unit-tests/utilities/time/test-timer.cpp +++ b/unit-tests/utilities/time/test-timer.cpp @@ -4,11 +4,11 @@ // Unit Test Goals: // Test the timer utility classes: stopwatch, timer, periodic_timer. -//#cmake:add-file ../../../common/utilities/time/timer.h +//#cmake:add-file ../../../include/librealsense2/utilities/time/timer.h #include "common.h" -#include "../common/utilities/time/timer.h" +#include using namespace utilities::time; diff --git a/unit-tests/utilities/time/test-waiting-on.cpp b/unit-tests/utilities/time/test-waiting-on.cpp index f507df4ac2..27356d8ea6 100644 --- a/unit-tests/utilities/time/test-waiting-on.cpp +++ b/unit-tests/utilities/time/test-waiting-on.cpp @@ -2,8 +2,8 @@ // Copyright(c) 2021 Intel Corporation. All Rights Reserved. #include -#include -#include +#include +#include #include using utilities::time::waiting_on; diff --git a/unit-tests/utilities/time/test-work_week.cpp b/unit-tests/utilities/time/test-work_week.cpp index 254f6ae593..cc0b64d837 100644 --- a/unit-tests/utilities/time/test-work_week.cpp +++ b/unit-tests/utilities/time/test-work_week.cpp @@ -1,12 +1,11 @@ // License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. -//#cmake:add-file ../../../common/utilities/time/work_week.h -//#cmake:add-file ../../../common/utilities/time/work_week.cpp - +//#cmake:add-file ../../../include/librealsense2/utilities/time/work-week.h +//#cmake:add-file ../../../include/librealsense2/utilities/time/work-week.cpp #include "common.h" -#include "../common/utilities/time/work_week.h" +#include #include using namespace utilities::time; diff --git a/wrappers/opencv/latency-tool/latency-detector.h b/wrappers/opencv/latency-tool/latency-detector.h index de98a3e616..3c58da429f 100644 --- a/wrappers/opencv/latency-tool/latency-detector.h +++ b/wrappers/opencv/latency-tool/latency-detector.h @@ -7,7 +7,7 @@ #include // Access librealsense internal clock #include // Include OpenCV API #include "../cv-helpers.hpp" // Helper functions for conversions between RealSense and OpenCV -#include "../../../src/concurrency.h" // We are borrowing from librealsense concurrency infrastructure for this sample +#include // We are borrowing from librealsense concurrency infrastructure for this sample #include // Helper class to keep track of measured data diff --git a/wrappers/python/CMakeLists.txt b/wrappers/python/CMakeLists.txt index 0c2f41622a..cf92d62ffa 100644 --- a/wrappers/python/CMakeLists.txt +++ b/wrappers/python/CMakeLists.txt @@ -79,7 +79,7 @@ set(RAW_RS ../../src/log.cpp ../../src/backend.h ../../src/backend.cpp - ../../src/dispatcher.cpp + ../../include/librealsense2/utilities/concurrency/dispatcher.cpp ../../src/frame.cpp ../../src/environment.cpp ../../src/to-string.cpp