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

Last change on this file since 257 was 257, checked in by Eugene Romanenko, 13 years ago

PDF plugin: Poppler library updated to version 0.10.0

File size: 1.5 KB
Line 
1//========================================================================
2//
3// DCTStream.h
4//
5// This file is licensed under the GPLv2 or later
6//
7// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net>
8// Copyright 2005 Martin Kretzschmar <martink@gnome.org>
9// Copyright 2005-2007 Albert Astals Cid <aacid@kde.org>
10//
11//========================================================================
12
13#ifndef DCTSTREAM_H
14#define DCTSTREAM_H
15#include <config.h>
16
17#ifdef USE_GCC_PRAGMAS
18#pragma interface
19#endif
20
21
22#ifdef USE_GCC_PRAGMAS
23#pragma implementation
24#endif
25
26#include <stdio.h>
27#include <stdlib.h>
28#include <stddef.h>
29#ifdef HAVE_UNISTD_H
30#include <unistd.h>
31#endif
32#include <string.h>
33#include <ctype.h>
34#include "goo/gmem.h"
35#include "goo/gfile.h"
36#include "poppler-config.h"
37#include "Error.h"
38#include "Object.h"
39#include "Decrypt.h"
40#include "Stream.h"
41
42extern "C" {
43#include <jpeglib.h>
44}
45
46struct str_src_mgr {
47    struct jpeg_source_mgr pub;
48    JOCTET buffer;
49    Stream *str;
50    int index;
51    bool abort;
52};
53
54
55class DCTStream: public FilterStream {
56public:
57
58  DCTStream(Stream *strA, int colorXformA);
59  virtual ~DCTStream();
60  virtual StreamKind getKind() { return strDCT; }
61  virtual void reset();
62  virtual int getChar();
63  virtual int lookChar();
64  virtual GooString *getPSFilter(int psLevel, char *indent);
65  virtual GBool isBinary(GBool last = gTrue);
66  Stream *getRawStream() { return str; }
67
68private:
69  void init();
70
71  unsigned int x;
72  struct jpeg_decompress_struct cinfo;
73  struct jpeg_error_mgr jerr;
74  struct str_src_mgr src;
75  JSAMPARRAY row_buffer;
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.