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.
This commit is contained in:
parent
7f3c5814b0
commit
63295f7290
@ -799,11 +799,11 @@ gst_kayasrc_stream_buffer_callback (STREAM_BUFFER_HANDLE buffer_handle,
|
|||||||
GST_BUFFER_OFFSET (buf) = src->frame_count;
|
GST_BUFFER_OFFSET (buf) = src->frame_count;
|
||||||
src->frame_count++;
|
src->frame_count++;
|
||||||
|
|
||||||
if (src->kaya_base == GST_CLOCK_TIME_NONE) {
|
//if (src->kaya_base == GST_CLOCK_TIME_NONE) {
|
||||||
/* assume delay between these two calls is negligible */
|
// assume delay between these two calls is negligible
|
||||||
src->kaya_base = KYFG_GetGrabberValueInt (src->cam_handle, "Timestamp");
|
src->kaya_base = KYFG_GetGrabberValueInt (src->cam_handle, "Timestamp");
|
||||||
src->unix_base = g_get_real_time () * 1000;
|
src->unix_base = g_get_real_time () * 1000;
|
||||||
}
|
//}
|
||||||
#if GST_CHECK_VERSION(1,14,0)
|
#if GST_CHECK_VERSION(1,14,0)
|
||||||
{
|
{
|
||||||
GstClockTime unix_ts = src->unix_base + (timestamp - src->kaya_base);
|
GstClockTime unix_ts = src->unix_base + (timestamp - src->kaya_base);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user