Commit 76b40a37 authored by Jake Howard's avatar Jake Howard Committed by Alexander Alekhin

Merge pull request #15111 from RealOrangeOne:patch-1

* Remove unavoidable print of CV error

The return value covers whether the device exists.

This might be better hidden behind a debug flag, but I couldn't work out how to do that nicely.

* Use `CV_LOG_WARNING` macro to log rather than removing it entirely
parent 32da0705
......@@ -792,11 +792,10 @@ bool CvCaptureCAM_V4L::open(int _index)
name = cv::format("/dev/video%d", _index);
}
/* Print the CameraNumber at the end of the string with a width of one character */
bool res = open(name.c_str());
if (!res)
{
fprintf(stderr, "VIDEOIO ERROR: V4L: can't open camera by index %d\n", _index);
CV_LOG_WARNING(NULL, cv::format("VIDEOIO ERROR: V4L: can't open camera by index %d", _index));
}
return res;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment