Xlib, libv4l2 ERROR, VIDEOIO ERROR

asked 2015-12-28 16:32:17 -0500

RO-ny9 gravatar image

Hi, I tried 2 types of code - one of them

CODE

#include "opencv/highgui.h"
#include "opencv/cv.h"
#include "stdio.h"

int main( int argc, char** argv ) {
    IplImage* frame = 0;
    cvNamedWindow( "VideoCapture", CV_WINDOW_AUTOSIZE );
    CvCapture* capture = 0;
    capture = cvCaptureFromCAM( CV_CAP_ANY );
    while(1) {
        frame = cvQueryFrame( capture );
        if( !frame ) break;
        cvShowImage( "VideoCapture", frame );
        char c = cvWaitKey(33);
        if( c == 27 ) break;
    }
    cvReleaseCapture( &capture );
    cvDestroyWindow( "VideoCapture" );
}

ERROR message

Xlib:  extension "RANDR" missing on display ":1.0".
libv4l2: error setting pixformat: Device or resource busy
VIDEOIO ERROR: libv4l unable to ioctl S_FMT
libv4l2: error setting pixformat: Device or resource busy
libv4l1: error setting pixformat: Device or resource busy
VIDEOIO ERROR: libv4l unable to ioctl VIDIOCSPICT
edit retag flag offensive close merge delete