|
1 // Copyright (c) 2005-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 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef MNGICLDECODER_H |
|
22 |
|
23 #define MNGICLDECODER_H |
|
24 |
|
25 #include "InputStream.h" |
|
26 #include "MngReadCodec.h" |
|
27 |
|
28 class CMngIclReadStream; |
|
29 |
|
30 /** |
|
31 Restricted implementation of the ICL decoder for MGN-LC format, |
|
32 doesn't support FrameCount() and decoding from a frame other than |
|
33 the 1st one. |
|
34 */ |
|
35 class CMngIclDecoder : public CImageDecoderPlugin, |
|
36 protected MDataFeed, |
|
37 protected MMngCodecObserver |
|
38 { |
|
39 public: |
|
40 static CMngIclDecoder* NewL(); |
|
41 virtual ~CMngIclDecoder(); |
|
42 |
|
43 virtual void ImageType(TInt aFrameNumber, TUid& aImageType, TUid& aImageSubType) const; |
|
44 CFrameInfoStrings* FrameInfoStringsL(RFs& aFs, TInt aFrameNumber); |
|
45 |
|
46 protected: |
|
47 // from the CImageDecoderPlugin // |
|
48 virtual void InitConvertL(); |
|
49 virtual void DoConvert(); |
|
50 virtual void ScanDataL(); |
|
51 virtual void Cleanup(); |
|
52 |
|
53 // from the MDataFeed // |
|
54 virtual TInt LockBuffer(TInt aPosition, TPtrC8& aBuffer, TInt aBytesToLock); |
|
55 // from the MMngCodecObserver // |
|
56 virtual void OnCodecEvent(TCodecEvent aEventCode, TInt aErrorCode); |
|
57 private: |
|
58 CMngIclDecoder(); |
|
59 |
|
60 // From CImageDecoderPlugin |
|
61 // Called by ScanDataL. |
|
62 void ReadFormatL(); |
|
63 private: |
|
64 TBool iMngSubframesNoLoops; //Subframes with No Loops |
|
65 CMngIclReadStream* iMngIclReadStream; |
|
66 |
|
67 enum |
|
68 { |
|
69 EStateReadData =0, //0 |
|
70 EStateDataParsed, //1 |
|
71 EStatePlayAnimation, //2 |
|
72 EStateFrameReady, //3 |
|
73 EStateImageCompleted //4 |
|
74 } iState; |
|
75 TBool iCodecEventPending; |
|
76 TInt iLatestCodecError; |
|
77 }; |
|
78 |
|
79 |
|
80 #endif // ndef MNGICLDECODER_H |
|
81 |