Internalise the libjpeg stuff into the JpegCompressor class as the libjpeg
headers are a bit conflict prone.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4669 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/JpegCompressor.h b/common/rfb/JpegCompressor.h
index 668c9a0..798572e 100644
--- a/common/rfb/JpegCompressor.h
+++ b/common/rfb/JpegCompressor.h
@@ -29,27 +29,13 @@
#include <rfb/PixelFormat.h>
#include <rfb/Rect.h>
-#include <stdio.h>
-extern "C" {
-#include <jpeglib.h>
-}
-#include <setjmp.h>
+struct jpeg_compress_struct;
+
+struct JPEG_ERROR_MGR;
+struct JPEG_DEST_MGR;
namespace rfb {
- typedef struct {
- struct jpeg_error_mgr pub;
- jmp_buf jmpBuffer;
- char lastError[JMSG_LENGTH_MAX];
- } JPEG_ERROR_MGR;
-
- class JpegCompressor;
-
- typedef struct {
- struct jpeg_destination_mgr pub;
- JpegCompressor *instance;
- } JPEG_DEST_MGR;
-
enum JPEG_SUBSAMP {
SUBSAMP_UNDEFINED = -1,
SUBSAMP_NONE = 0,
@@ -78,9 +64,10 @@
private:
- struct jpeg_compress_struct cinfo;
- JPEG_ERROR_MGR err;
- JPEG_DEST_MGR dest;
+ struct jpeg_compress_struct *cinfo;
+
+ struct JPEG_ERROR_MGR *err;
+ struct JPEG_DEST_MGR *dest;
};