Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

wavplugin.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 // L.J.Potter added changes Fri 02-15-2002
00021 
00022 #ifndef WAV_PLUGIN_H 
00023 #define WAV_PLUGIN_H
00024 
00025 #include <qstring.h>
00026 #include <qapplication.h>
00027 /* #include "../mediaplayerplugininterface.h" */
00028 #include <qpe/mediaplayerplugininterface.h>
00029 
00030 
00031 // #define OLD_MEDIAPLAYER_API
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     // If decoder doesn't support audio then return 0 here
00054     int audioStreams();
00055     int audioChannels( int stream ); 
00056     int audioFrequency( int stream );
00057 /*     int audioBitsPerSample( int stream ); */
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     // If decoder doesn't support video then return 0 here
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     // Profiling
00083     double getTime();
00084 
00085     // Ignore if these aren't supported
00086     bool setSMP( int ) { return FALSE; }
00087     bool setMMX( bool ) { return FALSE; }
00088 
00089     // Capabilities
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

Generated on Sat Nov 5 16:15:45 2005 for OPIE by  doxygen 1.4.2