diff options
author | Pierre Ossman <ossman@cendio.se> | 2009-03-05 11:57:11 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2009-03-05 11:57:11 +0000 |
commit | 02e43d78bf13276ef18fd542167e1ca26830a2f4 (patch) | |
tree | 9e4c69ff64d17ee9b85ec5e2c300ce704453ecaa /common/rfb/JpegCompressor.h | |
parent | b39ace5b32d5a52280198bef0e8bd8a6c5edacba (diff) | |
download | tigervnc-02e43d78bf13276ef18fd542167e1ca26830a2f4.tar.gz tigervnc-02e43d78bf13276ef18fd542167e1ca26830a2f4.zip |
Remove the "video" feature and its associated custom JPEG handling.
Having the client specifiy the video region is conceptually wrong
and a problem like this should be handled by better encoding selection.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3635 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/JpegCompressor.h')
-rw-r--r-- | common/rfb/JpegCompressor.h | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/common/rfb/JpegCompressor.h b/common/rfb/JpegCompressor.h deleted file mode 100644 index 93f6decf..00000000 --- a/common/rfb/JpegCompressor.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __JPEGCOMPRESSOR_H__ -#define __JPEGCOMPRESSOR_H__ - -#include <stdio.h> -#include <sys/types.h> -extern "C" { -#include <jpeglib.h> -} - -#include <rdr/types.h> -#include <rfb/PixelFormat.h> - -namespace rfb { - - // - // An abstract interface for performing JPEG compression. - // - - class JpegCompressor - { - public: - virtual ~JpegCompressor() {} - - // Set JPEG quality level (0..100) - virtual void setQuality(int level) = 0; - - // Actually compress an image. - virtual void compress(const rdr::U32 *buf, const PixelFormat *fmt, - int w, int h, int stride) = 0; - - // Access results of the compression. - virtual size_t getDataLength() = 0; - virtual const char *getDataPtr() = 0; - }; - - // - // A C++ class for performing JPEG compression via the - // Independent JPEG Group's software (free JPEG library). - // - - class StandardJpegCompressor : public JpegCompressor - { - public: - StandardJpegCompressor(); - virtual ~StandardJpegCompressor(); - - // Set JPEG quality level (0..100) - virtual void setQuality(int level); - - // Actually compress the image. - virtual void compress(const rdr::U32 *buf, const PixelFormat *fmt, - int w, int h, int stride); - - // Access results of the compression. - virtual size_t getDataLength() { return m_cdata_ready; } - virtual const char *getDataPtr() { return (const char *)m_cdata; } - - public: - // Our implementation of JPEG destination manager. These three - // functions should never be called directly. They are made public - // because they should be accessible from C-compatible functions - // called by the JPEG library. - void initDestination(); - bool emptyOutputBuffer(); - void termDestination(); - - protected: - static const int ALLOC_CHUNK_SIZE; - static const int DEFAULT_QUALITY; - - struct jpeg_compress_struct m_cinfo; - struct jpeg_error_mgr m_jerr; - - unsigned char *m_cdata; - size_t m_cdata_allocated; - size_t m_cdata_ready; - }; - -} - -#endif // __JPEGCOMPRESSOR_H__ - |