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 \inmodule QtMultimedia
48
49
50 \ingroup multimedia_control
51
52
53 \brief The QCameraViewfinderSettingsControl class provides an abstract class
54 for controlling camera viewfinder parameters.
55
56 The interface name of QCameraViewfinderSettingsControl is \c org.qt-project.qt.cameraviewfindersettingscontrol/5.0 as
57 defined in QCameraViewfinderSettingsControl_iid.
58
59 \warning New backends should implement QCameraViewfinderSettingsControl2 instead.
60 Application developers should request this control only if QCameraViewfinderSettingsControl2
61 is not available.
62
63 \sa QMediaService::requestControl(), QCameraViewfinderSettingsControl2, QCamera
64*/
65
66/*!
67 \macro QCameraViewfinderSettingsControl_iid
68
69 \c org.qt-project.qt.cameraviewfindersettingscontrol/5.0
70
71 Defines the interface name of the QCameraViewfinderSettingsControl class.
72
73 \relates QCameraViewfinderSettingsControl
74*/
75
76/*!
77 Constructs a camera viewfinder control object with \a parent.
78*/
79QCameraViewfinderSettingsControl::QCameraViewfinderSettingsControl(QObject *parent)
80 : QMediaControl(*new QMediaControlPrivate, parent)
81{
82}
83
84/*!
85 Destroys the camera viewfinder control object.
86*/
87QCameraViewfinderSettingsControl::~QCameraViewfinderSettingsControl()
88{
89}
90
91/*!
92 \enum QCameraViewfinderSettingsControl::ViewfinderParameter
93 \value Resolution
94 Viewfinder resolution, QSize.
95 \value PixelAspectRatio
96 Pixel aspect ratio, QSize as in QVideoSurfaceFormat::pixelAspectRatio
97 \value MinimumFrameRate
98 Minimum viewfinder frame rate, qreal
99 \value MaximumFrameRate
100 Maximum viewfinder frame rate, qreal
101 \value PixelFormat
102 Viewfinder pixel format, QVideoFrame::PixelFormat
103 \value UserParameter
104 The base value for platform specific extended parameters.
105 For such parameters the sequential values starting from UserParameter should be used.
106*/
107
108/*!
109 \fn bool QCameraViewfinderSettingsControl::isViewfinderParameterSupported(ViewfinderParameter parameter) const
110
111 Returns true if configuration of viewfinder \a parameter is supported by camera backend.
112*/
113
114/*!
115 \fn QCameraViewfinderSettingsControl::viewfinderParameter(ViewfinderParameter parameter) const
116
117 Returns the value of viewfinder \a parameter.
118*/
119
120/*!
121 \fn QCameraViewfinderSettingsControl::setViewfinderParameter(ViewfinderParameter parameter, const QVariant &value)
122
123 Set the prefferred \a value of viewfinder \a parameter.
124
125 Calling this while the camera is active may result in the camera being
126 stopped and reloaded. If video recording is in progress, this call may be ignored.
127
128 If an unsupported parameter is specified the camera may fail to load,
129 or the setting may be ignored.
130
131 Viewfinder parameters may also depend on other camera settings,
132 especially in video capture mode. If camera configuration conflicts
133 with viewfinder settings, the camara configuration is usually preferred.
134*/
135
136
137/*!
138 \class QCameraViewfinderSettingsControl2
139 \inmodule QtMultimedia
140 \ingroup multimedia_control
141 \since 5.5
142
143 \brief The QCameraViewfinderSettingsControl2 class provides access to the viewfinder settings
144 of a camera media service.
145
146 The functionality provided by this control is exposed to application code through the QCamera class.
147
148 The interface name of QCameraViewfinderSettingsControl2 is \c org.qt-project.qt.cameraviewfindersettingscontrol2/5.5 as
149 defined in QCameraViewfinderSettingsControl2_iid.
150
151 \sa QMediaService::requestControl(), QCameraViewfinderSettings, QCamera
152*/
153
154/*!
155 \macro QCameraViewfinderSettingsControl2_iid
156
157 \c org.qt-project.qt.cameraviewfindersettingscontrol2/5.5
158
159 Defines the interface name of the QCameraViewfinderSettingsControl2 class.
160
161 \relates QCameraViewfinderSettingsControl2
162*/
163
164/*!
165 Constructs a camera viewfinder settings control object with \a parent.
166*/
167QCameraViewfinderSettingsControl2::QCameraViewfinderSettingsControl2(QObject *parent)
168 : QMediaControl(*new QMediaControlPrivate, parent)
169{
170}
171
172/*!
173 Destroys the camera viewfinder settings control object.
174*/
175QCameraViewfinderSettingsControl2::~QCameraViewfinderSettingsControl2()
176{
177}
178
179/*!
180 \fn QCameraViewfinderSettingsControl2::supportedViewfinderSettings() const
181
182 Returns a list of supported camera viewfinder settings.
183
184 The list is ordered by preference; preferred settings come first.
185*/
186
187/*!
188 \fn QCameraViewfinderSettingsControl2::viewfinderSettings() const
189
190 Returns the viewfinder settings.
191
192 If undefined or unsupported values are passed to QCameraViewfinderSettingsControl2::setViewfinderSettings(),
193 this function returns the actual settings used by the camera viewfinder. These may be available
194 only once the camera is active.
195*/
196
197/*!
198 \fn QCameraViewfinderSettingsControl2::setViewfinderSettings(const QCameraViewfinderSettings &settings)
199
200 Sets the camera viewfinder \a settings.
201*/
202
203#include "moc_qcameraviewfindersettingscontrol.cpp"
204QT_END_NAMESPACE
205
206