summaryrefslogtreecommitdiff
path: root/poppler/DCTStream.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-03-11 21:42:52 +0000
committerKristian Høgsberg <krh@redhat.com>2005-03-11 21:42:52 +0000
commit83e904452f205a2c0cd2723cb12b7fd4640ce342 (patch)
tree2788fa4b27312c6bac7679705942eac56b47bd95 /poppler/DCTStream.h
parente2af71338fd89760c4ac76999985efc5eb92817f (diff)
2005-03-11 Kristian Høgsberg <krh@redhat.com>
From Jeff Muizelaar <jrmuizel@nit.ca>: * configure.ac: Add checks for libjpeg. * DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am: Conditionally use libjpeg instead of xpdf jpeg decoder.
Diffstat (limited to 'poppler/DCTStream.h')
-rw-r--r--poppler/DCTStream.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/poppler/DCTStream.h b/poppler/DCTStream.h
new file mode 100644
index 00000000..9447215b
--- /dev/null
+++ b/poppler/DCTStream.h
@@ -0,0 +1,70 @@
+//========================================================================
+//
+// DCTStream.h
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef DCTSTREAM_H
+#define DCTSTREAM_H
+#include <config.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#include "goo/gmem.h"
+#include "goo/gfile.h"
+#include "poppler-config.h"
+#include "Error.h"
+#include "Object.h"
+#ifndef NO_DECRYPTION
+#include "Decrypt.h"
+#endif
+#include "Stream.h"
+
+#include <jpeglib.h>
+
+struct str_src_mgr {
+ struct jpeg_source_mgr pub;
+ JOCTET buffer;
+ Stream *str;
+};
+
+
+class DCTStream: public FilterStream {
+public:
+
+ DCTStream(Stream *strA);
+ virtual ~DCTStream();
+ virtual StreamKind getKind() { return strDCT; }
+ virtual void reset();
+ virtual int getChar();
+ virtual int lookChar();
+ virtual GooString *getPSFilter(int psLevel, char *indent);
+ virtual GBool isBinary(GBool last = gTrue);
+ Stream *getRawStream() { return str; }
+
+private:
+ int x;
+ struct jpeg_decompress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+ struct str_src_mgr src;
+ JSAMPARRAY row_buffer;
+};
+
+#endif