Merge lp:~uriboni/camera-app/focus-area-coords into lp:camera-app/staging

Proposed by Ugo Riboni
Status: Merged
Approved by: Florian Boucault
Approved revision: 640
Merged at revision: 638
Proposed branch: lp:~uriboni/camera-app/focus-area-coords
Merge into: lp:camera-app/staging
Diff against target: 58 lines (+16/-17)
1 file modified
ViewFinderView.qml (+16/-17)
To merge this branch: bzr merge lp:~uriboni/camera-app/focus-area-coords
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Florian Boucault (community) Needs Fixing
Review via email: mp+283278@code.launchpad.net

Commit message

Fix some comments that are either formatter wrong or in the wrong place

Description of the change

Fix some comments that are either formatter wrong or in the wrong place

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Florian Boucault (fboucault) wrote :

The inversion of y coordinate should not be done between VideoOutput.mapPointToSourceNormalized and CameraFocus.customFocusPoint but instead between CameraFocus.customFocusPoint and android_camera_set_focus_region (in qtubuntu-camera).

review: Needs Fixing
639. By Ugo Riboni

Revert previous patch as fix was moved to qtubuntu-camera

640. By Ugo Riboni

Fix one more comment

Revision history for this message
Ugo Riboni (uriboni) wrote :

Moved the fix to qtubuntu-camera

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ViewFinderView.qml'
2--- ViewFinderView.qml 2016-01-14 15:55:52 +0000
3+++ ViewFinderView.qml 2016-01-21 16:40:35 +0000
4@@ -237,16 +237,16 @@
5 source: camera
6
7 /* This rotation need to be applied since the camera hardware in the
8- Galaxy Nexus phone is mounted at an angle inside the device, so the video
9- feed is rotated too.
10- FIXME: This should come from a system configuration option so that we
11- don't have to have a different codebase for each different device we want
12- to run on. Android has that information and QML has an API to reflect it:
13- the camera.orientation property. Unfortunately it is not hooked up yet.
14+ Galaxy Nexus phone is mounted at an angle inside the device, so the video
15+ feed is rotated too.
16+ FIXME: This should come from a system configuration option so that we
17+ don't have to have a different codebase for each different device we want
18+ to run on. Android has that information and QML has an API to reflect it:
19+ the camera.orientation property. Unfortunately it is not hooked up yet.
20
21- Ref.: http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html#orientation-prop
22- http://doc.qt.io/qt-5/qcamerainfocontrol.html#cameraOrientation
23- http://developer.android.com/reference/android/hardware/Camera.CameraInfo.html#orientation
24+ Ref.: http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html#orientation-prop
25+ http://doc.qt.io/qt-5/qcamerainfocontrol.html#cameraOrientation
26+ http://developer.android.com/reference/android/hardware/Camera.CameraInfo.html#orientation
27 */
28 Component.onCompleted: {
29 // Set orientation only at startup because later on Screen.primaryOrientation
30@@ -254,14 +254,6 @@
31 orientation = Screen.primaryOrientation === Qt.PortraitOrientation ? -90 : 0;
32 }
33
34- /* Convenience item tracking the real position and size of the real video feed.
35- Having this helps since these values depend on a lot of rules:
36- - the feed is automatically scaled to fit the viewfinder
37- - the viewfinder might apply a rotation to the feed, depending on device orientation
38- - the resolution and aspect ratio of the feed changes depending on the active camera
39- The item is also separated in a component so it can be unit tested.
40- */
41-
42 transform: Rotation {
43 origin.x: viewFinder.width / 2
44 origin.y: viewFinder.height / 2
45@@ -270,6 +262,13 @@
46 }
47 }
48
49+ /* Convenience item tracking the real position and size of the real video feed.
50+ Having this helps since these values depend on a lot of rules:
51+ - the feed is automatically scaled to fit the viewfinder
52+ - the viewfinder might apply a rotation to the feed, depending on device orientation
53+ - the resolution and aspect ratio of the feed changes depending on the active camera
54+ The item is also separated in a component so it can be unit tested.
55+ */
56 ViewFinderGeometry {
57 id: viewFinderGeometry
58 anchors.centerIn: parent

Subscribers

People subscribed via source and target branches