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>
This commit is contained in:
Andrew den Exter
2014-07-08 15:56:05 +10:00
committed by Andrew den Exter
parent 074bd6ab37
commit cddbe8736d
15 changed files with 445 additions and 283 deletions

View File

@@ -96,7 +96,7 @@ public:
BackCamera // Main photo camera
};
CameraBinSession(QObject *parent);
CameraBinSession(GstElementFactory *sourceFactory, QObject *parent);
~CameraBinSession();
#ifdef HAVE_GST_PHOTOGRAPHY
@@ -121,6 +121,7 @@ public:
QString generateFileName(const QString &prefix, const QDir &dir, const QString &ext) const;
GstElement *buildCameraSource();
GstElementFactory *sourceFactory() const { return m_sourceFactory; }
CameraBinControl *cameraControl() const { return m_cameraControl; }
CameraBinAudioEncoder *audioEncodeControl() const { return m_audioEncodeControl; }
@@ -239,6 +240,7 @@ private:
GstElement *m_camerabin;
GstElement *m_videoSrc;
GstElement *m_viewfinderElement;
GstElementFactory *m_sourceFactory;
bool m_viewfinderHasChanged;
bool m_videoInputHasChanged;