aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4l.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-19 17:26:01 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-21 09:34:58 (GMT)
commitf85679e6c08c5ed1c8bee595bb15805d1e9ec081 (patch)
tree6cfeee80ab0756013e06a18765c21ef6f791a852 /src/v4l.c
parent6087e0f3b3b2cfd57bf5eb173eaa0d4dd34ba9a4 (diff)
Add a dialog to optionally select the video device
The first time camorama is started, or if it doesn't find the previously used camera, it will now open a dialog allowing the user to choose the camera. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/v4l.c')
-rw-r--r--src/v4l.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/v4l.c b/src/v4l.c
index 7cea990..d8732c6 100644
--- a/src/v4l.c
+++ b/src/v4l.c
@@ -129,7 +129,7 @@ void get_supported_resolutions(cam_t *cam)
qsort(cam->res, cam->n_res, sizeof(struct resolutions), sort_func);
}
-void camera_cap(cam_t *cam)
+int camera_cap(cam_t *cam)
{
char *msg;
int i;
@@ -145,7 +145,7 @@ void camera_cap(cam_t *cam)
cam->video_dev, errno);
error_dialog(msg);
g_free(msg);
- exit(0);
+ return 1;
}
/* Query supported resolutions */
@@ -247,7 +247,7 @@ void camera_cap(cam_t *cam)
cam->video_dev);
error_dialog(msg);
g_free(msg);
- exit(0);
+ return 1;
}
if (!(vid_cap.device_caps & V4L2_CAP_STREAMING))
@@ -265,6 +265,8 @@ void camera_cap(cam_t *cam)
printf("min width = %d\n", cam->min_width);
printf("min height = %d\n", cam->min_height);
}
+
+ return 0;
}
void get_pic_info(cam_t *cam)

Privacy Policy