From d7f964b2a21244872ee197bd859777b11ba66717 Mon Sep 17 00:00:00 2001 From: doronhi Date: Wed, 15 May 2019 08:55:40 +0300 Subject: [PATCH] Disable time_diff_keeper for playback devices. --- src/ds5/ds5-device.cpp | 5 ++++- src/l500/l500-device.cpp | 5 ++++- unit-tests/unit-tests-common.h | 3 --- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ds5/ds5-device.cpp b/src/ds5/ds5-device.cpp index 4073f6cbec..0a9c675938 100644 --- a/src/ds5/ds5-device.cpp +++ b/src/ds5/ds5-device.cpp @@ -618,7 +618,10 @@ namespace librealsense }); notification_thread.detach(); } - _tf_keeper->start(); + if (dynamic_cast(&(ctx->get_backend())) == nullptr) + _tf_keeper->start(); + else + LOG_WARNING("playback_backend - global time_keeper unavailable."); } notification ds5_notification_decoder::decode(int value) diff --git a/src/l500/l500-device.cpp b/src/l500/l500-device.cpp index c39aa3e4be..fa1292c31c 100644 --- a/src/l500/l500-device.cpp +++ b/src/l500/l500-device.cpp @@ -72,7 +72,10 @@ namespace librealsense register_info(RS2_CAMERA_INFO_DEBUG_OP_CODE, std::to_string(static_cast(fw_cmd::GLD))); register_info(RS2_CAMERA_INFO_PHYSICAL_PORT, group.uvc_devices.front().device_path); register_info(RS2_CAMERA_INFO_PRODUCT_ID, pid_hex_str); - _tf_keeper->start(); + if (dynamic_cast(&(ctx->get_backend())) == nullptr) + _tf_keeper->start(); + else + LOG_WARNING("playback_backend - global time_keeper unavailable."); } std::shared_ptr l500_device::create_depth_device(std::shared_ptr ctx, diff --git a/unit-tests/unit-tests-common.h b/unit-tests/unit-tests-common.h index f6d5e606e5..70e221787b 100644 --- a/unit-tests/unit-tests-common.h +++ b/unit-tests/unit-tests-common.h @@ -213,9 +213,6 @@ inline void disable_sensitive_options_for(rs2::sensor& sen) REQUIRE_NOTHROW(range = sen.get_option_range(RS2_OPTION_EXPOSURE)); // TODO: fails sometimes with "Element Not Found!" REQUIRE_NOTHROW(sen.set_option(RS2_OPTION_EXPOSURE, range.def)); } - - if (sen.supports(RS2_OPTION_GLOBAL_TIME_ENABLED)) - REQUIRE_NOTHROW(sen.set_option(RS2_OPTION_GLOBAL_TIME_ENABLED, 0)); } inline void disable_sensitive_options_for(rs2::device& dev)