summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Koenig <tobias.koenig.qnx@kdab.com>2013-10-23 17:43:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-24 14:00:25 +0200
commite3bd0333de0b7632024cdd5e8e8833173c960549 (patch)
tree779db7dc0dcbfdb8f63bc4f9ea3e02fae2152f37 /src
parentd7dd22b9955ffde6d3c663655d9f9d4a58ca3894 (diff)
Blackberry: Fix video recording
The latest BB10 firmware (10.2) requires to set the rotation property of the video explicitly to the value of the video viewfinder. Change-Id: Iec9d43480820655b5d3ecdd136917d5458f0e55b Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/blackberry/camera/bbcamerasession.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/blackberry/camera/bbcamerasession.cpp b/src/plugins/blackberry/camera/bbcamerasession.cpp
index 707397992..8f8e666d9 100644
--- a/src/plugins/blackberry/camera/bbcamerasession.cpp
+++ b/src/plugins/blackberry/camera/bbcamerasession.cpp
@@ -637,13 +637,15 @@ void BbCameraSession::applyVideoSettings()
const QByteArray windowGroupId = m_windowGrabber->windowGroupId();
+ const int rotationAngle = (360 - m_nativeCameraOrientation);
+
camera_error_t result = CAMERA_EOK;
result = camera_set_videovf_property(m_handle,
CAMERA_IMGPROP_WIN_GROUPID, windowGroupId.data(),
CAMERA_IMGPROP_WIN_ID, windowId.data(),
CAMERA_IMGPROP_WIDTH, viewfinderResolution.width(),
CAMERA_IMGPROP_HEIGHT, viewfinderResolution.height(),
- CAMERA_IMGPROP_ROTATION, 360 - m_nativeCameraOrientation);
+ CAMERA_IMGPROP_ROTATION, rotationAngle);
if (result != CAMERA_EOK) {
qWarning() << "Unable to apply video viewfinder settings:" << result;
@@ -683,9 +685,11 @@ void BbCameraSession::applyVideoSettings()
cameraAudioCodec = CAMERA_AUDIOCODEC_AAC;
else if (audioCodec == QLatin1String("raw"))
cameraAudioCodec = CAMERA_AUDIOCODEC_RAW;
+
result = camera_set_video_property(m_handle,
CAMERA_IMGPROP_WIDTH, resolution.width(),
CAMERA_IMGPROP_HEIGHT, resolution.height(),
+ CAMERA_IMGPROP_ROTATION, rotationAngle,
CAMERA_IMGPROP_VIDEOCODEC, cameraVideoCodec,
CAMERA_IMGPROP_AUDIOCODEC, cameraAudioCodec);
#else