DRC | 7c2a39c | 2011-11-03 18:51:00 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2000-2003 Constantin Kaplinsky. All Rights Reserved. |
| 2 | * Copyright (C) 2004-2005 Cendio AB. All rights reserved. |
| 3 | * Copyright (C) 2011 D. R. Commander. All Rights Reserved. |
| 4 | * |
| 5 | * This is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This software is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this software; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 18 | * USA. |
| 19 | */ |
| 20 | |
| 21 | // |
| 22 | // JpegDecompressor decompresses a JPEG image into RGB output |
| 23 | // an underlying MemOutStream |
| 24 | // |
| 25 | |
| 26 | #ifndef __RFB_JPEGDECOMPRESSOR_H__ |
| 27 | #define __RFB_JPEGDECOMPRESSOR_H__ |
| 28 | |
| 29 | #include <rfb/PixelFormat.h> |
| 30 | #include <rfb/Rect.h> |
| 31 | |
| 32 | struct jpeg_decompress_struct; |
| 33 | |
| 34 | struct JPEG_ERROR_MGR; |
| 35 | struct JPEG_SRC_MGR; |
| 36 | |
| 37 | namespace rfb { |
| 38 | |
| 39 | class JpegDecompressor { |
| 40 | |
| 41 | public: |
| 42 | |
| 43 | JpegDecompressor(void); |
| 44 | virtual ~JpegDecompressor(); |
| 45 | |
| 46 | void decompress(const rdr::U8 *, int, rdr::U8 *, int, const Rect&, |
| 47 | const PixelFormat&); |
| 48 | |
| 49 | private: |
| 50 | |
| 51 | struct jpeg_decompress_struct *dinfo; |
| 52 | |
| 53 | struct JPEG_ERROR_MGR *err; |
| 54 | struct JPEG_SRC_MGR *src; |
| 55 | |
| 56 | }; |
| 57 | |
| 58 | } // end of namespace rfb |
| 59 | |
| 60 | #endif |