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 @@ + // 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 ) -static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linestep ) +static inline void memcpy_step ( void *dst, void *src, size_t len, size_t step ) { @@ -66,3 +67,3 @@ static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linest *((short int *) dst) ++ = *((short int *) src); - ((char * ) src) += linestep; + ((char *) src ) += step; } @@ -72,3 +73,3 @@ static inline void memcpy_step ( void *dst, void *src, size_t len, size_t linest -static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t linestep ) +static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t step ) { @@ -76,6 +77,6 @@ static inline void memcpy_step_rev ( void *dst, void *src, size_t len, size_t li - ((char *) src) += ( len * linestep ); + ((char *) src ) += ( len * step ); while ( len-- ) { - ((char *) src) -= linestep; + ((char *) src ) -= step; *((short int *) dst) ++ = *((short int *) src); @@ -184,2 +185,3 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) } + } if ( rightfill ) @@ -200,2 +202,3 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) } + } @@ -214,3 +217,5 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) - QImage *XineVideoWidget::logo ( ) const { + +QImage *XineVideoWidget::logo ( ) const +{ return m_logo; @@ -218,8 +223,11 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) - void XineVideoWidget::setLogo ( QImage * image ) { + +void XineVideoWidget::setLogo ( QImage* logo ) +{ delete m_logo; - m_logo = image; + m_logo = logo; } - void XineVideoWidget::setVideoFrame ( uchar * img, int w, int h, int bpl ) { +void XineVideoWidget::setVideoFrame ( uchar* img, int w, int h, int bpl ) +{ bool rot90 = (( -m_rotation ) & 1 ); @@ -240,6 +248,7 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) - repaint (( + repaint ((( m_thisframe & m_lastframe ) != m_lastframe ) ? m_lastframe : m_thisframe, false ); } - void XineVideoWidget::resizeEvent ( QResizeEvent * ) { +void XineVideoWidget::resizeEvent ( QResizeEvent * ) +{ QSize s = size ( ); @@ -249,3 +258,2 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) // (!! the paint routine uses m_rotation + qt_screen-> transformOrientation() !!) - m_rotation = fs ? -qt_screen-> transformOrientation ( ) : 0; @@ -259,3 +267,4 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) - void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * ) { +void XineVideoWidget::mouseReleaseEvent ( QMouseEvent * /*me*/ ) +{ emit clicked ( ); |