author | bipolar <bipolar> | 2002-03-03 17:13:17 (UTC) |
---|---|---|
committer | bipolar <bipolar> | 2002-03-03 17:13:17 (UTC) |
commit | a99347380a9006ec81a9dba2340d6aaab690a86e (patch) (unidiff) | |
tree | 73fdc2eff476fba2113172ed881dd64a4031def6 /core/multimedia/opieplayer/libmad | |
parent | 0e245156b28b70be5cd98a58a9256fe5e2739562 (diff) | |
download | opie-a99347380a9006ec81a9dba2340d6aaab690a86e.zip opie-a99347380a9006ec81a9dba2340d6aaab690a86e.tar.gz opie-a99347380a9006ec81a9dba2340d6aaab690a86e.tar.bz2 |
commited by ljp (llornkcor) reverted to qpe's interface for compatibility. Added playlist features:
save, remove, and have different ones. Uncommented code for background image and added opielogo.
Diffstat (limited to 'core/multimedia/opieplayer/libmad') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.h | 6 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp | 8 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadpluginimpl.h | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h index d163458..b240b77 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.h +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h | |||
@@ -12,26 +12,26 @@ | |||
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 | 35 | ||
36 | public: | 36 | public: |
37 | LibMadPlugin(); | 37 | LibMadPlugin(); |
@@ -44,25 +44,25 @@ public: | |||
44 | bool isFileSupported( const QString& ); | 44 | bool isFileSupported( const QString& ); |
45 | bool open( const QString& ); | 45 | bool open( const QString& ); |
46 | bool close(); | 46 | bool close(); |
47 | bool isOpen(); | 47 | bool isOpen(); |
48 | const QString &fileInfo() { return info; } | 48 | const QString &fileInfo() { return info; } |
49 | 49 | ||
50 | // If decoder doesn't support audio then return 0 here | 50 | // If decoder doesn't support audio then return 0 here |
51 | int audioStreams(); | 51 | int audioStreams(); |
52 | int audioChannels( int stream ); | 52 | int audioChannels( int stream ); |
53 | int audioFrequency( int stream ); | 53 | int audioFrequency( int stream ); |
54 | int audioSamples( int stream ); | 54 | int audioSamples( int stream ); |
55 | bool audioSetSample( long sample, int stream ); | 55 | bool audioSetSample( long sample, int stream ); |
56 | int audioBitsPerSample(int) {return 0;} | 56 | /* int audioBitsPerSample(int) {return 0;} */ |
57 | long audioGetSample( int stream ); | 57 | long audioGetSample( int stream ); |
58 | #ifdef OLD_MEDIAPLAYER_API | 58 | #ifdef OLD_MEDIAPLAYER_API |
59 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
60 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 60 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); |
61 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | 61 | bool audioReadSamples( short *output, int channel, long samples, int stream ); |
62 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | 62 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); |
63 | #else | 63 | #else |
64 | 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 ); |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | 67 | ||
68 | bool read(); | 68 | bool read(); |
diff --git a/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp b/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp index 028c658..67779e8 100644 --- a/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp +++ b/core/multimedia/opieplayer/libmad/libmadpluginimpl.cpp | |||
@@ -21,50 +21,50 @@ | |||
21 | #include "libmadpluginimpl.h" | 21 | #include "libmadpluginimpl.h" |
22 | 22 | ||
23 | 23 | ||
24 | LibMadPluginImpl::LibMadPluginImpl() | 24 | LibMadPluginImpl::LibMadPluginImpl() |
25 | : libmadplugin(0), ref(0) | 25 | : libmadplugin(0), ref(0) |
26 | { | 26 | { |
27 | } | 27 | } |
28 | 28 | ||
29 | 29 | ||
30 | LibMadPluginImpl::~LibMadPluginImpl() | 30 | LibMadPluginImpl::~LibMadPluginImpl() |
31 | { | 31 | { |
32 | if ( libmadplugin ) | 32 | if ( libmadplugin ) |
33 | delete libmadplugin; | 33 | delete libmadplugin; |
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | MediaPlayerDecoder *LibMadPluginImpl::decoder() | 37 | MediaPlayerDecoder *LibMadPluginImpl::decoder() |
38 | { | 38 | { |
39 | if ( !libmadplugin ) | 39 | if ( !libmadplugin ) |
40 | libmadplugin = new LibMadPlugin; | 40 | libmadplugin = new LibMadPlugin; |
41 | return libmadplugin; | 41 | return libmadplugin; |
42 | } | 42 | } |
43 | 43 | ||
44 | 44 | ||
45 | MediaPlayerEncoder *LibMadPluginImpl::encoder() | 45 | MediaPlayerEncoder *LibMadPluginImpl::encoder() |
46 | { | 46 | { |
47 | return NULL; | 47 | return NULL; |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | #ifndef QT_NO_COMPONENT | 51 | #ifndef QT_NO_COMPONENT |
52 | 52 | ||
53 | 53 | ||
54 | QRESULT LibMadPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 54 | QRESULT LibMadPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
55 | { | 55 | { |
56 | *iface = 0; | 56 | *iface = 0; |
57 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) | 57 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) |
58 | *iface = this, (*iface)->addRef(); | 58 | *iface = this, (*iface)->addRef(); |
59 | return QS_OK; | 59 | return QS_OK; |
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | Q_EXPORT_INTERFACE() | 63 | Q_EXPORT_INTERFACE() |
64 | { | 64 | { |
65 | Q_CREATE_INSTANCE( LibMadPluginImpl ) | 65 | Q_CREATE_INSTANCE( LibMadPluginImpl ) |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | #endif | 69 | #endif |
70 | 70 | ||
diff --git a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h index bc864ee..9b35b90 100644 --- a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h +++ b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h | |||
@@ -11,26 +11,26 @@ | |||
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_IMPL_H | 20 | #ifndef LIBMAD_PLUGIN_IMPL_H |
21 | #define LIBMAD_PLUGIN_IMPL_H | 21 | #define LIBMAD_PLUGIN_IMPL_H |
22 | 22 | ||
23 | //#include <qpe/mediaplayerplugininterface.h> | 23 | #include <qpe/mediaplayerplugininterface.h> |
24 | #include "../mediaplayerplugininterface.h" | 24 | //#include "../mediaplayerplugininterface.h" |
25 | 25 | ||
26 | 26 | ||
27 | class LibMadPlugin; | 27 | class LibMadPlugin; |
28 | 28 | ||
29 | 29 | ||
30 | class LibMadPluginImpl : public MediaPlayerPluginInterface | 30 | class LibMadPluginImpl : public MediaPlayerPluginInterface |
31 | { | 31 | { |
32 | public: | 32 | public: |
33 | LibMadPluginImpl(); | 33 | LibMadPluginImpl(); |
34 | virtual ~LibMadPluginImpl(); | 34 | virtual ~LibMadPluginImpl(); |
35 | 35 | ||
36 | #ifndef QT_NO_COMPONENT | 36 | #ifndef QT_NO_COMPONENT |