CV_LOG_WARNING(NULL,cv::format("VIDEOIO(%s): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)",info.name));
cv::format("VIDEOIO(%s): backend is not available "
"(plugin is missing, or can't be loaded due "
"dependencies or it is not compatible)",
info.name));
}
}
}
}
}
}
if(throwOnFail)
if(throwOnFail)
{
CV_Error_(Error::StsError,("could not open '%s'",filename.c_str()));
CV_Error_(Error::StsError,("could not open '%s'",filename.c_str()));
}
returnfalse;
returnfalse;
}
}
...
@@ -140,7 +184,10 @@ bool VideoCapture::open(int cameraNum, int apiPreference)
...
@@ -140,7 +184,10 @@ bool VideoCapture::open(int cameraNum, int apiPreference)
{
{
CV_TRACE_FUNCTION();
CV_TRACE_FUNCTION();
if(isOpened())release();
if(isOpened())
{
release();
}
if(apiPreference==CAP_ANY)
if(apiPreference==CAP_ANY)
{
{
...
@@ -159,8 +206,10 @@ bool VideoCapture::open(int cameraNum, int apiPreference)
...
@@ -159,8 +206,10 @@ bool VideoCapture::open(int cameraNum, int apiPreference)
CV_LOG_WARNING(NULL,cv::format("VIDEOIO(%s): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)",info.name));
cv::format("VIDEOIO(%s): backend is not available "
"(plugin is missing, or can't be loaded due "
"dependencies or it is not compatible)",
info.name));
}
}
}
}
}
}
if(throwOnFail)
if(throwOnFail)
{
CV_Error_(Error::StsError,("could not open camera %d",cameraNum));
CV_Error_(Error::StsError,("could not open camera %d",cameraNum));
CV_LOG_WARNING(NULL,cv::format("VIDEOIO(%s): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)",info.name));
cv::format("VIDEOIO(%s): backend is not available "