summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb.h15
6 files changed, 17 insertions, 15 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
@@ -250,24 +250,25 @@ void Lib::showVideoFullScreen( bool fullScreen ) {
250} 250}
251 251
252bool Lib::isVideoFullScreen() { 252bool Lib::isVideoFullScreen() {
253 return ::null_is_fullscreen( m_videoOutput ); 253 return ::null_is_fullscreen( m_videoOutput );
254} 254}
255 255
256void Lib::setScaling( bool scale ) { 256void Lib::setScaling( bool scale ) {
257 ::null_set_scaling( m_videoOutput, scale ); 257 ::null_set_scaling( m_videoOutput, scale );
258} 258}
259 259
260void Lib::setGamma( int value ) { 260void 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
265bool Lib::isScaling() { 266bool Lib::isScaling() {
266 return ::null_is_scaling( m_videoOutput ); 267 return ::null_is_scaling( m_videoOutput );
267} 268}
268 269
269void Lib::xine_event_handler( void* user_data, xine_event_t* t ) { 270void 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
273void Lib::xine_display_frame( void* user_data, uint8_t *frame, 274void Lib::xine_display_frame( void* user_data, uint8_t *frame,
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
@@ -26,25 +26,25 @@
26 26
27extern AudioWidget *audioUI; 27extern AudioWidget *audioUI;
28extern VideoWidget *videoUI; 28extern VideoWidget *videoUI;
29extern PlayListWidget *playList; 29extern PlayListWidget *playList;
30extern MediaPlayerState *mediaPlayerState; 30extern MediaPlayerState *mediaPlayerState;
31 31
32 32
33#define FBIOBLANK 0x4611 33#define FBIOBLANK 0x4611
34 34
35MediaPlayer::MediaPlayer( QObject *parent, const char *name ) 35MediaPlayer::MediaPlayer( QObject *parent, const char *name )
36 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { 36 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
37 37
38 playList->setCaption(tr("OpiePlayer: Initializating")); 38 playList->setCaption( tr( "OpiePlayer: Initializating" ) );
39 39
40 qApp->processEvents(); 40 qApp->processEvents();
41 // QPEApplication::grabKeyboard(); // EVIL 41 // QPEApplication::grabKeyboard(); // EVIL
42 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 42 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
43 43
44 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 44 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
45 45
46 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 46 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
47 47
48 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 48 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
49 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 49 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
50 connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); 50 connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
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
@@ -94,28 +94,28 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags
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 );
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
@@ -125,25 +125,25 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
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() );
@@ -427,26 +427,26 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
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
444void VideoWidget::closeEvent( QCloseEvent* ) { 444void VideoWidget::closeEvent( QCloseEvent* ) {
445 mediaPlayerState->setList(); 445 mediaPlayerState->setList();
446} 446}
447 447
448 448
449 449
450void VideoWidget::keyReleaseEvent( QKeyEvent *e) { 450void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
451 switch ( e->key() ) { 451 switch ( e->key() ) {
452////////////////////////////// Zaurus keys 452////////////////////////////// Zaurus keys
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
@@ -36,27 +36,27 @@
36#include <qmessagebox.h> 36#include <qmessagebox.h>
37#include <qpe/qcopenvelope_qws.h> 37#include <qpe/qcopenvelope_qws.h>
38#include <qpe/qpeapplication.h> 38#include <qpe/qpeapplication.h>
39#include "xinecontrol.h" 39#include "xinecontrol.h"
40#include "mediaplayerstate.h" 40#include "mediaplayerstate.h"
41#include "videowidget.h" 41#include "videowidget.h"
42 42
43extern MediaPlayerState *mediaPlayerState; 43extern MediaPlayerState *mediaPlayerState;
44extern VideoWidget *videoUI; 44extern VideoWidget *videoUI;
45XineControl::XineControl( QObject *parent, const char *name ) 45XineControl::XineControl( QObject *parent, const char *name )
46 : QObject( parent, name ) { 46 : QObject( parent, name ) {
47 47
48 libXine = new XINE::Lib(videoUI->vidWidget() ); 48 libXine = new XINE::Lib( videoUI->vidWidget() );
49 49
50 connect ( videoUI, SIGNAL( videoResized ( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); 50 connect ( videoUI, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) );
51 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); 51 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
52 connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); 52 connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) );
53 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); 53 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
54 connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); 54 connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
55 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); 55 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
56 connect( mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); 56 connect( mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );
57 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); 57 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
58 58
59 disabledSuspendScreenSaver = FALSE; 59 disabledSuspendScreenSaver = FALSE;
60} 60}
61 61
62XineControl::~XineControl() { 62XineControl::~XineControl() {
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
@@ -82,46 +82,46 @@ struct yuv2rgb_s {
82 uint8_t *v_buffer; 82 uint8_t *v_buffer;
83 void *y_chunk; 83 void *y_chunk;
84 void *u_chunk; 84 void *u_chunk;
85 void *v_chunk; 85 void *v_chunk;
86 86
87 void **table_rV; 87 void **table_rV;
88 void **table_gU; 88 void **table_gU;
89 int *table_gV; 89 int *table_gV;
90 void **table_bU; 90 void **table_bU;
91 91
92 uint8_t *cmap; 92 uint8_t *cmap;
93 scale_line_func_t scale_line; 93 scale_line_func_t scale_line;
94 94
95} ; 95} ;
96 96
97/* 97/*
98 * convenience class to easily create a lot of converters 98 * convenience class to easily create a lot of converters
99 */ 99 */
100 100
101struct yuv2rgb_factory_s { 101struct yuv2rgb_factory_s {
102 102
103 yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this); 103 yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this);
104 104
105 /* 105 /*
106 * adjust gamma (-100 to 100 looks fine) 106 * adjust gamma (-100 to 100 looks fine)
107 * for all converters produced by this factory 107 * for all converters produced by this factory
108 */ 108 */
109 void (*set_gamma) (yuv2rgb_factory_t *this, int gamma); 109 void (*set_gamma) (yuv2rgb_factory_t *this, int gamma);
110 110
111 /* 111 /*
112 * get gamma value 112 * get gamma value
113 */ 113 */
114 int (*get_gamma) (yuv2rgb_factory_t *this); 114 int (*get_gamma) (yuv2rgb_factory_t *this);
115 115
116 /* private data */ 116 /* private data */
117 117
118 int mode; 118 int mode;
119 int swapped; 119 int swapped;
120 uint8_t *cmap; 120 uint8_t *cmap;
121 121
122 int gamma; 122 int gamma;
123 int entry_size; 123 int entry_size;
124 124
125 uint32_t matrix_coefficients; 125 uint32_t matrix_coefficients;
126 126
127 void *table_rV[256]; 127 void *table_rV[256];
@@ -129,23 +129,24 @@ struct yuv2rgb_factory_s {
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
139yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colormap); 139yuv2rgb_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
146void mmx_yuv2rgb_set_gamma(int gamma); 146void mmx_yuv2rgb_set_gamma(int gamma);
147void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this); 147void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this);
148void yuv2rgb_init_mmx (yuv2rgb_factory_t *this); 148void yuv2rgb_init_mmx (yuv2rgb_factory_t *this);
149void yuv2rgb_init_mlib (yuv2rgb_factory_t *this); 149void yuv2rgb_init_mlib (yuv2rgb_factory_t *this);
150void yuv2rgb_init_arm (yuv2rgb_factory_t *this);
150 151
151#endif 152#endif