Diffstat (limited to 'noncore/multimedia/opieplayer2/xinevideowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp index 9b26d41..1d88cea 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp | |||
@@ -46,2 +46,3 @@ | |||
46 | 46 | ||
47 | |||
47 | // 0 deg rot: copy a line from src to dst (use libc memcpy) | 48 | // 0 deg rot: copy a line from src to dst (use libc memcpy) |
@@ -61,3 +62,3 @@ static inline void memcpy_rev ( void *dst, void *src, size_t len ) | |||
61 | 62 | ||
62 | static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linestep ) | 63 | static inline void memcpy_step ( void *dst, void *src, size_t len, size_t step ) |
63 | { | 64 | { |
@@ -66,3 +67,3 @@ static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linest | |||
66 | *((short int *) dst) ++ = *((short int *) src); | 67 | *((short int *) dst) ++ = *((short int *) src); |
67 | ((char * ) src) += linestep; | 68 | ((char *) src ) += step; |
68 | } | 69 | } |
@@ -72,3 +73,3 @@ static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linest | |||
72 | 73 | ||
73 | static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t linestep ) | 74 | static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t step ) |
74 | { | 75 | { |
@@ -76,6 +77,6 @@ static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t li | |||
76 | 77 | ||
77 | ((char *) src) += ( len * linestep ); | 78 | ((char *) src ) += ( len * step ); |
78 | 79 | ||
79 | while ( len-- ) { | 80 | while ( len-- ) { |
80 | ((char *) src) -= linestep; | 81 | ((char *) src ) -= step; |
81 | *((short int *) dst) ++ = *((short int *) src); | 82 | *((short int *) dst) ++ = *((short int *) src); |
@@ -184,2 +185,3 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
184 | } | 185 | } |
186 | } | ||
185 | if ( rightfill ) | 187 | if ( rightfill ) |
@@ -200,2 +202,3 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
200 | } | 202 | } |
203 | } | ||
201 | 204 | ||
@@ -214,3 +217,5 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
214 | 217 | ||
215 | QImage *XineVideoWidget::logo ( ) const { | 218 | |
219 | QImage *XineVideoWidget::logo ( ) const | ||
220 | { | ||
216 | return m_logo; | 221 | return m_logo; |
@@ -218,8 +223,11 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
218 | 223 | ||
219 | void XineVideoWidget::setLogo ( QImage * image ) { | 224 | |
225 | void XineVideoWidget::setLogo ( QImage* logo ) | ||
226 | { | ||
220 | delete m_logo; | 227 | delete m_logo; |
221 | m_logo = image; | 228 | m_logo = logo; |
222 | } | 229 | } |
223 | 230 | ||
224 | void XineVideoWidget::setVideoFrame ( uchar * img, int w, int h, int bpl ) { | 231 | void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl ) |
232 | { | ||
225 | bool rot90 = (( -m_rotation ) & 1 ); | 233 | bool rot90 = (( -m_rotation ) & 1 ); |
@@ -240,6 +248,7 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
240 | 248 | ||
241 | repaint (( | 249 | repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false ); |
242 | } | 250 | } |
243 | 251 | ||
244 | void XineVideoWidget::resizeEvent ( QResizeEvent * ) { | 252 | void XineVideoWidget::resizeEvent ( QResizeEvent * ) |
253 | { | ||
245 | QSize s = size ( ); | 254 | QSize s = size ( ); |
@@ -249,3 +258,2 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
249 | // (!! the paint routine uses m_rotation + qt_screen-> transformOrientation() !!) | 258 | // (!! the paint routine uses m_rotation + qt_screen-> transformOrientation() !!) |
250 | |||
251 | m_rotation = fs ? -qt_screen-> transformOrientation ( ) : 0; | 259 | m_rotation = fs ? -qt_screen-> transformOrientation ( ) : 0; |
@@ -259,3 +267,4 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) | |||
259 | 267 | ||
260 | void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * ) { | 268 | void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * /*me*/ ) |
269 | { | ||
261 | emit clicked ( ); | 270 | emit clicked ( ); |