Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qavfcamerabase_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QAVFCAMERABASE_H
5#define QAVFCAMERABASE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qobject.h>
19
20#include <private/qplatformcamera_p.h>
21#include <private/qplatformvideodevices_p.h>
22
23Q_FORWARD_DECLARE_OBJC_CLASS(AVCaptureDeviceFormat);
24Q_FORWARD_DECLARE_OBJC_CLASS(AVCaptureConnection);
26
29
31{
32public:
35
36 QList<QCameraDevice> videoDevices() const override;
37
38private:
39 void updateCameraDevices();
40
41 NSObject *m_deviceConnectedObserver;
42 NSObject *m_deviceDisconnectedObserver;
43
44 QList<QCameraDevice> m_cameraDevices;
45};
46
47
49{;
51public:
54
55 bool isActive() const override;
56 void setActive(bool activce) override;
57
58 void setCamera(const QCameraDevice &camera) override;
59 bool setCameraFormat(const QCameraFormat &format) override;
60
62 bool isFocusModeSupported(QCamera::FocusMode mode) const override;
63
64 void setCustomFocusPoint(const QPointF &point) override;
65
66 void setFocusDistance(float d) override;
67 void zoomTo(float factor, float rate) override;
68
70 bool isFlashModeSupported(QCamera::FlashMode mode) const override;
71 bool isFlashReady() const override;
72
74 bool isTorchModeSupported(QCamera::TorchMode mode) const override;
75
78
79 void setExposureCompensation(float bias) override;
80 void setManualIsoSensitivity(int value) override;
81 virtual int isoSensitivity() const override;
82 void setManualExposureTime(float value) override;
83 virtual float exposureTime() const override;
84
85#ifdef Q_OS_IOS
86 // not supported on macOS
88 void setWhiteBalanceMode(QCamera::WhiteBalanceMode /*mode*/) override;
89 void setColorTemperature(int /*temperature*/) override;
90#endif
91
92 AVCaptureDevice *device() const;
93
94protected:
97 void applyFlashSettings();
98
100 bool m_active = false;
101private:
102 bool isFlashSupported = false;
103 bool isFlashAutoSupported = false;
104 bool isTorchSupported = false;
105 bool isTorchAutoSupported = false;
106};
107
109
110#endif
virtual int isoSensitivity() const override
void setFocusDistance(float d) override
bool isTorchModeSupported(QCamera::TorchMode mode) const override
void setCamera(const QCameraDevice &camera) override
QCameraDevice m_cameraDevice
bool isFlashModeSupported(QCamera::FlashMode mode) const override
void setManualIsoSensitivity(int value) override
void setExposureMode(QCamera::ExposureMode) override
bool setCameraFormat(const QCameraFormat &format) override
void setActive(bool activce) override
void updateCameraConfiguration()
void setFocusMode(QCamera::FocusMode mode) override
void setCustomFocusPoint(const QPointF &point) override
void setFlashMode(QCamera::FlashMode mode) override
void setManualExposureTime(float value) override
bool isActive() const override
QAVFCameraBase(QCamera *camera)
virtual float exposureTime() const override
void setTorchMode(QCamera::TorchMode mode) override
bool isFlashReady() const override
void zoomTo(float factor, float rate) override
bool isExposureModeSupported(QCamera::ExposureMode mode) const override
AVCaptureDevice * device() const
void updateCameraProperties()
void setExposureCompensation(float bias) override
bool isFocusModeSupported(QCamera::FocusMode mode) const override
QList< QCameraDevice > videoDevices() const override
QAVFVideoDevices(QPlatformMediaIntegration *integration)
The QCameraDevice class provides general information about camera devices.
The QCameraFormat class describes a video format supported by a camera device. \inmodule QtMultimedia...
The QCamera class provides interface for system camera devices.
Definition qcamera.h:28
WhiteBalanceMode
\value WhiteBalanceAuto Auto white balance mode.
Definition qcamera.h:112
TorchMode
\value TorchOff Torch is Off.
Definition qcamera.h:84
FocusMode
\value FocusModeAuto Continuous auto focus mode.
Definition qcamera.h:67
FlashMode
\value FlashOff Flash is Off.
Definition qcamera.h:77
ExposureMode
\value ExposureAuto Automatic mode.
Definition qcamera.h:91
virtual void setWhiteBalanceMode(QCamera::WhiteBalanceMode)
virtual void setColorTemperature(int)
virtual bool isWhiteBalanceModeSupported(QCamera::WhiteBalanceMode mode) const
\inmodule QtCore\reentrant
Definition qpoint.h:217
QCamera * camera
Definition camera.cpp:19
Combined button and popup list for selecting options.
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum mode
GLint GLsizei GLsizei GLenum format
GLfloat bias
GLuint GLenum * rate
#define Q_OBJECT