compressor/compressor.h

Go to the documentation of this file.
00001 
00002 /* Copyright (c) 2009, Cedric Stalder <cedric.stalder@gmail.com> 
00003  *               2009, Stefan Eilemann <eile@equalizergraphics.com>
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018  
00019 #ifndef EQ_PLUGIN_COMPRESSOR
00020 #define EQ_PLUGIN_COMPRESSOR 
00021 
00022 #include <eq/plugins/compressor.h>
00023 
00024 #include <eq/base/base.h>
00025 #include <eq/base/buffer.h>
00026 
00027 #include <vector>
00028 
00035 namespace eq
00036 {
00037 namespace plugin
00038 {
00039     class Compressor
00040     {
00041     public:
00042         typedef void  (*CompressorGetInfo_t)( EqCompressorInfo* const );
00043         typedef void* (*NewCompressor_t)();
00044         typedef void (*Decompress_t)( const void* const*, const 
00045                                       eq_uint64_t* const,
00046                                       const unsigned, void* const, 
00047                                       const eq_uint64_t, const bool );
00048 
00049         struct Functions
00050         {
00051             Functions();
00052             
00053             unsigned                 name;
00054             CompressorGetInfo_t      getInfo;
00055             NewCompressor_t          newCompressor;
00056             Decompress_t             decompress;
00057         };
00058     
00062         Compressor();
00063 
00064         virtual ~Compressor();
00065 
00075         virtual void compress( const void* const inData,
00076                                const eq_uint64_t nPixels, 
00077                                const bool useAlpha ) = 0;
00078 
00079 
00080         typedef eq::base::Bufferb Result;
00081         typedef std::vector< Result* > ResultVector;
00082 
00088         const ResultVector& getResults() const { return _results; }
00089 
00090     protected: 
00091         ResultVector _results;  
00092     }; 
00093 }
00094 }
00095 
00096 #endif // EQ_PLUGIN_COMPRESSOR
00097 
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8