V4L2: removed setting device control values to initial values on capture

release
This commit is contained in:
Filipe Almeida 2010-06-19 14:34:44 +00:00
parent 8b86f05d3e
commit e78373f4b8

View File

@ -505,10 +505,11 @@ static void v4l2_free_ranges(CvCaptureCAM_V4L* capture) {
if (capture->v4l2_ctrl_ranges != NULL) {
for (i = 0; i < capture->v4l2_ctrl_count; i++) {
/* Return device to initial values: */
double value = (capture->v4l2_ctrl_ranges[i]->initial_value == 0)?0.0:((float)capture->v4l2_ctrl_ranges[i]->initial_value - capture->v4l2_ctrl_ranges[i]->minimum) / (capture->v4l2_ctrl_ranges[i]->maximum - capture->v4l2_ctrl_ranges[i]->minimum);
/* double value = (capture->v4l2_ctrl_ranges[i]->initial_value == 0)?0.0:((float)capture->v4l2_ctrl_ranges[i]->initial_value - capture->v4l2_ctrl_ranges[i]->minimum) / (capture->v4l2_ctrl_ranges[i]->maximum - capture->v4l2_ctrl_ranges[i]->minimum); */
/* Return device to default values: */
/* double value = (capture->v4l2_ctrl_ranges[i]->default_value == 0)?0.0:((float)capture->v4l2_ctrl_ranges[i]->default_value - capture->v4l2_ctrl_ranges[i]->minimum + 1) / (capture->v4l2_ctrl_ranges[i]->maximum - capture->v4l2_ctrl_ranges[i]->minimum); */
icvSetPropertyCAM_V4L(capture, capture->v4l2_ctrl_ranges[i]->ctrl_id, value);
/* icvSetPropertyCAM_V4L(capture, capture->v4l2_ctrl_ranges[i]->ctrl_id, value); */
free(capture->v4l2_ctrl_ranges[i]);
}
}