From 6c822e1dedff95eeb64733e8ae0f7554b01bcd17 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 23 Mar 2011 11:44:02 +0100 Subject: Implement grab timeout --- src/cameras/pco.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cameras/pco.c') diff --git a/src/cameras/pco.c b/src/cameras/pco.c index ac2e950..1cad698 100644 --- a/src/cameras/pco.c +++ b/src/cameras/pco.c @@ -75,6 +75,11 @@ static uint32_t uca_pco_set_property(struct uca_camera *cam, enum uca_property_i case UCA_PROP_TIMESTAMP_MODE: return pco_set_timestamp_mode(GET_PCO(cam), *((uint16_t *) data)); + case UCA_PROP_GRAB_TIMEOUT: + if (grabber->set_property(grabber, UCA_GRABBER_TIMEOUT, data) != UCA_NO_ERROR) + return UCA_ERR_PROP_VALUE_OUT_OF_RANGE; + break; + default: return UCA_ERR_PROP_INVALID; } @@ -188,6 +193,14 @@ static uint32_t uca_pco_get_property(struct uca_camera *cam, enum uca_property_i set_void(data, uint32_t, 16); break; + case UCA_PROP_GRAB_TIMEOUT: + { + uint32_t timeout; + cam->grabber->get_property(cam->grabber, UCA_GRABBER_TIMEOUT, &timeout); + set_void(data, uint32_t, timeout); + } + break; + default: return UCA_ERR_PROP_INVALID; } -- cgit v1.2.3