Accessing the camera
To access the camera when it is supported by the hardware and Qt Multimedia, use the Camera
type and its associated types to control the camera's capture behavior, exposure, flash, focus, and image processing settings. A simple use of the camera to show a viewfinder looks like the following code:
import QtQuick 2.3 import QtMultimedia 5.0 Item { width: 640 height: 480 Camera { id: camera } VideoOutput { source: camera anchors.fill: parent } }
In short, the Camera
type acts like a source for the video just as a MediaPlayer
instance does.
The Camera
type provides a few properties to control its behavior. They are:
imageCapture
: This is an instance ofCameraCapture
, which defines how the camera should capture an imagevideoRecording
: This is an instance ofCameraRecorder
, which defines how the camera should capture a videoexposure
: This is an instance ofCameraExposure
, which controls the various options for the exposure...