summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad
Side-by-side diff
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
@@ -169,55 +169,57 @@ synth.o: synth.c \
libmad_global.h \
fixed.h \
frame.h \
timer.h \
stream.h \
bit.h \
synth.h \
D.dat
decoder.o: decoder.c \
libmad_global.h \
stream.h \
bit.h \
frame.h \
fixed.h \
timer.h \
synth.h \
decoder.h
layer12.o: layer12.c \
libmad_global.h \
fixed.h \
bit.h \
stream.h \
frame.h \
timer.h \
layer12.h \
sf_table.dat \
qc_table.dat
layer3.o: layer3.c \
libmad_global.h \
fixed.h \
bit.h \
stream.h \
frame.h \
timer.h \
huffman.h \
layer3.h \
rq_table.dat \
imdct_s.dat
huffman.o: huffman.c \
libmad_global.h \
huffman.h
libmadplugin.o: libmadplugin.cpp \
libmadplugin.h \
+ ../mediaplayerplugininterface.h \
mad.h
libmadpluginimpl.o: libmadpluginimpl.cpp \
libmadplugin.h \
+ ../mediaplayerplugininterface.h \
libmadpluginimpl.h
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 @@
-TEMPLATE = lib
-CONFIG += qt warn_on release
-HEADERS = libmad_version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h \
- layer12.h layer3.h huffman.h libmad_global.h mad.h libmadplugin.h libmadpluginimpl.h
-SOURCES = version.c fixed.c bit.c timer.c stream.c frame.c synth.c decoder.c \
- layer12.c layer3.c huffman.c libmadplugin.cpp libmadpluginimpl.cpp
-TARGET = madplugin
-DESTDIR = ../../plugins/codecs
+TEMPLATE = lib
+CONFIG += qt warn_on release
+HEADERS = libmad_version.h fixed.h bit.h timer.h stream.h frame.h synth.h decoder.h \
+ layer12.h layer3.h huffman.h libmad_global.h mad.h libmadplugin.h libmadpluginimpl.h
+SOURCES = version.c fixed.c bit.c timer.c stream.c frame.c synth.c decoder.c \
+ layer12.c layer3.c huffman.c libmadplugin.cpp libmadpluginimpl.cpp
+TARGET = madplugin
+DESTDIR = ../../plugins/codecs
INCLUDEPATH += $(OPIEDIR)/include ..
DEPENDPATH += ../$(OPIEDIR)/include ..
+TMAKE_CFLAGS += -DFPM_64BIT
+TMAKE_CXXFLAGS += -DFPM_64BIT
LIBS += -lqpe -lm
-VERSION = 1.0.0
+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 @@
/**********************************************************************
** Copyright (C) 2001 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef LIBMAD_PLUGIN_H
#define LIBMAD_PLUGIN_H
#include <qstring.h>
-#include "mediaplayerplugininterface.h"
+//#include <qpe/mediaplayerplugininterface.h>
+#include "../mediaplayerplugininterface.h"
+
+
+// #define OLD_MEDIAPLAYER_API
class LibMadPluginData;
class LibMadPlugin : public MediaPlayerDecoder {
public:
LibMadPlugin();
~LibMadPlugin();
const char *pluginName() { return "LibMadPlugin"; }
const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; }
double pluginVersion() { return 1.0; }
bool isFileSupported( const QString& );
bool open( const QString& );
bool close();
bool isOpen();
const QString &fileInfo() { return info; }
// If decoder doesn't support audio then return 0 here
int audioStreams();
int audioChannels( int stream );
int audioFrequency( int stream );
int audioSamples( int stream );
bool audioSetSample( long sample, int stream );
+ int audioBitsPerSample(int) {return 0;}
long audioGetSample( int stream );
-// bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
-// bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
+#ifdef OLD_MEDIAPLAYER_API
+ bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
+ bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
+ bool audioReadSamples( short *output, int channel, long samples, int stream );
+ bool audioReReadSamples( short *output, int channel, long samples, int stream );
+#else
bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
-// bool audioReadSamples( short *output, int channel, long samples, int stream );
-// bool audioReReadSamples( short *output, int channel, long samples, int stream );
+#endif
bool read();
bool decode( short *output, long samples, long& samplesRead );
void printID3Tags();
// If decoder doesn't support video then return 0 here
int videoStreams() { return 0; }
int videoWidth( int ) { return 0; }
int videoHeight( int ) { return 0; }
double videoFrameRate( int ) { return 0.0; }
int videoFrames( int ) { return 0; }
bool videoSetFrame( long, int ) { return FALSE; }
long videoGetFrame( int ) { return 0; }
bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
// Profiling
double getTime();
// Ignore if these aren't supported
bool setSMP( int ) { return FALSE; }
bool setMMX( bool ) { return FALSE; }
// Capabilities
bool supportsAudio() { return TRUE; }
bool supportsVideo() { return FALSE; }
bool supportsYUV() { return FALSE; }
bool supportsMMX() { return TRUE; }
bool supportsSMP() { return FALSE; }
bool supportsStereo() { return TRUE; }
bool supportsScaling() { return FALSE; }
+ long getPlayTime() { return -1; }
+
private:
LibMadPluginData *d;
QString info;
};
#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 @@
/**********************************************************************
** Copyright (C) 2001 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef LIBMAD_PLUGIN_IMPL_H
#define LIBMAD_PLUGIN_IMPL_H
+//#include <qpe/mediaplayerplugininterface.h>
#include "../mediaplayerplugininterface.h"
class LibMadPlugin;
class LibMadPluginImpl : public MediaPlayerPluginInterface
{
public:
LibMadPluginImpl();
virtual ~LibMadPluginImpl();
#ifndef QT_NO_COMPONENT
QRESULT queryInterface( const QUuid&, QUnknownInterface** );
Q_REFCOUNT
#endif
virtual MediaPlayerDecoder *decoder();
virtual MediaPlayerEncoder *encoder();
-
private:
LibMadPlugin *libmadplugin;
ulong ref;
};
#endif
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[] =
# elif defined(FPM_SPARC)
"FPM_SPARC "
# elif defined(FPM_PPC)
"FPM_PPC "
# elif defined(FPM_DEFAULT)
"FPM_DEFAULT "
# endif
# if defined(ASO_IMDCT)
"ASO_IMDCT "
# endif
# if defined(ASO_INTERLEAVE1)
"ASO_INTERLEAVE1 "
# endif
# if defined(ASO_INTERLEAVE2)
"ASO_INTERLEAVE2 "
# endif
# if defined(ASO_ZEROCHECK)
"ASO_ZEROCHECK "
# endif
# if defined(OPT_SPEED)
"OPT_SPEED "
# elif defined(OPT_ACCURACY)
"OPT_ACCURACY "
# endif
# if defined(OPT_SSO)
"OPT_SSO "
# endif
# if defined(OPT_DCTO) /* never defined here */
"OPT_DCTO "
# endif
# if defined(OPT_STRICT)
"OPT_STRICT "
# endif
# if defined(EXPERIMENTAL)
"EXPERIMENTAL "
# endif
# if defined(DEBUG)
"DEBUG "
# elif defined(NDEBUG)
"NDEBUG "
# endif
-;
+; \ No newline at end of file