Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.3
- import QtQuick.Controls 2.12
- import QtQuick.Layouts 1.11
- import QtQuick.Window 2.12
- import QtMultimedia 5.8
- import QtQml 2.12
- import QtGraphicalEffects 1.12
- import video.filter 1.0
- Rectangle {
- anchors.centerIn: parent
- color: "black"
- Camera {
- id: inputCamera
- imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
- exposure {
- exposureCompensation: -1.0
- exposureMode: Camera.ExposurePortrait
- }
- flash.mode: Camera.FlashRedEyeReduction
- onCameraStatusChanged: {
- console.log(cameraStatus)
- if (cameraStatus == Camera.ActiveStatus) {
- if (!dmsmainwindow.isDMSInitialized)
- dmsmainwindow.isDMSInitialized = true
- } else if (cameraStatus == Camera.StoppingStatus) {
- if (dmsmainwindow.isDMSInitialized)
- dmsmainwindow.isDMSInitialized = false
- }
- }
- }
- VideoFilter {
- id: filter
- }
- VideoOutput {
- id: videoOutput
- source: inputCamera
- anchors.centerIn: parent
- fillMode: VideoOutput.PreserveAspectFit
- filters: [ filter ]
- }
- }
Add Comment
Please, Sign In to add comment