From 0c3438c9a12fbc607eada8f938cf0ad8fdea374d Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Fri, 29 Aug 2014 16:59:09 +0300 Subject: winrt: Add camera service This adds a basic camera service with viewfinder (video renderer based), still image capture, and device selection support. Runtime apps must set the "webcam" and "microphone" device capabilities in order to access the hardware. This can be done by adding the following to the .pro file: WINRT_MANIFEST.capabilites_device += webcam microphone [ChangeLog] Enabled basic camera support in the winrt backend. Change-Id: If4f963ef645d93c757ae23aec9a9c8aae122324f Reviewed-by: Yoann Lopes --- src/plugins/winrt/qwinrtserviceplugin.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/plugins/winrt/qwinrtserviceplugin.h') diff --git a/src/plugins/winrt/qwinrtserviceplugin.h b/src/plugins/winrt/qwinrtserviceplugin.h index aaac79c7b..9fabadb4f 100644 --- a/src/plugins/winrt/qwinrtserviceplugin.h +++ b/src/plugins/winrt/qwinrtserviceplugin.h @@ -48,15 +48,29 @@ QT_USE_NAMESPACE class QWinRTServicePlugin : public QMediaServiceProviderPlugin , public QMediaServiceFeaturesInterface + , public QMediaServiceCameraInfoInterface + , public QMediaServiceSupportedDevicesInterface + , public QMediaServiceDefaultDeviceInterface { Q_OBJECT Q_INTERFACES(QMediaServiceFeaturesInterface) + Q_INTERFACES(QMediaServiceCameraInfoInterface) + Q_INTERFACES(QMediaServiceSupportedDevicesInterface) + Q_INTERFACES(QMediaServiceDefaultDeviceInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "winrt.json") public: QMediaService *create(QString const &key); void release(QMediaService *service); QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const; + + QCamera::Position cameraPosition(const QByteArray &device) const Q_DECL_OVERRIDE; + int cameraOrientation(const QByteArray &device) const Q_DECL_OVERRIDE; + + QList devices(const QByteArray &service) const Q_DECL_OVERRIDE; + QString deviceDescription(const QByteArray &service, const QByteArray &device) Q_DECL_OVERRIDE; + + QByteArray defaultDevice(const QByteArray &service) const Q_DECL_OVERRIDE; }; #endif // QWINRTSERVICEPLUGIN_H -- cgit v1.2.1