summaryrefslogtreecommitdiff
path: root/noncore/multimedia
Unidiff
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp9
-rw-r--r--noncore/multimedia/opieplayer2/lib.h7
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp60
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h10
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c43
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp11
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp25
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h10
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp15
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h33
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp88
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb.c17
13 files changed, 244 insertions, 88 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index b2143a0..748ae1f 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -62,2 +62,3 @@ extern "C" {
62 void null_set_mode( vo_driver_t* self, int depth, int rgb ); 62 void null_set_mode( vo_driver_t* self, int depth, int rgb );
63 void null_set_videoGamma( vo_driver_t* self , int value );
63 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data); 64 void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data);
@@ -94,3 +95,3 @@ Lib::Lib(XineVideoWidget* widget) {
94 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 95 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
95 m_wid-> setImage ( new QImage ( Resource::loadImage(""))); 96 m_wid-> setImage ( new QImage ( Resource::loadImage("") ) );
96 m_wid->repaint(); 97 m_wid->repaint();
@@ -205,2 +206,8 @@ void Lib::setScaling( bool scale ) {
205} 206}
207
208void Lib::setGamma( int value ) {
209 //qDebug( QString( "%1").arg(value) );
210 ::null_set_videoGamma( m_videoOutput, value );
211}
212
206bool Lib::isScaling() { 213bool Lib::isScaling() {
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index abd8c65..b9d0a8a 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -114,2 +114,9 @@ namespace XINE {
114 void setScaling( bool ); 114 void setScaling( bool );
115
116 /**
117 * Set the Gamma value for video output
118 * @param int the value between -100 and 100, 0 is original
119 */
120 void setGamma( int );
121
115 /** 122 /**
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index d984022..4ec5989 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -1 +1,36 @@
1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
33
34// this file is based on work by trolltech
35
1#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
@@ -23,5 +58,2 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
23MediaPlayerState::~MediaPlayerState() { 58MediaPlayerState::~MediaPlayerState() {
24// Config cfg( "OpiePlayer" );
25// writeConfig( cfg );
26
27} 59}
@@ -36,2 +68,3 @@ void MediaPlayerState::readConfig( Config& cfg ) {
36 usePlaylist = cfg.readBoolEntry( "UsePlayList" ); 68 usePlaylist = cfg.readBoolEntry( "UsePlayList" );
69 videoGamma = cfg.readNumEntry( "VideoGamma" );
37 usePlaylist = TRUE; 70 usePlaylist = TRUE;
@@ -47,8 +80,9 @@ void MediaPlayerState::readConfig( Config& cfg ) {
47void MediaPlayerState::writeConfig( Config& cfg ) const { 80void MediaPlayerState::writeConfig( Config& cfg ) const {
48 cfg.setGroup("Options"); 81 cfg.setGroup( "Options" );
49 cfg.writeEntry("FullScreen", isFullscreen ); 82 cfg.writeEntry( "FullScreen", isFullscreen );
50 cfg.writeEntry("Scaling", isScaled ); 83 cfg.writeEntry( "Scaling", isScaled );
51 cfg.writeEntry("Looping", isLooping ); 84 cfg.writeEntry( "Looping", isLooping );
52 cfg.writeEntry("Shuffle", isShuffled ); 85 cfg.writeEntry( "Shuffle", isShuffled );
53 cfg.writeEntry("UsePlayList", usePlaylist ); 86 cfg.writeEntry( "UsePlayList", usePlaylist );
87 cfg.writeEntry( "VideoGamma", videoGamma );
54} 88}
@@ -211,2 +245,10 @@ void MediaPlayerState::updatePosition( long p ){
211 245
246void MediaPlayerState::setVideoGamma( int v ){
247 if ( videoGamma == v ) {
248 return;
249 }
250 videoGamma = v;
251 emit videoGammaChanged( v );
252}
253
212void MediaPlayerState::setLength( long l ) { 254void MediaPlayerState::setLength( long l ) {
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 215a2a8..4fef8e0 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -33,2 +33,4 @@
33 33
34// this file is based on work by trolltech
35
34#ifndef MEDIA_PLAYER_STATE_H 36#ifndef MEDIA_PLAYER_STATE_H
@@ -81,2 +83,3 @@ public slots:
81 void setBlanked( bool b ); 83 void setBlanked( bool b );
84 void setVideoGamma( int v );
82 85
@@ -113,2 +116,3 @@ signals:
113 void blankToggled( bool ); 116 void blankToggled( bool );
117 void videoGammaChanged( int );
114 void prev(); 118 void prev();
@@ -127,3 +131,3 @@ private:
127 char curView; 131 char curView;
128 132 int videoGamma;
129 void readConfig( Config& cfg ); 133 void readConfig( Config& cfg );
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index bd52869..ceda333 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -1 +1,33 @@
1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
1 33
@@ -33,3 +65,3 @@ struct null_driver_s {
33 int yuv2rgb_swap; 65 int yuv2rgb_swap;
34 int zuv2rgb_gamma; 66 int yuv2rgb_gamma;
35 uint8_t *yuv2rgb_cmap; 67 uint8_t *yuv2rgb_cmap;
@@ -607,2 +639,8 @@ int null_is_scaling( vo_driver_t* self ){
607} 639}
640
641void null_set_videoGamma( vo_driver_t* self , int value ) {
642 ((null_driver_t*) self) ->yuv2rgb_gamma = value;
643 ((null_driver_t*) self) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self) ->yuv2rgb_factory, value );
644}
645
608void null_set_scaling( vo_driver_t* self, int scale ){ 646void null_set_scaling( vo_driver_t* self, int scale ){
@@ -617,2 +655,4 @@ void null_set_gui_height( vo_driver_t* self, int height ){
617} 655}
656
657
618void null_set_mode( vo_driver_t* self, int depth, int rgb ){ 658void null_set_mode( vo_driver_t* self, int depth, int rgb ){
@@ -672 +712,2 @@ void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_
672} 712}
713
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 6c4d07f..3bd04bc 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -120,2 +120,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
120 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); 120 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
121 connect ( gammaSlider, SIGNAL( valueChanged( int ) ), mediaPlayerState, SLOT( setVideoGamma( int ) ) );
121 122
@@ -135,3 +136,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
135PlayListWidget::~PlayListWidget() { 136PlayListWidget::~PlayListWidget() {
136 // WTF?!@?! 137 // WTF?!@?!
137 138
@@ -735,3 +736,3 @@ void PlayListWidget::populateAudioView() {
735 size=0; 736 size=0;
736 else 737 else
737 size = QFile( dit.current()->file() ).size(); 738 size = QFile( dit.current()->file() ).size();
@@ -936,3 +937,3 @@ void PlayListWidget::writem3u() {
936 // no, cause it takes to long... 937 // no, cause it takes to long...
937 938
938 list += d->selectedFiles->current()->file() + "\n"; 939 list += d->selectedFiles->current()->file() + "\n";
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index 2742252..dcfdd48 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 6ecd016..250833c 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -101,2 +101,21 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags
101 101
102 gammaMenu = new QPopupMenu( this );
103 pmView->insertItem( tr( "Gamma" ), gammaMenu );
104 gammaMenu->setMinimumHeight( 50 );
105
106 gammaSlider = new QSlider( QSlider::Vertical, gammaMenu );
107 gammaSlider->setRange( -100, 100 );
108 gammaSlider->setTickmarks( QSlider::Left );
109 gammaSlider->setTickInterval( 20 );
110 gammaSlider->setFocusPolicy( QWidget::NoFocus );
111 gammaSlider->setValue( 0 );
112 gammaSlider->setMinimumHeight( 50 );
113
114 gammaLCD = new QLCDNumber( 3, gammaMenu );
115
116 gammaMenu->insertItem( gammaSlider );
117 gammaMenu->insertItem( gammaLCD );
118
119 connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) );
120
102 vbox5 = new QVBox( this ); 121 vbox5 = new QVBox( this );
@@ -109,3 +128,3 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags
109 pTab = new QWidget( tabWidget, "pTab" ); 128 pTab = new QWidget( tabWidget, "pTab" );
110 tabWidget->insertTab( pTab,"Playlist"); 129 tabWidget->insertTab( pTab, "Playlist");
111 130
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
index 4c8d737..61fd40d 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -46,3 +46,4 @@
46#include <qaction.h> 46#include <qaction.h>
47 47#include <qslider.h>
48#include <qlcdnumber.h>
48 49
@@ -106,2 +107,5 @@ protected:
106 QPopupMenu *pmView ; 107 QPopupMenu *pmView ;
108 QPopupMenu *gammaMenu;
109 QSlider *gammaSlider;
110 QLCDNumber *gammaLCD;
107 bool fromSetDocument; 111 bool fromSetDocument;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 12d80ba..d18fde5 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -53,2 +53,3 @@ XineControl::XineControl( QObject *parent, const char *name )
53 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); 53 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
54 connect( mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );
54 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); 55 connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
@@ -73,5 +74,5 @@ void XineControl::play( const QString& fileName ) {
73 m_fileName = fileName; 74 m_fileName = fileName;
74 75
75 qDebug("<<FILENAME: " + fileName + ">>>>"); 76 //qDebug("<<FILENAME: " + fileName + ">>>>");
76 77
77 libXine->play( fileName ); 78 libXine->play( fileName );
@@ -116,2 +117,6 @@ void XineControl::nextMedia() {
116 117
118void XineControl::setGamma( int value ) {
119 libXine->setGamma( value );
120}
121
117void XineControl::stop( bool isSet ) { 122void XineControl::stop( bool isSet ) {
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index 4263b36..1de610b 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -21,3 +21,3 @@
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
@@ -25,3 +25,3 @@
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
@@ -52,4 +52,18 @@ public slots:
52 void stop( bool ); 52 void stop( bool );
53
54 /**
55 * Pause the media stream
56 * @param if pause or not
57 */
53 void pause( bool ); 58 void pause( bool );
59
60 /**
61 * Set videos fullscreen
62 * @param yes or no
63 */
54 void setFullscreen( bool ); 64 void setFullscreen( bool );
65
66 /**
67 *
68 */
55 long currentTime(); 69 long currentTime();
@@ -59,5 +73,17 @@ public slots:
59 long position(); 73 long position();
74
75 /**
76 * Proceed to the next media file in playlist
77 */
60 void nextMedia(); 78 void nextMedia();
79
61 void videoResized ( const QSize &s ); 80 void videoResized ( const QSize &s );
62 81
82 /**
83 * Set the gamma value of the video output
84 * @param int value between -100 and 100, 0 is original
85 */
86 void setGamma( int );
87
88
63private: 89private:
@@ -65,3 +91,3 @@ private:
65 MediaDetect mdetect; 91 MediaDetect mdetect;
66 long m_currentTime; 92 long m_currentTime;
67 long m_position; 93 long m_position;
@@ -72,2 +98,3 @@ private:
72 bool hasAudioChannel : 1; 98 bool hasAudioChannel : 1;
99
73signals: 100signals:
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index bc95d86..d06d62a 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -131,10 +131,10 @@ void XineVideoWidget::paintEvent ( QPaintEvent * )
131 for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) { 131 for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) {
132 const QRect &clip = dp. rect ( i ); 132 const QRect &clip = dp. rect ( i );
133 133
134 qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); 134 qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( )));
135 135
136 uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); 136 uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb );
137 uchar *src = frame; 137 uchar *src = frame;
138 138
139 switch ( rot ) { 139 switch ( rot ) {
140 case 0: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) ); break; 140 case 0: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) ); break;
@@ -143,48 +143,48 @@ void XineVideoWidget::paintEvent ( QPaintEvent * )
143 case 3: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) ); break; 143 case 3: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) ); break;
144 default: break; 144 default: break;
145 } 145 }
146 146
147 uint leftfill = 0; 147 uint leftfill = 0;
148 uint framefill = 0; 148 uint framefill = 0;
149 uint rightfill = 0; 149 uint rightfill = 0;
150 uint clipwidth = clip. width ( ) * m_bytes_per_pixel; 150 uint clipwidth = clip. width ( ) * m_bytes_per_pixel;
151 151
152 if ( clip. left ( ) < framerect. left ( )) 152 if ( clip. left ( ) < framerect. left ( ))
153 leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; 153 leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth;
154 if ( clip. right ( ) > framerect. right ( )) 154 if ( clip. right ( ) > framerect. right ( ))
155 rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; 155 rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth;
156 156
157 framefill = clipwidth - ( leftfill + rightfill ); 157 framefill = clipwidth - ( leftfill + rightfill );
158 158
159 for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { 159 for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) {
160 if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { 160 if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) {
161 memset ( dst, 0, clipwidth ); 161 memset ( dst, 0, clipwidth );
162 } 162 }
163 else { 163 else {
164 if ( leftfill ) 164 if ( leftfill )
165 memset ( dst, 0, leftfill ); 165 memset ( dst, 0, leftfill );
166 166
167 if ( framefill ) { 167 if ( framefill ) {
168 switch ( rot ) { 168 switch ( rot ) {
169 case 0: memcpy ( dst + leftfill, src, framefill ); break; 169 case 0: memcpy ( dst + leftfill, src, framefill ); break;
170 case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; 170 case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
171 case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; 171 case 2: memcpy_rev ( dst + leftfill, src, framefill ); break;
172 case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; 172 case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break;
173 default: break; 173 default: break;
174 }
174 } 175 }
175 }
176 if ( rightfill ) 176 if ( rightfill )
177 memset ( dst + leftfill + framefill, 0, rightfill ); 177 memset ( dst + leftfill + framefill, 0, rightfill );
178 } 178 }
179 179
180 dst += m_bytes_per_line_fb; 180 dst += m_bytes_per_line_fb;
181 181
182 switch ( rot ) { 182 switch ( rot ) {
183 case 0: src += m_bytes_per_line_frame; break; 183 case 0: src += m_bytes_per_line_frame; break;
184 case 1: src -= m_bytes_per_pixel; break; 184 case 1: src -= m_bytes_per_pixel; break;
185 case 2: src -= m_bytes_per_line_frame; break; 185 case 2: src -= m_bytes_per_line_frame; break;
186 case 3: src += m_bytes_per_pixel; break; 186 case 3: src += m_bytes_per_pixel; break;
187 default: break; 187 default: break;
188 }
188 } 189 }
189 }
190 } 190 }
@@ -193,8 +193,8 @@ void XineVideoWidget::paintEvent ( QPaintEvent * )
193 { 193 {
194 // QVFB hack by MArtin Jones 194 // QVFB hack by MArtin Jones
195 QPainter p ( this ); 195 QPainter p ( this );
196 196
197 for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { 197 for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) {
198 p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) ); 198 p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) );
199 } 199 }
200 } 200 }
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.c b/noncore/multimedia/opieplayer2/yuv2rgb.c
index 22bb4cb..e8e86e6 100644
--- a/noncore/multimedia/opieplayer2/yuv2rgb.c
+++ b/noncore/multimedia/opieplayer2/yuv2rgb.c
@@ -3065,12 +3065,11 @@ yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) {
3065 */ 3065 */
3066
3067void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) { 3066void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) {
3068 3067
3069 int i; 3068 int i;
3070 3069
3071 for (i = 0; i < 256; i++) { 3070 for (i = 0; i < 256; i++) {
3072 (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma); 3071 (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma);
3073 (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma); 3072 (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma);
3074 (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma); 3073 (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma);
3075 } 3074 }
3076#ifdef ARCH_X86 3075#ifdef ARCH_X86