Apply maemo2 patch
authorkecsap <csaba.kertesz@gmail.com>
Mon, 14 Jul 2008 12:32:40 +0000 (12:32 +0000)
committerkecsap <csaba.kertesz@gmail.com>
Mon, 14 Jul 2008 12:32:40 +0000 (12:32 +0000)
git-svn-id: file:///svnroot/opencv/trunk@5 06388636-69cd-4dee-b09d-1587a8dc34ce

otherlibs/highgui/cvcap_v4l.cpp

index 793e4ba..e47f279 100644 (file)
@@ -219,8 +219,8 @@ make & enjoy!
 #endif
 
 /* Defaults - If your board can do better, set it here.  Set for the most common type inputs. */
-#define DEFAULT_V4L_WIDTH  640
-#define DEFAULT_V4L_HEIGHT 480
+#define DEFAULT_V4L_WIDTH  320
+#define DEFAULT_V4L_HEIGHT 240
 
 #define CHANNEL_NUMBER 1
 #define MAX_CAMERAS 8
@@ -845,7 +845,8 @@ static int _capture_V4L2 (CvCaptureCAM_V4L *capture, char *deviceName)
    if (autosetup_capture_mode_v4l2(capture) == -1)
        return -1;
 
-   icvSetVideoSize(capture, DEFAULT_V4L_WIDTH, DEFAULT_V4L_HEIGHT);
+   /* default capture size is already set */
+//   icvSetVideoSize(capture, DEFAULT_V4L_WIDTH, DEFAULT_V4L_HEIGHT);
 
    unsigned int min;
 
@@ -2393,9 +2394,9 @@ static int icvSetVideoSize( CvCaptureCAM_V4L* capture, int w, int h) {
     /* Get window info again, to get the real value */
     if (-1 == xioctl (capture->deviceHandle, VIDIOC_G_FMT, &capture->form))
     {
-      fprintf(stderr, "HIGHGUI ERROR: V4L/V4L2: Could not obtain specifics of capture window.\n\n");
+      fprintf(stderr, "HIGHGUI WARNING: V4L/V4L2: Could not obtain specifics of capture window.\n\n");
 
-      icvCloseCAM_V4L(capture);
+//      icvCloseCAM_V4L(capture);
 
       return 0;
     }