serviceproviders/sapi_mediamanagement/src/mgmediaitem.cpp
changeset 33 50974a8b132e
parent 22 fc9cf246af83
equal deleted inserted replaced
32:8d692d9f828f 33:50974a8b132e
    14 * Description:  Holds information common to all media types
    14 * Description:  Holds information common to all media types
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <mclfitem.h>
    19 #include <MCLFItem.h>
    20 #include <pathinfo.h>
    20 #include <pathinfo.h>
    21 #include <liwvariant.h>
    21 #include <liwvariant.h>
    22 #include "mgmresolution.h"
    22 #include "mgmresolution.h"
    23 
    23 
    24 #include "mgmediaitem.h"
    24 #include "mgmediaitem.h"
    98     aOutputMap->InsertL( KMgFileSize,TLiwVariant( size ) );
    98     aOutputMap->InsertL( KMgFileSize,TLiwVariant( size ) );
    99     
    99     
   100     if ( mediaType == ECLFMediaTypeImage )
   100     if ( mediaType == ECLFMediaTypeImage )
   101         {
   101         {
   102         TSize imageRes( 0,0 );
   102         TSize imageRes( 0,0 );
   103         MResolution* mediaResObj = MediaResolutionFactory::CreateMediaResolutionobjL( mediaImage,fullName );
   103         MResolution* mediaResObj=NULL;
   104         CleanupStack::PushL( mediaResObj );
   104         TInt err =KErrNone;
   105         mediaResObj->GetresolutionL( imageRes );        
   105         TRAP(err,mediaResObj = MediaResolutionFactory::CreateMediaResolutionobjL( mediaImage,fullName ));
   106         aOutputMap->InsertL( KXPixels,(TInt32)imageRes.iWidth );
   106         
   107         aOutputMap->InsertL( KYPixels,(TInt32)imageRes.iHeight );
   107         if(err == KErrNone){
   108         CleanupStack::Pop( mediaResObj );
   108             CleanupStack::PushL( mediaResObj );
   109         delete mediaResObj;
   109             mediaResObj->GetresolutionL( imageRes );        
       
   110             aOutputMap->InsertL( KXPixels,(TInt32)imageRes.iWidth );
       
   111             aOutputMap->InsertL( KYPixels,(TInt32)imageRes.iHeight );
       
   112             CleanupStack::Pop( mediaResObj );
       
   113             delete mediaResObj;
       
   114             }
   110         }         
   115         }         
   111     }
   116     }
   112 
   117 
   113 
   118 
   114 
   119