On Thu, Feb 05, 2015 at 01:06:08PM +0200, Billy Pitiot wrote:
>  Hi all,
>  I am currently trying to access the front camera of the Jolla phone. I
>  managed to get a VideoOutput to display the rear camera using import
>  QtMultimedia 5.0 but I do not understand how to change to the front
>  camera.

You cannot do that from QML. You need to have some C++ glue for that.

You create a C++ class inheriting QObject which gets passed Camera::mediaObject 
from QML

>From that mediaObject, get QMediaService:
http://doc.qt.io/qt-5/qmediaobject.html#service

Then request QVideoDeviceSelectorControl control. Use that to switch the devixe.

>  I have seen some examples like this code for CameraPlus:
>  [1]https://gitorious.org/cameraplus
>  But if I try to compile it using Sailfish IDE, I get such errors:
>  No provider of 'gstreamer1.0' found.
>  No provider of 'pkgconfig(gstreamer-1.0)' found.
>  pkgconfig(gstreamer-1.0) is needed by harbour-cameraplus-0-1.armv7hl
>  Am I missing something? What should I rather use?

Don't bother with camera plus. It does not use QtMultimedia. It uses
GStreamer directly. Is that what you need?

Cheers,
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to