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

Last change on this file since 461 was 461, checked in by Silvan Scherrer, 11 years ago

poppler update to 0.14.2

File size: 1.7 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, 2009, 2010 Albert Astals Cid <aacid@kde.org>
10// Copyright 2010 Carlos Garcia Campos <carlosgc@gnome.org>
11//
12//========================================================================
13
14#ifndef DCTSTREAM_H
15#define DCTSTREAM_H
16#include <config.h>
17
18#ifdef USE_GCC_PRAGMAS
19#pragma interface
20#endif
21
22
23#ifdef USE_GCC_PRAGMAS
24#pragma implementation
25#endif
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <stddef.h>
30#include <setjmp.h>
31#ifdef HAVE_UNISTD_H
32#include <unistd.h>
33#endif
34#include <string.h>
35#include <ctype.h>
36#include "goo/gmem.h"
37#include "goo/gfile.h"
38#include "poppler-config.h"
39#include "Error.h"
40#include "Object.h"
41#include "Decrypt.h"
42#include "Stream.h"
43
44extern "C" {
45#include <jpeglib.h>
46}
47
48struct str_src_mgr {
49    struct jpeg_source_mgr pub;
50    JOCTET buffer;
51    Stream *str;
52    int index;
53    jmp_buf setjmp_buffer;
54};
55
56
57class DCTStream: public FilterStream {
58public:
59
60  DCTStream(Stream *strA, int colorXformA);
61  virtual ~DCTStream();
62  virtual StreamKind getKind() { return strDCT; }
63  virtual void reset();
64  virtual int getChar();
65  virtual int lookChar();
66  virtual GooString *getPSFilter(int psLevel, char *indent);
67  virtual GBool isBinary(GBool last = gTrue);
68  Stream *getRawStream() { return str; }
69
70private:
71  void init();
72
73  int colorXform;
74  JSAMPLE *current;
75  JSAMPLE *limit;
76  struct jpeg_decompress_struct cinfo;
77  struct jpeg_error_mgr jerr;
78  struct str_src_mgr src;
79  JSAMPARRAY row_buffer;
80};
81
82#endif
Note: See TracBrowser for help on using the repository browser.