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 "qvideowindowcontrol.h"
41
42QT_BEGIN_NAMESPACE
43
44/*!
45 \class QVideoWindowControl
46
47 \inmodule QtMultimedia
48
49 \ingroup multimedia_control
50 \brief The QVideoWindowControl class provides a media control for rendering video to a window.
51
52
53 The winId() property QVideoWindowControl allows a platform specific window
54 ID to be set as the video render target of a QMediaService. The
55 displayRect() property is used to set the region of the window the video
56 should be rendered to, and the aspectRatioMode() property indicates how the
57 video should be scaled to fit the displayRect().
58
59 \snippet multimedia-snippets/video.cpp Video window control
60
61 QVideoWindowControl is one of a number of possible video output controls.
62
63 The interface name of QVideoWindowControl is \c org.qt-project.qt.videowindowcontrol/5.0 as
64 defined in QVideoWindowControl_iid.
65
66 \sa QMediaService::requestControl(), QVideoWidget
67*/
68
69/*!
70 \macro QVideoWindowControl_iid
71
72 \c org.qt-project.qt.videowindowcontrol/5.0
73
74 Defines the interface name of the QVideoWindowControl class.
75
76 \relates QVideoWindowControl
77*/
78
79/*!
80 Constructs a new video window control with the given \a parent.
81*/
82QVideoWindowControl::QVideoWindowControl(QObject *parent)
83 : QMediaControl(parent)
84{
85}
86
87/*!
88 Destroys a video window control.
89*/
90QVideoWindowControl::~QVideoWindowControl()
91{
92}
93
94/*!
95 \fn QVideoWindowControl::winId() const
96
97 Returns the ID of the window a video overlay end point renders to.
98*/
99
100/*!
101 \fn QVideoWindowControl::setWinId(WId id)
102
103 Sets the \a id of the window a video overlay end point renders to.
104*/
105
106/*!
107 \fn QVideoWindowControl::displayRect() const
108 Returns the sub-rect of a window where video is displayed.
109*/
110
111/*!
112 \fn QVideoWindowControl::setDisplayRect(const QRect &rect)
113 Sets the sub-\a rect of a window where video is displayed.
114*/
115
116/*!
117 \fn QVideoWindowControl::isFullScreen() const
118
119 Identifies if a video overlay is a fullScreen overlay.
120
121 Returns true if the video overlay is fullScreen, and false otherwise.
122*/
123
124/*!
125 \fn QVideoWindowControl::setFullScreen(bool fullScreen)
126
127 Sets whether a video overlay is a \a fullScreen overlay.
128*/
129
130/*!
131 \fn QVideoWindowControl::fullScreenChanged(bool fullScreen)
132
133 Signals that the \a fullScreen state of a video overlay has changed.
134*/
135
136/*!
137 \fn QVideoWindowControl::repaint()
138
139 Repaints the last frame.
140*/
141
142/*!
143 \fn QVideoWindowControl::nativeSize() const
144
145 Returns a suggested size for the video display based on the resolution and aspect ratio of the
146 video.
147*/
148
149/*!
150 \fn QVideoWindowControl::nativeSizeChanged()
151
152 Signals that the native dimensions of the video have changed.
153*/
154
155
156/*!
157 \fn QVideoWindowControl::aspectRatioMode() const
158
159 Returns how video is scaled to fit the display region with respect to its aspect ratio.
160*/
161
162/*!
163 \fn QVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
164
165 Sets the aspect ratio \a mode which determines how video is scaled to the fit the display region
166 with respect to its aspect ratio.
167*/
168
169/*!
170 \fn QVideoWindowControl::brightness() const
171
172 Returns the brightness adjustment applied to a video overlay.
173
174 Valid brightness values range between -100 and 100, the default is 0.
175*/
176
177/*!
178 \fn QVideoWindowControl::setBrightness(int brightness)
179
180 Sets a \a brightness adjustment for a video overlay.
181
182 Valid brightness values range between -100 and 100, the default is 0.
183*/
184
185/*!
186 \fn QVideoWindowControl::brightnessChanged(int brightness)
187
188 Signals that a video overlay's \a brightness adjustment has changed.
189*/
190
191/*!
192 \fn QVideoWindowControl::contrast() const
193
194 Returns the contrast adjustment applied to a video overlay.
195
196 Valid contrast values range between -100 and 100, the default is 0.
197*/
198
199/*!
200 \fn QVideoWindowControl::setContrast(int contrast)
201
202 Sets the \a contrast adjustment for a video overlay.
203
204 Valid contrast values range between -100 and 100, the default is 0.
205*/
206
207/*!
208 \fn QVideoWindowControl::contrastChanged(int contrast)
209
210 Signals that a video overlay's \a contrast adjustment has changed.
211*/
212
213/*!
214 \fn QVideoWindowControl::hue() const
215
216 Returns the hue adjustment applied to a video overlay.
217
218 Value hue values range between -100 and 100, the default is 0.
219*/
220
221/*!
222 \fn QVideoWindowControl::setHue(int hue)
223
224 Sets a \a hue adjustment for a video overlay.
225
226 Valid hue values range between -100 and 100, the default is 0.
227*/
228
229/*!
230 \fn QVideoWindowControl::hueChanged(int hue)
231
232 Signals that a video overlay's \a hue adjustment has changed.
233*/
234
235/*!
236 \fn QVideoWindowControl::saturation() const
237
238 Returns the saturation adjustment applied to a video overlay.
239
240 Value saturation values range between -100 and 100, the default is 0.
241*/
242
243/*!
244 \fn QVideoWindowControl::setSaturation(int saturation)
245 Sets a \a saturation adjustment for a video overlay.
246
247 Valid saturation values range between -100 and 100, the default is 0.
248*/
249
250/*!
251 \fn QVideoWindowControl::saturationChanged(int saturation)
252
253 Signals that a video overlay's \a saturation adjustment has changed.
254*/
255
256#include "moc_qvideowindowcontrol.cpp"
257QT_END_NAMESPACE
258
259