1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include "qcameraviewfindersettingscontrol.h"
41#include "qmediacontrol_p.h"
42
43QT_BEGIN_NAMESPACE
44
45/*!
46 \class QCameraViewfinderSettingsControl
47 \obsolete
48 \inmodule QtMultimedia
49
50
51 \ingroup multimedia_control
52
53
54 \brief The QCameraViewfinderSettingsControl class provides an abstract class
55 for controlling camera viewfinder parameters.
56
57 The interface name of QCameraViewfinderSettingsControl is \c org.qt-project.qt.cameraviewfindersettingscontrol/5.0 as
58 defined in QCameraViewfinderSettingsControl_iid.
59
60 \warning New backends should implement QCameraViewfinderSettingsControl2 instead.
61 Application developers should request this control only if QCameraViewfinderSettingsControl2
62 is not available.
63
64 \sa QMediaService::requestControl(), QCameraViewfinderSettingsControl2, QCamera
65*/
66
67/*!
68 \macro QCameraViewfinderSettingsControl_iid
69
70 \c org.qt-project.qt.cameraviewfindersettingscontrol/5.0
71
72 Defines the interface name of the QCameraViewfinderSettingsControl class.
73
74 \relates QCameraViewfinderSettingsControl
75*/
76
77/*!
78 Constructs a camera viewfinder control object with \a parent.
79*/
80QCameraViewfinderSettingsControl::QCameraViewfinderSettingsControl(QObject *parent)
81 : QMediaControl(*new QMediaControlPrivate, parent)
82{
83}
84
85/*!
86 Destroys the camera viewfinder control object.
87*/
88QCameraViewfinderSettingsControl::~QCameraViewfinderSettingsControl()
89{
90}
91
92/*!
93 \enum QCameraViewfinderSettingsControl::ViewfinderParameter
94 \value Resolution
95 Viewfinder resolution, QSize.
96 \value PixelAspectRatio
97 Pixel aspect ratio, QSize as in QVideoSurfaceFormat::pixelAspectRatio
98 \value MinimumFrameRate
99 Minimum viewfinder frame rate, qreal
100 \value MaximumFrameRate
101 Maximum viewfinder frame rate, qreal
102 \value PixelFormat
103 Viewfinder pixel format, QVideoFrame::PixelFormat
104 \value UserParameter
105 The base value for platform specific extended parameters.
106 For such parameters the sequential values starting from UserParameter should be used.
107*/
108
109/*!
110 \fn bool QCameraViewfinderSettingsControl::isViewfinderParameterSupported(ViewfinderParameter parameter) const
111
112 Returns true if configuration of viewfinder \a parameter is supported by camera backend.
113*/
114
115/*!
116 \fn QCameraViewfinderSettingsControl::viewfinderParameter(ViewfinderParameter parameter) const
117
118 Returns the value of viewfinder \a parameter.
119*/
120
121/*!
122 \fn QCameraViewfinderSettingsControl::setViewfinderParameter(ViewfinderParameter parameter, const QVariant &value)
123
124 Set the prefferred \a value of viewfinder \a parameter.
125
126 Calling this while the camera is active may result in the camera being
127 stopped and reloaded. If video recording is in progress, this call may be ignored.
128
129 If an unsupported parameter is specified the camera may fail to load,
130 or the setting may be ignored.
131
132 Viewfinder parameters may also depend on other camera settings,
133 especially in video capture mode. If camera configuration conflicts
134 with viewfinder settings, the camara configuration is usually preferred.
135*/
136
137
138/*!
139 \class QCameraViewfinderSettingsControl2
140 \inmodule QtMultimedia
141 \ingroup multimedia_control
142 \since 5.5
143
144 \brief The QCameraViewfinderSettingsControl2 class provides access to the viewfinder settings
145 of a camera media service.
146
147 The functionality provided by this control is exposed to application code through the QCamera class.
148
149 The interface name of QCameraViewfinderSettingsControl2 is \c org.qt-project.qt.cameraviewfindersettingscontrol2/5.5 as
150 defined in QCameraViewfinderSettingsControl2_iid.
151
152 \sa QMediaService::requestControl(), QCameraViewfinderSettings, QCamera
153*/
154
155/*!
156 \macro QCameraViewfinderSettingsControl2_iid
157
158 \c org.qt-project.qt.cameraviewfindersettingscontrol2/5.5
159
160 Defines the interface name of the QCameraViewfinderSettingsControl2 class.
161
162 \relates QCameraViewfinderSettingsControl2
163*/
164
165/*!
166 Constructs a camera viewfinder settings control object with \a parent.
167*/
168QCameraViewfinderSettingsControl2::QCameraViewfinderSettingsControl2(QObject *parent)
169 : QMediaControl(*new QMediaControlPrivate, parent)
170{
171}
172
173/*!
174 Destroys the camera viewfinder settings control object.
175*/
176QCameraViewfinderSettingsControl2::~QCameraViewfinderSettingsControl2()
177{
178}
179
180/*!
181 \fn QCameraViewfinderSettingsControl2::supportedViewfinderSettings() const
182
183 Returns a list of supported camera viewfinder settings.
184
185 The list is ordered by preference; preferred settings come first.
186*/
187
188/*!
189 \fn QCameraViewfinderSettingsControl2::viewfinderSettings() const
190
191 Returns the viewfinder settings.
192
193 If undefined or unsupported values are passed to QCameraViewfinderSettingsControl2::setViewfinderSettings(),
194 this function returns the actual settings used by the camera viewfinder. These may be available
195 only once the camera is active.
196*/
197
198/*!
199 \fn QCameraViewfinderSettingsControl2::setViewfinderSettings(const QCameraViewfinderSettings &settings)
200
201 Sets the camera viewfinder \a settings.
202*/
203
204QT_END_NAMESPACE
205
206#include "moc_qcameraviewfindersettingscontrol.cpp"
207

source code of qtmultimedia/src/multimedia/controls/qcameraviewfindersettingscontrol.cpp