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 <qcameracontrol.h>
41#include "qmediacontrol_p.h"
42
43QT_BEGIN_NAMESPACE
44
45/*!
46 \class QCameraControl
47 \obsolete
48
49
50
51 \brief The QCameraControl class is an abstract base class for
52 classes that control still cameras or video cameras.
53
54 \inmodule QtMultimedia
55
56 \ingroup multimedia_control
57
58 This service is provided by a QMediaService object via
59 QMediaService::control(). It is used by QCamera.
60
61 The interface name of QCameraControl is \c org.qt-project.qt.cameracontrol/5.0 as
62 defined in QCameraControl_iid.
63
64
65
66 \sa QMediaService::requestControl(), QCamera
67*/
68
69/*!
70 \macro QCameraControl_iid
71
72 \c org.qt-project.qt.cameracontrol/5.0
73
74 Defines the interface name of the QCameraControl class.
75
76 \relates QCameraControl
77*/
78
79/*!
80 Constructs a camera control object with \a parent.
81*/
82
83QCameraControl::QCameraControl(QObject *parent):
84 QMediaControl(*new QMediaControlPrivate, parent)
85{
86}
87
88/*!
89 Destruct the camera control object.
90*/
91
92QCameraControl::~QCameraControl()
93{
94}
95
96/*!
97 \fn QCameraControl::state() const
98
99 Returns the state of the camera service.
100
101 \sa QCamera::state
102*/
103
104/*!
105 \fn QCameraControl::setState(QCamera::State state)
106
107 Sets the camera \a state.
108
109 State changes are synchronous and indicate user intention,
110 while camera status is used as a feedback mechanism to inform application about backend status.
111 Status changes are reported asynchronously with QCameraControl::statusChanged() signal.
112
113 \sa QCamera::State
114*/
115
116/*!
117 \fn void QCameraControl::stateChanged(QCamera::State state)
118
119 Signal emitted when the camera \a state changes.
120
121 In most cases the state chage is caused by QCameraControl::setState(),
122 but if critical error has occurred the state changes to QCamera::UnloadedState.
123*/
124
125/*!
126 \fn QCameraControl::status() const
127
128 Returns the status of the camera service.
129
130 \sa QCamera::state
131*/
132
133/*!
134 \fn void QCameraControl::statusChanged(QCamera::Status status)
135
136 Signal emitted when the camera \a status changes.
137*/
138
139
140/*!
141 \fn void QCameraControl::error(int error, const QString &errorString)
142
143 Signal emitted when an error occurs with error code \a error and
144 a description of the error \a errorString.
145*/
146
147/*!
148 \fn Camera::CaptureModes QCameraControl::captureMode() const = 0
149
150 Returns the current capture mode.
151*/
152
153/*!
154 \fn void QCameraControl::setCaptureMode(QCamera::CaptureModes mode) = 0;
155
156 Sets the current capture \a mode.
157
158 The capture mode changes are synchronous and allowed in any camera state.
159
160 If the capture mode is changed while camera is active,
161 it's recommended to change status to QCamera::LoadedStatus
162 and start activating the camera in the next event loop
163 with the status changed to QCamera::StartingStatus.
164 This allows the capture settings to be applied before camera is started.
165 Than change the status to QCamera::StartedStatus when the capture mode change is done.
166*/
167
168/*!
169 \fn bool QCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const = 0;
170
171 Returns true if the capture \a mode is suported.
172*/
173
174/*!
175 \fn QCameraControl::captureModeChanged(QCamera::CaptureModes mode)
176
177 Signal emitted when the camera capture \a mode changes.
178 */
179
180/*!
181 \fn bool QCameraControl::canChangeProperty(PropertyChangeType changeType, QCamera::Status status) const
182
183 Returns true if backend can effectively apply changing camera properties of \a changeType type
184 while the camera state is QCamera::Active and camera status matches \a status parameter.
185
186 If backend doesn't support applying this change in the active state, it will be stopped
187 before the settings are changed and restarted after.
188 Otherwise the backend should apply the change in the current state,
189 with the camera status indicating the progress, if necessary.
190*/
191
192/*!
193 \enum QCameraControl::PropertyChangeType
194
195 \value CaptureMode Indicates the capture mode is changed.
196 \value ImageEncodingSettings Image encoder settings are changed, including resolution.
197 \value VideoEncodingSettings
198 Video encoder settings are changed, including audio, video and container settings.
199 \value Viewfinder Viewfinder is changed.
200 \value ViewfinderSettings Viewfinder settings are changed.
201*/
202
203QT_END_NAMESPACE
204
205#include "moc_qcameracontrol.cpp"
206

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