PDA

View Full Version : requestService(): no service found for - "org.qt-project.qt.camera"



TheIndependentAquarius
16th February 2017, 09:39
I tried this example from one of the qml camera tutorials.

The camera is being detected through "cheese", but is not shown through this code.

This code results in "defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.camera"

What should I look into?

Am using Qt 5.4 with QtGstreamer 1.2


import QtQuick 2.1
import QtQuick.Window 2.2
import QtMultimedia 5.4

Window
{
visible: true
width: 640
height: 480
title: qsTr("Hello World")

Camera {
id: camera

imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash

exposure {
exposureCompensation: -1.0
exposureMode: Camera.ExposurePortrait
}

flash.mode: Camera.FlashRedEyeReduction

imageCapture {
onImageCaptured: {
photoPreview.source = preview // Show the preview in an Image
}
}
}

VideoOutput {
source: camera
anchors.fill: parent
focus : visible // to receive focus and capture key events when visible
}

Image {
id: photoPreview
}
}