diff options
author | Alessio Treglia <alessio@debian.org> | 2014-07-21 13:58:29 +0100 |
---|---|---|
committer | Alessio Treglia <alessio@debian.org> | 2014-07-21 13:58:29 +0100 |
commit | e25104d1480e03993980d944d21d788a95ecd09d (patch) | |
tree | 96b84cc4baac713ad7ab3e887395f9febb91a462 /src/v4l.c | |
parent | 6ef14034edff72de856c29dd2e4f2b180444d890 (diff) |
Imported Upstream version 0.18upstream/0.18
Diffstat (limited to 'src/v4l.c')
-rw-r--r-- | src/v4l.c | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -151,23 +151,29 @@ void camera_cap(cam * cam) printf("min height = %d\n", cam->vid_cap.minheight); } } -void set_pic_info(cam * cam) -{ - char *msg; - if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) { - if(cam->debug == TRUE) { - fprintf(stderr, "VIDIOCSPICT -- could not set picture info, exiting....\n"); - } - msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); - error_dialog(msg); - g_free(msg); - exit(0); - } +void +set_pic_info(cam* cam) { + char *msg; + if(cam->debug) { + g_message("SET PIC"); + } + //cam->vid_pic.palette = VIDEO_PALETTE_RGB24; + //cam->vid_pic.depth = 24; + //cam->vid_pic.palette = VIDEO_PALETTE_YUV420P; + if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) { + if(cam->debug) { + g_message("VIDIOCSPICT -- could not set picture info, exiting...."); + } + msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); + error_dialog(msg); + g_free(msg); + exit(0); + } } -void get_pic_info(cam * cam) -{ +void get_pic_info(cam * cam){ +//set_pic_info(cam); char *msg; if(ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) { |