mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
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
This commit is contained in:
parent
32da0705cf
commit
76b40a37e7
@ -792,11 +792,10 @@ bool CvCaptureCAM_V4L::open(int _index)
|
|||||||
name = cv::format("/dev/video%d", _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());
|
bool res = open(name.c_str());
|
||||||
if (!res)
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user