Diffstat (limited to 'core/multimedia/opieplayer/libmad') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/Makefile.in | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmad.pro | 20 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.h | 20 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadpluginimpl.h | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/version.c | 2 |
5 files changed, 30 insertions, 16 deletions
diff --git a/core/multimedia/opieplayer/libmad/Makefile.in b/core/multimedia/opieplayer/libmad/Makefile.in index e9f74e7..552043c 100644 --- a/core/multimedia/opieplayer/libmad/Makefile.in +++ b/core/multimedia/opieplayer/libmad/Makefile.in | |||
@@ -169,55 +169,57 @@ synth.o: synth.c \ | |||
169 | libmad_global.h \ | 169 | libmad_global.h \ |
170 | fixed.h \ | 170 | fixed.h \ |
171 | frame.h \ | 171 | frame.h \ |
172 | timer.h \ | 172 | timer.h \ |
173 | stream.h \ | 173 | stream.h \ |
174 | bit.h \ | 174 | bit.h \ |
175 | synth.h \ | 175 | synth.h \ |
176 | D.dat | 176 | D.dat |
177 | 177 | ||
178 | decoder.o: decoder.c \ | 178 | decoder.o: decoder.c \ |
179 | libmad_global.h \ | 179 | libmad_global.h \ |
180 | stream.h \ | 180 | stream.h \ |
181 | bit.h \ | 181 | bit.h \ |
182 | frame.h \ | 182 | frame.h \ |
183 | fixed.h \ | 183 | fixed.h \ |
184 | timer.h \ | 184 | timer.h \ |
185 | synth.h \ | 185 | synth.h \ |
186 | decoder.h | 186 | decoder.h |
187 | 187 | ||
188 | layer12.o: layer12.c \ | 188 | layer12.o: layer12.c \ |
189 | libmad_global.h \ | 189 | libmad_global.h \ |
190 | fixed.h \ | 190 | fixed.h \ |
191 | bit.h \ | 191 | bit.h \ |
192 | stream.h \ | 192 | stream.h \ |
193 | frame.h \ | 193 | frame.h \ |
194 | timer.h \ | 194 | timer.h \ |
195 | layer12.h \ | 195 | layer12.h \ |
196 | sf_table.dat \ | 196 | sf_table.dat \ |
197 | qc_table.dat | 197 | qc_table.dat |
198 | 198 | ||
199 | layer3.o: layer3.c \ | 199 | layer3.o: layer3.c \ |
200 | libmad_global.h \ | 200 | libmad_global.h \ |
201 | fixed.h \ | 201 | fixed.h \ |
202 | bit.h \ | 202 | bit.h \ |
203 | stream.h \ | 203 | stream.h \ |
204 | frame.h \ | 204 | frame.h \ |
205 | timer.h \ | 205 | timer.h \ |
206 | huffman.h \ | 206 | huffman.h \ |
207 | layer3.h \ | 207 | layer3.h \ |
208 | rq_table.dat \ | 208 | rq_table.dat \ |
209 | imdct_s.dat | 209 | imdct_s.dat |
210 | 210 | ||
211 | huffman.o: huffman.c \ | 211 | huffman.o: huffman.c \ |
212 | libmad_global.h \ | 212 | libmad_global.h \ |
213 | huffman.h | 213 | huffman.h |
214 | 214 | ||
215 | libmadplugin.o: libmadplugin.cpp \ | 215 | libmadplugin.o: libmadplugin.cpp \ |
216 | libmadplugin.h \ | 216 | libmadplugin.h \ |
217 | ../mediaplayerplugininterface.h \ | ||
217 | mad.h | 218 | mad.h |
218 | 219 | ||
219 | libmadpluginimpl.o: libmadpluginimpl.cpp \ | 220 | libmadpluginimpl.o: libmadpluginimpl.cpp \ |
220 | libmadplugin.h \ | 221 | libmadplugin.h \ |
222 | ../mediaplayerplugininterface.h \ | ||
221 | libmadpluginimpl.h | 223 | libmadpluginimpl.h |
222 | 224 | ||
223 | 225 | ||
diff --git a/core/multimedia/opieplayer/libmad/libmad.pro b/core/multimedia/opieplayer/libmad/libmad.pro index 6c40a15..b54ca6b 100644 --- a/core/multimedia/opieplayer/libmad/libmad.pro +++ b/core/multimedia/opieplayer/libmad/libmad.pro | |||
@@ -1,12 +1,14 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | HEADERS = libmad_version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h \ | 3 | HEADERS = libmad_version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h \ |
4 | layer12.h layer3.h huffman.h libmad_global.h mad.h libmadplugin.h libmadpluginimpl.h | 4 | layer12.h layer3.h huffman.h libmad_global.h mad.h libmadplugin.h libmadpluginimpl.h |
5 | SOURCES = version.c fixed.c bit.c timer.c stream.c frame.c synth.c decoder.c \ | 5 | SOURCES = version.c fixed.c bit.c timer.c stream.c frame.c synth.c decoder.c \ |
6 | layer12.c layer3.c huffman.c libmadplugin.cpp libmadpluginimpl.cpp | 6 | layer12.c layer3.c huffman.c libmadplugin.cpp libmadpluginimpl.cpp |
7 | TARGET = madplugin | 7 | TARGET = madplugin |
8 | DESTDIR = ../../plugins/codecs | 8 | DESTDIR = ../../plugins/codecs |
9 | INCLUDEPATH += $(OPIEDIR)/include .. | 9 | INCLUDEPATH += $(OPIEDIR)/include .. |
10 | DEPENDPATH += ../$(OPIEDIR)/include .. | 10 | DEPENDPATH += ../$(OPIEDIR)/include .. |
11 | TMAKE_CFLAGS += -DFPM_64BIT | ||
12 | TMAKE_CXXFLAGS += -DFPM_64BIT | ||
11 | LIBS += -lqpe -lm | 13 | LIBS += -lqpe -lm |
12 | VERSION = 1.0.0 | 14 | VERSION = 1.0.0 |
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h index 88647ae..ff84c27 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.h +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h | |||
@@ -1,101 +1,111 @@ | |||
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 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include "mediaplayerplugininterface.h" | 25 | //#include <qpe/mediaplayerplugininterface.h> |
26 | #include "../mediaplayerplugininterface.h" | ||
27 | |||
28 | |||
29 | // #define OLD_MEDIAPLAYER_API | ||
26 | 30 | ||
27 | 31 | ||
28 | class LibMadPluginData; | 32 | class LibMadPluginData; |
29 | 33 | ||
30 | 34 | ||
31 | class LibMadPlugin : public MediaPlayerDecoder { | 35 | class LibMadPlugin : public MediaPlayerDecoder { |
32 | 36 | ||
33 | public: | 37 | public: |
34 | LibMadPlugin(); | 38 | LibMadPlugin(); |
35 | ~LibMadPlugin(); | 39 | ~LibMadPlugin(); |
36 | 40 | ||
37 | const char *pluginName() { return "LibMadPlugin"; } | 41 | const char *pluginName() { return "LibMadPlugin"; } |
38 | const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } | 42 | const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } |
39 | double pluginVersion() { return 1.0; } | 43 | double pluginVersion() { return 1.0; } |
40 | 44 | ||
41 | bool isFileSupported( const QString& ); | 45 | bool isFileSupported( const QString& ); |
42 | bool open( const QString& ); | 46 | bool open( const QString& ); |
43 | bool close(); | 47 | bool close(); |
44 | bool isOpen(); | 48 | bool isOpen(); |
45 | const QString &fileInfo() { return info; } | 49 | const QString &fileInfo() { return info; } |
46 | 50 | ||
47 | // If decoder doesn't support audio then return 0 here | 51 | // If decoder doesn't support audio then return 0 here |
48 | int audioStreams(); | 52 | int audioStreams(); |
49 | int audioChannels( int stream ); | 53 | int audioChannels( int stream ); |
50 | int audioFrequency( int stream ); | 54 | int audioFrequency( int stream ); |
51 | int audioSamples( int stream ); | 55 | int audioSamples( int stream ); |
52 | bool audioSetSample( long sample, int stream ); | 56 | bool audioSetSample( long sample, int stream ); |
57 | int audioBitsPerSample(int) {return 0;} | ||
53 | long audioGetSample( int stream ); | 58 | long audioGetSample( int stream ); |
54 | // bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | #ifdef OLD_MEDIAPLAYER_API |
55 | // bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 60 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
61 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | ||
62 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | ||
63 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | ||
64 | #else | ||
56 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | 65 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); |
57 | // bool audioReadSamples( short *output, int channel, long samples, int stream ); | 66 | #endif |
58 | // bool audioReReadSamples( short *output, int channel, long samples, int stream ); | ||
59 | 67 | ||
60 | 68 | ||
61 | bool read(); | 69 | bool read(); |
62 | bool decode( short *output, long samples, long& samplesRead ); | 70 | bool decode( short *output, long samples, long& samplesRead ); |
63 | void printID3Tags(); | 71 | void printID3Tags(); |
64 | 72 | ||
65 | 73 | ||
66 | // If decoder doesn't support video then return 0 here | 74 | // If decoder doesn't support video then return 0 here |
67 | int videoStreams() { return 0; } | 75 | int videoStreams() { return 0; } |
68 | int videoWidth( int ) { return 0; } | 76 | int videoWidth( int ) { return 0; } |
69 | int videoHeight( int ) { return 0; } | 77 | int videoHeight( int ) { return 0; } |
70 | double videoFrameRate( int ) { return 0.0; } | 78 | double videoFrameRate( int ) { return 0.0; } |
71 | int videoFrames( int ) { return 0; } | 79 | int videoFrames( int ) { return 0; } |
72 | bool videoSetFrame( long, int ) { return FALSE; } | 80 | bool videoSetFrame( long, int ) { return FALSE; } |
73 | long videoGetFrame( int ) { return 0; } | 81 | long videoGetFrame( int ) { return 0; } |
74 | bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } | 82 | bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } |
75 | bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } | 83 | bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } |
76 | bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; } | 84 | bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; } |
77 | 85 | ||
78 | // Profiling | 86 | // Profiling |
79 | double getTime(); | 87 | double getTime(); |
80 | 88 | ||
81 | // Ignore if these aren't supported | 89 | // Ignore if these aren't supported |
82 | bool setSMP( int ) { return FALSE; } | 90 | bool setSMP( int ) { return FALSE; } |
83 | bool setMMX( bool ) { return FALSE; } | 91 | bool setMMX( bool ) { return FALSE; } |
84 | 92 | ||
85 | // Capabilities | 93 | // Capabilities |
86 | bool supportsAudio() { return TRUE; } | 94 | bool supportsAudio() { return TRUE; } |
87 | bool supportsVideo() { return FALSE; } | 95 | bool supportsVideo() { return FALSE; } |
88 | bool supportsYUV() { return FALSE; } | 96 | bool supportsYUV() { return FALSE; } |
89 | bool supportsMMX() { return TRUE; } | 97 | bool supportsMMX() { return TRUE; } |
90 | bool supportsSMP() { return FALSE; } | 98 | bool supportsSMP() { return FALSE; } |
91 | bool supportsStereo() { return TRUE; } | 99 | bool supportsStereo() { return TRUE; } |
92 | bool supportsScaling() { return FALSE; } | 100 | bool supportsScaling() { return FALSE; } |
93 | 101 | ||
102 | long getPlayTime() { return -1; } | ||
103 | |||
94 | private: | 104 | private: |
95 | LibMadPluginData *d; | 105 | LibMadPluginData *d; |
96 | QString info; | 106 | QString info; |
97 | 107 | ||
98 | }; | 108 | }; |
99 | 109 | ||
100 | 110 | ||
101 | #endif | 111 | #endif |
diff --git a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h index a26b421..8ad4956 100644 --- a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h +++ b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h | |||
@@ -1,53 +1,53 @@ | |||
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_IMPL_H | 20 | #ifndef LIBMAD_PLUGIN_IMPL_H |
21 | #define LIBMAD_PLUGIN_IMPL_H | 21 | #define LIBMAD_PLUGIN_IMPL_H |
22 | 22 | ||
23 | 23 | ||
24 | //#include <qpe/mediaplayerplugininterface.h> | ||
24 | #include "../mediaplayerplugininterface.h" | 25 | #include "../mediaplayerplugininterface.h" |
25 | 26 | ||
26 | 27 | ||
27 | class LibMadPlugin; | 28 | class LibMadPlugin; |
28 | 29 | ||
29 | 30 | ||
30 | class LibMadPluginImpl : public MediaPlayerPluginInterface | 31 | class LibMadPluginImpl : public MediaPlayerPluginInterface |
31 | { | 32 | { |
32 | public: | 33 | public: |
33 | LibMadPluginImpl(); | 34 | LibMadPluginImpl(); |
34 | virtual ~LibMadPluginImpl(); | 35 | virtual ~LibMadPluginImpl(); |
35 | 36 | ||
36 | #ifndef QT_NO_COMPONENT | 37 | #ifndef QT_NO_COMPONENT |
37 | 38 | ||
38 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 39 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
39 | Q_REFCOUNT | 40 | Q_REFCOUNT |
40 | 41 | ||
41 | #endif | 42 | #endif |
42 | 43 | ||
43 | virtual MediaPlayerDecoder *decoder(); | 44 | virtual MediaPlayerDecoder *decoder(); |
44 | virtual MediaPlayerEncoder *encoder(); | 45 | virtual MediaPlayerEncoder *encoder(); |
45 | |||
46 | private: | 46 | private: |
47 | LibMadPlugin *libmadplugin; | 47 | LibMadPlugin *libmadplugin; |
48 | ulong ref; | 48 | ulong ref; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | 51 | ||
52 | #endif | 52 | #endif |
53 | 53 | ||
diff --git a/core/multimedia/opieplayer/libmad/version.c b/core/multimedia/opieplayer/libmad/version.c index 413d54b..1baba26 100644 --- a/core/multimedia/opieplayer/libmad/version.c +++ b/core/multimedia/opieplayer/libmad/version.c | |||
@@ -43,49 +43,49 @@ char const mad_build[] = | |||
43 | # elif defined(FPM_SPARC) | 43 | # elif defined(FPM_SPARC) |
44 | "FPM_SPARC " | 44 | "FPM_SPARC " |
45 | # elif defined(FPM_PPC) | 45 | # elif defined(FPM_PPC) |
46 | "FPM_PPC " | 46 | "FPM_PPC " |
47 | # elif defined(FPM_DEFAULT) | 47 | # elif defined(FPM_DEFAULT) |
48 | "FPM_DEFAULT " | 48 | "FPM_DEFAULT " |
49 | # endif | 49 | # endif |
50 | 50 | ||
51 | # if defined(ASO_IMDCT) | 51 | # if defined(ASO_IMDCT) |
52 | "ASO_IMDCT " | 52 | "ASO_IMDCT " |
53 | # endif | 53 | # endif |
54 | # if defined(ASO_INTERLEAVE1) | 54 | # if defined(ASO_INTERLEAVE1) |
55 | "ASO_INTERLEAVE1 " | 55 | "ASO_INTERLEAVE1 " |
56 | # endif | 56 | # endif |
57 | # if defined(ASO_INTERLEAVE2) | 57 | # if defined(ASO_INTERLEAVE2) |
58 | "ASO_INTERLEAVE2 " | 58 | "ASO_INTERLEAVE2 " |
59 | # endif | 59 | # endif |
60 | # if defined(ASO_ZEROCHECK) | 60 | # if defined(ASO_ZEROCHECK) |
61 | "ASO_ZEROCHECK " | 61 | "ASO_ZEROCHECK " |
62 | # endif | 62 | # endif |
63 | 63 | ||
64 | # if defined(OPT_SPEED) | 64 | # if defined(OPT_SPEED) |
65 | "OPT_SPEED " | 65 | "OPT_SPEED " |
66 | # elif defined(OPT_ACCURACY) | 66 | # elif defined(OPT_ACCURACY) |
67 | "OPT_ACCURACY " | 67 | "OPT_ACCURACY " |
68 | # endif | 68 | # endif |
69 | 69 | ||
70 | # if defined(OPT_SSO) | 70 | # if defined(OPT_SSO) |
71 | "OPT_SSO " | 71 | "OPT_SSO " |
72 | # endif | 72 | # endif |
73 | 73 | ||
74 | # if defined(OPT_DCTO) /* never defined here */ | 74 | # if defined(OPT_DCTO) /* never defined here */ |
75 | "OPT_DCTO " | 75 | "OPT_DCTO " |
76 | # endif | 76 | # endif |
77 | 77 | ||
78 | # if defined(OPT_STRICT) | 78 | # if defined(OPT_STRICT) |
79 | "OPT_STRICT " | 79 | "OPT_STRICT " |
80 | # endif | 80 | # endif |
81 | 81 | ||
82 | # if defined(EXPERIMENTAL) | 82 | # if defined(EXPERIMENTAL) |
83 | "EXPERIMENTAL " | 83 | "EXPERIMENTAL " |
84 | # endif | 84 | # endif |
85 | 85 | ||
86 | # if defined(DEBUG) | 86 | # if defined(DEBUG) |
87 | "DEBUG " | 87 | "DEBUG " |
88 | # elif defined(NDEBUG) | 88 | # elif defined(NDEBUG) |
89 | "NDEBUG " | 89 | "NDEBUG " |
90 | # endif | 90 | # endif |
91 | ; | 91 | ; \ No newline at end of file |