-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 47 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.h | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 33 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 |
7 files changed, 51 insertions, 58 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 442864f..56203e0 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -538,2 +538,3 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) | |||
538 | case Key_F13: //mail | 538 | case Key_F13: //mail |
539 | mediaPlayerState->toggleBlank(); | ||
539 | break; | 540 | break; |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 8dadf96..858b51f 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -4,2 +4,3 @@ | |||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/qcopenvelope_qws.h> | ||
5 | 6 | ||
@@ -18,2 +19,6 @@ | |||
18 | 19 | ||
20 | // for setBacklight() | ||
21 | #include <linux/fb.h> | ||
22 | #include <sys/file.h> | ||
23 | #include <sys/ioctl.h> | ||
19 | 24 | ||
@@ -30,3 +35,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
30 | 35 | ||
31 | xineControl = new XineControl(); | 36 | // xineControl = new XineControl(); |
32 | // QPEApplication::grabKeyboard(); // EVIL | 37 | // QPEApplication::grabKeyboard(); // EVIL |
@@ -40,2 +45,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
40 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 45 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
46 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | ||
41 | 47 | ||
@@ -52,3 +58,3 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
52 | volControl = new VolumeControl; | 58 | volControl = new VolumeControl; |
53 | 59 | xineControl = new XineControl(); | |
54 | } | 60 | } |
@@ -73,3 +79,2 @@ void MediaPlayer::setPlaying( bool play ) { | |||
73 | if ( !play ) { | 79 | if ( !play ) { |
74 | // mediaPlayerState->setPaused( FALSE ); | ||
75 | return; | 80 | return; |
@@ -100,8 +105,2 @@ void MediaPlayer::setPlaying( bool play ) { | |||
100 | 105 | ||
101 | // QString fileInfo = mediaPlayerState->curDecoder()->fileInfo(); | ||
102 | |||
103 | // if ( !fileInfo.isEmpty() ) | ||
104 | // tickerText += ", " + fileInfo; | ||
105 | // audioUI->setTickerText( tickerText + "." ); | ||
106 | |||
107 | audioUI->setTickerText( currentFile->file( ) ); | 106 | audioUI->setTickerText( currentFile->file( ) ); |
@@ -251,2 +250,20 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
251 | 250 | ||
251 | |||
252 | void MediaPlayer::blank( bool b ) { | ||
253 | fd=open("/dev/fb0",O_RDWR); | ||
254 | if (fd != -1) { | ||
255 | |||
256 | if ( !b ) { | ||
257 | qDebug("do blanking"); | ||
258 | ioctl( fd, FBIOBLANK, 3 ); | ||
259 | isBlanked = TRUE; | ||
260 | } else { | ||
261 | qDebug("do unblanking"); | ||
262 | ioctl( fd, FBIOBLANK, 0); | ||
263 | isBlanked = FALSE; | ||
264 | } | ||
265 | close( fd ); | ||
266 | } | ||
267 | } | ||
268 | |||
252 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 269 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
@@ -264,4 +281,7 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | |||
264 | qDebug("Blank here"); | 281 | qDebug("Blank here"); |
282 | // mediaPlayerState->toggleBlank(); | ||
265 | break; | 283 | break; |
266 | case Key_F13: //mail | 284 | case Key_F13: //mail |
285 | qDebug("Blank here"); | ||
286 | // mediaPlayerState->toggleBlank(); | ||
267 | break; | 287 | break; |
@@ -270,10 +290,2 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | |||
270 | 290 | ||
271 | void MediaPlayer::doBlank() { | ||
272 | |||
273 | } | ||
274 | |||
275 | void MediaPlayer::doUnblank() { | ||
276 | |||
277 | } | ||
278 | |||
279 | void MediaPlayer::cleanUp() { | 291 | void MediaPlayer::cleanUp() { |
@@ -281,3 +293,2 @@ void MediaPlayer::cleanUp() { | |||
281 | // QPEApplication::ungrabKeyboard(); | 293 | // QPEApplication::ungrabKeyboard(); |
282 | |||
283 | } | 294 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.h b/noncore/multimedia/opieplayer2/mediaplayer.h index 16213b5..81fab88 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.h +++ b/noncore/multimedia/opieplayer2/mediaplayer.h | |||
@@ -30,2 +30,3 @@ private slots: | |||
30 | void cleanUp(); | 30 | void cleanUp(); |
31 | void blank( bool ); | ||
31 | 32 | ||
@@ -34,5 +35,5 @@ protected: | |||
34 | void keyReleaseEvent( QKeyEvent *e); | 35 | void keyReleaseEvent( QKeyEvent *e); |
35 | void doBlank(); | ||
36 | void doUnblank(); | ||
37 | private: | 36 | private: |
37 | bool isBlanked; | ||
38 | int fd; | ||
38 | int volumeDirection; | 39 | int volumeDirection; |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index bb8d905..6aafb88 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -117,3 +117,3 @@ void MediaPlayerState::setIsStreaming( bool b ) { | |||
117 | 117 | ||
118 | void MediaPlayerState::setFullscreen( bool b ) { | 118 | void MediaPlayerState::setBlank( bool b ) { |
119 | if ( isFullscreen == b ) { | 119 | if ( isFullscreen == b ) { |
@@ -126,2 +126,11 @@ void MediaPlayerState::setFullscreen( bool b ) { | |||
126 | 126 | ||
127 | void MediaPlayerState::setFullscreen( bool b ) { | ||
128 | if ( isBlanked == b ) { | ||
129 | return; | ||
130 | } | ||
131 | isBlanked = b; | ||
132 | emit blankToggled(b); | ||
133 | } | ||
134 | |||
135 | |||
127 | void MediaPlayerState::setScaled( bool b ) { | 136 | void MediaPlayerState::setScaled( bool b ) { |
@@ -266,2 +275,5 @@ void MediaPlayerState::togglePlaying() { | |||
266 | 275 | ||
276 | void MediaPlayerState::toggleBlank() { | ||
277 | setBlank( !isBlanked); | ||
278 | } | ||
267 | 279 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 887c527..3baffd3 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -80,2 +80,3 @@ public slots: | |||
80 | void setView( char v ); | 80 | void setView( char v ); |
81 | void setBlank( bool b ); | ||
81 | 82 | ||
@@ -94,2 +95,3 @@ public slots: | |||
94 | void togglePlaying(); | 95 | void togglePlaying(); |
96 | void toggleBlank(); | ||
95 | 97 | ||
@@ -108,3 +110,3 @@ signals: | |||
108 | void viewChanged( char ); | 110 | void viewChanged( char ); |
109 | 111 | void blankToggled( bool ); | |
110 | void prev(); | 112 | void prev(); |
@@ -116,2 +118,3 @@ private: | |||
116 | bool isScaled; | 118 | bool isScaled; |
119 | bool isBlanked; | ||
117 | bool isLooping; | 120 | bool isLooping; |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6dcc842..0cfd720 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -2,4 +2,2 @@ | |||
2 | #define QTOPIA_INTERNAL_FSLP | 2 | #define QTOPIA_INTERNAL_FSLP |
3 | #include <qpe/qcopenvelope_qws.h> | ||
4 | |||
5 | #include <qpe/qpemenubar.h> | 3 | #include <qpe/qpemenubar.h> |
@@ -47,13 +45,2 @@ | |||
47 | 45 | ||
48 | #include <unistd.h> | ||
49 | #include <sys/file.h> | ||
50 | #include <sys/ioctl.h> | ||
51 | #include <sys/soundcard.h> | ||
52 | |||
53 | // for setBacklight() | ||
54 | #include <linux/fb.h> | ||
55 | #include <sys/types.h> | ||
56 | #include <sys/stat.h> | ||
57 | #include <stdlib.h> | ||
58 | |||
59 | #define BUTTONS_ON_TOOLBAR | 46 | #define BUTTONS_ON_TOOLBAR |
@@ -1081,23 +1068,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) | |||
1081 | 1068 | ||
1082 | void PlayListWidget::doBlank() { | ||
1083 | qDebug("do blanking"); | ||
1084 | fd=open("/dev/fb0",O_RDWR); | ||
1085 | if (fd != -1) { | ||
1086 | ioctl(fd,FBIOBLANK,1); | ||
1087 | // close(fd); | ||
1088 | } | ||
1089 | } | ||
1090 | 1069 | ||
1091 | void PlayListWidget::doUnblank() { | ||
1092 | // this crashes opieplayer with a segfault | ||
1093 | // int fd; | ||
1094 | // fd=open("/dev/fb0",O_RDWR); | ||
1095 | qDebug("do unblanking"); | ||
1096 | if (fd != -1) { | ||
1097 | ioctl(fd,FBIOBLANK,0); | ||
1098 | close(fd); | ||
1099 | } | ||
1100 | QCopEnvelope h("QPE/System", "setBacklight(int)"); | ||
1101 | h <<-3;// v[1]; // -3 Force on | ||
1102 | } | ||
1103 | 1070 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 67a85a8..dd4bee0 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -44,3 +44,3 @@ public: | |||
44 | QPushButton *tbDeletePlaylist; | 44 | QPushButton *tbDeletePlaylist; |
45 | int fd, selected; | 45 | int selected; |
46 | public slots: | 46 | public slots: |
@@ -61,4 +61,2 @@ private: | |||
61 | bool audioScan, videoScan; | 61 | bool audioScan, videoScan; |
62 | void doBlank(); | ||
63 | void doUnblank(); | ||
64 | void readm3u(const QString &); | 62 | void readm3u(const QString &); |