From 63295f7290976fba69005498e1d928b7c6343cc2 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Mon, 2 Aug 2021 10:54:15 -0400 Subject: [PATCH] kayasrc: for Unix time metadata, sync against system clock every frame due to drift Otherwise, over time, the framegrabber clock drifts from the system clock. --- sys/kaya/gstkayasrc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kaya/gstkayasrc.c b/sys/kaya/gstkayasrc.c index 140f438..94fa043 100644 --- a/sys/kaya/gstkayasrc.c +++ b/sys/kaya/gstkayasrc.c @@ -799,11 +799,11 @@ gst_kayasrc_stream_buffer_callback (STREAM_BUFFER_HANDLE buffer_handle, GST_BUFFER_OFFSET (buf) = src->frame_count; src->frame_count++; - if (src->kaya_base == GST_CLOCK_TIME_NONE) { - /* assume delay between these two calls is negligible */ - src->kaya_base = KYFG_GetGrabberValueInt (src->cam_handle, "Timestamp"); - src->unix_base = g_get_real_time () * 1000; - } + //if (src->kaya_base == GST_CLOCK_TIME_NONE) { + // assume delay between these two calls is negligible + src->kaya_base = KYFG_GetGrabberValueInt (src->cam_handle, "Timestamp"); + src->unix_base = g_get_real_time () * 1000; + //} #if GST_CHECK_VERSION(1,14,0) { GstClockTime unix_ts = src->unix_base + (timestamp - src->kaya_base);