OLD | NEW |
---|---|
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ | 7 #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ |
8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ | 8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ |
9 | 9 |
10 #include "../fxcrt/fx_system.h" | 10 #include "../fxcrt/fx_system.h" |
11 | 11 |
12 #ifdef PDF_ENABLE_XFA | |
13 class CFX_DIBAttribute; | |
14 | |
15 #endif | |
12 class IFX_JpegProvider { | 16 class IFX_JpegProvider { |
13 public: | 17 public: |
14 virtual void Release() = 0; | 18 virtual void Release() = 0; |
15 | 19 |
16 virtual void* CreateDecoder(const uint8_t* src_buf, | 20 virtual void* CreateDecoder(const uint8_t* src_buf, |
17 FX_DWORD src_size, | 21 FX_DWORD src_size, |
18 int width, | 22 int width, |
19 int height, | 23 int height, |
20 int nComps, | 24 int nComps, |
21 FX_BOOL ColorTransform) = 0; | 25 FX_BOOL ColorTransform) = 0; |
(...skipping 29 matching lines...) Expand all Loading... | |
51 | 55 |
52 virtual void Finish(void* pContext) = 0; | 56 virtual void Finish(void* pContext) = 0; |
53 | 57 |
54 virtual void Input(void* pContext, | 58 virtual void Input(void* pContext, |
55 const uint8_t* src_buf, | 59 const uint8_t* src_buf, |
56 FX_DWORD src_size) = 0; | 60 FX_DWORD src_size) = 0; |
57 | 61 |
58 virtual int ReadHeader(void* pContext, | 62 virtual int ReadHeader(void* pContext, |
59 int* width, | 63 int* width, |
60 int* height, | 64 int* height, |
65 #ifndef PDF_ENABLE_XFA | |
61 int* nComps) = 0; | 66 int* nComps) = 0; |
67 #else | |
68 int* nComps, | |
69 CFX_DIBAttribute* pAttribute = NULL) = 0; | |
Lei Zhang
2015/10/30 06:15:30
dislike
| |
70 #endif | |
62 | 71 |
63 virtual int StartScanline(void* pContext, int down_scale) = 0; | 72 virtual int StartScanline(void* pContext, int down_scale) = 0; |
64 | 73 |
65 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0; | 74 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0; |
66 | 75 |
67 virtual FX_DWORD GetAvailInput(void* pContext, | 76 virtual FX_DWORD GetAvailInput(void* pContext, |
68 uint8_t** avail_buf_ptr = NULL) = 0; | 77 uint8_t** avail_buf_ptr = NULL) = 0; |
69 | 78 |
70 protected: | 79 protected: |
71 ~IFX_JpegProvider() {} | 80 ~IFX_JpegProvider() {} |
72 }; | 81 }; |
73 | 82 |
74 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ | 83 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ |
OLD | NEW |