|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef FWEXTTESTCODEC_H |
|
17 #define FWEXTTESTCODEC_H |
|
18 |
|
19 #include <icl/imagecodec.h> |
|
20 #include "fwexttestconvert.h" |
|
21 |
|
22 // Forward declaration |
|
23 class CFwExtTestDecoderPlugin; |
|
24 |
|
25 // Read Codec |
|
26 class CFwExtReadCodec : public CImageReadCodec |
|
27 { |
|
28 public: |
|
29 static CFwExtReadCodec* NewL(CFwExtTestDecoderPlugin& aDecoder); |
|
30 |
|
31 // From CImageReadCodec |
|
32 void InitFrameL(TFrameInfo& aFrameInfo, CFrameImageData& aFrameImageData, TBool aDisableErrorDiffusion, CFbsBitmap& aDestination, CFbsBitmap* aDestinationMask); |
|
33 void InitFrameHeader(TFrameInfo& aFrameInfo, CFrameImageData& aFrameData); |
|
34 TFrameState ProcessFrameL(TBufPtr8& aSrc); |
|
35 void SetPrepareProcessing(); // set flag that Prepare in progress |
|
36 |
|
37 private: |
|
38 CFwExtReadCodec(CFwExtTestDecoderPlugin& aDecoder); |
|
39 |
|
40 private: |
|
41 TInt iLoops; |
|
42 TBool iPrepareProcessing; // to distinguish between Prepare and Convert |
|
43 CFwExtTestDecoderPlugin* iDecoder; // not owned |
|
44 }; |
|
45 |
|
46 // Write Codec |
|
47 class CFwExtWriteCodec : public CImageWriteCodec |
|
48 { |
|
49 public: |
|
50 static CFwExtWriteCodec* NewL(CFwExtTestEncoderPlugin& aEncoder); |
|
51 |
|
52 void ResetCount(); |
|
53 void Complete(); |
|
54 |
|
55 // From CImageWriteCodec |
|
56 TFrameState ProcessFrameL(TBufPtr8& aDst); |
|
57 void SetPrepareProcessing(); // set flag that Prepare in progress |
|
58 |
|
59 private: |
|
60 CFwExtWriteCodec(CFwExtTestEncoderPlugin& aEncoder); |
|
61 |
|
62 private: |
|
63 TInt iLoops; |
|
64 TBool iPrepareProcessing; // to distinguish between Prepare and Convert/AddBlocks |
|
65 TBool iComplete; |
|
66 CFwExtTestEncoderPlugin* iEncoder; // not owned |
|
67 }; |
|
68 |
|
69 #endif // FWEXTTESTCODEC_H |