提交 71891123 编写于 作者: V Vadim Pisarevsky

Merge pull request #3152 from PhilLab:VideoCaptureFix

......@@ -621,15 +621,15 @@ Ptr<IVideoCapture> VideoCapture::createCameraCapture(int index)
{
#ifdef HAVE_DSHOW
case CV_CAP_DSHOW:
capture = Ptr<IVideoCapture>(new cv::VideoCapture_DShow(index));
if (capture)
capture = makePtr<VideoCapture_DShow>(index);
if (capture && capture.dynamicCast<VideoCapture_DShow>()->isOpened())
return capture;
break; // CV_CAP_DSHOW
#endif
#ifdef HAVE_INTELPERC
case CV_CAP_INTELPERC:
capture = Ptr<IVideoCapture>(new cv::VideoCapture_IntelPerC());
if (capture)
capture = makePtr<VideoCapture_IntelPerC>();
if (capture && capture.dynamicCast<VideoCapture_IntelPerC>()->isOpened())
return capture;
break; // CV_CAP_INTEL_PERC
#endif
......
......@@ -1590,7 +1590,7 @@ bool videoInput::isFrameNew(int id){
bool videoInput::isDeviceSetup(int id){
if(id<devicesFound && VDList[id]->readyToCapture)return true;
if(id>=0 && id<devicesFound && VDList[id]->readyToCapture)return true;
else return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册