summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmpeg3
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmpeg3/Makefile.in6
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3.pro79
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h4
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h3
4 files changed, 49 insertions, 43 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/Makefile.in b/core/multimedia/opieplayer/libmpeg3/Makefile.in
index 154f85d..d255e4f 100644
--- a/core/multimedia/opieplayer/libmpeg3/Makefile.in
+++ b/core/multimedia/opieplayer/libmpeg3/Makefile.in
@@ -167,40 +167,42 @@ libmpeg3plugin.o: libmpeg3plugin.cpp \
167 libmpeg3plugin.h \ 167 libmpeg3plugin.h \
168 libmpeg3.h \ 168 libmpeg3.h \
169 mpeg3private.h \ 169 mpeg3private.h \
170 mpeg3atrack.h \ 170 mpeg3atrack.h \
171 mpeg3demux.h \ 171 mpeg3demux.h \
172 mpeg3title.h \ 172 mpeg3title.h \
173 mpeg3io.h \ 173 mpeg3io.h \
174 mpeg3css.h \ 174 mpeg3css.h \
175 mpeg3private.inc \ 175 mpeg3private.inc \
176 audio/mpeg3audio.h \ 176 audio/mpeg3audio.h \
177 mpeg3vtrack.h \ 177 mpeg3vtrack.h \
178 video/mpeg3video.h \ 178 video/mpeg3video.h \
179 mpeg3protos.h 179 mpeg3protos.h \
180 ../mediaplayerplugininterface.h
180 181
181libmpeg3pluginimpl.o: libmpeg3pluginimpl.cpp \ 182libmpeg3pluginimpl.o: libmpeg3pluginimpl.cpp \
182 libmpeg3plugin.h \ 183 libmpeg3plugin.h \
183 libmpeg3.h \ 184 libmpeg3.h \
184 mpeg3private.h \ 185 mpeg3private.h \
185 mpeg3atrack.h \ 186 mpeg3atrack.h \
186 mpeg3demux.h \ 187 mpeg3demux.h \
187 mpeg3title.h \ 188 mpeg3title.h \
188 mpeg3io.h \ 189 mpeg3io.h \
189 mpeg3css.h \ 190 mpeg3css.h \
190 mpeg3private.inc \ 191 mpeg3private.inc \
191 audio/mpeg3audio.h \ 192 audio/mpeg3audio.h \
192 mpeg3vtrack.h \ 193 mpeg3vtrack.h \
193 video/mpeg3video.h \ 194 video/mpeg3video.h \
194 mpeg3protos.h \ 195 mpeg3protos.h \
196 ../mediaplayerplugininterface.h \
195 libmpeg3pluginimpl.h 197 libmpeg3pluginimpl.h
196 198
197bitstream.o: bitstream.c \ 199bitstream.o: bitstream.c \
198 mpeg3private.h \ 200 mpeg3private.h \
199 mpeg3atrack.h \ 201 mpeg3atrack.h \
200 mpeg3demux.h \ 202 mpeg3demux.h \
201 mpeg3title.h \ 203 mpeg3title.h \
202 mpeg3io.h \ 204 mpeg3io.h \
203 mpeg3css.h \ 205 mpeg3css.h \
204 mpeg3private.inc \ 206 mpeg3private.inc \
205 audio/mpeg3audio.h \ 207 audio/mpeg3audio.h \
206 mpeg3vtrack.h \ 208 mpeg3vtrack.h \
@@ -405,25 +407,25 @@ audio/layer2.o: audio/layer2.c \
405 mpeg3css.h \ 407 mpeg3css.h \
406 mpeg3private.inc \ 408 mpeg3private.inc \
407 audio/../libmpeg3.h \ 409 audio/../libmpeg3.h \
408 mpeg3private.h \ 410 mpeg3private.h \
409 mpeg3atrack.h \ 411 mpeg3atrack.h \
410 audio/mpeg3audio.h \ 412 audio/mpeg3audio.h \
411 mpeg3vtrack.h \ 413 mpeg3vtrack.h \
412 video/mpeg3video.h \ 414 video/mpeg3video.h \
413 audio/../mpeg3protos.h \ 415 audio/../mpeg3protos.h \
414 audio/tables.h 416 audio/tables.h
415 417
416audio/layer3.o: audio/layer3.c \ 418audio/layer3.o: audio/layer3.c \
417 audio/huffman.h \ 419 huffman.h \
418 audio/mpeg3audio.h \ 420 audio/mpeg3audio.h \
419 audio/ac3.h \ 421 audio/ac3.h \
420 audio/mpeg3real.h \ 422 audio/mpeg3real.h \
421 audio/../bitstream.h \ 423 audio/../bitstream.h \
422 mpeg3demux.h \ 424 mpeg3demux.h \
423 mpeg3title.h \ 425 mpeg3title.h \
424 mpeg3io.h \ 426 mpeg3io.h \
425 mpeg3css.h \ 427 mpeg3css.h \
426 mpeg3private.inc \ 428 mpeg3private.inc \
427 audio/../libmpeg3.h \ 429 audio/../libmpeg3.h \
428 mpeg3private.h \ 430 mpeg3private.h \
429 mpeg3atrack.h \ 431 mpeg3atrack.h \
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro b/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
index b1426d1..e50aa4e 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
@@ -1,42 +1,43 @@
1 TEMPLATE= lib 1TEMPLATE = lib
2 CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3 HEADERS = libmpeg3plugin.h libmpeg3pluginimpl.h 3HEADERS = libmpeg3plugin.h libmpeg3pluginimpl.h
4 SOURCES = libmpeg3plugin.cpp libmpeg3pluginimpl.cpp \ 4SOURCES = libmpeg3plugin.cpp libmpeg3pluginimpl.cpp \
5 bitstream.c \ 5 bitstream.c \
6 libmpeg3.c \ 6 libmpeg3.c \
7 mpeg3atrack.c \ 7 mpeg3atrack.c \
8 mpeg3css.c \ 8 mpeg3css.c \
9 mpeg3demux.c \ 9 mpeg3demux.c \
10 mpeg3io.c \ 10 mpeg3io.c \
11 mpeg3title.c \ 11 mpeg3title.c \
12 mpeg3vtrack.c \ 12 mpeg3vtrack.c \
13 audio/ac3.c \ 13 audio/ac3.c \
14 audio/bit_allocation.c \ 14 audio/bit_allocation.c \
15 audio/dct.c \ 15 audio/dct.c \
16 audio/exponents.c \ 16 audio/exponents.c \
17 audio/header.c \ 17 audio/header.c \
18 audio/layer2.c \ 18 audio/layer2.c \
19 audio/layer3.c \ 19 audio/layer3.c \
20 audio/mantissa.c \ 20 audio/mantissa.c \
21 audio/mpeg3audio.c \ 21 audio/mpeg3audio.c \
22 audio/pcm.c \ 22 audio/pcm.c \
23 audio/synthesizers.c \ 23 audio/synthesizers.c \
24 audio/tables.c \ 24 audio/tables.c \
25 video/getpicture.c \ 25 video/getpicture.c \
26 video/headers.c \ 26 video/headers.c \
27 video/idct.c \ 27 video/idct.c \
28 video/macroblocks.c \ 28 video/macroblocks.c \
29 video/mmxtest.c \ 29 video/mmxtest.c \
30 video/motion.c \ 30 video/motion.c \
31 video/mpeg3video.c \ 31 video/mpeg3video.c \
32 video/output.c \ 32 video/output.c \
33 video/reconstruct.c \ 33 video/reconstruct.c \
34 video/seek.c \ 34 video/seek.c \
35 video/slice.c \ 35 video/slice.c \
36 video/vlc.c 36 video/vlc.c
37 TARGET = mpeg3plugin 37TARGET = mpeg3plugin
38 DESTDIR = ../../plugins/codecs 38TMAKE_CC=g++
39DESTDIR = ../../plugins/codecs
39INCLUDEPATH += $(OPIEDIR)/include .. 40INCLUDEPATH += $(OPIEDIR)/include ..
40DEPENDPATH += ../$(OPIEDIR)/include .. 41DEPENDPATH += ../$(OPIEDIR)/include ..
41LIBS += -lqpe -lpthread -lm 42LIBS += -lqpe -lpthread -lm
42 VERSION = 1.0.0 43VERSION = 1.0.0
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
index e0eb930..bd31706 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
@@ -15,25 +15,26 @@
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 LIBMPEG3_PLUGIN_H 20#ifndef LIBMPEG3_PLUGIN_H
21#define LIBMPEG3_PLUGIN_H 21#define LIBMPEG3_PLUGIN_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include "libmpeg3.h" 25#include "libmpeg3.h"
26#include "mpeg3protos.h" 26#include "mpeg3protos.h"
27#include <qpe/mediaplayerplugininterface.h> 27//#include <qpe/mediaplayerplugininterface.h>
28#include "../mediaplayerplugininterface.h"
28 29
29 30
30// #define OLD_MEDIAPLAYER_API 31// #define OLD_MEDIAPLAYER_API
31 32
32 33
33class LibMpeg3Plugin : public MediaPlayerDecoder { 34class LibMpeg3Plugin : public MediaPlayerDecoder {
34 35
35public: 36public:
36 LibMpeg3Plugin() { file = NULL; } 37 LibMpeg3Plugin() { file = NULL; }
37 ~LibMpeg3Plugin() { close(); } 38 ~LibMpeg3Plugin() { close(); }
38 39
39 const char *pluginName() { return "LibMpeg3Plugin"; } 40 const char *pluginName() { return "LibMpeg3Plugin"; }
@@ -41,24 +42,25 @@ public:
41 double pluginVersion() { return 1.0; } 42 double pluginVersion() { return 1.0; }
42 43
43 bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; } 44 bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; }
44 bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } 45 bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; }
45 bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } 46 bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; }
46 bool isOpen() { return file != NULL; } 47 bool isOpen() { return file != NULL; }
47 const QString &fileInfo() { return strInfo = ""; } 48 const QString &fileInfo() { return strInfo = ""; }
48 49
49 // If decoder doesn't support audio then return 0 here 50 // If decoder doesn't support audio then return 0 here
50 int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } 51 int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; }
51 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } 52 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; }
52 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } 53 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; }
54 int audioBitsPerSample(int) { return 0;}
53 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } 55 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; }
54 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } 56 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; }
55 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } 57 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; }
56#ifdef OLD_MEDIAPLAYER_API 58#ifdef OLD_MEDIAPLAYER_API
57 bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); 59 bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
58 bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); 60 bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
59 bool audioReadSamples( short *output, int channel, long samples, int stream ); 61 bool audioReadSamples( short *output, int channel, long samples, int stream );
60 bool audioReReadSamples( short *output, int channel, long samples, int stream ); 62 bool audioReReadSamples( short *output, int channel, long samples, int stream );
61#else 63#else
62 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 );
63#endif 65#endif
64 66
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
index e9926f4..a2f5211 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
@@ -11,25 +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 LIBMPEG3_PLUGIN_IMPL_H 20#ifndef LIBMPEG3_PLUGIN_IMPL_H
21#define LIBMPEG3_PLUGIN_IMPL_H 21#define LIBMPEG3_PLUGIN_IMPL_H
22 22
23#include <qpe/mediaplayerplugininterface.h> 23//#include <qpe/mediaplayerplugininterface.h>
24#include "../mediaplayerplugininterface.h"
24 25
25 26
26class LibMpeg3Plugin; 27class LibMpeg3Plugin;
27 28
28 29
29class LibMpeg3PluginImpl : public MediaPlayerPluginInterface 30class LibMpeg3PluginImpl : public MediaPlayerPluginInterface
30{ 31{
31public: 32public:
32 LibMpeg3PluginImpl(); 33 LibMpeg3PluginImpl();
33 virtual ~LibMpeg3PluginImpl(); 34 virtual ~LibMpeg3PluginImpl();
34 35
35#ifndef QT_NO_COMPONENT 36#ifndef QT_NO_COMPONENT