--- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailgeneratetask.cpp Wed Aug 18 10:05:55 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailgeneratetask.cpp Thu Sep 02 20:45:11 2010 +0300
@@ -29,6 +29,11 @@
#include "thumbnaillog.h"
#include "thumbnailpanic.h"
#include "thumbnailfetchedchecker.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "thumbnailgeneratetaskTraces.h"
+#endif
+
// ======== MEMBER FUNCTIONS ========
@@ -52,6 +57,7 @@
iQualityPreference( aQualityPreference ), iVirtualUri( aVirtualUri )
{
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::CThumbnailGenerateTask()", this);
+ OstTrace1( TRACE_NORMAL, CTHUMBNAILGENERATETASK_CTHUMBNAILGENERATETASK, "CThumbnailGenerateTask::CThumbnailGenerateTask;this=%o", this );
if ( !aBuffer && aFile)
{
@@ -85,6 +91,7 @@
CThumbnailGenerateTask::~CThumbnailGenerateTask()
{
TN_DEBUG2("CThumbnailGenerateTask(0x%08x)::~CThumbnailGenerateTask()", this);
+ OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILGENERATETASK_CTHUMBNAILGENERATETASK, "CThumbnailGenerateTask::~CThumbnailGenerateTask;this=%o", this );
if ( iProvider )
{
@@ -110,6 +117,7 @@
iFile.Close();
TN_DEBUG1("CThumbnailGenerateTask::~CThumbnailGenerateTask() - file handle closed");
+ OstTrace0( TRACE_NORMAL, DUP2_CTHUMBNAILGENERATETASK_CTHUMBNAILGENERATETASK, "CThumbnailGenerateTask::~CThumbnailGenerateTask - file handle closed" );
}
@@ -120,6 +128,7 @@
void CThumbnailGenerateTask::StartL()
{
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::StartL()", this );
+ OstTrace1( TRACE_NORMAL, CTHUMBNAILGENERATETASK_STARTL, "CThumbnailGenerateTask::StartL;this=%o", this );
CThumbnailTask::StartL();
@@ -141,6 +150,7 @@
iProvider = iServer.ResolveProviderL(mimeType);
TN_DEBUG3( "CThumbnailGenerateTask(0x%08x) -- provider UID 0x%08x", this, iProvider->Uid());
+ OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILGENERATETASK_STARTL, "CThumbnailGenerateTask::StartL;this=%o", this );
__ASSERT_DEBUG(( iProvider ), ThumbnailPanic( EThumbnailNullPointer ));
@@ -178,6 +188,7 @@
User::LeaveIfError( providerErr );
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::StartL() end", this );
+ OstTrace1( TRACE_NORMAL, DUP2_CTHUMBNAILGENERATETASK_STARTL, "CThumbnailGenerateTask::StartL -end;this=%o", this );
}
@@ -198,6 +209,7 @@
void CThumbnailGenerateTask::DoCancel()
{
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::DoCancel()", this );
+ OstTrace1( TRACE_NORMAL, CTHUMBNAILGENERATETASK_DOCANCEL, "CThumbnailGenerateTask::DoCancel;this=%o", this );
if ( iProvider )
{
@@ -274,6 +286,9 @@
{
TN_DEBUG4(
"CThumbnailGenerateTask(0x%08x)::ThumbnailProviderReady(aError=%d, aBitmap=0x%08x)", this, aError, aBitmap );
+ OstTrace1( TRACE_NORMAL, CTHUMBNAILGENERATETASK_THUMBNAILPROVIDERREADY, "CThumbnailGenerateTask::ThumbnailProviderReady;this=%o", this );
+ OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILGENERATETASK_THUMBNAILPROVIDERREADY, "CThumbnailGenerateTask::ThumbnailProviderReady;aError=%d", aError );
+ OstTrace1( TRACE_NORMAL, DUP2_CTHUMBNAILGENERATETASK_THUMBNAILPROVIDERREADY, "CThumbnailGenerateTask::ThumbnailProviderReady;aBitmap=%o", aBitmap );
#ifdef _DEBUG
aStop.UniversalTime();
@@ -299,6 +314,7 @@
#ifdef _DEBUG
TN_DEBUG2( "CThumbnailGenerateTask::ThumbnailProviderReady() - displaymode is %d", aBitmap->DisplayMode());
+ OstTrace1( TRACE_NORMAL, DUP3_CTHUMBNAILGENERATETASK_THUMBNAILPROVIDERREADY, "CThumbnailGenerateTask::ThumbnailProviderReady;aBitmap->DisplayMode()=%u", aBitmap->DisplayMode() );
#endif
TRAPD( err, CreateScaleTasksL( aBitmap ));
@@ -358,6 +374,8 @@
TThumbnailSize size = (*iMissingSizes)[ i ].iType;
#ifdef _DEBUG
TN_DEBUG3( "CThumbnailGenerateTask(0x%08x)::CreateScaleTasksL() *iMissingSizes)[ i ].iType == %d", this, size );
+ OstTrace1( TRACE_NORMAL, CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;this=%o", this );
+ OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;size=%d", size );
#endif
if ( iPortrait )
@@ -367,13 +385,21 @@
size == EAudioFullScreenThumbnailSize ||
size == EImageFullScreenThumbnailSize )
{
+ TInt mis_width = (*iMissingSizes)[ i ].iSize.iWidth;
TN_DEBUG2( "*iMissingSizes)[ i ].iWidth == %d", (*iMissingSizes)[ i ].iSize.iWidth );
+ OstTrace1( TRACE_NORMAL, DUP2_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;width=%d", mis_width );
+
+ TInt mis_height = (*iMissingSizes)[ i ].iSize.iHeight;
TN_DEBUG2( "*iMissingSizes)[ i ].iHeight == %d", (*iMissingSizes)[ i ].iSize.iHeight );
+ OstTrace1( TRACE_NORMAL, DUP3_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;mis_height=%d", mis_height );
TInt width = (*iMissingSizes)[ i ].iSize.iWidth;
(*iMissingSizes)[ i ].iSize.iWidth = (*iMissingSizes)[ i ].iSize.iHeight;
(*iMissingSizes)[ i ].iSize.iHeight = width;
TN_DEBUG2( "*iMissingSizes)[ i ].iWidth == %d", (*iMissingSizes)[ i ].iSize.iWidth );
+ OstTrace1( TRACE_NORMAL, DUP4_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;width=%d", width );
+ mis_height = (*iMissingSizes)[ i ].iSize.iHeight;
TN_DEBUG2( "*iMissingSizes)[ i ].iHeight == %d", (*iMissingSizes)[ i ].iSize.iHeight );
+ OstTrace1( TRACE_NORMAL, DUP5_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL;mis_height=%d", mis_height );
}
}
@@ -393,6 +419,7 @@
{
complTask->SetDoStore( EFalse );
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::CreateScaleTasksL() - do not store", this );
+ OstTrace1( TRACE_NORMAL, DUP6_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL - do not store;this=%o", this );
}
else
{
@@ -442,6 +469,7 @@
{
complTask->SetDoStore( EFalse );
TN_DEBUG2( "CThumbnailGenerateTask(0x%08x)::CreateScaleTasksL() - do not store", this );
+ OstTrace1( TRACE_NORMAL, DUP7_CTHUMBNAILGENERATETASK_CREATESCALETASKSL, "CThumbnailGenerateTask::CreateScaleTasksL - do not store;this=%o", this );
}
else
{
@@ -479,6 +507,7 @@
void CThumbnailGenerateTask::CreateBlackListedL( const TSize& aOriginalSize )
{
TN_DEBUG1( "CThumbnailGenerateTask::CreateBlackListedL()");
+ OstTrace0( TRACE_NORMAL, CTHUMBNAILGENERATETASK_CREATEBLACKLISTEDL, "CThumbnailGenerateTask::CreateBlackListedL" );
CFbsBitmap* tempBitmap = 0;
tempBitmap = new (ELeave) CFbsBitmap();
CleanupStack::PushL( tempBitmap );
@@ -515,6 +544,7 @@
void CThumbnailGenerateTask::DoBlacklisting( const TInt aError, const TSize& aOriginalSize )
{
TN_DEBUG1( "CThumbnailGenerateTask::DoBlacklisting()");
+ OstTrace0( TRACE_NORMAL, CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting" );
// Create a temporary bitmap of size 1 for storing blacklisted thumbnail
// Because no actual bitmap data is generated, there is no reason to
// add bitmap to server bitmap pool. Completion of client request with
@@ -533,6 +563,7 @@
if(iMissingSizes)
{
TN_DEBUG2( "CThumbnailGenerateTask::DoBlacklisting() - blacklist missing sizes count = %d", iMissingSizes->Count() );
+ OstTrace1( TRACE_NORMAL, DUP1_CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting - blacklist missing sizes count;iMissingSizes->Count()=%d", iMissingSizes->Count() );
for ( TInt i( 0 ); i < iMissingSizes->Count(); i++ )
{
@@ -541,6 +572,7 @@
if (err != KErrNone)
{
TN_DEBUG3( "CThumbnailGenerateTask::DoBlacklisting() - blacklisting missing size %d failed with code %d", iThumbnailSize, err );
+ OstTraceExt2( TRACE_NORMAL, DUP2_CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting - - blacklisting missing size failed with error;iThumbnailSize=%u;err=%d", iThumbnailSize, err );
}
}
return;
@@ -548,15 +580,18 @@
else
{
TN_DEBUG1( "CThumbnailGenerateTask::DoBlacklisting() - blacklist single size" );
+ OstTrace0( TRACE_NORMAL, DUP3_CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting - blacklist single size" );
TRAPD( err, CreateBlackListedL( aOriginalSize ) );
if (err != KErrNone)
{
TN_DEBUG2( "CThumbnailGenerateTask::DoBlacklisting() - blacklisting failed with code %d", err );
+ OstTrace1( TRACE_NORMAL, DUP4_CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting - blacklisting failed with code;err=%d", err );
}
return;
}
}
TN_DEBUG1( "CThumbnailGenerateTask::DoBlacklisting() - not blacklisted " );
+ OstTrace0( TRACE_NORMAL, DUP5_CTHUMBNAILGENERATETASK_DOBLACKLISTING, "CThumbnailGenerateTask::DoBlacklisting - not blacklisted" );
}
}