summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp52
1 files changed, 23 insertions, 29 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index 7f59085..78ebe19 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -1,3 +1,2 @@
1
2/* 1/*
3                This file is part of the Opie Project 2                This file is part of the Opie Project
@@ -216,21 +215,26 @@ void XineVideoWidget::paintEvent2 ( QPaintEvent * )
216 int middle_h = _vh/2; 215 int middle_h = _vh/2;
217 m_thisframe.setRect(width()/2-middle_w,height()/2-middle_h,_vw,_vh); 216 m_thisframe.setRect(width()/2-middle_w,height()/2-middle_h,_vw,_vh);
218 QRect topFill,rightFill,leftFill,downFill; 217
219 topFill. setRect(0,0 ,width(),m_thisframe.top()); 218 {
220 downFill.setCoords(0,m_thisframe.bottom(),width(),height()); 219 // is this stuff realy needed? it seems working without, too.
221 rightFill.setCoords(m_thisframe.right(),0,width(),height()); 220 QRect topFill,rightFill,leftFill,downFill;
222 leftFill.setCoords(0,0,m_thisframe.left(),height()); 221 topFill. setRect(0,0 ,width(),m_thisframe.top());
223 222 downFill.setCoords(0,m_thisframe.bottom(),width(),height());
224 if (topFill.isValid()) { 223 rightFill.setCoords(m_thisframe.right(),0,width(),height());
225 p.fillRect(topFill,black); 224 leftFill.setCoords(0,0,m_thisframe.left(),height());
226 } 225
227 if (downFill.isValid()) { 226 if (topFill.isValid()) {
228 p.fillRect(downFill,black); 227 p.fillRect(topFill,black);
229 } 228 }
230 if (rightFill.isValid()) { 229 if (downFill.isValid()) {
231 p.fillRect(rightFill,black); 230 p.fillRect(downFill,black);
232 } 231 }
233 if (leftFill.isValid()) { 232 if (rightFill.isValid()) {
234 p.fillRect(leftFill,black); 233 p.fillRect(rightFill,black);
234 }
235 if (leftFill.isValid()) {
236 p.fillRect(leftFill,black);
237 }
238
235 } 239 }
236 uchar *fb = dp. frameBuffer ( ); 240 uchar *fb = dp. frameBuffer ( );
@@ -268,11 +272,4 @@ void XineVideoWidget::paintEvent2 ( QPaintEvent * )
268 } 272 }
269 } 273 }
270
271
272 {
273 // QVFB hack by Martin Jones
274 // We need to "touch" all affected clip rects with a normal QPainter in addition to the QDirectPainter
275 p.fillRect(QRect(mapFromGlobal (m_thisframe. topLeft ( )), m_thisframe.size ()),QBrush(NoBrush));
276 }
277 } 274 }
278} 275}
@@ -312,7 +309,4 @@ void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl )
312 m_buff = 0; 309 m_buff = 0;
313 } 310 }
314 } else if (l==0){
315 delete[] m_buff;
316 m_buff = 0;
317 } 311 }
318 m_lastsize = l; 312 m_lastsize = l;
@@ -324,5 +318,5 @@ void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl )
324 } // Release Mutex 318 } // Release Mutex
325 319
326 paintEvent2(0); 320 if (m_buff) paintEvent2(0);
327} 321}
328 322