author | kergoth <kergoth> | 2003-08-09 18:00:34 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 18:00:34 (UTC) |
commit | 7670c56f5952f7772e8fbab65e9233274e2a0564 (patch) (unidiff) | |
tree | 10932f8976c76755b8edf2ab9397a6e53d95a13c | |
parent | 1ab4ca95e4d2cf24d32b38c9031cb6076351e730 (diff) | |
download | opie-7670c56f5952f7772e8fbab65e9233274e2a0564.zip opie-7670c56f5952f7772e8fbab65e9233274e2a0564.tar.gz opie-7670c56f5952f7772e8fbab65e9233274e2a0564.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | core/multimedia/opieplayer/config.in | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/inputDialog.cpp | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.h | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/main.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/load_j2b.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/tables.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/config.in | 3 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/libtremorplugin.cpp | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/tremor/config.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/vorbis.pro | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/wavplugin/config.in | 2 |
15 files changed, 12 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/config.in b/core/multimedia/opieplayer/config.in index dc1b79a..a7ac444 100644 --- a/core/multimedia/opieplayer/config.in +++ b/core/multimedia/opieplayer/config.in | |||
@@ -1,12 +1,13 @@ | |||
1 | config OPIEPLAYER | 1 | config OPIEPLAYER |
2 | boolean "opie-mediaplayer (mediaplayer that plays mp3, mpeg, and wav)" | 2 | boolean "Opieplayer" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE |
5 | 5 | ||
6 | source core/multimedia/opieplayer/libflash/config.in | 6 | source core/multimedia/opieplayer/libflash/config.in |
7 | source core/multimedia/opieplayer/libmad/config.in | 7 | source core/multimedia/opieplayer/libmad/config.in |
8 | source core/multimedia/opieplayer/libmpeg3/config.in | 8 | source core/multimedia/opieplayer/libmpeg3/config.in |
9 | source core/multimedia/opieplayer/modplug/config.in | 9 | source core/multimedia/opieplayer/modplug/config.in |
10 | source core/multimedia/opieplayer/wavplugin/config.in | 10 | source core/multimedia/opieplayer/wavplugin/config.in |
11 | source core/multimedia/opieplayer/vorbis/tremor/config.in | 11 | source core/multimedia/opieplayer/vorbis/tremor/config.in |
12 | source core/multimedia/opieplayer/vorbis/config.in | 12 | source core/multimedia/opieplayer/vorbis/config.in |
13 | \ No newline at end of file | ||
diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp index 62240b2..38b8f53 100644 --- a/core/multimedia/opieplayer/inputDialog.cpp +++ b/core/multimedia/opieplayer/inputDialog.cpp | |||
@@ -1,59 +1,56 @@ | |||
1 | #include "inputDialog.h" | 1 | #include "inputDialog.h" |
2 | 2 | ||
3 | #include <qpe/resource.h> | 3 | #include <qpe/resource.h> |
4 | 4 | ||
5 | #include <opie/ofiledialog.h> | 5 | #include <opie/ofiledialog.h> |
6 | 6 | ||
7 | #include <qlineedit.h> | 7 | #include <qlineedit.h> |
8 | #include <qlayout.h> | ||
9 | #include <qvariant.h> | ||
10 | #include <qpushbutton.h> | 8 | #include <qpushbutton.h> |
11 | #include <qwhatsthis.h> | ||
12 | 9 | ||
13 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 10 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
14 | : QDialog( parent, name, modal, fl ) { | 11 | : QDialog( parent, name, modal, fl ) { |
15 | if ( !name ) { | 12 | if ( !name ) { |
16 | setName( "InputDialog" ); | 13 | setName( "InputDialog" ); |
17 | } | 14 | } |
18 | resize( 234, 115); | 15 | resize( 234, 115); |
19 | setMaximumSize( QSize( 240, 40)); | 16 | setMaximumSize( QSize( 240, 40)); |
20 | setCaption( tr( name ) ); | 17 | setCaption( tr( name ) ); |
21 | 18 | ||
22 | QPushButton *browserButton; | 19 | QPushButton *browserButton; |
23 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); | 20 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); |
24 | browserButton->setGeometry( QRect( 205, 10, 22, 22)); | 21 | browserButton->setGeometry( QRect( 205, 10, 22, 22)); |
25 | connect( browserButton, SIGNAL(released()),this,SLOT(browse())); | 22 | connect( browserButton, SIGNAL(released()),this,SLOT(browse())); |
26 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 23 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
27 | LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); | 24 | LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); |
28 | LineEdit1->setFocus(); | 25 | LineEdit1->setFocus(); |
29 | } | 26 | } |
30 | /* | 27 | /* |
31 | * return the current text(input) | 28 | * return the current text(input) |
32 | */ | 29 | */ |
33 | QString InputDialog::text() const { | 30 | QString InputDialog::text() const { |
34 | return LineEdit1->text(); | 31 | return LineEdit1->text(); |
35 | } | 32 | } |
36 | /* | 33 | /* |
37 | * Destroys the object and frees any allocated resources | 34 | * Destroys the object and frees any allocated resources |
38 | */ | 35 | */ |
39 | InputDialog::~InputDialog() { | 36 | InputDialog::~InputDialog() { |
40 | } | 37 | } |
41 | 38 | ||
42 | void InputDialog::browse() { | 39 | void InputDialog::browse() { |
43 | 40 | ||
44 | MimeTypes types; | 41 | MimeTypes types; |
45 | QStringList audio, video, all; | 42 | QStringList audio, video, all; |
46 | audio << "audio/*"; | 43 | audio << "audio/*"; |
47 | audio << "playlist/plain"; | 44 | audio << "playlist/plain"; |
48 | audio << "audio/x-mpegurl"; | 45 | audio << "audio/x-mpegurl"; |
49 | 46 | ||
50 | video << "video/*"; | 47 | video << "video/*"; |
51 | video << "playlist/plain"; | 48 | video << "playlist/plain"; |
52 | 49 | ||
53 | all += audio; | 50 | all += audio; |
54 | all += video; | 51 | all += video; |
55 | types.insert("All Media Files", all ); | 52 | types.insert("All Media Files", all ); |
56 | types.insert("Audio", audio ); | 53 | types.insert("Audio", audio ); |
57 | types.insert("Video", video ); | 54 | types.insert("Video", video ); |
58 | 55 | ||
59 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); | 56 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); |
diff --git a/core/multimedia/opieplayer/libmad/config.in b/core/multimedia/opieplayer/libmad/config.in index 72249dc..1239166 100644 --- a/core/multimedia/opieplayer/libmad/config.in +++ b/core/multimedia/opieplayer/libmad/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config LIBMAD | 1 | config LIBMAD |
2 | boolean "opieplayer1-libmadplugin (plugin with shoutcast/icecast support to play MP3 files)" | 2 | boolean "libmadplugin" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h index 6747712..b05ba15 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.h +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h | |||
@@ -1,83 +1,82 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef LIBMAD_PLUGIN_H | 20 | #ifndef LIBMAD_PLUGIN_H |
21 | #define LIBMAD_PLUGIN_H | 21 | #define LIBMAD_PLUGIN_H |
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qpe/mediaplayerplugininterface.h> | 24 | #include <qpe/mediaplayerplugininterface.h> |
25 | /* #include "../mediaplayerplugininterface.h" */ | 25 | /* #include "../mediaplayerplugininterface.h" */ |
26 | 26 | ||
27 | 27 | ||
28 | // #define OLD_MEDIAPLAYER_API | 28 | // #define OLD_MEDIAPLAYER_API |
29 | 29 | ||
30 | 30 | ||
31 | class LibMadPluginData; | 31 | class LibMadPluginData; |
32 | 32 | ||
33 | 33 | ||
34 | class LibMadPlugin : public MediaPlayerDecoder { | 34 | class LibMadPlugin : public MediaPlayerDecoder { |
35 | |||
36 | public: | 35 | public: |
37 | LibMadPlugin(); | 36 | LibMadPlugin(); |
38 | ~LibMadPlugin(); | 37 | ~LibMadPlugin(); |
39 | 38 | ||
40 | const char *pluginName() { return "LibMadPlugin"; } | 39 | const char *pluginName() { return "LibMadPlugin"; } |
41 | const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } | 40 | const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } |
42 | double pluginVersion() { return 1.0; } | 41 | double pluginVersion() { return 1.0; } |
43 | 42 | ||
44 | bool isFileSupported( const QString& ); | 43 | bool isFileSupported( const QString& ); |
45 | bool open( const QString& ); | 44 | bool open( const QString& ); |
46 | 45 | ||
47 | bool close(); | 46 | bool close(); |
48 | bool isOpen(); | 47 | bool isOpen(); |
49 | const QString &fileInfo() { return info; } | 48 | const QString &fileInfo() { return info; } |
50 | 49 | ||
51 | // If decoder doesn't support audio then return 0 here | 50 | // If decoder doesn't support audio then return 0 here |
52 | int audioStreams(); | 51 | int audioStreams(); |
53 | int audioChannels( int stream ); | 52 | int audioChannels( int stream ); |
54 | int audioFrequency( int stream ); | 53 | int audioFrequency( int stream ); |
55 | int audioSamples( int stream ); | 54 | int audioSamples( int stream ); |
56 | bool audioSetSample( long sample, int stream ); | 55 | bool audioSetSample( long sample, int stream ); |
57 | /* int audioBitsPerSample(int) {return 0;} */ | 56 | /* int audioBitsPerSample(int) {return 0;} */ |
58 | long audioGetSample( int stream ); | 57 | long audioGetSample( int stream ); |
59 | #ifdef OLD_MEDIAPLAYER_API | 58 | #ifdef OLD_MEDIAPLAYER_API |
60 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
61 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 60 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); |
62 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | 61 | bool audioReadSamples( short *output, int channel, long samples, int stream ); |
63 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | 62 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); |
64 | #else | 63 | #else |
65 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | 64 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); |
66 | #endif | 65 | #endif |
67 | 66 | ||
68 | 67 | ||
69 | bool read(); | 68 | bool read(); |
70 | bool decode( short *output, long samples, long& samplesRead ); | 69 | bool decode( short *output, long samples, long& samplesRead ); |
71 | void printID3Tags(); | 70 | void printID3Tags(); |
72 | 71 | ||
73 | 72 | ||
74 | // If decoder doesn't support video then return 0 here | 73 | // If decoder doesn't support video then return 0 here |
75 | int videoStreams() { return 0; } | 74 | int videoStreams() { return 0; } |
76 | int videoWidth( int ) { return 0; } | 75 | int videoWidth( int ) { return 0; } |
77 | int videoHeight( int ) { return 0; } | 76 | int videoHeight( int ) { return 0; } |
78 | double videoFrameRate( int ) { return 0.0; } | 77 | double videoFrameRate( int ) { return 0.0; } |
79 | int videoFrames( int ) { return 0; } | 78 | int videoFrames( int ) { return 0; } |
80 | bool videoSetFrame( long, int ) { return FALSE; } | 79 | bool videoSetFrame( long, int ) { return FALSE; } |
81 | long videoGetFrame( int ) { return 0; } | 80 | long videoGetFrame( int ) { return 0; } |
82 | bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } | 81 | bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } |
83 | bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } | 82 | bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } |
diff --git a/core/multimedia/opieplayer/libmpeg3/config.in b/core/multimedia/opieplayer/libmpeg3/config.in index b965a40..b634594 100644 --- a/core/multimedia/opieplayer/libmpeg3/config.in +++ b/core/multimedia/opieplayer/libmpeg3/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config LIBMPEG3 | 1 | config LIBMPEG3 |
2 | boolean "opieplayer1-libmpeg3plugin (play MPEG3 video files)" | 2 | boolean "libmpeg3plugin" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/main.cpp b/core/multimedia/opieplayer/main.cpp index 18cd7a6..32dc1d5 100644 --- a/core/multimedia/opieplayer/main.cpp +++ b/core/multimedia/opieplayer/main.cpp | |||
@@ -1,56 +1,55 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qpe/qpeapplication.h> | ||
21 | #include "mediaplayerstate.h" | 20 | #include "mediaplayerstate.h" |
22 | #include "playlistwidget.h" | 21 | #include "playlistwidget.h" |
23 | #include "audiowidget.h" | 22 | #include "audiowidget.h" |
24 | #include "videowidget.h" | 23 | #include "videowidget.h" |
25 | #include "loopcontrol.h" | 24 | #include "loopcontrol.h" |
26 | #include "mediaplayer.h" | 25 | #include "mediaplayer.h" |
27 | 26 | ||
28 | MediaPlayerState *mediaPlayerState; | 27 | MediaPlayerState *mediaPlayerState; |
29 | PlayListWidget *playList; | 28 | PlayListWidget *playList; |
30 | AudioWidget *audioUI; | 29 | AudioWidget *audioUI; |
31 | VideoWidget *videoUI; | 30 | VideoWidget *videoUI; |
32 | LoopControl *loopControl; | 31 | LoopControl *loopControl; |
33 | 32 | ||
34 | 33 | ||
35 | int main(int argc, char **argv) { | 34 | int main(int argc, char **argv) { |
36 | QPEApplication a(argc,argv); | 35 | QPEApplication a(argc,argv); |
37 | 36 | ||
38 | MediaPlayerState st( 0, "mediaPlayerState" ); | 37 | MediaPlayerState st( 0, "mediaPlayerState" ); |
39 | mediaPlayerState = &st; | 38 | mediaPlayerState = &st; |
40 | PlayListWidget pl( 0, "playList" ); | 39 | PlayListWidget pl( 0, "playList" ); |
41 | playList = &pl; | 40 | playList = &pl; |
42 | AudioWidget aw( 0, "audioUI" ); | 41 | AudioWidget aw( 0, "audioUI" ); |
43 | audioUI = &aw; | 42 | audioUI = &aw; |
44 | VideoWidget vw( 0, "videoUI" ); | 43 | VideoWidget vw( 0, "videoUI" ); |
45 | videoUI = &vw; | 44 | videoUI = &vw; |
46 | LoopControl lc( 0, "loopControl" ); | 45 | LoopControl lc( 0, "loopControl" ); |
47 | loopControl = &lc; | 46 | loopControl = &lc; |
48 | MediaPlayer mp( 0, "mediaPlayer" ); | 47 | MediaPlayer mp( 0, "mediaPlayer" ); |
49 | 48 | ||
50 | // pl.setCaption( MediaPlayer::tr("OpiePlayer") ); | 49 | // pl.setCaption( MediaPlayer::tr("OpiePlayer") ); |
51 | a.showMainDocumentWidget(&pl); | 50 | a.showMainDocumentWidget(&pl); |
52 | 51 | ||
53 | return a.exec(); | 52 | return a.exec(); |
54 | } | 53 | } |
55 | 54 | ||
56 | 55 | ||
diff --git a/core/multimedia/opieplayer/modplug/config.in b/core/multimedia/opieplayer/modplug/config.in index 86e4725..769db1b 100644 --- a/core/multimedia/opieplayer/modplug/config.in +++ b/core/multimedia/opieplayer/modplug/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config MODPLUG | 1 | config MODPLUG |
2 | boolean "opieplayer1-modplugin (play MOD/XM/S3M/IT amiga tracker modules)" | 2 | boolean "modplugin" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/modplug/load_j2b.cpp b/core/multimedia/opieplayer/modplug/load_j2b.cpp index 5f60bbb..4f0b85c 100644 --- a/core/multimedia/opieplayer/modplug/load_j2b.cpp +++ b/core/multimedia/opieplayer/modplug/load_j2b.cpp | |||
@@ -1,18 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and modify it | 2 | * This program is free software; you can redistribute it and modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the license or (at your | 4 | * Free Software Foundation; either version 2 of the license or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | * | 6 | * |
7 | * Authors: Olivier Lapicque <olivierl@jps.net> | 7 | * Authors: Olivier Lapicque <olivierl@jps.net> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | 10 | ||
11 | /////////////////////////////////////////////////// | 11 | /////////////////////////////////////////////////// |
12 | // | 12 | // |
13 | // J2B module loader | 13 | // J2B module loader |
14 | // | 14 | // |
15 | /////////////////////////////////////////////////// | 15 | /////////////////////////////////////////////////// |
16 | #include "stdafx.h" | 16 | #include "stdafx.h" |
17 | #include "sndfile.h" | ||
18 | 17 | ||
diff --git a/core/multimedia/opieplayer/modplug/tables.cpp b/core/multimedia/opieplayer/modplug/tables.cpp index e7198b2..baf4517 100644 --- a/core/multimedia/opieplayer/modplug/tables.cpp +++ b/core/multimedia/opieplayer/modplug/tables.cpp | |||
@@ -1,59 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and modify it | 2 | * This program is free software; you can redistribute it and modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the license or (at your | 4 | * Free Software Foundation; either version 2 of the license or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | * | 6 | * |
7 | * Authors: Olivier Lapicque <olivierl@jps.net> | 7 | * Authors: Olivier Lapicque <olivierl@jps.net> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "stdafx.h" | 10 | #include "stdafx.h" |
11 | #include "sndfile.h" | ||
12 | 11 | ||
13 | #ifndef FASTSOUNDLIB | 12 | #ifndef FASTSOUNDLIB |
14 | //#pragma data_seg(".tables") | 13 | //#pragma data_seg(".tables") |
15 | #endif | 14 | #endif |
16 | 15 | ||
17 | extern const BYTE ImpulseTrackerPortaVolCmd[16]; | 16 | extern const BYTE ImpulseTrackerPortaVolCmd[16]; |
18 | const BYTE ImpulseTrackerPortaVolCmd[16] = | 17 | const BYTE ImpulseTrackerPortaVolCmd[16] = |
19 | { | 18 | { |
20 | 0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0x40, 0x60, | 19 | 0x00, 0x01, 0x04, 0x08, 0x10, 0x20, 0x40, 0x60, |
21 | 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | 20 | 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF |
22 | }; | 21 | }; |
23 | 22 | ||
24 | // Period table for Protracker octaves 0-5: | 23 | // Period table for Protracker octaves 0-5: |
25 | extern const WORD ProTrackerPeriodTable[6*12]; | 24 | extern const WORD ProTrackerPeriodTable[6*12]; |
26 | const WORD ProTrackerPeriodTable[6*12] = | 25 | const WORD ProTrackerPeriodTable[6*12] = |
27 | { | 26 | { |
28 | 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, | 27 | 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, |
29 | 856,808,762,720,678,640,604,570,538,508,480,453, | 28 | 856,808,762,720,678,640,604,570,538,508,480,453, |
30 | 428,404,381,360,339,320,302,285,269,254,240,226, | 29 | 428,404,381,360,339,320,302,285,269,254,240,226, |
31 | 214,202,190,180,170,160,151,143,135,127,120,113, | 30 | 214,202,190,180,170,160,151,143,135,127,120,113, |
32 | 107,101,95,90,85,80,75,71,67,63,60,56, | 31 | 107,101,95,90,85,80,75,71,67,63,60,56, |
33 | 53,50,47,45,42,40,37,35,33,31,30,28 | 32 | 53,50,47,45,42,40,37,35,33,31,30,28 |
34 | }; | 33 | }; |
35 | 34 | ||
36 | 35 | ||
37 | extern const WORD ProTrackerTunedPeriods[16*12]; | 36 | extern const WORD ProTrackerTunedPeriods[16*12]; |
38 | const WORD ProTrackerTunedPeriods[16*12] = | 37 | const WORD ProTrackerTunedPeriods[16*12] = |
39 | { | 38 | { |
40 | 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, | 39 | 1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960,907, |
41 | 1700,1604,1514,1430,1348,1274,1202,1134,1070,1010,954,900, | 40 | 1700,1604,1514,1430,1348,1274,1202,1134,1070,1010,954,900, |
42 | 1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948,894, | 41 | 1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948,894, |
43 | 1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940,888, | 42 | 1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940,888, |
44 | 1664,1570,1482,1398,1320,1246,1176,1110,1048,990,934,882, | 43 | 1664,1570,1482,1398,1320,1246,1176,1110,1048,990,934,882, |
45 | 1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926,874, | 44 | 1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926,874, |
46 | 1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920,868, | 45 | 1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920,868, |
47 | 1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914,862, | 46 | 1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914,862, |
48 | 1814,1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960, | 47 | 1814,1712,1616,1524,1440,1356,1280,1208,1140,1076,1016,960, |
49 | 1800,1700,1604,1514,1430,1350,1272,1202,1134,1070,1010,954, | 48 | 1800,1700,1604,1514,1430,1350,1272,1202,1134,1070,1010,954, |
50 | 1788,1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948, | 49 | 1788,1688,1592,1504,1418,1340,1264,1194,1126,1064,1004,948, |
51 | 1774,1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940, | 50 | 1774,1676,1582,1492,1408,1330,1256,1184,1118,1056,996,940, |
52 | 1762,1664,1570,1482,1398,1320,1246,1176,1110,1048,988,934, | 51 | 1762,1664,1570,1482,1398,1320,1246,1176,1110,1048,988,934, |
53 | 1750,1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926, | 52 | 1750,1652,1558,1472,1388,1310,1238,1168,1102,1040,982,926, |
54 | 1736,1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920, | 53 | 1736,1640,1548,1460,1378,1302,1228,1160,1094,1032,974,920, |
55 | 1724,1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914 | 54 | 1724,1628,1536,1450,1368,1292,1220,1150,1086,1026,968,914 |
56 | }; | 55 | }; |
57 | 56 | ||
58 | 57 | ||
59 | // S3M C-4 periods | 58 | // S3M C-4 periods |
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index b393230..8016d8e 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -45,97 +45,97 @@ | |||
45 | #include <qmessagebox.h> | 45 | #include <qmessagebox.h> |
46 | #include <qtoolbutton.h> | 46 | #include <qtoolbutton.h> |
47 | #include <qtabwidget.h> | 47 | #include <qtabwidget.h> |
48 | #include <qlistview.h> | 48 | #include <qlistview.h> |
49 | #include <qpoint.h> | 49 | #include <qpoint.h> |
50 | #include <qlineedit.h> | 50 | #include <qlineedit.h> |
51 | #include <qpushbutton.h> | 51 | #include <qpushbutton.h> |
52 | #include <qregexp.h> | 52 | #include <qregexp.h> |
53 | #include <qtextstream.h> | 53 | #include <qtextstream.h> |
54 | 54 | ||
55 | //#include <qtimer.h> | 55 | //#include <qtimer.h> |
56 | 56 | ||
57 | #include "playlistselection.h" | 57 | #include "playlistselection.h" |
58 | #include "playlistwidget.h" | 58 | #include "playlistwidget.h" |
59 | #include "mediaplayerstate.h" | 59 | #include "mediaplayerstate.h" |
60 | 60 | ||
61 | #include "inputDialog.h" | 61 | #include "inputDialog.h" |
62 | 62 | ||
63 | #include <stdlib.h> | 63 | #include <stdlib.h> |
64 | #include "audiowidget.h" | 64 | #include "audiowidget.h" |
65 | #include "videowidget.h" | 65 | #include "videowidget.h" |
66 | 66 | ||
67 | #include <unistd.h> | 67 | #include <unistd.h> |
68 | #include <sys/file.h> | 68 | #include <sys/file.h> |
69 | #include <sys/ioctl.h> | 69 | #include <sys/ioctl.h> |
70 | #include <sys/soundcard.h> | 70 | #include <sys/soundcard.h> |
71 | 71 | ||
72 | // for setBacklight() | 72 | // for setBacklight() |
73 | #include <linux/fb.h> | 73 | #include <linux/fb.h> |
74 | #include <sys/types.h> | 74 | #include <sys/types.h> |
75 | #include <sys/stat.h> | 75 | #include <sys/stat.h> |
76 | #include <stdlib.h> | 76 | #include <stdlib.h> |
77 | 77 | ||
78 | #define BUTTONS_ON_TOOLBAR | 78 | #define BUTTONS_ON_TOOLBAR |
79 | #define SIDE_BUTTONS | 79 | #define SIDE_BUTTONS |
80 | #define CAN_SAVE_LOAD_PLAYLISTS | 80 | #define CAN_SAVE_LOAD_PLAYLISTS |
81 | 81 | ||
82 | extern AudioWidget *audioUI; | 82 | extern AudioWidget *audioUI; |
83 | extern VideoWidget *videoUI; | 83 | extern VideoWidget *videoUI; |
84 | extern MediaPlayerState *mediaPlayerState; | 84 | extern MediaPlayerState *mediaPlayerState; |
85 | 85 | ||
86 | static inline QString fullBaseName ( const QFileInfo &fi ) | 86 | static inline QString fullBaseName ( const QFileInfo &fi ) |
87 | { | 87 | { |
88 | QString str = fi. fileName ( ); | 88 | QString str = fi. fileName ( ); |
89 | return str. left ( str. findRev ( '.' )); | 89 | return str. left ( str. findRev ( '.' )); |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
93 | QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg;audio/x-mod;audio/x-ogg"; | 93 | QString audioMimes ="audio/mpeg;audio/x-wav;application/ogg;audio/x-mod"; |
94 | // class myFileSelector { | 94 | // class myFileSelector { |
95 | 95 | ||
96 | // }; | 96 | // }; |
97 | class PlayListWidgetPrivate { | 97 | class PlayListWidgetPrivate { |
98 | public: | 98 | public: |
99 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbScale, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; | 99 | QToolButton *tbPlay, *tbFull, *tbLoop, *tbScale, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove; |
100 | QFrame *playListFrame; | 100 | QFrame *playListFrame; |
101 | FileSelector *files; | 101 | FileSelector *files; |
102 | PlayListSelection *selectedFiles; | 102 | PlayListSelection *selectedFiles; |
103 | bool setDocumentUsed; | 103 | bool setDocumentUsed; |
104 | DocLnk *current; | 104 | DocLnk *current; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | 107 | ||
108 | class ToolButton : public QToolButton { | 108 | class ToolButton : public QToolButton { |
109 | public: | 109 | public: |
110 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) | 110 | ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) |
111 | : QToolButton( parent, name ) { | 111 | : QToolButton( parent, name ) { |
112 | setTextLabel( name ); | 112 | setTextLabel( name ); |
113 | setPixmap( Resource::loadPixmap( icon ) ); | 113 | setPixmap( Resource::loadPixmap( icon ) ); |
114 | setAutoRaise( TRUE ); | 114 | setAutoRaise( TRUE ); |
115 | setFocusPolicy( QWidget::NoFocus ); | 115 | setFocusPolicy( QWidget::NoFocus ); |
116 | setToggleButton( t ); | 116 | setToggleButton( t ); |
117 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); | 117 | connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); |
118 | QPEMenuToolFocusManager::manager()->addWidget( this ); | 118 | QPEMenuToolFocusManager::manager()->addWidget( this ); |
119 | } | 119 | } |
120 | }; | 120 | }; |
121 | 121 | ||
122 | 122 | ||
123 | class MenuItem : public QAction { | 123 | class MenuItem : public QAction { |
124 | public: | 124 | public: |
125 | MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) | 125 | MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) |
126 | : QAction( text, QString::null, 0, 0 ) { | 126 | : QAction( text, QString::null, 0, 0 ) { |
127 | connect( this, SIGNAL( activated() ), handler, slot ); | 127 | connect( this, SIGNAL( activated() ), handler, slot ); |
128 | addTo( parent ); | 128 | addTo( parent ); |
129 | } | 129 | } |
130 | }; | 130 | }; |
131 | 131 | ||
132 | 132 | ||
133 | PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | 133 | PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) |
134 | : QMainWindow( parent, name, fl ) { | 134 | : QMainWindow( parent, name, fl ) { |
135 | 135 | ||
136 | d = new PlayListWidgetPrivate; | 136 | d = new PlayListWidgetPrivate; |
137 | d->setDocumentUsed = FALSE; | 137 | d->setDocumentUsed = FALSE; |
138 | d->current = NULL; | 138 | d->current = NULL; |
139 | fromSetDocument = FALSE; | 139 | fromSetDocument = FALSE; |
140 | insanityBool=FALSE; | 140 | insanityBool=FALSE; |
141 | audioScan = FALSE; | 141 | audioScan = FALSE; |
@@ -1327,97 +1327,97 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) | |||
1327 | break; | 1327 | break; |
1328 | case Key_2: | 1328 | case Key_2: |
1329 | tabWidget->setCurrentPage(1); | 1329 | tabWidget->setCurrentPage(1); |
1330 | break; | 1330 | break; |
1331 | case Key_3: | 1331 | case Key_3: |
1332 | tabWidget->setCurrentPage(2); | 1332 | tabWidget->setCurrentPage(2); |
1333 | break; | 1333 | break; |
1334 | case Key_4: | 1334 | case Key_4: |
1335 | tabWidget->setCurrentPage(3); | 1335 | tabWidget->setCurrentPage(3); |
1336 | break; | 1336 | break; |
1337 | case Key_Down: | 1337 | case Key_Down: |
1338 | if ( !d->selectedFiles->next() ) | 1338 | if ( !d->selectedFiles->next() ) |
1339 | d->selectedFiles->first(); | 1339 | d->selectedFiles->first(); |
1340 | 1340 | ||
1341 | break; | 1341 | break; |
1342 | case Key_Up: | 1342 | case Key_Up: |
1343 | if ( !d->selectedFiles->prev() ) | 1343 | if ( !d->selectedFiles->prev() ) |
1344 | // d->selectedFiles->last(); | 1344 | // d->selectedFiles->last(); |
1345 | 1345 | ||
1346 | break; | 1346 | break; |
1347 | 1347 | ||
1348 | } | 1348 | } |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | void PlayListWidget::keyPressEvent( QKeyEvent *) | 1351 | void PlayListWidget::keyPressEvent( QKeyEvent *) |
1352 | { | 1352 | { |
1353 | // qDebug("Key press"); | 1353 | // qDebug("Key press"); |
1354 | // switch ( e->key() ) { | 1354 | // switch ( e->key() ) { |
1355 | // ////////////////////////////// Zaurus keys | 1355 | // ////////////////////////////// Zaurus keys |
1356 | // case Key_A: //add to playlist | 1356 | // case Key_A: //add to playlist |
1357 | // qDebug("Add"); | 1357 | // qDebug("Add"); |
1358 | // addSelected(); | 1358 | // addSelected(); |
1359 | // break; | 1359 | // break; |
1360 | // case Key_R: //remove from playlist | 1360 | // case Key_R: //remove from playlist |
1361 | // removeSelected(); | 1361 | // removeSelected(); |
1362 | // break; | 1362 | // break; |
1363 | // case Key_P: //play | 1363 | // case Key_P: //play |
1364 | // qDebug("Play"); | 1364 | // qDebug("Play"); |
1365 | // playSelected(); | 1365 | // playSelected(); |
1366 | // break; | 1366 | // break; |
1367 | // case Key_Space: | 1367 | // case Key_Space: |
1368 | // qDebug("Play"); | 1368 | // qDebug("Play"); |
1369 | // playSelected(); | 1369 | // playSelected(); |
1370 | // break; | 1370 | // break; |
1371 | // } | 1371 | // } |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | void PlayListWidget::doBlank() { | 1374 | void PlayListWidget::doBlank() { |
1375 | // TODO: why do we blank this way, why don't we use ODevice or ScreenSaver? | 1375 | // qDebug("do blanking"); |
1376 | #ifdef QT_QWS_DEVFS | 1376 | #ifdef QT_QWS_DEVFS |
1377 | fd=open("/dev/fb/0",O_RDWR); | 1377 | fd=open("/dev/fb/0",O_RDWR); |
1378 | #else | 1378 | #else |
1379 | fd=open("/dev/fb0",O_RDWR); | 1379 | fd=open("/dev/fb0",O_RDWR); |
1380 | #endif | 1380 | #endif |
1381 | if (fd != -1) { | 1381 | if (fd != -1) { |
1382 | ioctl(fd,FBIOBLANK,1); | 1382 | ioctl(fd,FBIOBLANK,1); |
1383 | // close(fd); | 1383 | // close(fd); |
1384 | } | 1384 | } |
1385 | } | 1385 | } |
1386 | 1386 | ||
1387 | void PlayListWidget::doUnblank() { | 1387 | void PlayListWidget::doUnblank() { |
1388 | // this crashes opieplayer with a segfault | 1388 | // this crashes opieplayer with a segfault |
1389 | // int fd; | 1389 | // int fd; |
1390 | // fd=open("/dev/fb0",O_RDWR); | 1390 | // fd=open("/dev/fb0",O_RDWR); |
1391 | // qDebug("do unblanking"); | 1391 | // qDebug("do unblanking"); |
1392 | if (fd != -1) { | 1392 | if (fd != -1) { |
1393 | ioctl(fd,FBIOBLANK,0); | 1393 | ioctl(fd,FBIOBLANK,0); |
1394 | close(fd); | 1394 | close(fd); |
1395 | } | 1395 | } |
1396 | QCopEnvelope h("QPE/System", "setBacklight(int)"); | 1396 | QCopEnvelope h("QPE/System", "setBacklight(int)"); |
1397 | h <<-3;// v[1]; // -3 Force on | 1397 | h <<-3;// v[1]; // -3 Force on |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | void PlayListWidget::populateSkinsMenu() { | 1400 | void PlayListWidget::populateSkinsMenu() { |
1401 | int item = 0; | 1401 | int item = 0; |
1402 | defaultSkinIndex = 0; | 1402 | defaultSkinIndex = 0; |
1403 | QString skinName; | 1403 | QString skinName; |
1404 | Config cfg( "OpiePlayer" ); | 1404 | Config cfg( "OpiePlayer" ); |
1405 | cfg.setGroup("Options" ); | 1405 | cfg.setGroup("Options" ); |
1406 | QString skin = cfg.readEntry( "Skin", "default" ); | 1406 | QString skin = cfg.readEntry( "Skin", "default" ); |
1407 | 1407 | ||
1408 | QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); | 1408 | QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); |
1409 | skinsDir.setFilter( QDir::Dirs ); | 1409 | skinsDir.setFilter( QDir::Dirs ); |
1410 | skinsDir.setSorting(QDir::Name ); | 1410 | skinsDir.setSorting(QDir::Name ); |
1411 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); | 1411 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); |
1412 | QFileInfoListIterator it( *skinslist ); | 1412 | QFileInfoListIterator it( *skinslist ); |
1413 | QFileInfo *fi; | 1413 | QFileInfo *fi; |
1414 | while ( ( fi = it.current() ) ) { | 1414 | while ( ( fi = it.current() ) ) { |
1415 | skinName = fi->fileName(); | 1415 | skinName = fi->fileName(); |
1416 | // qDebug( fi->fileName() ); | 1416 | // qDebug( fi->fileName() ); |
1417 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { | 1417 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { |
1418 | item = skinsMenu->insertItem( fi->fileName() ) ; | 1418 | item = skinsMenu->insertItem( fi->fileName() ) ; |
1419 | } | 1419 | } |
1420 | if( skinName == "default" ) { | 1420 | if( skinName == "default" ) { |
1421 | defaultSkinIndex = item; | 1421 | defaultSkinIndex = item; |
1422 | } | 1422 | } |
1423 | if( skinName == skin ) { | 1423 | if( skinName == skin ) { |
diff --git a/core/multimedia/opieplayer/vorbis/config.in b/core/multimedia/opieplayer/vorbis/config.in index bad9922..d66ec88 100644 --- a/core/multimedia/opieplayer/vorbis/config.in +++ b/core/multimedia/opieplayer/vorbis/config.in | |||
@@ -1,5 +1,6 @@ | |||
1 | config LIBTREMORPLUGIN | 1 | config LIBTREMORPLUGIN |
2 | boolean "opieplayer1-libtremorplugin (play OGG vorbis files)" | 2 | boolean "libtremorplugin" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |
5 | comment "tremor is ogg vorbis!!" | ||
5 | \ No newline at end of file | 6 | \ No newline at end of file |
diff --git a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp index c1e1a23..53c4b2b 100644 --- a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp +++ b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp | |||
@@ -1,90 +1,89 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * libtremorplugin.cpp | 2 | * libtremorplugin.cpp |
3 | * | 3 | * |
4 | * Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net> | 4 | * Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * the Free Software Foundation; either version 2 of the License, or |
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | * | 10 | * |
11 | * This program is distributed in the hope that it will be useful, | 11 | * This program is distributed in the hope that it will be useful, |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | // fixed and adapted for opieplayer 2003 ljp <llornkcor@handhelds.org> | 20 | // fixed and adapted for opieplayer 2003 ljp <llornkcor@handhelds.org> |
21 | 21 | ||
22 | #include <stdio.h> | 22 | #include <stdio.h> |
23 | #include <stdarg.h> | 23 | #include <stdarg.h> |
24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
26 | #include <sys/stat.h> | 26 | #include <sys/stat.h> |
27 | #include <fcntl.h> | 27 | #include <fcntl.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <string.h> | 29 | #include <string.h> |
30 | #include <errno.h> | 30 | #include <errno.h> |
31 | #include <time.h> | 31 | #include <time.h> |
32 | #include <locale.h> | 32 | #include <locale.h> |
33 | #include <math.h> | 33 | #include <math.h> |
34 | #include <assert.h> | 34 | #include <assert.h> |
35 | 35 | ||
36 | #include <qmap.h> | 36 | #include <qmap.h> |
37 | 37 | ||
38 | #include "libtremorplugin.h" | 38 | #include "libtremorplugin.h" |
39 | 39 | ||
40 | 40 | ||
41 | extern "C" { | 41 | extern "C" { |
42 | #include "tremor/ivorbiscodec.h" | ||
43 | #include "tremor/ivorbisfile.h" | 42 | #include "tremor/ivorbisfile.h" |
44 | } | 43 | } |
45 | 44 | ||
46 | 45 | ||
47 | #define MPEG_BUFFER_SIZE 65536 | 46 | #define MPEG_BUFFER_SIZE 65536 |
48 | //#define debugMsg(a) qDebug(a) | 47 | //#define debugMsg(a) qDebug(a) |
49 | #define debugMsg(a) | 48 | #define debugMsg(a) |
50 | 49 | ||
51 | 50 | ||
52 | class LibTremorPluginData { | 51 | class LibTremorPluginData { |
53 | public: | 52 | public: |
54 | char* filename; | 53 | char* filename; |
55 | FILE* f; | 54 | FILE* f; |
56 | OggVorbis_File vf; | 55 | OggVorbis_File vf; |
57 | vorbis_info* vi; | 56 | vorbis_info* vi; |
58 | vorbis_comment* vc; | 57 | vorbis_comment* vc; |
59 | bool bos; | 58 | bool bos; |
60 | int csection; | 59 | int csection; |
61 | QString finfo; | 60 | QString finfo; |
62 | }; | 61 | }; |
63 | 62 | ||
64 | 63 | ||
65 | LibTremorPlugin::LibTremorPlugin() { | 64 | LibTremorPlugin::LibTremorPlugin() { |
66 | qDebug("<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>"); | 65 | qDebug("<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>"); |
67 | d = new LibTremorPluginData; | 66 | d = new LibTremorPluginData; |
68 | d->f = 0; | 67 | d->f = 0; |
69 | d->vi = 0; | 68 | d->vi = 0; |
70 | d->vc = 0; | 69 | d->vc = 0; |
71 | d->bos = 0; | 70 | d->bos = 0; |
72 | d->csection = 0; | 71 | d->csection = 0; |
73 | d->finfo = ""; | 72 | d->finfo = ""; |
74 | } | 73 | } |
75 | 74 | ||
76 | 75 | ||
77 | LibTremorPlugin::~LibTremorPlugin() { | 76 | LibTremorPlugin::~LibTremorPlugin() { |
78 | close(); | 77 | close(); |
79 | delete d; | 78 | delete d; |
80 | } | 79 | } |
81 | 80 | ||
82 | 81 | ||
83 | bool LibTremorPlugin::isFileSupported( const QString& path ) { | 82 | bool LibTremorPlugin::isFileSupported( const QString& path ) { |
84 | debugMsg( "LibTremorPlugin::isFileSupported" ); | 83 | debugMsg( "LibTremorPlugin::isFileSupported" ); |
85 | 84 | ||
86 | // Mpeg file extensions | 85 | // Mpeg file extensions |
87 | // "mp2","mp3","m1v","m2v","m2s","mpg","vob","mpeg",ac3" | 86 | // "mp2","mp3","m1v","m2v","m2s","mpg","vob","mpeg",ac3" |
88 | // Other media extensions | 87 | // Other media extensions |
89 | // "wav","mid","mod","s3m","ogg","avi","mov","sid" | 88 | // "wav","mid","mod","s3m","ogg","avi","mov","sid" |
90 | 89 | ||
diff --git a/core/multimedia/opieplayer/vorbis/tremor/config.in b/core/multimedia/opieplayer/vorbis/tremor/config.in index 8ee753c..f803d16 100644 --- a/core/multimedia/opieplayer/vorbis/tremor/config.in +++ b/core/multimedia/opieplayer/vorbis/tremor/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config LIBTREMOR | 1 | config LIBTREMOR |
2 | boolean "libtremor (library needed to play OGG files)" | 2 | boolean "libtremor" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && OPIEPLAYER |
diff --git a/core/multimedia/opieplayer/vorbis/vorbis.pro b/core/multimedia/opieplayer/vorbis/vorbis.pro index a15cf9c..d566003 100644 --- a/core/multimedia/opieplayer/vorbis/vorbis.pro +++ b/core/multimedia/opieplayer/vorbis/vorbis.pro | |||
@@ -1,11 +1,11 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | HEADERS = libtremorplugin.h libtremorinimpl.h | 3 | HEADERS = libtremorplugin.h libtremorpluginimpl.h |
4 | SOURCES = libtremorplugin.cpp libtremorpluginimpl.cpp | 4 | SOURCES = libtremorplugin.cpp libtremorpluginimpl.cpp |
5 | TARGET = tremorplugin | 5 | TARGET = tremorplugin |
6 | DESTDIR = $(OPIEDIR)/plugins/codecs | 6 | DESTDIR = $(OPIEDIR)/plugins/codecs |
7 | INCLUDEPATH += $(OPIEDIR)/include .. tremor | 7 | INCLUDEPATH += $(OPIEDIR)/include .. tremor |
8 | DEPENDPATH += $(OPIEDIR)/include .. tremor | 8 | DEPENDPATH += $(OPIEDIR)/include .. tremor |
9 | LIBS += -lqpe -lm -ltremor | 9 | LIBS += -lqpe -lm -ltremor |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | include ( $(OPIEDIR)/include.pro ) | 11 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/multimedia/opieplayer/wavplugin/config.in b/core/multimedia/opieplayer/wavplugin/config.in index 56bdfab..6e4c4b3 100644 --- a/core/multimedia/opieplayer/wavplugin/config.in +++ b/core/multimedia/opieplayer/wavplugin/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config WAVPLUGIN | 1 | config WAVPLUGIN |
2 | boolean "opieplayer1-wavplugin (play WAV files)" | 2 | boolean "wavplugin" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && OPIEPLAYER |