author | alwin <alwin> | 2005-04-02 21:55:07 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-04-02 21:55:07 (UTC) |
commit | a5020219d43b9dd788cc090ae565c28f27dd6a58 (patch) (unidiff) | |
tree | c60f0ae6554817db54e45ea2eb6b1c9896193b3e | |
parent | b92357d5566b9ee220ff5f4e8eb612b2db32e20b (diff) | |
download | opie-a5020219d43b9dd788cc090ae565c28f27dd6a58.zip opie-a5020219d43b9dd788cc090ae565c28f27dd6a58.tar.gz opie-a5020219d43b9dd788cc090ae565c28f27dd6a58.tar.bz2 |
my last try to get mediaplayer2 more stable.
-> protected the videobuffer with mutex, make a deep copy of it so xine may
destruct its internal buffers as wanted
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 359 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.h | 54 |
2 files changed, 229 insertions, 184 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp index 9e86041..211791b 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp | |||
@@ -2,5 +2,6 @@ | |||
2 | /* | 2 | /* |
3 | � � � � � � � � This file is part of the Opie Project | 3 | �� �� �� �� �� �� �� �� This file is part of the Opie Project |
4 | 4 | ||
5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 5 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> |
6 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | 7 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> |
@@ -8,21 +9,21 @@ | |||
8 | .=l. | 9 | .=l. |
9 | � � � � � �.>+-= | 10 | �� �� �� �� �� ��.>+-= |
10 | �_;:, � � .> � �:=|. This program is free software; you can | 11 | ��_;:, �� �� .> �� ��:=|. This program is free software; you can |
11 | .> <`_, � > �. � <= redistribute it and/or modify it under | 12 | .> <`_, �� > ��. �� <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- � : the terms of the GNU General Public | 13 | :`=1 )Y*s>-.-- �� : the terms of the GNU General Public |
13 | .="- .-=="i, � � .._ License as published by the Free Software | 14 | .="- .-=="i, �� �� .._ License as published by the Free Software |
14 | �- . � .-<_> � � .<> Foundation; either version 2 of the License, | 15 | ��- . �� .-<_> �� �� .<> Foundation; either version 2 of the License, |
15 | � � �._= =} � � � : or (at your option) any later version. | 16 | �� �� ��._= =} �� �� �� : or (at your option) any later version. |
16 | � � .%`+i> � � � _;_. | 17 | �� �� .%`+i> �� �� �� _;_. |
17 | � � .i_,=:_. � � �-<s. This program is distributed in the hope that | 18 | �� �� .i_,=:_. �� �� ��-<s. This program is distributed in the hope that |
18 | � � �+ �. �-:. � � � = it will be useful, but WITHOUT ANY WARRANTY; | 19 | �� �� ��+ ��. ��-:. �� �� �� = it will be useful, but WITHOUT ANY WARRANTY; |
19 | � � : .. � �.:, � � . . . without even the implied warranty of | 20 | �� �� : .. �� ��.:, �� �� . . . without even the implied warranty of |
20 | � � =_ � � � �+ � � =;=|` MERCHANTABILITY or FITNESS FOR A | 21 | �� �� =_ �� �� �� ��+ �� �� =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | � _.=:. � � � : � �:=>`: PARTICULAR PURPOSE. See the GNU | 22 | �� _.=:. �� �� �� : �� ��:=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= � � � = � � � ; Library General Public License for more | 23 | ..}^=.= �� �� �� = �� �� �� ; Library General Public License for more |
23 | ++= � -. � � .` � � .: details. | 24 | ++= �� -. �� �� .` �� �� .: details. |
24 | �: � � = �...= . :.=- | 25 | ��: �� �� = ��...= . :.=- |
25 | �-. � .:....=;==+<; You should have received a copy of the GNU | 26 | ��-. �� .:....=;==+<; You should have received a copy of the GNU |
26 | � -_. . . � )=. �= Library General Public License along with | 27 | �� -_. . . �� )=. ��= Library General Public License along with |
27 | � � -- � � � �:-=` this library; see the file COPYING.LIB. | 28 | �� �� -- �� �� �� ��:-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 29 | If not, write to the Free Software Foundation, |
@@ -33,2 +34,5 @@ | |||
33 | 34 | ||
35 | #include "xinevideowidget.h" | ||
36 | #include <opie2/odebug.h> | ||
37 | |||
34 | #include <qimage.h> | 38 | #include <qimage.h> |
@@ -41,3 +45,4 @@ | |||
41 | 45 | ||
42 | #include "xinevideowidget.h" | 46 | #include <pthread.h> |
47 | |||
43 | 48 | ||
@@ -114,11 +119,12 @@ static inline void memcpy_step_rev ( void *_dst, void *_src, size_t len, size_t | |||
114 | XineVideoWidget::XineVideoWidget ( QWidget* parent, const char* name ) | 119 | XineVideoWidget::XineVideoWidget ( QWidget* parent, const char* name ) |
115 | : QWidget ( parent, name, WRepaintNoErase | WResizeNoErase ) | 120 | : QWidget ( parent, name, WRepaintNoErase | WResizeNoErase ) |
116 | { | 121 | { |
117 | setBackgroundMode ( NoBackground ); | 122 | setBackgroundMode ( NoBackground ); |
118 | 123 | ||
119 | m_logo = 0; | 124 | m_logo = 0; |
120 | m_buff = 0; | 125 | m_buff = 0; |
121 | m_bytes_per_line_fb = qt_screen-> linestep ( ); | 126 | m_bytes_per_line_fb = qt_screen-> linestep ( ); |
122 | m_bytes_per_pixel = ( qt_screen->depth() + 7 ) / 8; | 127 | m_bytes_per_pixel = ( qt_screen->depth() + 7 ) / 8; |
123 | m_rotation = 0; | 128 | m_rotation = 0; |
129 | m_lastsize = 0; | ||
124 | } | 130 | } |
@@ -128,3 +134,11 @@ XineVideoWidget::~XineVideoWidget ( ) | |||
128 | { | 134 | { |
129 | delete m_logo; | 135 | ThreadUtil::AutoLock a(m_bufmutex); |
136 | if (m_buff) { | ||
137 | delete[]m_buff; | ||
138 | m_lastsize=0; | ||
139 | m_buff = 0; | ||
140 | } | ||
141 | if (m_logo) { | ||
142 | delete m_logo; | ||
143 | } | ||
130 | } | 144 | } |
@@ -133,4 +147,9 @@ void XineVideoWidget::clear ( ) | |||
133 | { | 147 | { |
134 | m_buff = 0; | 148 | ThreadUtil::AutoLock a(m_bufmutex); |
135 | repaint ( false ); | 149 | if (m_buff) { |
150 | delete[]m_buff; | ||
151 | m_lastsize=0; | ||
152 | m_buff = 0; | ||
153 | } | ||
154 | repaint ( false ); | ||
136 | } | 155 | } |
@@ -154,105 +173,115 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
154 | { | 173 | { |
155 | if ( m_buff == 0 ) { | 174 | ThreadUtil::AutoLock a(m_bufmutex); |
156 | QPainter p ( this ); | 175 | QPainter p ( this ); |
157 | p. fillRect ( rect ( ), black ); | 176 | p. fillRect ( rect (), black ); |
158 | if ( m_logo ) | 177 | if (m_logo) |
159 | p. drawImage ( 0, 0, *m_logo ); | 178 | p. drawImage ( 0, 0, *m_logo ); |
160 | } | 179 | } |
161 | else { | 180 | |
162 | // Qt needs to be notified which areas were really updated .. strange | 181 | void XineVideoWidget::paintEvent2 ( QPaintEvent * ) |
163 | QArray <QRect> qt_bug_workaround_clip_rects; | 182 | { |
164 | 183 | ThreadUtil::AutoLock a(m_bufmutex); | |
165 | { | 184 | if ( m_buff == 0 ) { |
166 | QDirectPainter dp ( this ); | 185 | QPainter p ( this ); |
167 | 186 | p. fillRect ( rect ( ), black ); | |
168 | int rot = dp. transformOrientation ( ) + m_rotation; // device rotation + custom rotation | 187 | if ( m_logo ) |
169 | 188 | p. drawImage ( 0, 0, *m_logo ); | |
170 | uchar *fb = dp. frameBuffer ( ); | 189 | } |
171 | uchar *frame = m_buff; | 190 | else { |
172 | 191 | // Qt needs to be notified which areas were really updated .. strange | |
173 | // where is the video frame in fb coordinates | 192 | QArray <QRect> qt_bug_workaround_clip_rects; |
174 | QRect framerect = qt_screen-> mapToDevice ( QRect ( mapToGlobal ( m_thisframe. topLeft ( )), m_thisframe. size ( )), QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); | 193 | |
175 | 194 | { | |
176 | qt_bug_workaround_clip_rects. resize ( dp. numRects ( )); | 195 | QDirectPainter dp ( this ); |
177 | 196 | ||
178 | for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) { | 197 | int rot = dp. transformOrientation ( ) + m_rotation; // device rotation + custom rotation |
179 | const QRect &clip = dp. rect ( i ); | 198 | |
180 | 199 | uchar *fb = dp. frameBuffer ( ); | |
181 | qt_bug_workaround_clip_rects [ i ] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); | 200 | uchar *frame = m_buff; |
182 | 201 | ||
183 | uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); // clip x/y in the fb | 202 | // where is the video frame in fb coordinates |
184 | uchar *src = frame; | 203 | QRect framerect = qt_screen-> mapToDevice ( QRect ( mapToGlobal ( m_thisframe. topLeft ( )), m_thisframe. size ( )), QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); |
185 | 204 | ||
186 | // Adjust the start the source data based on the rotation (xine frame) | 205 | qt_bug_workaround_clip_rects. resize ( dp. numRects ( )); |
187 | switch ( rot ) { | 206 | |
188 | case 0: src += ((( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame )); break; | 207 | for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) { |
189 | case 1: src += ((( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_pixel )); break; | 208 | const QRect &clip = dp. rect ( i ); |
190 | case 2: src += ((( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_line_frame )); break; | 209 | |
191 | case 3: src += ((( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame )); break; | 210 | qt_bug_workaround_clip_rects [ i ] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); |
192 | default: break; | 211 | |
193 | } | 212 | uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); // clip x/y in the fb |
194 | 213 | uchar *src = frame; | |
195 | // all of the following widths/heights are fb relative (0deg rotation) | 214 | |
196 | 215 | // Adjust the start the source data based on the rotation (xine frame) | |
197 | uint leftfill = 0; // black border on the "left" side of the video frame | 216 | switch ( rot ) { |
198 | uint framefill = 0; // "width" of the video frame | 217 | case 0: src += ((( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame )); break; |
199 | uint rightfill = 0; // black border on the "right" side of the video frame | 218 | case 1: src += ((( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_pixel )); break; |
200 | uint clipwidth = clip. width ( ) * m_bytes_per_pixel; // "width" of the current clip rect | 219 | case 2: src += ((( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) + (( framerect. height ( ) - 1 ) * m_bytes_per_line_frame )); break; |
201 | 220 | case 3: src += ((( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame )); break; | |
202 | if ( clip. left ( ) < framerect. left ( )) | 221 | default: break; |
203 | leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; | 222 | } |
204 | if ( clip. right ( ) > framerect. right ( )) | 223 | |
205 | rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; | 224 | // all of the following widths/heights are fb relative (0deg rotation) |
206 | 225 | ||
207 | framefill = clipwidth - ( leftfill + rightfill ); | 226 | uint leftfill = 0; // black border on the "left" side of the video frame |
208 | 227 | uint framefill = 0; // "width" of the video frame | |
209 | for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { | 228 | uint rightfill = 0; // black border on the "right" side of the video frame |
210 | if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { | 229 | uint clipwidth = clip. width ( ) * m_bytes_per_pixel; // "width" of the current clip rect |
211 | // "above" or "below" the video -> black | 230 | |
212 | memset ( dst, 0, clipwidth ); | 231 | if ( clip. left ( ) < framerect. left ( )) |
213 | } | 232 | leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; |
214 | else { | 233 | if ( clip. right ( ) > framerect. right ( )) |
215 | if ( leftfill ) | 234 | rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; |
216 | memset ( dst, 0, leftfill ); // "left" border -> black | 235 | |
217 | 236 | framefill = clipwidth - ( leftfill + rightfill ); | |
218 | if ( framefill ) { // blit in the video frame | 237 | |
219 | // see above for an explanation of the different memcpys | 238 | for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { |
220 | 239 | if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { | |
221 | switch ( rot ) { | 240 | // "above" or "below" the video -> black |
222 | case 0: memcpy ( dst + leftfill, src, framefill & ~1 ); break; | 241 | memset ( dst, 0, clipwidth ); |
223 | case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; | 242 | } |
224 | case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; | 243 | else { |
225 | case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; | 244 | if ( leftfill ) |
226 | default: break; | 245 | memset ( dst, 0, leftfill ); // "left" border -> black |
227 | } | 246 | |
228 | } | 247 | if ( framefill ) { // blit in the video frame |
229 | if ( rightfill ) | 248 | // see above for an explanation of the different memcpys |
230 | memset ( dst + leftfill + framefill, 0, rightfill ); // "right" border -> black | 249 | |
231 | } | 250 | switch ( rot ) { |
232 | 251 | case 0: memcpy ( dst + leftfill, src, framefill & ~1 ); break; | |
233 | dst += m_bytes_per_line_fb; // advance one line in the framebuffer | 252 | case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; |
234 | 253 | case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; | |
235 | // advance one "line" in the xine frame data | 254 | case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; |
236 | switch ( rot ) { | 255 | default: break; |
237 | case 0: src += m_bytes_per_line_frame;break; | 256 | } |
238 | case 1: src -= m_bytes_per_pixel; break; | 257 | } |
239 | case 2: src -= m_bytes_per_line_frame; break; | 258 | if ( rightfill ) |
240 | case 3: src += m_bytes_per_pixel; break; | 259 | memset ( dst + leftfill + framefill, 0, rightfill ); // "right" border -> black |
241 | default: break; | 260 | } |
242 | } | 261 | |
243 | } | 262 | dst += m_bytes_per_line_fb; // advance one line in the framebuffer |
244 | } | 263 | |
245 | } | 264 | // advance one "line" in the xine frame data |
246 | 265 | switch ( rot ) { | |
247 | { | 266 | case 0: src += m_bytes_per_line_frame; break; |
248 | // QVFB hack by Martin Jones | 267 | case 1: src -= m_bytes_per_pixel; break; |
249 | // We need to "touch" all affected clip rects with a normal QPainter in addition to the QDirectPainter | 268 | case 2: src -= m_bytes_per_line_frame; break; |
250 | 269 | case 3: src += m_bytes_per_pixel; break; | |
251 | QPainter p ( this ); | 270 | default: break; |
252 | 271 | } | |
253 | for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { | 272 | } |
254 | p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [ i ]. topLeft ( )), qt_bug_workaround_clip_rects [ i ]. size ( )), QBrush ( NoBrush )); | 273 | } |
255 | } | 274 | } |
256 | } | 275 | |
257 | } | 276 | { |
277 | // QVFB hack by Martin Jones | ||
278 | // We need to "touch" all affected clip rects with a normal QPainter in addition to the QDirectPainter | ||
279 | |||
280 | QPainter p ( this ); | ||
281 | |||
282 | for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { | ||
283 | p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [ i ]. topLeft ( )), qt_bug_workaround_clip_rects [ i ]. size ( )), QBrush ( NoBrush )); | ||
284 | } | ||
285 | } | ||
286 | } | ||
258 | } | 287 | } |
@@ -262,3 +291,3 @@ QImage *XineVideoWidget::logo ( ) const | |||
262 | { | 291 | { |
263 | return m_logo; | 292 | return m_logo; |
264 | } | 293 | } |
@@ -268,4 +297,4 @@ void XineVideoWidget::setLogo ( QImage* logo ) | |||
268 | { | 297 | { |
269 | delete m_logo; | 298 | delete m_logo; |
270 | m_logo = logo; | 299 | m_logo = logo; |
271 | } | 300 | } |
@@ -274,21 +303,33 @@ void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl ) | |||
274 | { | 303 | { |
275 | bool rot90 = (( -m_rotation ) & 1 ); | 304 | // mutex area for AutoLock |
276 | 305 | { | |
277 | if ( rot90 ) { // if the rotation is 90 or 270 we have to swap width / height | 306 | if (m_bufmutex.isLocked()) { |
278 | int d = w; | 307 | // no time to wait - drop frame |
279 | w = h; | 308 | return; |
280 | h = d; | 309 | } |
281 | } | 310 | ThreadUtil::AutoLock a(m_bufmutex); |
282 | 311 | bool rot90 = (( -m_rotation ) & 1 ); | |
283 | m_lastframe = m_thisframe; | 312 | int l = h*m_bytes_per_pixel*w; |
284 | m_thisframe. setRect (( width ( ) - w ) / 2, ( height ( ) - h ) / 2, w , h ); | 313 | if (l>m_lastsize) { |
285 | 314 | if (m_buff) { | |
286 | m_buff = img; | 315 | delete[]m_buff; |
287 | m_bytes_per_line_frame = bpl; | 316 | } |
288 | 317 | m_buff = new uchar[l]; | |
289 | // only repaint the area that *really* needs to be repainted | 318 | m_lastsize=l; |
290 | 319 | } | |
291 | repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false ); | 320 | |
292 | // ensure that we always have a valid frame! | 321 | if ( rot90 ) { // if the rotation is 90 or 270 we have to swap width / height |
293 | m_buff = 0; | 322 | int d = w; |
323 | w = h; | ||
324 | h = d; | ||
325 | } | ||
326 | |||
327 | m_lastframe = m_thisframe; | ||
328 | m_thisframe. setRect (( width ( ) - w ) / 2, ( height ( ) - h ) / 2, w , h ); | ||
329 | |||
330 | memcpy(m_buff,img,m_lastsize); | ||
331 | m_bytes_per_line_frame = bpl; | ||
332 | } // Release Mutex | ||
333 | |||
334 | paintEvent2(0); | ||
294 | } | 335 | } |
@@ -303,3 +344,3 @@ void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * /*me*/ ) | |||
303 | { | 344 | { |
304 | emit clicked(); | 345 | emit clicked(); |
305 | } | 346 | } |
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.h b/noncore/multimedia/opieplayer2/xinevideowidget.h index 8b3a3ea..7f00aaa 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.h +++ b/noncore/multimedia/opieplayer2/xinevideowidget.h | |||
@@ -1,5 +1,7 @@ | |||
1 | |||
1 | /* | 2 | /* |
2 | � � � � � � � � This file is part of the Opie Project | 3 | �� �� �� �� �� �� �� �� This file is part of the Opie Project |
3 | 4 | ||
4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 5 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> |
6 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
5 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | 7 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> |
@@ -7,21 +9,21 @@ | |||
7 | .=l. | 9 | .=l. |
8 | � � � � � �.>+-= | 10 | �� �� �� �� �� ��.>+-= |
9 | �_;:, � � .> � �:=|. This program is free software; you can | 11 | ��_;:, �� �� .> �� ��:=|. This program is free software; you can |
10 | .> <`_, � > �. � <= redistribute it and/or modify it under | 12 | .> <`_, �� > ��. �� <= redistribute it and/or modify it under |
11 | :`=1 )Y*s>-.-- � : the terms of the GNU General Public | 13 | :`=1 )Y*s>-.-- �� : the terms of the GNU General Public |
12 | .="- .-=="i, � � .._ License as published by the Free Software | 14 | .="- .-=="i, �� �� .._ License as published by the Free Software |
13 | �- . � .-<_> � � .<> Foundation; either version 2 of the License, | 15 | ��- . �� .-<_> �� �� .<> Foundation; either version 2 of the License, |
14 | � � �._= =} � � � : or (at your option) any later version. | 16 | �� �� ��._= =} �� �� �� : or (at your option) any later version. |
15 | � � .%`+i> � � � _;_. | 17 | �� �� .%`+i> �� �� �� _;_. |
16 | � � .i_,=:_. � � �-<s. This program is distributed in the hope that | 18 | �� �� .i_,=:_. �� �� ��-<s. This program is distributed in the hope that |
17 | � � �+ �. �-:. � � � = it will be useful, but WITHOUT ANY WARRANTY; | 19 | �� �� ��+ ��. ��-:. �� �� �� = it will be useful, but WITHOUT ANY WARRANTY; |
18 | � � : .. � �.:, � � . . . without even the implied warranty of | 20 | �� �� : .. �� ��.:, �� �� . . . without even the implied warranty of |
19 | � � =_ � � � �+ � � =;=|` MERCHANTABILITY or FITNESS FOR A | 21 | �� �� =_ �� �� �� ��+ �� �� =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | � _.=:. � � � : � �:=>`: PARTICULAR PURPOSE. See the GNU | 22 | �� _.=:. �� �� �� : �� ��:=>`: PARTICULAR PURPOSE. See the GNU |
21 | ..}^=.= � � � = � � � ; Library General Public License for more | 23 | ..}^=.= �� �� �� = �� �� �� ; Library General Public License for more |
22 | ++= � -. � � .` � � .: details. | 24 | ++= �� -. �� �� .` �� �� .: details. |
23 | �: � � = �...= . :.=- | 25 | ��: �� �� = ��...= . :.=- |
24 | �-. � .:....=;==+<; You should have received a copy of the GNU | 26 | ��-. �� .:....=;==+<; You should have received a copy of the GNU |
25 | � -_. . . � )=. �= Library General Public License along with | 27 | �� -_. . . �� )=. ��= Library General Public License along with |
26 | � � -- � � � �:-=` this library; see the file COPYING.LIB. | 28 | �� �� -- �� �� �� ��:-=` this library; see the file COPYING.LIB. |
27 | If not, write to the Free Software Foundation, | 29 | If not, write to the Free Software Foundation, |
@@ -33,3 +35,2 @@ | |||
33 | 35 | ||
34 | |||
35 | #include <qwidget.h> | 36 | #include <qwidget.h> |
@@ -43,3 +44,3 @@ class XineVideoWidget : public QWidget { | |||
43 | Q_OBJECT | 44 | Q_OBJECT |
44 | 45 | ||
45 | public: | 46 | public: |
@@ -55,4 +56,5 @@ public: | |||
55 | protected: | 56 | protected: |
56 | void paintEvent( QPaintEvent *p ); | 57 | void paintEvent2( QPaintEvent *p ); |
57 | void resizeEvent ( QResizeEvent *r ); | 58 | virtual void paintEvent(QPaintEvent*); |
59 | virtual void resizeEvent ( QResizeEvent *r ); | ||
58 | 60 | ||
@@ -72,4 +74,6 @@ private: | |||
72 | int m_bytes_per_pixel; | 74 | int m_bytes_per_pixel; |
75 | int m_lastsize; | ||
73 | QImage *m_logo; | 76 | QImage *m_logo; |
74 | mutable int m_rotation; | 77 | mutable int m_rotation; |
78 | ThreadUtil::Mutex m_bufmutex; | ||
75 | }; | 79 | }; |