aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4l.c
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2014-07-21 12:58:29 (GMT)
committerAlessio Treglia <alessio@debian.org>2014-07-21 12:58:29 (GMT)
commite25104d1480e03993980d944d21d788a95ecd09d (patch)
tree96b84cc4baac713ad7ab3e887395f9febb91a462 /src/v4l.c
parent6ef14034edff72de856c29dd2e4f2b180444d890 (diff)
Imported Upstream version 0.18upstream/0.18
Diffstat (limited to 'src/v4l.c')
-rw-r--r--src/v4l.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/v4l.c b/src/v4l.c
index f337e02..7732346 100644
--- a/src/v4l.c
+++ b/src/v4l.c
@@ -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) {

Privacy Policy