0

Environment: laptop, Ubuntu, qt creator

I wanna open the camera of the laptop and display the video in label in qt creator.

When I run the program, nothing in the label.

the part of code occur the error

if(-1 == ioctl(fd, VIDIOC_S_CROP, &crop))
    {
        if(EINVAL == errno)
        {
            emit display_error(tr("VIDIOC_S_CROP not supported"));
        }
        else
        {
            emit display_error(tr("VIDIOC_S_CROP: %1").arg(QString(strerror(errno))));
            return -1;
        }
    }

error occur in else.

Thank you in advance.

0 Answers0