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

libtremorplugin.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 * libtremorplugin.h
00003 *
00004 * Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net>
00005 *
00006 * This program is free software; you can redistribute it and/or modify
00007 * it under the terms of the GNU General Public License as published by
00008 * the Free Software Foundation; either version 2 of the License, or
00009 * (at your option) any later version.
00010 *
00011 * This program is distributed in the hope that it will be useful,
00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 * GNU General Public License for more details.
00015 *
00016 * You should have received a copy of the GNU General Public License
00017 * along with this program; if not, write to the Free Software
00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ****************************************************************************/
00020 
00021 #ifndef LIBTREMOR_PLUGIN_H 
00022 #define LIBTREMOR_PLUGIN_H
00023 
00024 
00025 #include <qstring.h>
00026 #include <qpe/mediaplayerplugininterface.h>
00027 
00028 
00029 class LibTremorPluginData;
00030 
00031 
00032 class LibTremorPlugin : public MediaPlayerDecoder {
00033 
00034 public:
00035     LibTremorPlugin();
00036     ~LibTremorPlugin();
00037 
00038     const char *pluginName() { return "LibTremorPlugin"; }
00039     const char *pluginComment() { return "This is the Tremor library that has been wrapped as a plugin"; }
00040     double pluginVersion() { return 1.0; }
00041 
00042     bool isFileSupported( const QString& );
00043     bool open( const QString& );
00044     bool close();
00045     bool isOpen();
00046     const QString &fileInfo();
00047 
00048     // If decoder doesn't support audio then return 0 here
00049     int audioStreams();
00050     int audioChannels( int stream ); 
00051     int audioFrequency( int stream );
00052     int audioSamples( int stream );
00053     bool audioSetSample( long sample, int stream );
00054     long audioGetSample( int stream );
00055     bool audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream );
00056 
00057 
00058     // If decoder doesn't support video then return 0 here
00059     int videoStreams() { return 0; }
00060     int videoWidth( int ) { return 0; }
00061     int videoHeight( int ) { return 0; }
00062     double videoFrameRate( int ) { return 0.0; }
00063     int videoFrames( int ) { return 0; }
00064     bool videoSetFrame( long, int ) { return FALSE; }
00065     long videoGetFrame( int ) { return 0; }
00066     bool videoReadFrame( unsigned char **, int, int, int, int, ColorFormat, int ) { return FALSE; }
00067     bool videoReadScaledFrame( unsigned char **, int, int, int, int, int, int, ColorFormat, int ) { return FALSE; }
00068     bool videoReadYUVFrame( char *, char *, char *, int, int, int, int, int ) { return FALSE; }
00069 
00070     // Profiling
00071     double getTime();
00072 
00073     // Ignore if these aren't supported
00074     bool setSMP( int ) { return FALSE; }
00075     bool setMMX( bool ) { return FALSE; }
00076 
00077     // Capabilities
00078     bool supportsAudio() { return TRUE; }
00079     bool supportsVideo() { return FALSE; }
00080     bool supportsYUV() { return FALSE; }
00081     bool supportsMMX() { return TRUE; }
00082     bool supportsSMP() { return FALSE; }
00083     bool supportsStereo() { return TRUE; }
00084     bool supportsScaling() { return FALSE; }
00085 
00086     long getPlayTime() { return -1; }
00087 
00088 private:
00089     LibTremorPluginData *d;
00090 
00091 };
00092 
00093 
00094 #endif

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