Functional version of IrixCLJpegCompressor. This commit includes modifications used to test this class without hardware compressors available via Irix CL.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2376 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/IrixCLJpegCompressor.h b/common/rfb/IrixCLJpegCompressor.h
index e32659a..39ebd4a 100644
--- a/common/rfb/IrixCLJpegCompressor.h
+++ b/common/rfb/IrixCLJpegCompressor.h
@@ -2,6 +2,7 @@
#define __IRIXCLJPEGCOMPRESSOR_H__
#include <sys/types.h>
+#include <dmedia/cl.h>
#include <rdr/types.h>
#include <rfb/PixelFormat.h>
@@ -22,7 +23,7 @@
virtual ~IrixCLJpegCompressor();
// Check if the object has been created successfully.
- bool isValid() const { return false; }
+ bool isValid() const { return m_clHandleValid; }
// Set JPEG quality level (0..100).
virtual void setQuality(int level);
@@ -39,7 +40,15 @@
static const int DEFAULT_QUALITY;
int m_quality;
+ CLhandle m_clHandle;
+ bool m_clHandleValid;
+
+ int m_srcBufferSize;
+ int m_dstBufferSize;
+
+ rdr::U32 *m_sourceData;
char *m_compressedData;
+
size_t m_compressedLength;
};