photosgallery/viewframework/texturemanager/inc/glxbitmapdecoderwrapper.h
branchRCL_3
changeset 47 f9e827349359
parent 0 4e91876724a2
equal deleted inserted replaced
35:420f6808bf21 47:f9e827349359
    85     TInt OOMRequestFreeMemoryL( TInt aBytesRequested);
    85     TInt OOMRequestFreeMemoryL( TInt aBytesRequested);
    86 
    86 
    87 public:    
    87 public:    
    88     /**
    88     /**
    89      * Standard Active object functions
    89      * Standard Active object functions
    90      * */
    90      */
    91     virtual void RunL();
    91     virtual void RunL();
    92     virtual void DoCancel();
    92     virtual void DoCancel();
    93 
    93 
    94 private:
    94 private:
    95     /*
    95     /**
    96      * Constructor
    96      * Constructor
    97      * */
    97      */
    98     CGlxBitmapDecoderWrapper();
    98     CGlxBitmapDecoderWrapper();
    99     
    99     
   100     /*
   100     /**
   101      *Second-phase constuction 
   101      * Second-phase constuction 
   102      * */
   102      */
   103     void ConstructL(MGlxBitmapDecoderObserver* aObserver);
   103     void ConstructL(MGlxBitmapDecoderObserver* aObserver);
   104     /*
   104     
   105      * Get the orientation of the file
   105     /**
   106      * This API reads the Exif tag in an image and returns the orientation of that Image 
   106      * If the image format is non jpeg, then we need to calculate as per
       
   107      * reduction factor and reduced size as what the decoder is going to return us
       
   108      * This function returns if that needs to be done. 
   107      */
   109      */
   108     TUint16 GetOrientationL(const TDesC& aFileName) ;
   110     TBool DoesMimeTypeNeedsRecalculateL();
   109     /*
   111     
   110      * Get the Rotation Angle and Mirroring status of the image so as to set it on the decoder 
   112     /**
   111      * This API calculates the rotation angle and the Mirroring status required by the decoder
   113      * Recalculate the size for png/bmp as decoder fails to 
   112      * @param aOrientation Orientation of the image.
   114      * decode for desired size 
   113      * @param aRotAngle Rotation angle to be set on the image decoder.
       
   114      * @param aFlipStatus Mirroring status for the decoder if 1 then mirroring should be set.
       
   115      * Internally it also sets the iOriginalSize to the required size
       
   116      */
   115      */
   117     void GetRotationParameters(TUint16 aOrientation, TInt& aRotAngle, TBool& aFlipStatus) ;
   116     TSize ReCalculateSizeL();
   118 
   117 
   119 private:    
   118 private:    
   120     /* Contains the TextureManagerImpl object,calls the HandleBitmapDecoded*/
   119     /* Contains the TextureManagerImpl object,calls the HandleBitmapDecoded*/
   121     MGlxBitmapDecoderObserver* iObserver;
   120     MGlxBitmapDecoderObserver* iObserver;
   122     /*Specifies the Decoder */
   121     /*Specifies the Decoder */
   123     CImageDecoder*          iImageDecoder; // decoder from ICL API
   122     CImageDecoder* iImageDecoder; // decoder from ICL API
   124     /*Contains the Thumbnail Index*/
   123     /*Contains the Thumbnail Index*/
   125     TInt iThumbnailIndex;
   124     TInt iThumbnailIndex;
   126     /*Contains the Bitmap generated*/
   125     /*Contains the Bitmap generated*/
   127     CFbsBitmap* iBitmap;
   126     CFbsBitmap* iBitmap;
   128     /*contains the original size of the image*/
   127     /*contains the original size of the image*/
   129     TAlfRealSize iOriginalSize;
   128     TAlfRealSize iOriginalSize;
   130     /*A handle to a file server session.*/ 
   129     /*A handle to a file server session.*/ 
   131     RFs iFs;
   130     RFs iFs;
   132     /*Specifies the state of decoding ,if it is in initial level(3MP), Middlelevel(6MP) or final level*/
   131     /*To store the target image size*/
   133     TDecoderState iDecoderState;
   132     TSize iTargetBitmapSize;
   134     /*Specifies the size of teh image and levels to decode*/
   133     /*To store the image uri path*/ 
   135     TImageLevel   iImageLevel;
   134     HBufC* iImagePath;                     
   136 #ifdef _DEBUG
   135 #ifdef _DEBUG
   137     
       
   138     TTime iDecodeProcessstartTime;
       
   139     TTime iStartTime;
   136     TTime iStartTime;
   140     TTime iStopTime;
   137     TTime iStopTime;
   141 #endif
   138 #endif
   142     };
   139     };
   143 
   140