author | harlekin <harlekin> | 2002-09-02 17:18:30 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-02 17:18:30 (UTC) |
commit | 99b610f06af444e2636d1afe93d3de89a524ee8a (patch) (unidiff) | |
tree | a664829bd5149686b906253f71d4cc01eeb9b059 | |
parent | bf0f423d8aed59da90db9e9748a53fdd5e1efab0 (diff) | |
download | opie-99b610f06af444e2636d1afe93d3de89a524ee8a.zip opie-99b610f06af444e2636d1afe93d3de89a524ee8a.tar.gz opie-99b610f06af444e2636d1afe93d3de89a524ee8a.tar.bz2 |
first parts of gamma correction, fullscreen on arm need some more work
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 48 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 43 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 23 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 31 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 0 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.c | 1 |
13 files changed, 178 insertions, 22 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 | |||
@@ -60,6 +60,7 @@ extern "C" { | |||
60 | void null_set_gui_width( vo_driver_t* self, int width ); | 60 | void null_set_gui_width( vo_driver_t* self, int width ); |
61 | void null_set_gui_height( vo_driver_t* self, int height ); | 61 | void null_set_gui_height( vo_driver_t* self, int height ); |
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); |
64 | } | 65 | } |
65 | 66 | ||
@@ -203,6 +204,12 @@ bool Lib::isVideoFullScreen() { | |||
203 | void Lib::setScaling( bool scale ) { | 204 | void Lib::setScaling( bool scale ) { |
204 | ::null_set_scaling( m_videoOutput, scale ); | 205 | ::null_set_scaling( m_videoOutput, scale ); |
205 | } | 206 | } |
207 | |||
208 | void Lib::setGamma( int value ) { | ||
209 | //qDebug( QString( "%1").arg(value) ); | ||
210 | ::null_set_videoGamma( m_videoOutput, value ); | ||
211 | } | ||
212 | |||
206 | bool Lib::isScaling() { | 213 | bool Lib::isScaling() { |
207 | return ::null_is_scaling( m_videoOutput ); | 214 | return ::null_is_scaling( m_videoOutput ); |
208 | } | 215 | } |
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 | |||
@@ -112,6 +112,13 @@ namespace XINE { | |||
112 | * | 112 | * |
113 | */ | 113 | */ |
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 | /** |
116 | * test | 123 | * test |
117 | */ | 124 | */ |
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,3 +1,38 @@ | |||
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> |
2 | #include <qpe/qlibrary.h> | 37 | #include <qpe/qlibrary.h> |
3 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
@@ -21,9 +56,6 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) | |||
21 | 56 | ||
22 | 57 | ||
23 | MediaPlayerState::~MediaPlayerState() { | 58 | MediaPlayerState::~MediaPlayerState() { |
24 | // Config cfg( "OpiePlayer" ); | ||
25 | // writeConfig( cfg ); | ||
26 | |||
27 | } | 59 | } |
28 | 60 | ||
29 | 61 | ||
@@ -34,6 +66,7 @@ void MediaPlayerState::readConfig( Config& cfg ) { | |||
34 | isLooping = cfg.readBoolEntry( "Looping" ); | 66 | isLooping = cfg.readBoolEntry( "Looping" ); |
35 | isShuffled = cfg.readBoolEntry( "Shuffle" ); | 67 | isShuffled = cfg.readBoolEntry( "Shuffle" ); |
36 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); | 68 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); |
69 | videoGamma = cfg.readNumEntry( "VideoGamma" ); | ||
37 | usePlaylist = TRUE; | 70 | usePlaylist = TRUE; |
38 | isPlaying = FALSE; | 71 | isPlaying = FALSE; |
39 | isStreaming = FALSE; | 72 | isStreaming = FALSE; |
@@ -51,6 +84,7 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { | |||
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 | } |
55 | 89 | ||
56 | 90 | ||
@@ -209,6 +243,14 @@ void MediaPlayerState::updatePosition( long p ){ | |||
209 | emit positionUpdated(p); | 243 | emit positionUpdated(p); |
210 | } | 244 | } |
211 | 245 | ||
246 | void MediaPlayerState::setVideoGamma( int v ){ | ||
247 | if ( videoGamma == v ) { | ||
248 | return; | ||
249 | } | ||
250 | videoGamma = v; | ||
251 | emit videoGammaChanged( v ); | ||
252 | } | ||
253 | |||
212 | void MediaPlayerState::setLength( long l ) { | 254 | void MediaPlayerState::setLength( long l ) { |
213 | if ( curLength == l ) { | 255 | if ( curLength == l ) { |
214 | return; | 256 | return; |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -31,6 +31,8 @@ | |||
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | // this file is based on work by trolltech | ||
35 | |||
34 | #ifndef MEDIA_PLAYER_STATE_H | 36 | #ifndef MEDIA_PLAYER_STATE_H |
35 | #define MEDIA_PLAYER_STATE_H | 37 | #define MEDIA_PLAYER_STATE_H |
36 | 38 | ||
@@ -79,6 +81,7 @@ public slots: | |||
79 | void setLength( long l ); | 81 | void setLength( long l ); |
80 | void setView( char v ); | 82 | void setView( char v ); |
81 | void setBlanked( bool b ); | 83 | void setBlanked( bool b ); |
84 | void setVideoGamma( int v ); | ||
82 | 85 | ||
83 | void setPrev(); | 86 | void setPrev(); |
84 | void setNext(); | 87 | void setNext(); |
@@ -111,6 +114,7 @@ signals: | |||
111 | void lengthChanged( long ); | 114 | void lengthChanged( long ); |
112 | void viewChanged( char ); | 115 | void viewChanged( char ); |
113 | void blankToggled( bool ); | 116 | void blankToggled( bool ); |
117 | void videoGammaChanged( int ); | ||
114 | void prev(); | 118 | void prev(); |
115 | void next(); | 119 | void next(); |
116 | 120 | ||
@@ -125,7 +129,7 @@ private: | |||
125 | long curPosition; | 129 | long curPosition; |
126 | long curLength; | 130 | long curLength; |
127 | char curView; | 131 | char curView; |
128 | 132 | int videoGamma; | |
129 | void readConfig( Config& cfg ); | 133 | void readConfig( Config& cfg ); |
130 | 134 | ||
131 | }; | 135 | }; |
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,3 +1,35 @@ | |||
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 | ||
2 | /*#include <xine.h>*/ | 34 | /*#include <xine.h>*/ |
3 | #include <stdlib.h> | 35 | #include <stdlib.h> |
@@ -31,7 +63,7 @@ struct null_driver_s { | |||
31 | int depth, bpp, bytes_per_pixel; | 63 | int depth, bpp, bytes_per_pixel; |
32 | int yuv2rgb_mode; | 64 | int yuv2rgb_mode; |
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; |
36 | yuv2rgb_factory_t *yuv2rgb_factory; | 68 | yuv2rgb_factory_t *yuv2rgb_factory; |
37 | vo_overlay_t *overlay; | 69 | vo_overlay_t *overlay; |
@@ -605,6 +637,12 @@ void null_set_fullscreen( vo_driver_t* self, int screen ){ | |||
605 | int null_is_scaling( vo_driver_t* self ){ | 637 | int null_is_scaling( vo_driver_t* self ){ |
606 | return ((null_driver_t*)self)->m_is_scaling; | 638 | return ((null_driver_t*)self)->m_is_scaling; |
607 | } | 639 | } |
640 | |||
641 | void 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 | |||
608 | void null_set_scaling( vo_driver_t* self, int scale ){ | 646 | void null_set_scaling( vo_driver_t* self, int scale ){ |
609 | ((null_driver_t*)self)->m_is_scaling = scale; | 647 | ((null_driver_t*)self)->m_is_scaling = scale; |
610 | } | 648 | } |
@@ -615,6 +653,8 @@ void null_set_gui_width( vo_driver_t* self, int width ){ | |||
615 | void null_set_gui_height( vo_driver_t* self, int height ){ | 653 | void null_set_gui_height( vo_driver_t* self, int height ){ |
616 | ((null_driver_t*)self)->gui_height = height; | 654 | ((null_driver_t*)self)->gui_height = height; |
617 | } | 655 | } |
656 | |||
657 | |||
618 | void null_set_mode( vo_driver_t* self, int depth, int rgb ){ | 658 | void null_set_mode( vo_driver_t* self, int depth, int rgb ){ |
619 | null_driver_t* this = (null_driver_t*)self; | 659 | null_driver_t* this = (null_driver_t*)self; |
620 | 660 | ||
@@ -670,3 +710,4 @@ void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_ | |||
670 | this->caller = user_data; | 710 | this->caller = user_data; |
671 | this->frameDis = t; | 711 | this->frameDis = t; |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -118,6 +118,7 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
118 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); | 118 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); |
119 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); | 119 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); |
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 | ||
122 | readConfig( cfg ); | 123 | readConfig( cfg ); |
123 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" ); | 124 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" ); |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -99,6 +99,25 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags | |||
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 ); | ||
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 ); |
103 | QVBox *vbox4 = new QVBox( vbox5 ); | 122 | QVBox *vbox4 = new QVBox( vbox5 ); |
104 | QHBox *hbox6 = new QHBox( vbox4 ); | 123 | QHBox *hbox6 = new QHBox( vbox4 ); |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -44,7 +44,8 @@ | |||
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qpopupmenu.h> | 45 | #include <qpopupmenu.h> |
46 | #include <qaction.h> | 46 | #include <qaction.h> |
47 | 47 | #include <qslider.h> | |
48 | #include <qlcdnumber.h> | ||
48 | 49 | ||
49 | class PlayListWidgetPrivate; | 50 | class PlayListWidgetPrivate; |
50 | class PlayListSelection; | 51 | class PlayListSelection; |
@@ -104,6 +105,9 @@ protected: | |||
104 | QListView *audioView, *videoView, *playlistView; | 105 | QListView *audioView, *videoView, *playlistView; |
105 | QLabel *libString; | 106 | QLabel *libString; |
106 | QPopupMenu *pmView ; | 107 | QPopupMenu *pmView ; |
108 | QPopupMenu *gammaMenu; | ||
109 | QSlider *gammaSlider; | ||
110 | QLCDNumber *gammaLCD; | ||
107 | bool fromSetDocument; | 111 | bool fromSetDocument; |
108 | bool insanityBool; | 112 | bool insanityBool; |
109 | QString setDocFileRef; | 113 | QString setDocFileRef; |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -51,6 +51,7 @@ XineControl::XineControl( QObject *parent, const char *name ) | |||
51 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 51 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); |
52 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); | 52 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); |
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() ) ); |
55 | 56 | ||
56 | disabledSuspendScreenSaver = FALSE; | 57 | disabledSuspendScreenSaver = FALSE; |
@@ -72,7 +73,7 @@ void XineControl::play( const QString& fileName ) { | |||
72 | hasAudioChannel=FALSE; | 73 | hasAudioChannel=FALSE; |
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 ); |
78 | mediaPlayerState->setPlaying( true ); | 79 | mediaPlayerState->setPlaying( true ); |
@@ -114,6 +115,10 @@ void XineControl::nextMedia() { | |||
114 | mediaPlayerState->setNext(); | 115 | mediaPlayerState->setNext(); |
115 | } | 116 | } |
116 | 117 | ||
118 | void XineControl::setGamma( int value ) { | ||
119 | libXine->setGamma( value ); | ||
120 | } | ||
121 | |||
117 | void XineControl::stop( bool isSet ) { | 122 | void XineControl::stop( bool isSet ) { |
118 | if ( !isSet) { | 123 | if ( !isSet) { |
119 | libXine->stop( ); | 124 | libXine->stop( ); |
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 | |||
@@ -19,11 +19,11 @@ | |||
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
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. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
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. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
@@ -50,16 +50,42 @@ public: | |||
50 | public slots: | 50 | public slots: |
51 | void play( const QString& fileName ); | 51 | void play( const QString& fileName ); |
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(); |
56 | void seekTo( long ); | 70 | void seekTo( long ); |
57 | // get length of media file and set it | 71 | // get length of media file and set it |
58 | void length(); | 72 | void length(); |
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 | |||
63 | private: | 89 | private: |
64 | XINE::Lib *libXine; | 90 | XINE::Lib *libXine; |
65 | MediaDetect mdetect; | 91 | MediaDetect mdetect; |
@@ -70,6 +96,7 @@ private: | |||
70 | bool disabledSuspendScreenSaver : 1; | 96 | bool disabledSuspendScreenSaver : 1; |
71 | bool hasVideoChannel : 1; | 97 | bool hasVideoChannel : 1; |
72 | bool hasAudioChannel : 1; | 98 | bool hasAudioChannel : 1; |
99 | |||
73 | signals: | 100 | signals: |
74 | void positionChanged( long ); | 101 | void positionChanged( long ); |
75 | 102 | ||
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 | |||
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 | |||
@@ -3063,7 +3063,6 @@ yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) { | |||
3063 | /* | 3063 | /* |
3064 | * factory functions | 3064 | * factory functions |
3065 | */ | 3065 | */ |
3066 | |||
3067 | void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) { | 3066 | void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) { |
3068 | 3067 | ||
3069 | int i; | 3068 | int i; |