|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #include <qvideowindowcontrol.h> |
|
43 |
|
44 QTM_BEGIN_NAMESPACE |
|
45 |
|
46 /*! |
|
47 \class QVideoWindowControl |
|
48 \preliminary |
|
49 \ingroup multimedia-serv |
|
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 |
|
54 window 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 |
|
56 video should be rendered to, and the aspectRatioMode() property |
|
57 indicates how the video should be scaled to fit the displayRect(). |
|
58 |
|
59 \code |
|
60 QVideoWindowControl *windowControl = mediaService->control<QVideoWindowControl *>(); |
|
61 windowControl->setWinId(widget->winId()); |
|
62 windowControl->setDisplayRect(widget->rect()); |
|
63 windowControl->setAspectRatioMode(QVideoWidget::KeepAspectRatio); |
|
64 \endcode |
|
65 |
|
66 QVideoWindowControl is one of number of possible video output controls, |
|
67 in order to receive video it must be made the active video output |
|
68 control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WindowOutput}{WindowOutput}. |
|
69 Consequently any QMediaService that implements QVideoWindowControl must |
|
70 also implement QVideoOutputControl. |
|
71 |
|
72 \code |
|
73 QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>(); |
|
74 outputControl->setOutput(QVideoOutputControl::WindowOutput); |
|
75 \endcode |
|
76 |
|
77 The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as |
|
78 defined in QVideoWindowControl_iid. |
|
79 |
|
80 \sa QMediaService::control(), QVideoOutputControl, QVideoWidget |
|
81 */ |
|
82 |
|
83 /*! |
|
84 \macro QVideoWindowControl_iid |
|
85 |
|
86 \c com.nokia.Qt.QVideoWindowControl/1.0 |
|
87 |
|
88 Defines the interface name of the QVideoWindowControl class. |
|
89 |
|
90 \relates QVideoWindowControl |
|
91 */ |
|
92 |
|
93 /*! |
|
94 Constructs a new video window control with the given \a parent. |
|
95 */ |
|
96 QVideoWindowControl::QVideoWindowControl(QObject *parent) |
|
97 : QMediaControl(parent) |
|
98 { |
|
99 } |
|
100 |
|
101 /*! |
|
102 Destroys a video window control. |
|
103 */ |
|
104 QVideoWindowControl::~QVideoWindowControl() |
|
105 { |
|
106 } |
|
107 |
|
108 /*! |
|
109 \fn QVideoWindowControl::winId() const |
|
110 |
|
111 Returns the ID of the window a video overlay end point renders to. |
|
112 */ |
|
113 |
|
114 /*! |
|
115 \fn QVideoWindowControl::setWinId(WId id) |
|
116 |
|
117 Sets the \a id of the window a video overlay end point renders to. |
|
118 */ |
|
119 |
|
120 /*! |
|
121 \fn QVideoWindowControl::displayRect() const |
|
122 Returns the sub-rect of a window where video is displayed. |
|
123 */ |
|
124 |
|
125 /*! |
|
126 \fn QVideoWindowControl::setDisplayRect(const QRect &rect) |
|
127 Sets the sub-\a rect of a window where video is displayed. |
|
128 */ |
|
129 |
|
130 /*! |
|
131 \fn QVideoWindowControl::isFullScreen() const |
|
132 |
|
133 Identifies if a video overlay is a fullScreen overlay. |
|
134 |
|
135 Returns true if the video overlay is fullScreen, and false otherwise. |
|
136 */ |
|
137 |
|
138 /*! |
|
139 \fn QVideoWindowControl::setFullScreen(bool fullScreen) |
|
140 |
|
141 Sets whether a video overlay is a \a fullScreen overlay. |
|
142 */ |
|
143 |
|
144 /*! |
|
145 \fn QVideoWindowControl::fullScreenChanged(bool fullScreen) |
|
146 |
|
147 Signals that the \a fullScreen state of a video overlay has changed. |
|
148 */ |
|
149 |
|
150 /*! |
|
151 \fn QVideoWindowControl::repaint() |
|
152 |
|
153 Repaints the last frame. |
|
154 */ |
|
155 |
|
156 /*! |
|
157 \fn QVideoWindowControl::nativeSize() const |
|
158 |
|
159 Returns a suggested size for the video display based on the resolution and aspect ratio of the |
|
160 video. |
|
161 */ |
|
162 |
|
163 /*! |
|
164 \fn QVideoWindowControl::nativeSizeChanged() |
|
165 |
|
166 Signals that the native dimensions of the video have changed. |
|
167 */ |
|
168 |
|
169 |
|
170 /*! |
|
171 \fn QVideoWindowControl::aspectRatioMode() const |
|
172 |
|
173 Returns how video is scaled to fit the display region with respect to its aspect ratio. |
|
174 */ |
|
175 |
|
176 /*! |
|
177 \fn QVideoWindowControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) |
|
178 |
|
179 Sets the aspect ratio \a mode which determines how video is scaled to the fit the display region |
|
180 with respect to its aspect ratio. |
|
181 */ |
|
182 |
|
183 /*! |
|
184 \fn QVideoWindowControl::brightness() const |
|
185 |
|
186 Returns the brightness adjustment applied to a video overlay. |
|
187 |
|
188 Valid brightness values range between -100 and 100, the default is 0. |
|
189 */ |
|
190 |
|
191 /*! |
|
192 \fn QVideoWindowControl::setBrightness(int brightness) |
|
193 |
|
194 Sets a \a brightness adjustment for a video overlay. |
|
195 |
|
196 Valid brightness values range between -100 and 100, the default is 0. |
|
197 */ |
|
198 |
|
199 /*! |
|
200 \fn QVideoWindowControl::brightnessChanged(int brightness) |
|
201 |
|
202 Signals that a video overlay's \a brightness adjustment has changed. |
|
203 */ |
|
204 |
|
205 /*! |
|
206 \fn QVideoWindowControl::contrast() const |
|
207 |
|
208 Returns the contrast adjustment applied to a video overlay. |
|
209 |
|
210 Valid contrast values range between -100 and 100, the default is 0. |
|
211 */ |
|
212 |
|
213 /*! |
|
214 \fn QVideoWindowControl::setContrast(int contrast) |
|
215 |
|
216 Sets the \a contrast adjustment for a video overlay. |
|
217 |
|
218 Valid contrast values range between -100 and 100, the default is 0. |
|
219 */ |
|
220 |
|
221 /*! |
|
222 \fn QVideoWindowControl::contrastChanged(int contrast) |
|
223 |
|
224 Signals that a video overlay's \a contrast adjustment has changed. |
|
225 */ |
|
226 |
|
227 /*! |
|
228 \fn QVideoWindowControl::hue() const |
|
229 |
|
230 Returns the hue adjustment applied to a video overlay. |
|
231 |
|
232 Value hue values range between -100 and 100, the default is 0. |
|
233 */ |
|
234 |
|
235 /*! |
|
236 \fn QVideoWindowControl::setHue(int hue) |
|
237 |
|
238 Sets a \a hue adjustment for a video overlay. |
|
239 |
|
240 Valid hue values range between -100 and 100, the default is 0. |
|
241 */ |
|
242 |
|
243 /*! |
|
244 \fn QVideoWindowControl::hueChanged(int hue) |
|
245 |
|
246 Signals that a video overlay's \a hue adjustment has changed. |
|
247 */ |
|
248 |
|
249 /*! |
|
250 \fn QVideoWindowControl::saturation() const |
|
251 |
|
252 Returns the saturation adjustment applied to a video overlay. |
|
253 |
|
254 Value saturation values range between -100 and 100, the default is 0. |
|
255 */ |
|
256 |
|
257 /*! |
|
258 \fn QVideoWindowControl::setSaturation(int saturation) |
|
259 Sets a \a saturation adjustment for a video overlay. |
|
260 |
|
261 Valid saturation values range between -100 and 100, the default is 0. |
|
262 */ |
|
263 |
|
264 /*! |
|
265 \fn QVideoWindowControl::saturationChanged(int saturation) |
|
266 |
|
267 Signals that a video overlay's \a saturation adjustment has changed. |
|
268 */ |
|
269 |
|
270 #include "moc_qvideowindowcontrol.cpp" |
|
271 QTM_END_NAMESPACE |
|
272 |