00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WAV_PLUGIN_H
00023 #define WAV_PLUGIN_H
00024
00025 #include <qstring.h>
00026 #include <qapplication.h>
00027
00028 #include <qpe/mediaplayerplugininterface.h>
00029
00030
00031
00032
00033
00034 class WavPluginData;
00035
00036
00037 class WavPlugin : public MediaPlayerDecoder {
00038
00039 public:
00040 WavPlugin();
00041 ~WavPlugin();
00042
00043 const char *pluginName() { return "WavPlugin"; }
00044 const char *pluginComment() { return "This is a simple plugin for playing wav files"; }
00045 double pluginVersion() { return 1.0; }
00046
00047 bool isFileSupported( const QString& );
00048 bool open( const QString& );
00049 bool close();
00050 bool isOpen();
00051 const QString &fileInfo() { return strInfo = ""; }
00052
00053
00054 int audioStreams();
00055 int audioChannels( int stream );
00056 int audioFrequency( int stream );
00057
00058 int audioSamples( int stream );
00059 bool audioSetSample( long sample, int stream );
00060 long audioGetSample( int stream );
00061 #ifdef OLD_MEDIAPLAYER_API
00062 bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream );
00063 bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream );
00064 bool audioReadSamples( short *output, int channel, long samples, int stream );
00065 bool audioReReadSamples( short *output, int channel, long samples, int stream );
00066 #else
00067 bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
00068 #endif
00069
00070
00071 int videoStreams() { return 0; }
00072 int videoWidth( int ) { return 0; }
00073 int videoHeight( int ) { return 0; }
00074 double videoFrameRate( int ) { return 0.0; }
00075 int videoFrames( int ) { return 0; }
00076 bool videoSetFrame( long, int ) { return FALSE; }
00077 long videoGetFrame( int ) { return 0; }
00078 bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
00079 bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
00080 bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
00081
00082
00083 double getTime();
00084
00085
00086 bool setSMP( int ) { return FALSE; }
00087 bool setMMX( bool ) { return FALSE; }
00088
00089
00090 bool supportsAudio() { return TRUE; }
00091 bool supportsVideo() { return FALSE; }
00092 bool supportsYUV() { return FALSE; }
00093 bool supportsMMX() { return TRUE; }
00094 bool supportsSMP() { return FALSE; }
00095 bool supportsStereo() { return TRUE; }
00096 bool supportsScaling() { return FALSE; }
00097
00098 long getPlayTime() { return -1; }
00099
00100 private:
00101 WavPluginData *d;
00102 QString strInfo;
00103
00104 };
00105
00106
00107 #endif