|
|
|
@ -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]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|