Diffstat (limited to 'core/multimedia/opieplayer/modplug/modplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/modplug/modplugin.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/modplug/modplugin.h b/core/multimedia/opieplayer/modplug/modplugin.h new file mode 100644 index 0000000..a778223 --- a/dev/null +++ b/core/multimedia/opieplayer/modplug/modplugin.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* This file is part of the KDE project | ||
2 | Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> | ||
3 | |||
4 | This program is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU General Public | ||
6 | License as published by the Free Software Foundation; either | ||
7 | version 2 of the License, or (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program; see the file COPYING. If not, write to | ||
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
17 | Boston, MA 02111-1307, USA. | ||
18 | */ | ||
19 | #ifndef MOD_PLUGIN_H | ||
20 | #define MOD_PLUGIN_H | ||
21 | |||
22 | //#include "../mediaplayerplugininterface.h" | ||
23 | #include <qpe/mediaplayerplugininterface.h> | ||
24 | |||
25 | #include "stdafx.h" | ||
26 | #include "sndfile.h" | ||
27 | |||
28 | class ModPlugin : public MediaPlayerDecoder, | ||
29 | public CSoundFile | ||
30 | { | ||
31 | public: | ||
32 | ModPlugin(); | ||
33 | virtual ~ModPlugin(); | ||
34 | |||
35 | virtual const char *pluginName(); | ||
36 | virtual const char *pluginComment(); | ||
37 | virtual double pluginVersion(); | ||
38 | |||
39 | virtual bool isFileSupported( const QString &file ); | ||
40 | virtual bool open( const QString &file ); | ||
41 | virtual bool close(); | ||
42 | virtual bool isOpen(); | ||
43 | virtual const QString &fileInfo(); | ||
44 | |||
45 | virtual int audioStreams(); | ||
46 | virtual int audioChannels( int stream ); | ||
47 | virtual int audioFrequency( int stream ); | ||
48 | virtual int audioSamples( int stream ); | ||
49 | virtual bool audioSetSample( long sample, int stream ); | ||
50 | virtual long audioGetSample( int stream ); | ||
51 | virtual bool audioReadSamples( short *output, int channels, long samples, | ||
52 | long &samplesRead, int stream ); | ||
53 | |||
54 | virtual int videoStreams(); | ||
55 | virtual int videoWidth( int stream ); | ||
56 | virtual int videoHeight( int stream ); | ||
57 | virtual double videoFrameRate( int stream ); | ||
58 | virtual int videoFrames( int stream ); | ||
59 | virtual bool videoSetFrame( long sample, int stream ); | ||
60 | virtual long videoGetFrame( int stream ); | ||
61 | virtual bool videoReadFrame( unsigned char **outputRows, int inX, int inY, | ||
62 | int inW, int inH, ColorFormat colorModel, int stream ); | ||
63 | virtual bool videoReadScaledFrame( unsigned char **outputRows, int inX, int inY, | ||
64 | int inW, int inH, int outW, int outH, | ||
65 | ColorFormat colorModel, int stream ); | ||
66 | virtual bool videoReadYUVFrame( char *yOutput, char *uOutput, char *vOutput, | ||
67 | int inX, int inY, int inW, int inH, int stream ); | ||
68 | |||
69 | virtual double getTime(); | ||
70 | |||
71 | virtual bool setSMP( int cpus ); | ||
72 | virtual bool setMMX( bool useMMX ); | ||
73 | |||
74 | virtual bool supportsAudio(); | ||
75 | virtual bool supportsVideo(); | ||
76 | virtual bool supportsYUV(); | ||
77 | virtual bool supportsMMX(); | ||
78 | virtual bool supportsSMP(); | ||
79 | virtual bool supportsStereo(); | ||
80 | virtual bool supportsScaling(); | ||
81 | |||
82 | private: | ||
83 | int m_songTime; | ||
84 | int m_maxPosition; | ||
85 | |||
86 | static const int s_channels = 2; | ||
87 | static const int s_bytesPerSample = 2; | ||
88 | static const int s_maxChannels = 128; | ||
89 | static const int s_frequency = 44100; | ||
90 | static const int s_audioBufferSize = 32768; | ||
91 | }; | ||
92 | |||
93 | #endif | ||
94 | /* vim: et sw=4 | ||
95 | */ | ||