Home > OS >  V4L2 programming in the ioctl VIDIOC_CROPCAP return value error
V4L2 programming in the ioctl VIDIOC_CROPCAP return value error

Time:09-29

The Linux kernel version is 2.6.38
The camera model is in the core 301 p
Development board is tiny6410
Program the following
If (0==ioctl (fd, VIDIOC_CROPCAP, & amp; Cropcap))//an error here, errors of parameter
{
CLEAR (crop);
Crop. Type=V4L2_BUF_TYPE_VIDEO_CAPTURE;
Crop. C=cropcap. Defrect;
If (1==ioctl (fd, VIDIOC_S_CROP, & amp; Crop))
{
If (EINVAL==errno)
{
Emit display_error (tr (" VIDIOC_S_CROP not supported "));
}
The else
{
Emit display_error (tr (" VIDIOC_S_CROP: % 1 "). Arg (QString (strerror (errno))));
return -1;
}
}
}
The else
{
Emit display_error (tr (" VIDIOC_CROPCAP: % 1 "). Arg (QString (strerror (errno))));
return -1;
}
This code the first ioctl return value has been wrong, leads to the else, error error parameters, excuse me everybody is what problem?

CodePudding user response:

Problem has been solved, there is doubt can I private chat,

CodePudding user response:

The building Lord, please teach,

CodePudding user response:

refer to the second floor qq_26709569 response:
the building Lord give advice or comments please,
add my QQ, 493341322

CodePudding user response:

Could you tell me is how to deal with?

CodePudding user response:

Sick, you have a question to ask, solution to you, or you do not say, I also to a private chat, this kind of attitude, become a big deal,

CodePudding user response:

Address you say ah, a few words, to the private chat what are you doing? Why want to charge you have said, sweetly
  • Related