From 85b4e242caf33e0a9dc1e216a5e3bf4cf056e8c0 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Mon, 25 Mar 2019 14:32:07 -0400 Subject: [PATCH] kayasrc: issue warning when exposure time value is invalid --- sys/kaya/gstkayasrc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kaya/gstkayasrc.c b/sys/kaya/gstkayasrc.c index 916e466..72256fa 100644 --- a/sys/kaya/gstkayasrc.c +++ b/sys/kaya/gstkayasrc.c @@ -269,8 +269,12 @@ static void gst_kayasrc_set_exposure_time (GstKayaSrc * src) { if (src->cam_handle != INVALID_CAMHANDLE) { - KYFG_SetCameraValueFloat (src->cam_handle, "ExposureTime", + FGSTATUS ret = KYFG_SetCameraValueFloat (src->cam_handle, "ExposureTime", src->exposure_time); + if (ret != FGSTATUS_OK) { + GST_WARNING_OBJECT (src, "Exposure time %.3f invalid", + src->exposure_time); + } } }