summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmpeg3
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmpeg3/Makefile.in6
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h22
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h1
3 files changed, 21 insertions, 8 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
@@ -176,7 +176,8 @@ libmpeg3plugin.o: libmpeg3plugin.cpp \
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 \
@@ -192,6 +193,7 @@ libmpeg3pluginimpl.o: libmpeg3pluginimpl.cpp \
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 \
@@ -414,7 +416,7 @@ audio/layer2.o: audio/layer2.c \
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 \
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
index 0a06264..54f259b 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
@@ -25,7 +25,11 @@
25#include <qapplication.h> 25#include <qapplication.h>
26#include "libmpeg3.h" 26#include "libmpeg3.h"
27#include "mpeg3protos.h" 27#include "mpeg3protos.h"
28#include "mediaplayerplugininterface.h" 28//#include <qpe/mediaplayerplugininterface.h>
29#include "../mediaplayerplugininterface.h"
30
31
32// #define OLD_MEDIAPLAYER_API
29 33
30 34
31class LibMpeg3Plugin : public MediaPlayerDecoder { 35class LibMpeg3Plugin : public MediaPlayerDecoder {
@@ -42,20 +46,24 @@ public:
42 bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } 46 bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; }
43 bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } 47 bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; }
44 bool isOpen() { return file != NULL; } 48 bool isOpen() { return file != NULL; }
45 const QString &fileInfo() { return strInfo = QString( "" ); } 49 const QString &fileInfo() { return strInfo = ""; }
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() { return file ? mpeg3_total_astreams( file ) : 0; } 52 int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; }
49 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } 53 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; }
50 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } 54 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; }
55 int audioBitsPerSample(int) { return 0;}
51 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } 56 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; }
52 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } 57 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; }
53 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } 58 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; }
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 // If decoder doesn't support video then return 0 here 68 // If decoder doesn't support video then return 0 here
61 int videoStreams() { return file ? mpeg3_total_vstreams( file ) : 0; } 69 int videoStreams() { return file ? mpeg3_total_vstreams( file ) : 0; }
@@ -102,6 +110,8 @@ public:
102 bool supportsStereo() { return TRUE; } 110 bool supportsStereo() { return TRUE; }
103 bool supportsScaling() { return TRUE; } 111 bool supportsScaling() { return TRUE; }
104 112
113 long getPlayTime() { return -1; }
114
105private: 115private:
106 mpeg3_t *file; 116 mpeg3_t *file;
107 QString strInfo; 117 QString strInfo;
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
index 29ec6ba..89abf97 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
@@ -21,6 +21,7 @@
21#define LIBMPEG3_PLUGIN_IMPL_H 21#define LIBMPEG3_PLUGIN_IMPL_H
22 22
23 23
24//#include <qpe/mediaplayerplugininterface.h>
24#include "../mediaplayerplugininterface.h" 25#include "../mediaplayerplugininterface.h"
25 26
26 27