SmartPDF - lightweight pdf viewer app for rosapps
[reactos.git] / rosapps / smartpdf / poppler / poppler / DCTStream.h
1 //========================================================================
2 //
3 // DCTStream.h
4 //
5 // Copyright 1996-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
8
9 #ifndef DCTSTREAM_H
10 #define DCTSTREAM_H
11 #include <config.h>
12
13 #ifdef USE_GCC_PRAGMAS
14 #pragma interface
15 #endif
16
17
18 #ifdef USE_GCC_PRAGMAS
19 #pragma implementation
20 #endif
21
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <stddef.h>
25 #ifndef WIN32
26 #include <unistd.h>
27 #endif
28 #include <string.h>
29 #include <ctype.h>
30 #include "goo/gmem.h"
31 #include "goo/gfile.h"
32 #include "poppler-config.h"
33 #include "Error.h"
34 #include "Object.h"
35 #include "Decrypt.h"
36 #include "Stream.h"
37
38 extern "C" {
39 #include <jpeglib.h>
40 }
41
42 struct str_src_mgr {
43 struct jpeg_source_mgr pub;
44 JOCTET buffer;
45 Stream *str;
46 int index;
47 };
48
49
50 class DCTStream: public FilterStream {
51 public:
52
53 DCTStream(Stream *strA);
54 virtual ~DCTStream();
55 virtual StreamKind getKind() { return strDCT; }
56 virtual void reset();
57 virtual int getChar();
58 virtual int lookChar();
59 virtual GooString *getPSFilter(int psLevel, char *indent);
60 virtual GBool isBinary(GBool last = gTrue);
61 Stream *getRawStream() { return str; }
62
63 private:
64 void init();
65
66 unsigned int x;
67 struct jpeg_decompress_struct cinfo;
68 struct jpeg_error_mgr jerr;
69 struct str_src_mgr src;
70 JSAMPARRAY row_buffer;
71 };
72
73 #endif