summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmad/libmadplugin.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmad/libmadplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.h20
1 files changed, 15 insertions, 5 deletions
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
@@ -13,25 +13,29 @@
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
28class LibMadPluginData; 32class LibMadPluginData;
29 33
30 34
31class LibMadPlugin : public MediaPlayerDecoder { 35class LibMadPlugin : public MediaPlayerDecoder {
32 36
33public: 37public:
34 LibMadPlugin(); 38 LibMadPlugin();
35 ~LibMadPlugin(); 39 ~LibMadPlugin();
36 40
37 const char *pluginName() { return "LibMadPlugin"; } 41 const char *pluginName() { return "LibMadPlugin"; }
@@ -41,30 +45,34 @@ public:
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; }
@@ -82,20 +90,22 @@ public:
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
94private: 104private:
95 LibMadPluginData *d; 105 LibMadPluginData *d;
96 QString info; 106 QString info;
97 107
98}; 108};
99 109
100 110
101#endif 111#endif