librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Get frame timestamp in SDK2.0

Open yichenpan opened this issue 9 years ago • 1 comments

Required Info
Camera Model D400
Firmware Version
Operating System & Version Ubuntu 16.04.3 LTS
Kernel Version (Linux Only)

Hi,

I'm trying to get frame timestamp in SDK2.0 with C api. I noticed there is one function rs2_time_t rs2_get_notification_timestamp(rs2_notification* notification, rs2_error** error); should do the job. However I'm not sure how should I get a rs2_notification object associates to my sensor.

void rs2_set_notifications_callback(const rs2_sensor* sensor, rs2_notification_callback_ptr on_notification, void* user, rs2_error** error); looks like the correct function to get it, but still I don't know what kind of callback function I should be passed into the function.

Anyone can help? Thanks in advance

yichenpan avatar Nov 23 '17 02:11 yichenpan

Hi @yichenpan Please see an example here Let us know if it helped

dorodnic avatar Nov 23 '17 06:11 dorodnic