Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h index bd31706..b573e84 100644 --- a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h +++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h | |||
@@ -15,26 +15,25 @@ | |||
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 LIBMPEG3_PLUGIN_H | 20 | #ifndef LIBMPEG3_PLUGIN_H |
21 | #define LIBMPEG3_PLUGIN_H | 21 | #define LIBMPEG3_PLUGIN_H |
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qapplication.h> | 24 | #include <qapplication.h> |
25 | #include "libmpeg3.h" | 25 | #include "libmpeg3.h" |
26 | #include "mpeg3protos.h" | 26 | #include "mpeg3protos.h" |
27 | //#include <qpe/mediaplayerplugininterface.h> | 27 | #include <qpe/mediaplayerplugininterface.h> |
28 | #include "../mediaplayerplugininterface.h" | ||
29 | 28 | ||
30 | 29 | ||
31 | // #define OLD_MEDIAPLAYER_API | 30 | // #define OLD_MEDIAPLAYER_API |
32 | 31 | ||
33 | 32 | ||
34 | class LibMpeg3Plugin : public MediaPlayerDecoder { | 33 | class LibMpeg3Plugin : public MediaPlayerDecoder { |
35 | 34 | ||
36 | public: | 35 | public: |
37 | LibMpeg3Plugin() { file = NULL; } | 36 | LibMpeg3Plugin() { file = NULL; } |
38 | ~LibMpeg3Plugin() { close(); } | 37 | ~LibMpeg3Plugin() { close(); } |
39 | 38 | ||
40 | const char *pluginName() { return "LibMpeg3Plugin"; } | 39 | const char *pluginName() { return "LibMpeg3Plugin"; } |
@@ -42,25 +41,25 @@ public: | |||
42 | double pluginVersion() { return 1.0; } | 41 | double pluginVersion() { return 1.0; } |
43 | 42 | ||
44 | bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; } | 43 | bool isFileSupported( const QString& fileName ) { return mpeg3_check_sig( (char *)fileName.latin1() ) == 1; } |
45 | bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } | 44 | bool open( const QString& fileName ) { file = mpeg3_open( (char *)fileName.latin1() ); return file != NULL; } |
46 | bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } | 45 | bool close() { if ( file ) { int r = mpeg3_close( file ); file = NULL; return r == 1; } return FALSE; } |
47 | bool isOpen() { return file != NULL; } | 46 | bool isOpen() { return file != NULL; } |
48 | const QString &fileInfo() { return strInfo = ""; } | 47 | const QString &fileInfo() { return strInfo = ""; } |
49 | 48 | ||
50 | // If decoder doesn't support audio then return 0 here | 49 | // If decoder doesn't support audio then return 0 here |
51 | int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } | 50 | int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } |
52 | int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } | 51 | int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } |
53 | int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } | 52 | int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } |
54 | int audioBitsPerSample(int) { return 0;} | 53 | /* int audioBitsPerSample(int) { return 0;} */ |
55 | int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } | 54 | int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } |
56 | bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } | 55 | bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } |
57 | long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } | 56 | long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } |
58 | #ifdef OLD_MEDIAPLAYER_API | 57 | #ifdef OLD_MEDIAPLAYER_API |
59 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 58 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
60 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); |
61 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | 60 | bool audioReadSamples( short *output, int channel, long samples, int stream ); |
62 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | 61 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); |
63 | #else | 62 | #else |
64 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); | 63 | bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ); |
65 | #endif | 64 | #endif |
66 | 65 | ||