From ec5c7fcb9f30a78f77e7c0e05924e55bbd4ab7fc Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Tue, 3 Sep 2024 16:49:46 +0300 Subject: [PATCH 1/2] metadata field used for API RS2_FRAME_METADATA_SENSOR_TIMESTAMP for mipi updated as in usb --- src/ds/d400/d400-device.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ds/d400/d400-device.cpp b/src/ds/d400/d400-device.cpp index 5dfc8232fc..62cc070760 100644 --- a/src/ds/d400/d400-device.cpp +++ b/src/ds/d400/d400-device.cpp @@ -1083,14 +1083,10 @@ namespace librealsense auto md_prop_offset = offsetof(metadata_mipi_depth_raw, depth_mode); depth_sensor.register_metadata(RS2_FRAME_METADATA_SENSOR_TIMESTAMP, - make_attribute_parser(&md_mipi_depth_mode::hw_timestamp, - md_mipi_depth_control_attributes::hw_timestamp_attribute, - md_prop_offset)); - - depth_sensor.register_metadata(RS2_FRAME_METADATA_SENSOR_TIMESTAMP, - make_attribute_parser(&md_mipi_depth_mode::optical_timestamp, - md_mipi_depth_control_attributes::optical_timestamp_attribute, - md_prop_offset)); + make_rs400_sensor_ts_parser(make_uvc_header_parser(&platform::uvc_header::timestamp), + make_attribute_parser(&md_mipi_depth_mode::optical_timestamp, + md_mipi_depth_control_attributes::optical_timestamp_attribute, + md_prop_offset))); depth_sensor.register_metadata(RS2_FRAME_METADATA_ACTUAL_EXPOSURE, make_attribute_parser(&md_mipi_depth_mode::exposure_time, From 9e9530ee517891407cb6de1fa28c80f36888d3f7 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Tue, 3 Sep 2024 16:51:57 +0300 Subject: [PATCH 2/2] comment added --- src/ds/d400/d400-device.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ds/d400/d400-device.cpp b/src/ds/d400/d400-device.cpp index 62cc070760..68980de97c 100644 --- a/src/ds/d400/d400-device.cpp +++ b/src/ds/d400/d400-device.cpp @@ -1082,6 +1082,7 @@ namespace librealsense // attributes of md_mipi_depth_control structure auto md_prop_offset = offsetof(metadata_mipi_depth_raw, depth_mode); + // optical_timestamp contains value of exposure/2 depth_sensor.register_metadata(RS2_FRAME_METADATA_SENSOR_TIMESTAMP, make_rs400_sensor_ts_parser(make_uvc_header_parser(&platform::uvc_header::timestamp), make_attribute_parser(&md_mipi_depth_mode::optical_timestamp,