import QtMobility.location 1.2
// TODO: postcapture
-// TODO: flash not ready
-// TODO: touch focus
+// TODO: flash not ready (battery low or flash not ready message)
// TODO: portrait/landscape
-// TODO: stop viewfinder in settings pages ?
-// TODO: grid lines, face tracking, ambr
+// TODO: grid lines, face tracking
// TODO: select primary/secondary camera.
// TODO: disable debug builds.
// TODO: a way to get buffers to the application
// TODO: fcam like functionality (precise control over capture parameters).
-// TODO: mute video sound
PageStackWindow {
id: root
}
platformStyle: PageStackWindowStyle {
- // TODO: Hack
- background: " "
+ cornersVisible: false
+ background: ""
+ backgroundColor: "transparent"
}
ImageSettings {
}
Camera {
+ id: cam
+ anchors.fill: parent
+
+ FocusReticle {
+ id: focusReticle
+ cam: cam
+ visible: pageStack.currentPage && pageStack.currentPage.controlsVisible && pageStack.currentPage.focusReticleVisible && cam && cam.autoFocus.canFocus(cam.scene.value);
+ cafStatus: cam ? cam.autoFocus.cafStatus : -1
+ status: cam ? cam.autoFocus.status : -1
+ }
+
/*
onDeviceIdChanged: {
// TODO: is this needed ?
}
}
*/
- id: cam
- anchors.fill: parent
-
onError: {
+ if (pipelineManager.error) {
+ // Ignore any subsequent errors.
+ // Killing pulseaudio while recording will lead to an
+ // infinite supply of errors which will break the UI
+ // if we show a banner for each.
+ return;
+ }
+
+ pipelineManager.error = true;
+ pageStack.currentPage.cameraError();
console.log("Camera error (" + code + "): " + message + " " + debug);
showError(qsTr("Camera error. Please restart the application."));
- cam.stop();
- mountProtector.unlock();
+
+ // We cannot stop camera here. Seems there is a race condition somewhere
+ // which leads to a freeze if we do so.
}
onRunningChanged: {
Component.onDestruction: cam.stop();
- // TODO: Hack
+ // We need to show viewfinder below pages.
z: -1
Rectangle {
value: cam.iso.value
}
+ Binding {
+ target: cam.videoMute
+ property: "enabled"
+ value: settings.videoMuted
+ }
+
TrackerStore {
id: trackerStore
active: cam.running
}
}
}
+
+ Standby {
+ policyLost: pipelineManager.state == "policyLost"
+ show: !pageStack.currentPage || (pageStack.currentPage.standbyVisible && pageStack.currentPage.status == PageStatus.Active && pipelineManager.showStandBy)
+ }
}