An error occurred while debugging OV511. Let's take a look! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. I bought a mesh V2000 camera while learning the USB driver. In linux2.4.20-8 with an OV511 Driver (ov511.c; ov511.h), I first tried to use it. I changed a test program to see if it was useful, the program is exited. Let's take a look at my test program.
CODE: # include "spcav4l. h"
Int main (int argc, const char * argv [])
{
Char videodevice [] = "/dev/v4l/video0 ";
Char character file [] = "1.bmp ";
Int grabmethod = 0;
Int format = VIDEO_PALETTE_JPEG;
Int width = 240;
Int height = 320;
Int I;
Printf ("here 3! \ N ");
Memset (& videoIn, 0, sizeof (struct vdIn ));
If (init_videoIn (& videoIn, videodevice, width, height, format, grabmethod) = 0)
{
Printf ("init is OK! \ N ");
}
Else printf ("init is wrong! \ N ");
Sleep (2 );
Printf ("here 1! \ N ");
V4lGrab (& videoIn, custom file );
Sleep (2 );
Close_v4l (& videoIn );
Return 0;
} |