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

modplugin.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 #ifndef MOD_PLUGIN_H
00020 #define MOD_PLUGIN_H
00021 
00022 //#include "../mediaplayerplugininterface.h"
00023 #include <qpe/mediaplayerplugininterface.h>
00024 
00025 #include "stdafx.h"
00026 #include "sndfile.h"
00027 
00028 class ModPlugin : public MediaPlayerDecoder,
00029                   public CSoundFile
00030 {
00031 public:
00032     ModPlugin();
00033     virtual ~ModPlugin();
00034 
00035     virtual const char *pluginName();
00036     virtual const char *pluginComment();
00037     virtual double pluginVersion();
00038 
00039     virtual bool isFileSupported( const QString &file );
00040     virtual bool open( const QString &file );
00041     virtual bool close();
00042     virtual bool isOpen();
00043     virtual const QString &fileInfo();
00044 
00045     virtual int audioStreams();
00046     virtual int audioChannels( int stream );
00047     virtual int audioFrequency( int stream );
00048     virtual int audioSamples( int stream );
00049     virtual bool audioSetSample( long sample, int stream );
00050     virtual long audioGetSample( int stream );
00051     virtual bool audioReadSamples( short *output, int channels, long samples,
00052                                    long &samplesRead, int stream );
00053 
00054     virtual int videoStreams();
00055     virtual int videoWidth( int stream );
00056     virtual int videoHeight( int stream );
00057     virtual double videoFrameRate( int stream );
00058     virtual int videoFrames( int stream );
00059     virtual bool videoSetFrame( long sample, int stream );
00060     virtual long videoGetFrame( int stream );
00061     virtual bool videoReadFrame( unsigned char **outputRows, int inX, int inY,
00062                                  int inW, int inH, ColorFormat colorModel, int stream );
00063     virtual bool videoReadScaledFrame( unsigned char **outputRows, int inX, int inY,
00064                                        int inW, int inH, int outW, int outH,
00065                                        ColorFormat colorModel, int stream );
00066     virtual bool videoReadYUVFrame( char *yOutput, char *uOutput, char *vOutput,
00067                                     int inX, int inY, int inW, int inH, int stream );
00068 
00069     virtual double getTime();
00070 
00071     virtual bool setSMP( int cpus );
00072     virtual bool setMMX( bool useMMX );
00073 
00074     virtual bool supportsAudio();
00075     virtual bool supportsVideo();
00076     virtual bool supportsYUV();
00077     virtual bool supportsMMX();
00078     virtual bool supportsSMP();
00079     virtual bool supportsStereo();
00080     virtual bool supportsScaling();
00081 
00082 private:
00083     int m_songTime;
00084     int m_maxPosition;
00085 
00086     static const int s_channels = 2;
00087     static const int s_bytesPerSample = 2;
00088     static const int s_maxChannels = 128;
00089     static const int s_frequency = 44100;
00090     static const int s_audioBufferSize = 32768;
00091 };
00092 
00093 #endif
00094 /* vim: et sw=4
00095  */

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