Viewfinder settings control (1) for OS X/iOS
QCameraViewfinderSettingsControl - version for AVFoundation plugin
('obsolete' viewfinder settings control interface, camera session uses v2
instead). v1 is implemented using v2 (the v2 object from camera service).
Change-Id: I81207b52b0ba5a67e64465f0e5e0c80d7267df3e
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
committed by
Yoann Lopes
parent
0d783b7303
commit
985ee3261b
@@ -38,6 +38,7 @@
|
||||
#include <QtMultimedia/qcameraviewfindersettings.h>
|
||||
#include <QtMultimedia/qvideoframe.h>
|
||||
|
||||
#include <QtCore/qpointer.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qsize.h>
|
||||
|
||||
@@ -56,6 +57,7 @@ class AVFCameraViewfinderSettingsControl2 : public QCameraViewfinderSettingsCont
|
||||
Q_OBJECT
|
||||
|
||||
friend class AVFCameraSession;
|
||||
friend class AVFCameraViewfinderSettingsControl;
|
||||
public:
|
||||
AVFCameraViewfinderSettingsControl2(AVFCameraService *service);
|
||||
|
||||
@@ -86,6 +88,27 @@ private:
|
||||
mutable AVCaptureConnection *m_videoConnection;
|
||||
};
|
||||
|
||||
class AVFCameraViewfinderSettingsControl : public QCameraViewfinderSettingsControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AVFCameraViewfinderSettingsControl(AVFCameraService *service);
|
||||
|
||||
bool isViewfinderParameterSupported(ViewfinderParameter parameter) const Q_DECL_OVERRIDE;
|
||||
QVariant viewfinderParameter(ViewfinderParameter parameter) const Q_DECL_OVERRIDE;
|
||||
void setViewfinderParameter(ViewfinderParameter parameter, const QVariant &value) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
void setResolution(const QVariant &resolution);
|
||||
void setAspectRatio(const QVariant &aspectRatio);
|
||||
void setFrameRate(const QVariant &fps, bool max);
|
||||
void setPixelFormat(const QVariant &pf);
|
||||
bool initSettingsControl() const;
|
||||
|
||||
AVFCameraService *m_service;
|
||||
mutable QPointer<AVFCameraViewfinderSettingsControl2> m_settingsControl;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user