diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-01-15 20:55:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 10:08:30 +0100 |
commit | 437db8df51c8ce11f6d856d1c0441572cf218e1f (patch) | |
tree | e689faf4df9eba025a096657495ffb686e613810 /src/plugins/android/src/wrappers | |
parent | dda1bb47163a39e07ba559d16684b9891193cc85 (diff) |
Android: fixes custom camera focus point.
The custom focus point passed to the camera was in viewport orientation
but should be in sensor orientation. The two might differ.
Task-number: QTBUG-36208
Change-Id: Id272402090c2814e02abc527c0f6a6e932a60081
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins/android/src/wrappers')
-rw-r--r-- | src/plugins/android/src/wrappers/jcamera.cpp | 8 | ||||
-rw-r--r-- | src/plugins/android/src/wrappers/jcamera.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/android/src/wrappers/jcamera.cpp b/src/plugins/android/src/wrappers/jcamera.cpp index 3a0585f31..c880141af 100644 --- a/src/plugins/android/src/wrappers/jcamera.cpp +++ b/src/plugins/android/src/wrappers/jcamera.cpp @@ -231,6 +231,7 @@ class JCameraWorker : public QObject, public QJNIObjectPrivate QSize m_previewSize; int m_rotation; + int m_displayOrientation; bool m_hasAPI14; @@ -336,8 +337,14 @@ int JCamera::getNativeOrientation() return d->getNativeOrientation(); } +int JCamera::getDisplayOrientation() const +{ + return d->m_displayOrientation; +} + void JCamera::setDisplayOrientation(int degrees) { + d->m_displayOrientation = degrees; QMetaObject::invokeMethod(d, "setDisplayOrientation", Q_ARG(int, degrees)); } @@ -619,6 +626,7 @@ JCameraWorker::JCameraWorker(JCamera *camera, int cameraId, jobject cam, QThread , QJNIObjectPrivate(cam) , m_cameraId(cameraId) , m_rotation(0) + , m_displayOrientation(0) , m_hasAPI14(false) , m_parametersMutex(QMutex::Recursive) { diff --git a/src/plugins/android/src/wrappers/jcamera.h b/src/plugins/android/src/wrappers/jcamera.h index 535efe214..e9063f120 100644 --- a/src/plugins/android/src/wrappers/jcamera.h +++ b/src/plugins/android/src/wrappers/jcamera.h @@ -88,6 +88,7 @@ public: CameraFacing getFacing(); int getNativeOrientation(); + int getDisplayOrientation() const; void setDisplayOrientation(int degrees); QSize getPreferredPreviewSizeForVideo(); |