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
@@ -1,101 +1,111 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2001 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
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 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"; }
38 const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } 42 const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; }
39 double pluginVersion() { return 1.0; } 43 double pluginVersion() { return 1.0; }
40 44
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; }
71 int videoFrames( int ) { return 0; } 79 int videoFrames( int ) { return 0; }
72 bool videoSetFrame( long, int ) { return FALSE; } 80 bool videoSetFrame( long, int ) { return FALSE; }
73 long videoGetFrame( int ) { return 0; } 81 long videoGetFrame( int ) { return 0; }
74 bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; } 82 bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
75 bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; } 83 bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
76 bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; } 84 bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
77 85
78 // Profiling 86 // Profiling
79 double getTime(); 87 double getTime();
80 88
81 // Ignore if these aren't supported 89 // Ignore if these aren't supported
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