-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 0 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 0 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.h | 1 |
6 files changed, 6 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 85030de..c0e5acd 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -238,47 +238,48 @@ bool Lib::hasVideo() { | |||
238 | int test = xine_get_stream_info( m_xine, 2 ); | 238 | int test = xine_get_stream_info( m_xine, 2 ); |
239 | if( test > 0 ) { | 239 | if( test > 0 ) { |
240 | // qDebug( QString(" has video: %1").arg( test ) ); | 240 | // qDebug( QString(" has video: %1").arg( test ) ); |
241 | return true; | 241 | return true; |
242 | } else { | 242 | } else { |
243 | //qDebug ( "does not have video "); | 243 | //qDebug ( "does not have video "); |
244 | return false; | 244 | return false; |
245 | } | 245 | } |
246 | } | 246 | } |
247 | 247 | ||
248 | void Lib::showVideoFullScreen( bool fullScreen ) { | 248 | void Lib::showVideoFullScreen( bool fullScreen ) { |
249 | ::null_set_fullscreen( m_videoOutput, fullScreen ); | 249 | ::null_set_fullscreen( m_videoOutput, fullScreen ); |
250 | } | 250 | } |
251 | 251 | ||
252 | bool Lib::isVideoFullScreen() { | 252 | bool Lib::isVideoFullScreen() { |
253 | return ::null_is_fullscreen( m_videoOutput ); | 253 | return ::null_is_fullscreen( m_videoOutput ); |
254 | } | 254 | } |
255 | 255 | ||
256 | void Lib::setScaling( bool scale ) { | 256 | void Lib::setScaling( bool scale ) { |
257 | ::null_set_scaling( m_videoOutput, scale ); | 257 | ::null_set_scaling( m_videoOutput, scale ); |
258 | } | 258 | } |
259 | 259 | ||
260 | void Lib::setGamma( int value ) { | 260 | void Lib::setGamma( int value ) { |
261 | //qDebug( QString( "%1").arg(value) ); | 261 | //qDebug( QString( "%1").arg(value) ); |
262 | int gammaValue = ( 100 + value ); | ||
262 | ::null_set_videoGamma( m_videoOutput, value ); | 263 | ::null_set_videoGamma( m_videoOutput, value ); |
263 | } | 264 | } |
264 | 265 | ||
265 | bool Lib::isScaling() { | 266 | bool Lib::isScaling() { |
266 | return ::null_is_scaling( m_videoOutput ); | 267 | return ::null_is_scaling( m_videoOutput ); |
267 | } | 268 | } |
268 | 269 | ||
269 | void Lib::xine_event_handler( void* user_data, xine_event_t* t ) { | 270 | void Lib::xine_event_handler( void* user_data, xine_event_t* t ) { |
270 | ( (Lib*)user_data)->handleXineEvent( t ); | 271 | ( (Lib*)user_data)->handleXineEvent( t ); |
271 | } | 272 | } |
272 | 273 | ||
273 | void Lib::xine_display_frame( void* user_data, uint8_t *frame, | 274 | void Lib::xine_display_frame( void* user_data, uint8_t *frame, |
274 | int width, int height, int bytes ) { | 275 | int width, int height, int bytes ) { |
275 | ( (Lib*)user_data)->drawFrame( frame, width, height, bytes ); | 276 | ( (Lib*)user_data)->drawFrame( frame, width, height, bytes ); |
276 | } | 277 | } |
277 | 278 | ||
278 | void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) { | 279 | void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) { |
279 | if ( !m_video ) { | 280 | if ( !m_video ) { |
280 | qWarning("not showing video now"); | 281 | qWarning("not showing video now"); |
281 | return; | 282 | return; |
282 | } | 283 | } |
283 | m_wid-> setVideoFrame ( frame, width, height, bytes ); | 284 | m_wid-> setVideoFrame ( frame, width, height, bytes ); |
284 | } | 285 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 5069a49..606f8e9 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 1042a0c..49356d3 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -82,52 +82,52 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags | |||
82 | bar = new QPEToolBar( this ); | 82 | bar = new QPEToolBar( this ); |
83 | bar->setLabel( tr( "Play Operations" ) ); | 83 | bar->setLabel( tr( "Play Operations" ) ); |
84 | 84 | ||
85 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" ); | 85 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" ); |
86 | tbDeletePlaylist->setFlat( TRUE ); | 86 | tbDeletePlaylist->setFlat( TRUE ); |
87 | tbDeletePlaylist->setFixedSize( 20, 20 ); | 87 | tbDeletePlaylist->setFixedSize( 20, 20 ); |
88 | 88 | ||
89 | tbDeletePlaylist->hide(); | 89 | tbDeletePlaylist->hide(); |
90 | 90 | ||
91 | pmPlayList = new QPopupMenu( this ); | 91 | pmPlayList = new QPopupMenu( this ); |
92 | menu->insertItem( tr( "File" ), pmPlayList ); | 92 | menu->insertItem( tr( "File" ), pmPlayList ); |
93 | 93 | ||
94 | pmView = new QPopupMenu( this ); | 94 | pmView = new QPopupMenu( this ); |
95 | menu->insertItem( tr( "View" ), pmView ); | 95 | menu->insertItem( tr( "View" ), pmView ); |
96 | pmView->isCheckable(); | 96 | pmView->isCheckable(); |
97 | 97 | ||
98 | skinsMenu = new QPopupMenu( this ); | 98 | skinsMenu = new QPopupMenu( this ); |
99 | pmView->insertItem( tr( "Skins" ), skinsMenu ); | 99 | pmView->insertItem( tr( "Skins" ), skinsMenu ); |
100 | skinsMenu->isCheckable(); | 100 | skinsMenu->isCheckable(); |
101 | 101 | ||
102 | gammaMenu = new QPopupMenu( this ); | 102 | gammaMenu = new QPopupMenu( this ); |
103 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); | 103 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); |
104 | 104 | ||
105 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); | 105 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); |
106 | gammaSlider->setRange( -100, 100 ); | 106 | gammaSlider->setRange( -40, 40 ); |
107 | gammaSlider->setTickmarks( QSlider::Left ); | 107 | gammaSlider->setTickmarks( QSlider::Left ); |
108 | gammaSlider->setTickInterval( 20 ); | 108 | gammaSlider->setTickInterval( 20 ); |
109 | gammaSlider->setFocusPolicy( QWidget::NoFocus ); | 109 | //gammaSlider->setFocusPolicy( QWidget::NoFocus ); |
110 | gammaSlider->setValue( 0 ); | 110 | gammaSlider->setValue( 0 ); |
111 | gammaSlider->setMinimumHeight( 50 ); | 111 | gammaSlider->setMinimumHeight( 50 ); |
112 | 112 | ||
113 | gammaLCD = new QLCDNumber( 3, gammaMenu ); | 113 | gammaLCD = new QLCDNumber( 3, gammaMenu ); |
114 | 114 | ||
115 | gammaMenu->insertItem( gammaSlider ); | 115 | gammaMenu->insertItem( gammaSlider ); |
116 | gammaMenu->insertItem( gammaLCD ); | 116 | gammaMenu->insertItem( gammaLCD ); |
117 | 117 | ||
118 | connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) ); | 118 | connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) ); |
119 | 119 | ||
120 | vbox5 = new QVBox( this ); | 120 | vbox5 = new QVBox( this ); |
121 | QVBox *vbox4 = new QVBox( vbox5 ); | 121 | QVBox *vbox4 = new QVBox( vbox5 ); |
122 | QHBox *hbox6 = new QHBox( vbox4 ); | 122 | QHBox *hbox6 = new QHBox( vbox4 ); |
123 | 123 | ||
124 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 124 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
125 | 125 | ||
126 | QWidget *pTab; | 126 | QWidget *pTab; |
127 | pTab = new QWidget( tabWidget, "pTab" ); | 127 | pTab = new QWidget( tabWidget, "pTab" ); |
128 | tabWidget->insertTab( pTab, "Playlist"); | 128 | tabWidget->insertTab( pTab, "Playlist"); |
129 | 129 | ||
130 | QGridLayout *Playout = new QGridLayout( pTab ); | 130 | QGridLayout *Playout = new QGridLayout( pTab ); |
131 | Playout->setSpacing( 2); | 131 | Playout->setSpacing( 2); |
132 | Playout->setMargin( 2); | 132 | Playout->setMargin( 2); |
133 | 133 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index f5f5c37..7b8ad7a 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -113,49 +113,49 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | |||
113 | if ( !masks[i]->isNull() ) { | 113 | if ( !masks[i]->isNull() ) { |
114 | QImage imgMask = masks[i]->convertToImage(); | 114 | QImage imgMask = masks[i]->convertToImage(); |
115 | uchar **dest = imgButtonMask->jumpTable(); | 115 | uchar **dest = imgButtonMask->jumpTable(); |
116 | for ( int y = 0; y < imgUp->height(); y++ ) { | 116 | for ( int y = 0; y < imgUp->height(); y++ ) { |
117 | uchar *line = dest[y]; | 117 | uchar *line = dest[y]; |
118 | for ( int x = 0; x < imgUp->width(); x++ ) { | 118 | for ( int x = 0; x < imgUp->width(); x++ ) { |
119 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 119 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
120 | line[x] = i + 1; | 120 | line[x] = i + 1; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | for ( int i = 0; i < 7; i++ ) { | 126 | for ( int i = 0; i < 7; i++ ) { |
127 | buttonPixUp[i] = NULL; | 127 | buttonPixUp[i] = NULL; |
128 | buttonPixDown[i] = NULL; | 128 | buttonPixDown[i] = NULL; |
129 | } | 129 | } |
130 | 130 | ||
131 | setBackgroundPixmap( *pixBg ); | 131 | setBackgroundPixmap( *pixBg ); |
132 | 132 | ||
133 | slider = new QSlider( Qt::Horizontal, this ); | 133 | slider = new QSlider( Qt::Horizontal, this ); |
134 | slider->setMinValue( 0 ); | 134 | slider->setMinValue( 0 ); |
135 | slider->setMaxValue( 1 ); | 135 | slider->setMaxValue( 1 ); |
136 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | 136 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
137 | slider->setFocusPolicy( QWidget::NoFocus ); | 137 | //slider->setFocusPolicy( QWidget::NoFocus ); |
138 | 138 | ||
139 | resizeEvent( NULL ); | 139 | resizeEvent( NULL ); |
140 | 140 | ||
141 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 141 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
142 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 142 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
143 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 143 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
144 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 144 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
145 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 145 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
146 | 146 | ||
147 | setLength( mediaPlayerState->length() ); | 147 | setLength( mediaPlayerState->length() ); |
148 | setPosition( mediaPlayerState->position() ); | 148 | setPosition( mediaPlayerState->position() ); |
149 | setFullscreen( mediaPlayerState->fullscreen() ); | 149 | setFullscreen( mediaPlayerState->fullscreen() ); |
150 | setPlaying( mediaPlayerState->playing() ); | 150 | setPlaying( mediaPlayerState->playing() ); |
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | VideoWidget::~VideoWidget() { | 154 | VideoWidget::~VideoWidget() { |
155 | 155 | ||
156 | for ( int i = 0; i < 7; i++ ) { | 156 | for ( int i = 0; i < 7; i++ ) { |
157 | delete buttonPixUp[i]; | 157 | delete buttonPixUp[i]; |
158 | delete buttonPixDown[i]; | 158 | delete buttonPixDown[i]; |
159 | } | 159 | } |
160 | 160 | ||
161 | delete pixBg; | 161 | delete pixBg; |
@@ -415,49 +415,49 @@ void VideoWidget::makeVisible() { | |||
415 | 415 | ||
416 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 416 | void VideoWidget::paintEvent( QPaintEvent * pe) { |
417 | QPainter p( this ); | 417 | QPainter p( this ); |
418 | 418 | ||
419 | if ( mediaPlayerState->fullscreen() ) { | 419 | if ( mediaPlayerState->fullscreen() ) { |
420 | // Clear the background | 420 | // Clear the background |
421 | p.setBrush( QBrush( Qt::black ) ); | 421 | p.setBrush( QBrush( Qt::black ) ); |
422 | } else { | 422 | } else { |
423 | if ( !pe->erased() ) { | 423 | if ( !pe->erased() ) { |
424 | // Combine with background and double buffer | 424 | // Combine with background and double buffer |
425 | QPixmap pix( pe->rect().size() ); | 425 | QPixmap pix( pe->rect().size() ); |
426 | QPainter p( &pix ); | 426 | QPainter p( &pix ); |
427 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 427 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
428 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); | 428 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); |
429 | for ( int i = 0; i < numVButtons; i++ ) { | 429 | for ( int i = 0; i < numVButtons; i++ ) { |
430 | paintButton( &p, i ); | 430 | paintButton( &p, i ); |
431 | } | 431 | } |
432 | QPainter p2( this ); | 432 | QPainter p2( this ); |
433 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 433 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
434 | } else { | 434 | } else { |
435 | QPainter p( this ); | 435 | QPainter p( this ); |
436 | for ( int i = 0; i < numVButtons; i++ ) | 436 | for ( int i = 0; i < numVButtons; i++ ) |
437 | paintButton( &p, i ); | 437 | paintButton( &p, i ); |
438 | } | 438 | } |
439 | slider->repaint( TRUE ); | 439 | //slider->repaint( TRUE ); |
440 | } | 440 | } |
441 | } | 441 | } |
442 | 442 | ||
443 | 443 | ||
444 | void VideoWidget::closeEvent( QCloseEvent* ) { | 444 | void VideoWidget::closeEvent( QCloseEvent* ) { |
445 | mediaPlayerState->setList(); | 445 | mediaPlayerState->setList(); |
446 | } | 446 | } |
447 | 447 | ||
448 | 448 | ||
449 | 449 | ||
450 | void VideoWidget::keyReleaseEvent( QKeyEvent *e) { | 450 | void VideoWidget::keyReleaseEvent( QKeyEvent *e) { |
451 | switch ( e->key() ) { | 451 | switch ( e->key() ) { |
452 | ////////////////////////////// Zaurus keys | 452 | ////////////////////////////// Zaurus keys |
453 | case Key_Home: | 453 | case Key_Home: |
454 | break; | 454 | break; |
455 | case Key_F9: //activity | 455 | case Key_F9: //activity |
456 | break; | 456 | break; |
457 | case Key_F10: //contacts | 457 | case Key_F10: //contacts |
458 | // hide(); | 458 | // hide(); |
459 | break; | 459 | break; |
460 | case Key_F11: //menu | 460 | case Key_F11: //menu |
461 | break; | 461 | break; |
462 | case Key_F12: //home | 462 | case Key_F12: //home |
463 | break; | 463 | break; |
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 81693e1..31ac9dc 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.h b/noncore/multimedia/opieplayer2/yuv2rgb.h index 5b9c3f6..e453243 100644 --- a/noncore/multimedia/opieplayer2/yuv2rgb.h +++ b/noncore/multimedia/opieplayer2/yuv2rgb.h | |||
@@ -126,26 +126,27 @@ struct yuv2rgb_factory_s { | |||
126 | 126 | ||
127 | void *table_rV[256]; | 127 | void *table_rV[256]; |
128 | void *table_gU[256]; | 128 | void *table_gU[256]; |
129 | int table_gV[256]; | 129 | int table_gV[256]; |
130 | void *table_bU[256]; | 130 | void *table_bU[256]; |
131 | 131 | ||
132 | /* preselected functions for mode/swap/hardware */ | 132 | /* preselected functions for mode/swap/hardware */ |
133 | yuv2rgb_fun_t yuv2rgb_fun; | 133 | yuv2rgb_fun_t yuv2rgb_fun; |
134 | yuy22rgb_fun_t yuy22rgb_fun; | 134 | yuy22rgb_fun_t yuy22rgb_fun; |
135 | yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun; | 135 | yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun; |
136 | 136 | ||
137 | }; | 137 | }; |
138 | 138 | ||
139 | yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colormap); | 139 | yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colormap); |
140 | 140 | ||
141 | 141 | ||
142 | /* | 142 | /* |
143 | * internal stuff below this line | 143 | * internal stuff below this line |
144 | */ | 144 | */ |
145 | 145 | ||
146 | void mmx_yuv2rgb_set_gamma(int gamma); | 146 | void mmx_yuv2rgb_set_gamma(int gamma); |
147 | void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); | 147 | void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); |
148 | void yuv2rgb_init_mmx (yuv2rgb_factory_t *this); | 148 | void yuv2rgb_init_mmx (yuv2rgb_factory_t *this); |
149 | void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); | 149 | void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); |
150 | void yuv2rgb_init_arm (yuv2rgb_factory_t *this); | ||
150 | 151 | ||
151 | #endif | 152 | #endif |