compressor/compressor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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