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 _FX_CODEC_PROVIDER_H_ | 7 #ifndef _FX_CODEC_PROVIDER_H_ |
8 #define _FX_CODEC_PROVIDER_H_ | 8 #define _FX_CODEC_PROVIDER_H_ |
9 class IFX_JpegProvider | 9 class IFX_JpegProvider |
10 { | 10 { |
11 public: | 11 public: |
12 | |
13 virtual void Release() = 0; | 12 virtual void Release() = 0; |
14 | 13 |
15 virtual void* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_s
ize, int width, int height, int nComps, FX_BOOL ColorTransform) = 0; | 14 virtual void* CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_s
ize, int width, int height, int nComps, FX_BOOL ColorTransform) = 0; |
16 | 15 |
17 | 16 |
18 virtual void DestroyDecoder(void* pDecoder) = 0; | 17 virtual void DestroyDecoder(void* pDecoder) = 0; |
19 | 18 |
20 virtual void DownScale(void* pDecoder, int dest_width, int de
st_height) = 0; | 19 virtual void DownScale(void* pDecoder, int dest_width, int de
st_height) = 0; |
21 | 20 |
22 virtual FX_BOOL Rewind(void* pDecoder) = 0; | 21 virtual FX_BOOL Rewind(void* pDecoder) = 0; |
(...skipping 19 matching lines...) Expand all Loading... |
42 virtual int ReadHeader(void* pContext, int* width, int* heig
ht, int* nComps) = 0; | 41 virtual int ReadHeader(void* pContext, int* width, int* heig
ht, int* nComps) = 0; |
43 | 42 |
44 | 43 |
45 virtual int StartScanline(void* pContext, int down_scale) =
0; | 44 virtual int StartScanline(void* pContext, int down_scale) =
0; |
46 | 45 |
47 | 46 |
48 virtual FX_BOOL ReadScanline(void* pContext, FX_LPBYTE dest_buf)
= 0; | 47 virtual FX_BOOL ReadScanline(void* pContext, FX_LPBYTE dest_buf)
= 0; |
49 | 48 |
50 | 49 |
51 virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr =
NULL) = 0; | 50 virtual FX_DWORD GetAvailInput(void* pContext, FX_LPBYTE* avail_buf_ptr =
NULL) = 0; |
| 51 |
| 52 protected: |
| 53 ~IFX_JpegProvider() { } |
52 }; | 54 }; |
53 #endif | 55 #endif |
OLD | NEW |