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

Qt Code:
  1. import QtQuick 2.1
  2. import QtQuick.Window 2.2
  3. import QtMultimedia 5.4
  4.  
  5. Window
  6. {
  7. visible: true
  8. width: 640
  9. height: 480
  10. title: qsTr("Hello World")
  11.  
  12. Camera {
  13. id: camera
  14.  
  15. imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
  16.  
  17. exposure {
  18. exposureCompensation: -1.0
  19. exposureMode: Camera.ExposurePortrait
  20. }
  21.  
  22. flash.mode: Camera.FlashRedEyeReduction
  23.  
  24. imageCapture {
  25. onImageCaptured: {
  26. photoPreview.source = preview // Show the preview in an Image
  27. }
  28. }
  29. }
  30.  
  31. VideoOutput {
  32. source: camera
  33. anchors.fill: parent
  34. focus : visible // to receive focus and capture key events when visible
  35. }
  36.  
  37. Image {
  38. id: photoPreview
  39. }
  40. }
To copy to clipboard, switch view to plain text mode