visible: standbyVisible && page.status == PageStatus.Active && pipelineManager.showStandBy
Image {
+ id: icon
source: "image://theme/icon-l-camera-standby"
anchors.centerIn: parent
}
+
+ Label {
+ anchors.top: icon.bottom
+ anchors.right: parent.right
+ anchors.left: parent.left
+ text: qsTr("Resources lost")
+ color: "white"
+ font.pixelSize: 36
+ horizontalAlignment: Text.AlignHCenter
+ visible: pipelineManager.state == "policyLost"
+ }
}
function setPreview(image) {
function stopCamera() {
console.log("stop");
- camera.stop(false);
+ if (camera.stop(false)) {
+ console.log("stopped");
+ }
+ else {
+ console.log("didn't stop");
+ }
+
policy.acquire(CameraResources.None);
+ console.log("acquired none");
}
function forceStopCamera() {
- // We don't release resources here so we can get them back when they become available
+ // We don't release resources here so we can get them back
+ // when they become available
console.log("force");
camera.stop(true);
- showError(qsTr("Resources lost. Stopping camera."));
}
state: "off"