diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so index f62e5961f2..6f28f2c554 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r2.2.0.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so index c0237c1d02..010641ed15 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r2.3.3.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so index 2c235d8249..5a145b25bd 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r3.0.1.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so index 4872588894..a524b743f7 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.0.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so index 169d97e774..a1802f1ff3 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.0.3.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so index bdd09fb065..089c7e9e2f 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.1.1.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so index 74bfdea5e0..a9ffa4b0cf 100755 Binary files a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so and b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.2.0.so differ diff --git a/3rdparty/lib/armeabi-v7a/libnative_camera_r4.3.0.so b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.3.0.so new file mode 100755 index 0000000000..8ff7177ada Binary files /dev/null and b/3rdparty/lib/armeabi-v7a/libnative_camera_r4.3.0.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r2.2.0.so b/3rdparty/lib/armeabi/libnative_camera_r2.2.0.so index 7c061d9eee..b6ce0d5a5b 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r2.2.0.so and b/3rdparty/lib/armeabi/libnative_camera_r2.2.0.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r2.3.3.so b/3rdparty/lib/armeabi/libnative_camera_r2.3.3.so index 686bdfb615..635ce681a9 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r2.3.3.so and b/3rdparty/lib/armeabi/libnative_camera_r2.3.3.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r3.0.1.so b/3rdparty/lib/armeabi/libnative_camera_r3.0.1.so index 5a5c231737..caacf39d4a 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r3.0.1.so and b/3rdparty/lib/armeabi/libnative_camera_r3.0.1.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r4.0.0.so b/3rdparty/lib/armeabi/libnative_camera_r4.0.0.so index 694cfb80dd..fff4a8069b 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r4.0.0.so and b/3rdparty/lib/armeabi/libnative_camera_r4.0.0.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r4.0.3.so b/3rdparty/lib/armeabi/libnative_camera_r4.0.3.so index c6cc8ab5f9..3119265558 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r4.0.3.so and b/3rdparty/lib/armeabi/libnative_camera_r4.0.3.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r4.1.1.so b/3rdparty/lib/armeabi/libnative_camera_r4.1.1.so index 94966c82e7..7c18baf01f 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r4.1.1.so and b/3rdparty/lib/armeabi/libnative_camera_r4.1.1.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r4.2.0.so b/3rdparty/lib/armeabi/libnative_camera_r4.2.0.so index 8251510c49..8bb093a3d0 100755 Binary files a/3rdparty/lib/armeabi/libnative_camera_r4.2.0.so and b/3rdparty/lib/armeabi/libnative_camera_r4.2.0.so differ diff --git a/3rdparty/lib/armeabi/libnative_camera_r4.3.0.so b/3rdparty/lib/armeabi/libnative_camera_r4.3.0.so new file mode 100755 index 0000000000..a05f179172 Binary files /dev/null and b/3rdparty/lib/armeabi/libnative_camera_r4.3.0.so differ diff --git a/3rdparty/lib/mips/libnative_camera_r4.0.3.so b/3rdparty/lib/mips/libnative_camera_r4.0.3.so index c8c9e2c571..b9500441a0 100755 Binary files a/3rdparty/lib/mips/libnative_camera_r4.0.3.so and b/3rdparty/lib/mips/libnative_camera_r4.0.3.so differ diff --git a/3rdparty/lib/mips/libnative_camera_r4.1.1.so b/3rdparty/lib/mips/libnative_camera_r4.1.1.so index 6845d715d9..d11dcf036d 100755 Binary files a/3rdparty/lib/mips/libnative_camera_r4.1.1.so and b/3rdparty/lib/mips/libnative_camera_r4.1.1.so differ diff --git a/3rdparty/lib/mips/libnative_camera_r4.2.0.so b/3rdparty/lib/mips/libnative_camera_r4.2.0.so index b148d1621b..b06a6819f1 100755 Binary files a/3rdparty/lib/mips/libnative_camera_r4.2.0.so and b/3rdparty/lib/mips/libnative_camera_r4.2.0.so differ diff --git a/3rdparty/lib/mips/libnative_camera_r4.3.0.so b/3rdparty/lib/mips/libnative_camera_r4.3.0.so new file mode 100755 index 0000000000..844b806b9d Binary files /dev/null and b/3rdparty/lib/mips/libnative_camera_r4.3.0.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r2.3.3.so b/3rdparty/lib/x86/libnative_camera_r2.3.3.so index d9400638b5..0dd8904ac9 100755 Binary files a/3rdparty/lib/x86/libnative_camera_r2.3.3.so and b/3rdparty/lib/x86/libnative_camera_r2.3.3.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r3.0.1.so b/3rdparty/lib/x86/libnative_camera_r3.0.1.so index cf2e9908ca..105a19d0c5 100755 Binary files a/3rdparty/lib/x86/libnative_camera_r3.0.1.so and b/3rdparty/lib/x86/libnative_camera_r3.0.1.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r4.0.3.so b/3rdparty/lib/x86/libnative_camera_r4.0.3.so index 420ec818fa..b01a4bd28c 100755 Binary files a/3rdparty/lib/x86/libnative_camera_r4.0.3.so and b/3rdparty/lib/x86/libnative_camera_r4.0.3.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r4.1.1.so b/3rdparty/lib/x86/libnative_camera_r4.1.1.so index 5468d206c6..a59ae39b3c 100755 Binary files a/3rdparty/lib/x86/libnative_camera_r4.1.1.so and b/3rdparty/lib/x86/libnative_camera_r4.1.1.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r4.2.0.so b/3rdparty/lib/x86/libnative_camera_r4.2.0.so index 9923310326..b90b826448 100755 Binary files a/3rdparty/lib/x86/libnative_camera_r4.2.0.so and b/3rdparty/lib/x86/libnative_camera_r4.2.0.so differ diff --git a/3rdparty/lib/x86/libnative_camera_r4.3.0.so b/3rdparty/lib/x86/libnative_camera_r4.3.0.so new file mode 100755 index 0000000000..6607e5da81 Binary files /dev/null and b/3rdparty/lib/x86/libnative_camera_r4.3.0.so differ diff --git a/modules/androidcamera/camera_wrapper/camera_wrapper.cpp b/modules/androidcamera/camera_wrapper/camera_wrapper.cpp index 2d0ebc7a14..ca631fc21e 100644 --- a/modules/androidcamera/camera_wrapper/camera_wrapper.cpp +++ b/modules/androidcamera/camera_wrapper/camera_wrapper.cpp @@ -1,5 +1,8 @@ -#if !defined(ANDROID_r2_2_0) && !defined(ANDROID_r2_3_3) && !defined(ANDROID_r3_0_1) && !defined(ANDROID_r4_0_0) && !defined(ANDROID_r4_0_3) && !defined(ANDROID_r4_1_1) && !defined(ANDROID_r4_2_0) -# error Building camera wrapper for your version of Android is not supported by OpenCV. You need to modify OpenCV sources in order to compile camera wrapper for your version of Android. +#if !defined(ANDROID_r2_2_0) && !defined(ANDROID_r2_3_3) && !defined(ANDROID_r3_0_1) && \ + !defined(ANDROID_r4_0_0) && !defined(ANDROID_r4_0_3) && !defined(ANDROID_r4_1_1) && \ + !defined(ANDROID_r4_2_0) && !defined(ANDROID_r4_3_0) +# error Building camera wrapper for your version of Android is not supported by OpenCV.\ + You need to modify OpenCV sources in order to compile camera wrapper for your version of Android. #endif #include @@ -16,17 +19,18 @@ //Include SurfaceTexture.h file with the SurfaceTexture class # include # define MAGIC_OPENCV_TEXTURE_ID (0x10) -#else // defined(ANDROID_r3_0_1) || defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) -//TODO: This is either 2.2 or 2.3. Include the headers for ISurface.h access -#if defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) -#include -#include +#elif defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) +# include +# include +#elif defined(ANDROID_r4_3_0) +# include +# include #else # include -#endif // defined(ANDROID_r4_1_1) -#endif // defined(ANDROID_r3_0_1) || defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) +#endif #include +#include //undef logging macro from /system/core/libcutils/loghack.h #ifdef LOGD @@ -45,7 +49,6 @@ # undef LOGE #endif - // LOGGING #include #define CAMERA_LOG_TAG "OpenCV_NativeCamera" @@ -60,7 +63,7 @@ using namespace android; void debugShowFPS(); -#if defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) +#if defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) class ConsumerListenerStub: public BufferQueue::ConsumerListener { public: @@ -73,6 +76,29 @@ public: }; #endif +std::string getProcessName() +{ + std::string result; + std::ifstream f; + + f.open("/proc/self/cmdline"); + if (f.is_open()) + { + std::string fullPath; + std::getline(f, fullPath, '\0'); + if (!fullPath.empty()) + { + int i = fullPath.size()-1; + while ((i >= 0) && (fullPath[i] != '/')) i--; + result = fullPath.substr(i+1, std::string::npos); + } + } + + f.close(); + + return result; +} + void debugShowFPS() { static int mFrameCount = 0; @@ -280,7 +306,7 @@ public: } virtual void postData(int32_t msgType, const sp& dataPtr - #if defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) || defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) + #if defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) || defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) ,camera_frame_metadata_t* #endif ) @@ -361,7 +387,9 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, typedef sp (*Android22ConnectFuncType)(); typedef sp (*Android23ConnectFuncType)(int); typedef sp (*Android3DConnectFuncType)(int, int); + typedef sp (*Android43ConnectFuncType)(int, const String16&, int); + const int ANY_CAMERA_INDEX = -1; const int BACK_CAMERA_INDEX = 99; const int FRONT_CAMERA_INDEX = 98; @@ -372,14 +400,24 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, CAMERA_SUPPORT_MODE_ZSL = 0x08 /* Camera Sensor supports ZSL mode. */ }; + // used for Android 4.3 + enum { + USE_CALLING_UID = -1 + }; + const char Android22ConnectName[] = "_ZN7android6Camera7connectEv"; const char Android23ConnectName[] = "_ZN7android6Camera7connectEi"; const char Android3DConnectName[] = "_ZN7android6Camera7connectEii"; + const char Android43ConnectName[] = "_ZN7android6Camera7connectEiRKNS_8String16Ei"; int localCameraIndex = cameraId; + if (cameraId == ANY_CAMERA_INDEX) + { + localCameraIndex = 0; + } #if !defined(ANDROID_r2_2_0) - if (cameraId == BACK_CAMERA_INDEX) + else if (cameraId == BACK_CAMERA_INDEX) { LOGD("Back camera selected"); for (int i = 0; i < Camera::getNumberOfCameras(); i++) @@ -450,6 +488,12 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, LOGD("Connecting to CameraService v 3D"); camera = Android3DConnect(localCameraIndex, CAMERA_SUPPORT_MODE_2D); } + else if (Android43ConnectFuncType Android43Connect = (Android43ConnectFuncType)dlsym(CameraHALHandle, Android43ConnectName)) + { + std::string currentProcName = getProcessName(); + LOGD("Current process name for camera init: %s", currentProcName.c_str()); + camera = Android43Connect(localCameraIndex, String16(currentProcName.c_str()), USE_CALLING_UID); + } else { dlclose(CameraHALHandle); @@ -471,7 +515,7 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, handler->camera = camera; handler->cameraId = localCameraIndex; - if (prevCameraParameters != 0) + if (prevCameraParameters != NULL) { LOGI("initCameraConnect: Setting paramers from previous camera handler"); camera->setParameters(prevCameraParameters->flatten()); @@ -503,11 +547,11 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, const char* available_focus_modes = handler->params.get(CameraParameters::KEY_SUPPORTED_FOCUS_MODES); if (available_focus_modes != 0) { - if (strstr(available_focus_modes, "continuous-video") != NULL) - { - handler->params.set(CameraParameters::KEY_FOCUS_MODE, CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO); + if (strstr(available_focus_modes, "continuous-video") != NULL) + { + handler->params.set(CameraParameters::KEY_FOCUS_MODE, CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO); - status_t resParams = handler->camera->setParameters(handler->params.flatten()); + status_t resParams = handler->camera->setParameters(handler->params.flatten()); if (resParams != 0) { @@ -517,8 +561,8 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, { LOGD("initCameraConnect: autofocus is set to mode \"continuous-video\""); } + } } - } #endif //check if yuv420sp format available. Set this format as preview format. @@ -560,26 +604,25 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, } } - status_t pdstatus; + status_t bufferStatus; #if defined(ANDROID_r2_2_0) - pdstatus = camera->setPreviewDisplay(sp(0 /*new DummySurface*/)); - if (pdstatus != 0) - LOGE("initCameraConnect: failed setPreviewDisplay(0) call; camera migth not work correctly on some devices"); + bufferStatus = camera->setPreviewDisplay(sp(0 /*new DummySurface*/)); + if (bufferStatus != 0) + LOGE("initCameraConnect: failed setPreviewDisplay(0) call (status %d); camera might not work correctly on some devices", bufferStatus); #elif defined(ANDROID_r2_3_3) /* Do nothing in case of 2.3 for now */ - #elif defined(ANDROID_r3_0_1) || defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) sp surfaceTexture = new SurfaceTexture(MAGIC_OPENCV_TEXTURE_ID); - pdstatus = camera->setPreviewTexture(surfaceTexture); - if (pdstatus != 0) - LOGE("initCameraConnect: failed setPreviewTexture call; camera migth not work correctly"); -#elif defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) + bufferStatus = camera->setPreviewTexture(surfaceTexture); + if (bufferStatus != 0) + LOGE("initCameraConnect: failed setPreviewTexture call (status %d); camera might not work correctly", bufferStatus); +#elif defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) sp bufferQueue = new BufferQueue(); sp queueListener = new ConsumerListenerStub(); bufferQueue->consumerConnect(queueListener); - pdstatus = camera->setPreviewTexture(bufferQueue); - if (pdstatus != 0) - LOGE("initCameraConnect: failed setPreviewTexture call; camera migth not work correctly"); + bufferStatus = camera->setPreviewTexture(bufferQueue); + if (bufferStatus != 0) + LOGE("initCameraConnect: failed setPreviewTexture call; camera might not work correctly"); #endif #if (defined(ANDROID_r2_2_0) || defined(ANDROID_r2_3_3) || defined(ANDROID_r3_0_1)) @@ -595,9 +638,9 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, #endif //!(defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3)) LOGD("Starting preview"); - status_t resStart = camera->startPreview(); + status_t previewStatus = camera->startPreview(); - if (resStart != 0) + if (previewStatus != 0) { LOGE("initCameraConnect: startPreview() fails. Closing camera connection..."); handler->closeCameraConnect(); @@ -605,7 +648,7 @@ CameraHandler* CameraHandler::initCameraConnect(const CameraCallback& callback, } else { - LOGD("Preview started successfully"); + LOGD("Preview started successfully"); } return handler; @@ -620,9 +663,11 @@ void CameraHandler::closeCameraConnect() } camera->stopPreview(); +#if defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) || defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) + camera->setPreviewCallbackFlags(CAMERA_FRAME_CALLBACK_FLAG_NOOP); +#endif camera->disconnect(); camera.clear(); - camera=NULL; // ATTENTION!!!!!!!!!!!!!!!!!!!!!!!!!! // When we set @@ -863,14 +908,60 @@ void CameraHandler::applyProperties(CameraHandler** ppcameraHandler) if (*ppcameraHandler == 0) { - LOGE("applyProperties: Passed null *ppcameraHandler"); + LOGE("applyProperties: Passed NULL *ppcameraHandler"); return; } - LOGD("CameraHandler::applyProperties()"); - CameraHandler* previousCameraHandler=*ppcameraHandler; - CameraParameters curCameraParameters(previousCameraHandler->params.flatten()); + CameraParameters curCameraParameters((*ppcameraHandler)->params.flatten()); + +#if defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) || defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) + CameraHandler* handler=*ppcameraHandler; + + handler->camera->stopPreview(); + handler->camera->setPreviewCallbackFlags(CAMERA_FRAME_CALLBACK_FLAG_NOOP); + + status_t reconnectStatus = handler->camera->reconnect(); + if (reconnectStatus != 0) + { + LOGE("applyProperties: failed to reconnect camera (status %d)", reconnectStatus); + return; + } + + handler->camera->setParameters(curCameraParameters.flatten()); + handler->params.unflatten(curCameraParameters.flatten()); + + status_t bufferStatus; +# if defined(ANDROID_r4_0_0) || defined(ANDROID_r4_0_3) + sp surfaceTexture = new SurfaceTexture(MAGIC_OPENCV_TEXTURE_ID); + bufferStatus = handler->camera->setPreviewTexture(surfaceTexture); + if (bufferStatus != 0) + LOGE("applyProperties: failed setPreviewTexture call (status %d); camera might not work correctly", bufferStatus); +# elif defined(ANDROID_r4_1_1) || defined(ANDROID_r4_2_0) || defined(ANDROID_r4_3_0) + sp bufferQueue = new BufferQueue(); + sp queueListener = new ConsumerListenerStub(); + bufferQueue->consumerConnect(queueListener); + bufferStatus = handler->camera->setPreviewTexture(bufferQueue); + if (bufferStatus != 0) + LOGE("applyProperties: failed setPreviewTexture call; camera might not work correctly"); +# endif + handler->camera->setPreviewCallbackFlags( CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK | CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK);//with copy + + LOGD("Starting preview"); + status_t previewStatus = handler->camera->startPreview(); + + if (previewStatus != 0) + { + LOGE("initCameraConnect: startPreview() fails. Closing camera connection..."); + handler->closeCameraConnect(); + handler = NULL; + } + else + { + LOGD("Preview started successfully"); + } +#else + CameraHandler* previousCameraHandler=*ppcameraHandler; CameraCallback cameraCallback=previousCameraHandler->cameraCallback; void* userData=previousCameraHandler->userData; int cameraId=previousCameraHandler->cameraId; @@ -879,7 +970,6 @@ void CameraHandler::applyProperties(CameraHandler** ppcameraHandler) previousCameraHandler->closeCameraConnect(); LOGD("CameraHandler::applyProperties(): after previousCameraHandler->closeCameraConnect"); - LOGD("CameraHandler::applyProperties(): before initCameraConnect"); CameraHandler* handler=initCameraConnect(cameraCallback, cameraId, userData, &curCameraParameters); LOGD("CameraHandler::applyProperties(): after initCameraConnect, handler=0x%x", (int)handler); @@ -892,6 +982,7 @@ void CameraHandler::applyProperties(CameraHandler** ppcameraHandler) } } (*ppcameraHandler)=handler; +#endif } diff --git a/modules/androidcamera/src/camera_activity.cpp b/modules/androidcamera/src/camera_activity.cpp index 508159b17f..84db3e1f33 100644 --- a/modules/androidcamera/src/camera_activity.cpp +++ b/modules/androidcamera/src/camera_activity.cpp @@ -431,14 +431,14 @@ void CameraActivity::applyProperties() int CameraActivity::getFrameWidth() { if (frameWidth <= 0) - frameWidth = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEWIDTH); + frameWidth = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEWIDTH); return frameWidth; } int CameraActivity::getFrameHeight() { if (frameHeight <= 0) - frameHeight = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEHEIGHT); + frameHeight = getProperty(ANDROID_CAMERA_PROPERTY_FRAMEHEIGHT); return frameHeight; } diff --git a/platforms/scripts/camera_build.conf b/platforms/scripts/camera_build.conf index e72fddddbd..7392f91d48 100644 --- a/platforms/scripts/camera_build.conf +++ b/platforms/scripts/camera_build.conf @@ -21,3 +21,7 @@ native_camera_r4.2.0; armeabi-v7a; 14; /home/alexander/Projects/AndroidSource/4. native_camera_r4.2.0; armeabi; 14; /home/alexander/Projects/AndroidSource/4.2 native_camera_r4.2.0; x86; 14; /home/alexander/Projects/AndroidSource/4.2 native_camera_r4.2.0; mips; 14; /home/alexander/Projects/AndroidSource/4.2 +native_camera_r4.3.0; armeabi; 14; /home/alexander/Projects/AndroidSource/4.3 +native_camera_r4.3.0; armeabi-v7a; 14; /home/alexander/Projects/AndroidSource/4.3 +native_camera_r4.3.0; x86; 14; /home/alexander/Projects/AndroidSource/4.3 +native_camera_r4.3.0; mips; 14; /home/alexander/Projects/AndroidSource/4.3