summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-04-14 13:13:43 +0200
committerLars Knoll <lars.knoll@qt.io>2021-04-16 11:25:51 +0000
commitb43c44e3e5aa89f076ba2846c30ca2edc435c741 (patch)
tree8f2a00f6db0a2b28fd1860b9810ef081c26f7126 /examples
parent58d8d75bfcb9d7d78dfc207151b3e6dbcc5f7a85 (diff)
Use the C++ based Camera item
The old one doesn't work anymore, and this allows for some level of testing on the QML side. Change-Id: I8163d8c8cd2ab7c021f138e844128300d26debf2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml18
1 files changed, 11 insertions, 7 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml
index 018453c22..4bbe2f978 100644
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml
+++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml
@@ -61,17 +61,21 @@ VideoOutput {
onHeightChanged: root.sizeChanged()
- Camera {
- id: camera
+ CaptureSession {
+ camera: NCamera {
+ id: camera
- onError: {
- if (Camera.NoError != error) {
- console.log("[qmlvideo] CameraItem.onError error " + error + " errorString " + errorString)
- root.fatalError()
- }
+// onError: {
+// if (Camera.NoError != error) {
+// console.log("[qmlvideo] CameraItem.onError error " + error + " errorString " + errorString)
+// root.fatalError()
+// }
+// }
}
+ videoOutput: root
}
+
function start() { camera.start() }
function stop() { camera.stop() }
}