aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4l.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-20 19:39:23 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-20 19:39:23 (GMT)
commit75f8cc6781e3e834b27c5999c83258654655088b (patch)
tree84f5fbdf925f8323a9d7b354d480a9251e8f71f8 /src/v4l.c
parent8db7a8e712ed7b341914490ec3ed043d0adb9724 (diff)
v4l: remove uneeded debug messages
There's no reason why printing a GUI message and a debug message with the same contents. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/v4l.c')
-rw-r--r--src/v4l.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/v4l.c b/src/v4l.c
index 6af1d88..87adb3c 100644
--- a/src/v4l.c
+++ b/src/v4l.c
@@ -139,12 +139,10 @@ void camera_cap(cam_t *cam)
/* Query device capabilities */
if (v4l2_ioctl(cam->dev, VIDIOC_QUERYCAP, &vid_cap) == -1) {
- if (cam->debug == TRUE) {
- fprintf(stderr,
- "VIDIOC_QUERYCAP -- could not get camera capabilities, exiting.....\n");
- }
- msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."),
- cam->video_dev);
+
+ msg = g_strdup_printf(_("Could not connect to video device (%s).\n"
+ "Please check connection. Error: %d"),
+ cam->video_dev, errno);
error_dialog(msg);
g_free(msg);
exit(0);
@@ -245,11 +243,7 @@ void camera_cap(cam_t *cam)
}
if (!(vid_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
- if (cam->debug == TRUE) {
- fprintf(stderr,
- "VIDIOC_QUERYCAP -- it is not a capture device, exiting.....\n");
- }
- msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."),
+ msg = g_strdup_printf(_("Device %s is not a video capture device)."),
cam->video_dev);
error_dialog(msg);
g_free(msg);

Privacy Policy