summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmad') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/Makefile.in2
-rw-r--r--core/multimedia/opieplayer/libmad/libmad.pro20
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.h20
-rw-r--r--core/multimedia/opieplayer/libmad/libmadpluginimpl.h2
-rw-r--r--core/multimedia/opieplayer/libmad/version.c2
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
@@ -211,13 +211,15 @@ layer3.o: layer3.c \
211huffman.o: huffman.c \ 211huffman.o: huffman.c \
212 libmad_global.h \ 212 libmad_global.h \
213 huffman.h 213 huffman.h
214 214
215libmadplugin.o: libmadplugin.cpp \ 215libmadplugin.o: libmadplugin.cpp \
216 libmadplugin.h \ 216 libmadplugin.h \
217 ../mediaplayerplugininterface.h \
217 mad.h 218 mad.h
218 219
219libmadpluginimpl.o: libmadpluginimpl.cpp \ 220libmadpluginimpl.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 1TEMPLATE = lib
2 CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3 HEADERS = libmad_version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h \ 3HEADERS = 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 \ 5SOURCES = 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 7TARGET = madplugin
8 DESTDIR = ../../plugins/codecs 8DESTDIR = ../../plugins/codecs
9INCLUDEPATH += $(OPIEDIR)/include .. 9INCLUDEPATH += $(OPIEDIR)/include ..
10DEPENDPATH += ../$(OPIEDIR)/include .. 10DEPENDPATH += ../$(OPIEDIR)/include ..
11TMAKE_CFLAGS += -DFPM_64BIT
12TMAKE_CXXFLAGS += -DFPM_64BIT
11LIBS += -lqpe -lm 13LIBS += -lqpe -lm
12 VERSION = 1.0.0 14VERSION = 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
@@ -19,13 +19,17 @@
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
28class LibMadPluginData; 32class LibMadPluginData;
29 33
30 34
31class LibMadPlugin : public MediaPlayerDecoder { 35class LibMadPlugin : public MediaPlayerDecoder {
@@ -47,18 +51,22 @@ public:
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
@@ -88,12 +96,14 @@ public:
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
94private: 104private:
95 LibMadPluginData *d; 105 LibMadPluginData *d;
96 QString info; 106 QString info;
97 107
98}; 108};
99 109
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
@@ -18,12 +18,13 @@
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
27class LibMadPlugin; 28class LibMadPlugin;
28 29
29 30
@@ -39,13 +40,12 @@ public:
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
46private: 46private:
47 LibMadPlugin *libmadplugin; 47 LibMadPlugin *libmadplugin;
48 ulong ref; 48 ulong ref;
49}; 49};
50 50
51 51
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
@@ -85,7 +85,7 @@ char const mad_build[] =
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