# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1263839797 -7200 # Node ID 7a9a8e73f54b16bd72ab7b119fdb5a4db39a97f6 # Parent 7f2202662322d75a041101738cae3a7650bb8501 Revision: 201001 Kit: 201003 diff -r 7f2202662322 -r 7a9a8e73f54b mmappcomponents/asxparser/src/asxparser.cpp --- a/mmappcomponents/asxparser/src/asxparser.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mmappcomponents/asxparser/src/asxparser.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -15,7 +15,7 @@ * */ -// Version : %version: 10.1.5 % +// Version : %version: e003sa33#10.1.6 % @@ -299,7 +299,8 @@ CleanupStack::PopAndDestroy(); //attributeList } - while( nodelist2.HasNext() ) + TBool urlIsSet = EFalse; + while( !urlIsSet && nodelist2.HasNext() ) { element = nodelist2.Next(); @@ -326,6 +327,8 @@ TPtrC8 attrData = attr.Value(); asxItem->url = attrData.AllocL(); iAsxArray.Append(asxItem); + urlIsSet = ETrue; + break; } } diff -r 7f2202662322 -r 7a9a8e73f54b mmappcomponents/asxparser/test/AsxFiles/multiURL.asx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmappcomponents/asxparser/test/AsxFiles/multiURL.asx Mon Jan 18 20:36:37 2010 +0200 @@ -0,0 +1,25 @@ + + Unknown Abstract Info + Unknown Title + Unknown Author + 2008 by Nokia + + + Link 1 + 2008 Nokia + + + + + Link 2 + 2008 Nokia + + + + + Link 3 + 2008 Nokia + + + + diff -r 7f2202662322 -r 7a9a8e73f54b mmappcomponents/asxparser/test/test.cpp --- a/mmappcomponents/asxparser/test/test.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mmappcomponents/asxparser/test/test.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -15,7 +15,7 @@ * */ -// Version : %version: 5 % +// Version : %version: e003sa33#6 % @@ -103,6 +103,20 @@ PrintUrl(url); delete parser; } + + RDebug::Print(_L("#MP# TestAsx Test 5")); + { + _LIT(KFile,"c:\\multiURL_v3.asx"); + parser = CAsxParser::NewL(KFile); + TUint i = 0; + parser->GetUrlCount(i); + __ASSERT_DEBUG(i == 1,1); + TPtrC8 url; + TPtrC16 url2; + parser->GetUrl(1,url); + PrintUrl(url); + delete parser; + } } void DoExampleL() diff -r 7f2202662322 -r 7a9a8e73f54b mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h --- a/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Thu Jan 07 12:57:30 2010 +0200 +++ b/mmappcomponents/collectionhelper/inc/mpxcollectionuihelperimp.h Mon Jan 18 20:36:37 2010 +0200 @@ -848,6 +848,7 @@ TInt iEmbeddedPluginInfo; TBool iInitialized; // collection db merging TBool iIncAdding; // Incremental adding guard + TInt iRefCount; }; #endif // CMPX_COLLECTION_UI_HELPER_H diff -r 7f2202662322 -r 7a9a8e73f54b mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp --- a/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mmappcomponents/collectionhelper/src/mpxcollectionuihelperimp.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -82,6 +82,8 @@ iChunkNumber = 0; iChunkSize = 0; iArrayIndex = 0; + iRefCount = 1; + } @@ -103,10 +105,34 @@ // CMPXCollectionUiHelperImp* CMPXCollectionUiHelperImp::NewLC(const TUid& aModeId) { - CMPXCollectionUiHelperImp* self = new( ELeave ) CMPXCollectionUiHelperImp(); - CleanupStack::PushL( self ); - self->ConstructL(aModeId); - return self; + + CMPXCollectionUiHelperImp* self(NULL); + + if ( aModeId == KMcModeDefault ) + { + self = reinterpret_cast(Dll::Tls()); + if ( !self ) + { + self = new( ELeave ) CMPXCollectionUiHelperImp(); + CleanupStack::PushL( self ); + self->ConstructL(aModeId); + Dll::SetTls( self ); + } + else + { + self->iRefCount++; + CleanupStack::PushL( self ); + } + + return self; + } + else + { + self = new( ELeave ) CMPXCollectionUiHelperImp(); + CleanupStack::PushL( self ); + self->ConstructL(aModeId); + return self; + } } // --------------------------------------------------------------------------- @@ -1016,7 +1042,21 @@ // void CMPXCollectionUiHelperImp::Close() { - delete this; + + ASSERT( iRefCount > 0 ); + if ( --iRefCount == 0 ) + { + // last client released + CMPXCollectionUiHelperImp* s = reinterpret_cast( Dll::Tls() ); + if ( s ) + { + if ( s == this ) + { + delete this; + Dll::SetTls( NULL ); + } + } + } } // --------------------------------------------------------------------------- diff -r 7f2202662322 -r 7a9a8e73f54b mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h --- a/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h Thu Jan 07 12:57:30 2010 +0200 +++ b/mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h Mon Jan 18 20:36:37 2010 +0200 @@ -164,7 +164,8 @@ EPbAccessoryLoopset = 0x00000020, EPbAccessoryMusicStand = 0x00000040, EPbAccessoryTVOut = 0x00000080, - EPbAccessoryHeadphones = 0x00000100 + EPbAccessoryHeadphones = 0x00000100, + EPbAccessoryHDMI = 0x00000200 }; #else /** diff -r 7f2202662322 -r 7a9a8e73f54b mpx/playbackframework/playbackengine/src/mpxaccessoryobserver.cpp --- a/mpx/playbackframework/playbackengine/src/mpxaccessoryobserver.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mpx/playbackframework/playbackengine/src/mpxaccessoryobserver.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -211,6 +211,9 @@ case EAccModeHeadphones: mode = EPbAccessoryHeadphones; break; + case EAccModeHDMI: + mode = EPbAccessoryHDMI; + break; default: break; } diff -r 7f2202662322 -r 7a9a8e73f54b mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp --- a/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -1514,7 +1514,7 @@ // Try pre-initialsing the next song, just in case we get there // TBool more = iInitializer->Next(); - if (!more && iPlaylist->Shuffle()) + if (!more && iPlaylist && iPlaylist->Shuffle()) { // Reach to the end and shuffle is on, pre-initializer // needs to re-copy the new shuffle list from engine if (iInitializer) diff -r 7f2202662322 -r 7a9a8e73f54b mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp --- a/mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp Thu Jan 07 12:57:30 2010 +0200 +++ b/mpx/playbackframework/playbackutility/src/mpxplaybackutilityimpl.cpp Mon Jan 18 20:36:37 2010 +0200 @@ -367,8 +367,11 @@ EPbCmdPlayPause == cmdType || EPbCmdStop == cmdType) { - aCmd.SetTObjectValueL(KMPXCommandPlaybackGeneralClientPid, - RProcess().Id()); // current process id + if( !aCmd.IsSupported( KMPXCommandPlaybackGeneralClientPid ) ) + { + aCmd.SetTObjectValueL ( + KMPXCommandPlaybackGeneralClientPid, RProcess().Id()); // current process id + } } }