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 <yoann.lopes@digia.com>
This commit is contained in:
Andrew Knight
2014-08-29 16:59:09 +03:00
parent 80ba1d635d
commit 0c3438c9a1
16 changed files with 2375 additions and 4 deletions

View File

@@ -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<QByteArray> 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