An error occurred while debugging OV511. Let's take a look!

Source: Internet
Author: User
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;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.