summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/src/wrappers/jcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/android/src/wrappers/jcamera.cpp')
-rw-r--r--src/plugins/android/src/wrappers/jcamera.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/android/src/wrappers/jcamera.cpp b/src/plugins/android/src/wrappers/jcamera.cpp
index 2d42ffbd6..e69cb554d 100644
--- a/src/plugins/android/src/wrappers/jcamera.cpp
+++ b/src/plugins/android/src/wrappers/jcamera.cpp
@@ -118,6 +118,7 @@ JCamera::JCamera(int cameraId, jobject cam)
: QObject()
, QJNIObjectPrivate(cam)
, m_cameraId(cameraId)
+ , m_rotation(0)
, m_hasAPI14(false)
{
if (isValid()) {
@@ -205,6 +206,11 @@ int JCamera::getNativeOrientation()
return m_info.getField<jint>("orientation");
}
+void JCamera::setDisplayOrientation(int degrees)
+{
+ callMethod<void>("setDisplayOrientation", "(I)V", degrees);
+}
+
QSize JCamera::getPreferredPreviewSizeForVideo()
{
if (!m_parameters.isValid())
@@ -612,10 +618,16 @@ void JCamera::setRotation(int rotation)
if (!m_parameters.isValid())
return;
+ m_rotation = rotation;
m_parameters.callMethod<void>("setRotation", "(I)V", rotation);
applyParameters();
}
+int JCamera::getRotation() const
+{
+ return m_rotation;
+}
+
QList<QSize> JCamera::getSupportedPictureSizes()
{
QList<QSize> list;