Diffstat (limited to 'core/multimedia/opieplayer/libmad/libmadplugin.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h new file mode 100644 index 0000000..88647ae --- a/dev/null +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef LIBMAD_PLUGIN_H | ||
21 | #define LIBMAD_PLUGIN_H | ||
22 | |||
23 | |||
24 | #include <qstring.h> | ||
25 | #include "mediaplayerplugininterface.h" | ||
26 | |||
27 | |||
28 | class LibMadPluginData; | ||
29 | |||
30 | |||
31 | class LibMadPlugin : public MediaPlayerDecoder { | ||
32 | |||
33 | public: | ||
34 | LibMadPlugin(); | ||
35 | ~LibMadPlugin(); | ||
36 | |||
37 | const char *pluginName() { return "LibMadPlugin"; } | ||
38 | const char *pluginComment() { return "This is the libmad library that has been wrapped as a plugin"; } | ||
39 | double pluginVersion() { return 1.0; } | ||
40 | |||
41 | bool isFileSupported( const QString& ); | ||
42 | bool open( const QString& ); | ||
43 | bool close(); | ||
44 | bool isOpen(); | ||
45 | const QString &fileInfo() { return info; } | ||
46 | |||
47 | // If decoder doesn't support audio then return 0 here | ||
48 | int audioStreams(); | ||
49 | int audioChannels( int stream ); | ||
50 | int audioFrequency( int stream ); | ||
51 | int audioSamples( int stream ); | ||
52 | bool audioSetSample( long sample, int stream ); | ||
53 | long audioGetSample( int stream ); | ||
54 | // bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | ||
55 | // bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | ||
56 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | ||
57 | // bool audioReadSamples( short *output, int channel, long samples, int stream ); | ||
58 | // bool audioReReadSamples( short *output, int channel, long samples, int stream ); | ||
59 | |||
60 | |||
61 | bool read(); | ||
62 | bool decode( short *output, long samples, long& samplesRead ); | ||
63 | void printID3Tags(); | ||
64 | |||
65 | |||
66 | // If decoder doesn't support video then return 0 here | ||
67 | int videoStreams() { return 0; } | ||
68 | int videoWidth( int ) { return 0; } | ||
69 | int videoHeight( int ) { return 0; } | ||
70 | double videoFrameRate( int ) { return 0.0; } | ||
71 | int videoFrames( int ) { return 0; } | ||
72 | bool videoSetFrame( long, int ) { return FALSE; } | ||
73 | long videoGetFrame( int ) { return 0; } | ||
74 | 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; } | ||
76 | bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; } | ||
77 | |||
78 | // Profiling | ||
79 | double getTime(); | ||
80 | |||
81 | // Ignore if these aren't supported | ||
82 | bool setSMP( int ) { return FALSE; } | ||
83 | bool setMMX( bool ) { return FALSE; } | ||
84 | |||
85 | // Capabilities | ||
86 | bool supportsAudio() { return TRUE; } | ||
87 | bool supportsVideo() { return FALSE; } | ||
88 | bool supportsYUV() { return FALSE; } | ||
89 | bool supportsMMX() { return TRUE; } | ||
90 | bool supportsSMP() { return FALSE; } | ||
91 | bool supportsStereo() { return TRUE; } | ||
92 | bool supportsScaling() { return FALSE; } | ||
93 | |||
94 | private: | ||
95 | LibMadPluginData *d; | ||
96 | QString info; | ||
97 | |||
98 | }; | ||
99 | |||
100 | |||
101 | #endif | ||