Native camera issue on HTC One S fixed.

Camera connect->disconnect->connect leads to sigsegv.
Apply properties method reimplemented.
This commit is contained in:
Alexander Smorkalov
2012-09-07 12:43:45 +04:00
parent 19e1f89cd6
commit 710e070990
4 changed files with 49 additions and 35 deletions

View File

@@ -448,13 +448,15 @@ VideoCapture::~VideoCapture()
bool VideoCapture::open(const string& filename)
{
cap = cvCreateFileCapture(filename.c_str());
if (!isOpened())
cap = cvCreateFileCapture(filename.c_str());
return isOpened();
}
bool VideoCapture::open(int device)
{
cap = cvCreateCameraCapture(device);
if (!isOpened())
cap = cvCreateCameraCapture(device);
return isOpened();
}