source: trunk/poppler/mypoppler/poppler/DCTStream.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 16 years ago

First import

File size: 1.3 KB
Line 
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
38extern "C" {
39#include <jpeglib.h>
40}
41
42struct str_src_mgr {
43    struct jpeg_source_mgr pub;
44    JOCTET buffer;
45    Stream *str;
46    int index;
47};
48
49
50class DCTStream: public FilterStream {
51public:
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
63private:
64  unsigned int x;
65  struct jpeg_decompress_struct cinfo;
66  struct jpeg_error_mgr jerr;
67  struct str_src_mgr src;
68  JSAMPARRAY row_buffer;
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.