diff options
author | Andrew den Exter <andrew.den.exter@jollamobile.com> | 2014-07-08 15:56:05 +1000 |
---|---|---|
committer | Andrew den Exter <andrew.den.exter@qinetic.com.au> | 2014-07-12 02:46:10 +0200 |
commit | cddbe8736d995b4bfdfbbf1abfc3d6aeae3eb214 (patch) | |
tree | 8d775c9ee17902ae39aebae0d825ee3a93455135 /src/plugins/gstreamer/camerabin/camerabinserviceplugin.h | |
parent | 074bd6ab37bbbb4dbba188921783fd98be872555 (diff) |
Provide face and orientation info from gstreamer camera backend.
Cleans up duplicate device enumeration code so the devices listed by
the QMediaServiceProviderPlugin are the same as those in the
QVideoInputDeviceControl and includes face and orientation information
if available.
Change-Id: Iaa4c303c973bcf3e0f7c8c2fd7a7de629bccec86
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/plugins/gstreamer/camerabin/camerabinserviceplugin.h')
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabinserviceplugin.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h index 50ffc59b2..6b192d8ea 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h @@ -44,7 +44,9 @@ #define CAMERABINSERVICEPLUGIN_H #include <qmediaserviceproviderplugin.h> -#include <QtCore/QObject> +#include <private/qgstreamervideoinputdevicecontrol_p.h> + +#include <gst/gst.h> QT_BEGIN_NAMESPACE @@ -53,13 +55,18 @@ class CameraBinServicePlugin , public QMediaServiceSupportedDevicesInterface , public QMediaServiceDefaultDeviceInterface , public QMediaServiceFeaturesInterface + , public QMediaServiceCameraInfoInterface { Q_OBJECT Q_INTERFACES(QMediaServiceSupportedDevicesInterface) Q_INTERFACES(QMediaServiceDefaultDeviceInterface) Q_INTERFACES(QMediaServiceFeaturesInterface) + Q_INTERFACES(QMediaServiceCameraInfoInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "camerabin.json") public: + CameraBinServicePlugin(); + ~CameraBinServicePlugin(); + QMediaService* create(QString const& key); void release(QMediaService *service); @@ -70,12 +77,13 @@ public: QString deviceDescription(const QByteArray &service, const QByteArray &device); QVariant deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property); + QCamera::Position cameraPosition(const QByteArray &device) const; + int cameraOrientation(const QByteArray &device) const; + private: - void updateDevices() const; + GstElementFactory *sourceFactory() const; - mutable QByteArray m_defaultCameraDevice; - mutable QList<QByteArray> m_cameraDevices; - mutable QStringList m_cameraDescriptions; + mutable GstElementFactory *m_sourceFactory; }; QT_END_NAMESPACE |