Merge lp:~schwann/camera-app/camera-video-orientation into lp:camera-app

Proposed by Günter Schwann
Status: Merged
Approved by: Günter Schwann
Approved revision: 149
Merged at revision: 152
Proposed branch: lp:~schwann/camera-app/camera-video-orientation
Merge into: lp:camera-app
Diff against target: 41 lines (+12/-10)
1 file modified
Toolbar.qml (+12/-10)
To merge this branch: bzr merge lp:~schwann/camera-app/camera-video-orientation
Reviewer Review Type Date Requested Status
Ugo Riboni (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+170053@code.launchpad.net

Commit message

Set orientation for videos

Description of the change

Set orientation for videos

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ugo Riboni (uriboni) wrote :

The change makes sense to me in terms of code, but I haven't tested on device.

review: Approve
Revision history for this message
Günter Schwann (schwann) wrote :

There is nothing to test on the phone - without the this (bigger) patch https://code.launchpad.net/~schwann/qtubuntu-camera/video-orientation-support/+merge/170062

So I top approve it

Revision history for this message
Günter Schwann (schwann) wrote :
Revision history for this message
Günter Schwann (schwann) wrote :

now approving ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Toolbar.qml'
2--- Toolbar.qml 2013-02-19 16:31:00 +0000
3+++ Toolbar.qml 2013-06-18 11:59:46 +0000
4@@ -133,8 +133,20 @@
5 "camera"
6
7 onClicked: {
8+ var orientation = 90
9+ if (device.isLandscape) {
10+ if (device.naturalOrientation === "portrait") {
11+ orientation = 180
12+ } else {
13+ orientation = 0
14+ }
15+ }
16+ if (device.isInverted)
17+ orientation += 180
18+
19 if (camera.captureMode == Camera.CaptureVideo) {
20 if (camera.videoRecorder.recorderState == CameraRecorder.StoppedState) {
21+ camera.videoRecorder.setMetadata("Orientation", orientation)
22 camera.videoRecorder.record()
23 } else {
24 camera.videoRecorder.stop()
25@@ -142,16 +154,6 @@
26 // and no preview to slide off anyway. Figure out what to do in this case.
27 }
28 } else {
29- var orientation = 90
30- if (device.isLandscape) {
31- if (device.naturalOrientation === "portrait") {
32- orientation = 180
33- } else {
34- orientation = 0
35- }
36- }
37- if (device.isInverted)
38- orientation += 180
39 camera.imageCapture.setMetadata("Orientation", orientation)
40 camera.imageCapture.capture()
41 }

Subscribers

People subscribed via source and target branches