std::string CameraWrapperConnector::pathLibFolder;
-bool CameraWrapperConnector::isConnectedToLib=false;
+bool CameraWrapperConnector::isConnectedToLib = false;
InitCameraConnectC CameraWrapperConnector::pInitCameraC = 0;
CloseCameraConnectC CameraWrapperConnector::pCloseCameraC = 0;
GetCameraPropertyC CameraWrapperConnector::pGetPropertyC = 0;
frameWidth = -1;
frameHeight = -1;
CameraWrapperConnector::applyProperties(&camera);
+ frameWidth = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEWIDTH);
+ frameHeight = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEHEIGHT);
}
int CameraActivity::getFrameWidth()
{
LOGD("CameraActivity::getFrameWidth()");
- return getProperty(ANDROID_CAMERA_PROPERTY_FRAMEWIDTH);
+ if (frameWidth <= 0)
+ frameWidth = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEWIDTH);
+ return frameWidth;
}
int CameraActivity::getFrameHeight()
{
LOGD("CameraActivity::getFrameHeight()");
- return frameHeight = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEHEIGHT);
+ if (frameHeight <= 0)
+ frameHeight = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEHEIGHT);
+ return frameHeight;
}
void CameraActivity::setPathLibFolder(const char* path)