--- a/layers.sysdef.xml Fri Aug 06 17:13:32 2010 -0500
+++ b/layers.sysdef.xml Tue Aug 24 03:26:23 2010 -0500
@@ -3,7 +3,7 @@
<!ENTITY layer_real_source_path "sf/mw/mmappfw" >
]>
-<SystemDefinition name="avdomain" schema="1.5.1">
+<SystemDefinition name="mmappfw" schema="1.5.1">
<systemModel>
<!-- Common file for prebuild layers-->
<layer name="mw_layer">
--- a/mmappcomponents/asxparser/src/asxparser.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/asxparser/src/asxparser.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 10.1.5.1.3 %
+// Version : %version: 10.1.5.1.4 %
@@ -26,11 +26,11 @@
#include <utf.h>
#include <asxparser.h>
-#include <xmlengdomimplementation.h>
-#include <xmlengdomparser.h>
-#include <xmlengdocument.h>
-#include <xmlengelement.h>
-#include <xmlengnodelist.h>
+#include <xml/dom/xmlengdomimplementation.h>
+#include <xml/dom/xmlengdomparser.h>
+#include <xml/dom/xmlengdocument.h>
+#include <xml/dom/xmlengelement.h>
+#include <xml/dom/xmlengnodelist.h>
#include "AsxParser_debug.h"
--- a/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/collectionhelper/group/mpxcollectionhelper.mmp Tue Aug 24 03:26:23 2010 -0500
@@ -56,9 +56,11 @@
LIBRARY usbman.lib
LIBRARY apgrfx.lib
LIBRARY mpxmetadataextractor.lib
+
+LIBRARY metadatautility.lib
+
#ifdef RD_MPX_TNM_INTEGRATION
LIBRARY thumbnailmanager.lib
-
#endif //RD_MPX_TNM_INTEGRATION
#if defined(ARMCC)
@@ -66,6 +68,3 @@
#elif defined(WINSCW)
deffile ../bwinscw/
#endif
-
-SMPSAFE
-
--- a/mmappcomponents/collectionhelper/inc/mpxcollectioncachedhelper.h Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/collectionhelper/inc/mpxcollectioncachedhelper.h Tue Aug 24 03:26:23 2010 -0500
@@ -618,6 +618,12 @@
* @param aDestination destination media to copt attributes to
*/
void DoAppendMTPL( CMPXMedia& aSrc, CMPXMedia& aDestination );
+
+ /**
+ * Attempt to set missing Metadata info in specific case
+ * @param aMedia media object to be checked and adding the info if needed
+ */
+ void SetMissingMetadataL(CMPXMedia* aMedia);
#ifdef RD_MPX_COLLECTION_CACHE
--- a/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/collectionhelper/src/mpxcollectioncachedhelper.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Extended collection helper with an internal caching array
-* Version : %version: e003sa33#27.1.12.3.4 %
+* Version : %version: da1mmcf#27.1.12.3.5 %
*
*/
@@ -43,9 +43,17 @@
#include "mpxcollectionhelpercommon.h"
#include <mpxmetadataextractor.h>
+#include <MetaDataUtility.h> // for SetMissingMetadataL
+#include <MetaDataFieldContainer.h> // for SetMissingMetadataL
+
// CONSTANTS
const TInt KCacheCount = 10;
+_LIT( K3GPFileExt, ".3gp" );
+_LIT( K3G2FileExt, ".3g2" );
+_LIT( KODFFileExt, ".odf" );
+_LIT( KO4AFileExt, ".o4a" );
+
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -884,6 +892,9 @@
{
case EAdd:
{
+ TRAP( error, SetMissingMetadataL( media ) ); // doing this only before initial add
+ MPX_DEBUG2( "CMPXCollectionCachedHelper::Commit, SetMissingMetadataL, err = %d", error );
+
TRAP(error,
CMPXCollectionHelperImp::AddL( media );
);
@@ -1188,5 +1199,113 @@
aDestination.SetTObjectValueL( KMPXMediaMTPDrmStatus, val );
}
}
+
+// ---------------------------------------------------------------------------
+// Attempt to set missing Metadata info in specific case
+// ---------------------------------------------------------------------------
+//
+void CMPXCollectionCachedHelper::SetMissingMetadataL(CMPXMedia* aMedia)
+ {
+ MPX_FUNC("CMPXCollectionCachedHelper::SetMissingMetadataL");
+
+ const TDesC& path = aMedia->ValueText(KMPXMediaGeneralUri);
+ TParsePtrC parse( path );
+
+ // only do this for file that might not be natively supported by PC
+ if ( ( parse.Ext().CompareF(K3GPFileExt) == 0 )
+ || ( parse.Ext().CompareF(K3G2FileExt) == 0 )
+ || ( parse.Ext().CompareF(KODFFileExt) == 0 )
+ || ( parse.Ext().CompareF(KO4AFileExt) == 0 ) )
+ {
+ TBool isTitleMissing = EFalse;
+ TBool isArtistMissing = EFalse;
+ TBool isAlbumMissing = EFalse;
+
+ if ( aMedia->ValueText( KMPXMediaGeneralTitle ).Length() == 0 )
+ isTitleMissing = ETrue;
+
+ if ( aMedia->ValueText( KMPXMediaMusicArtist ).Length() == 0 )
+ isArtistMissing = ETrue;
+
+ if ( aMedia->ValueText( KMPXMediaMusicAlbum ).Length() == 0 )
+ isAlbumMissing = ETrue;
+
+ MPX_DEBUG4("CMPXCollectionCachedHelper::SetMissingMetadataL, isTitleMissing = %d, isArtistMissing = %d, isAlbumMissing = %d", isTitleMissing, isArtistMissing, isAlbumMissing);
+
+ // only do this if one of the following is missing:
+ // - Title
+ // - Artist
+ // - Album
+ // but can easily be extended to support any category field like: composer, genre
+ if ( isTitleMissing || isArtistMissing || isAlbumMissing )
+ {
+ // metadataextractor should be used instead, but not until CreateMediaL can be called without add/TN of the embedded art
+ // CR is needed to add parameter (TBool aAlbumArtNeeded = ETrue) // ETrue by default, for all existing caller
+ // for now use MDU instead
+ CMetaDataUtility* metadataUtility = CMetaDataUtility::NewL();
+
+ CleanupStack::PushL( metadataUtility );
+ metadataUtility->OpenFileL( path );
+
+ MPX_DEBUG1( "CMPXCollectionCachedHelper::SetMissingMetadataL, CMetaDataUtility::OpenFileL succeed" );
+
+ const CMetaDataFieldContainer& metaCont = metadataUtility->MetaDataFieldsL();
+
+ for ( TInt i = 0; i < metaCont.Count(); i++ )
+ {
+ TMetaDataFieldId fieldType;
+ TMPXAttributeData attribute;
+
+ metaCont.FieldIdAt( i, fieldType ); // get the field type
+
+ switch ( fieldType )
+ {
+ case EMetaDataSongTitle: // fall through
+ case EMetaDataArtist: // fall through
+ case EMetaDataAlbum:
+ {
+ if ( ( isTitleMissing && ( fieldType == EMetaDataSongTitle ) )
+ || ( isArtistMissing && ( fieldType == EMetaDataArtist ) )
+ || ( isAlbumMissing && ( fieldType == EMetaDataAlbum ) ) )
+ {
+ HBufC* value = metaCont.At( i, fieldType ).AllocL();
+ CleanupStack::PushL( value );
+
+ TPtr valptr = value->Des();
+ valptr.Trim();
+
+ // replace '\t' as ' '
+ for ( TInt i = 0; i < value->Length(); i++ )
+ {
+ if ( valptr[i] == TText( '\t' ) )
+ valptr[i] = TText( ' ' );
+ }
+
+ if ( fieldType == EMetaDataSongTitle )
+ attribute = KMPXMediaGeneralTitle;
+ else if ( fieldType == EMetaDataArtist )
+ attribute = KMPXMediaMusicArtist;
+ else
+ attribute = KMPXMediaMusicAlbum;
+
+ MPX_DEBUG3( "fieldType = %d, value = %S", fieldType, &valptr );
+ aMedia->SetTextValueL( attribute , *value );
+ CleanupStack::PopAndDestroy( value );
+ }
+ }
+
+ break;
+
+ default:
+
+ break;
+ }
+ }
+
+ metadataUtility->ResetL();
+ CleanupStack::PopAndDestroy( metadataUtility );
+ }
+ }
+ }
// END OF FILE
--- a/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h Tue Aug 24 03:26:23 2010 -0500
@@ -24,12 +24,12 @@
// Please update the increment number for each increment
// Please update the version number for each schema change
#ifdef ABSTRACTAUDIOALBUM_INCLUDED
-_LIT( KHarvesterDBName, "harvesterdbv10_1.dat" );
-_LIT( KHarvesterDBNameEMMC, "harvesterdbv10_1i.dat" );
+_LIT( KHarvesterDBName, "harvesterdbv10_2.dat" );
+_LIT( KHarvesterDBNameEMMC, "harvesterdbv10_2i.dat" );
#else
-_LIT( KHarvesterDBName, "harvesterdbv10_1n.dat" );
-_LIT( KHarvesterDBNameEMMC, "harvesterdbv10_1in.dat" );
-#endif
+_LIT( KHarvesterDBName, "harvesterdbv10_2n.dat" );
+_LIT( KHarvesterDBNameEMMC, "harvesterdbv10_2in.dat" );
+#endif
_LIT( KHarvesterDBPattern, "harvesterdbv*.dat" );
const TInt KDbMaxTableCreationSQLLength = 1024;
--- a/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Extracts metadata from a file
-* Version : %version: da1mmcf#38.1.4.2.6.1.5.3.6 % << Don't touch! Updated by Synergy at check-out.
+* Version : %version: da1mmcf#38.1.4.2.6.1.5.3.8 % << Don't touch! Updated by Synergy at check-out.
*
*/
@@ -251,6 +251,10 @@
// URL
aMediaProp.SetTextValueL( KMPXMediaMusicURL,
KNullDesC );
+ // AlbumArtist
+ aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtist,
+ KNullDesC );
+
}
// ---------------------------------------------------------------------------
@@ -473,6 +477,18 @@
}
break;
}
+ case EMetaDataAlbumArtist:
+ {
+ TPtr valptr = value->Des();
+ valptr.Trim();
+ TInt vallen = value->Length();
+ if (vallen>0)
+ {
+ FindAndReplaceForbiddenChars(valptr, vallen);
+ iMedia->SetTextValueL(KMPXMediaMusicAlbumArtist, *value);
+ }
+ break;
+ }
case EMetaDataOriginalArtist: // fall through
case EMetaDataVendor: // fall through
case EMetaDataRating: // fall through
@@ -923,7 +939,20 @@
{
TDataType dataType;
TUid dummyUid(KNullUid);
- iAppArc.AppForDocument(iFileName, dummyUid, dataType);
+ // File handle based mime type recogniton required , because AppArc does
+ // not have All Files capa required for files in private folders
+ TDataRecognitionResult result;
+ RFs fs;
+ RFile rFile;
+ User::LeaveIfError(fs.Connect());
+ CleanupClosePushL(fs);
+ User::LeaveIfError(fs.ShareProtected());
+ User::LeaveIfError(rFile.Open(fs, iFileName, EFileShareReadersOrWriters));
+ CleanupClosePushL(rFile);
+ User::LeaveIfError(iAppArc.RecognizeData(rFile, result));
+ CleanupStack::PopAndDestroy(&rFile);
+ CleanupStack::PopAndDestroy(&fs);
+ dataType = result.iDataType;
iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() );
}
--- a/mmappcomponents/playbackhelper/src/streaminglinkmodel.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappcomponents/playbackhelper/src/streaminglinkmodel.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 4 %
+// Version : %version: 4.1.1 %
@@ -559,6 +559,8 @@
TInt size = 0;
TInt result = KErrNone;
+
+ TBool linkadded = EFalse;
if ( aRamFile.Size( size ) == KErrNone && size <= KMaxLinkFileSize )
{
@@ -576,6 +578,8 @@
// Get links from buffer
while ( ret == KErrNone )
{
+ linkadded = EFalse;
+
// Create a linkitem ptr
LinkStruct* linkItem = new( ELeave ) LinkStruct;
CleanupStack::PushL( linkItem );
@@ -593,14 +597,23 @@
{
ptr2.TrimRight();
iLinkArray.Append( linkItem );
+ linkadded = ETrue;
}
}
else
{
iLinkArray.Append( linkItem );
+ linkadded = ETrue;
}
- CleanupStack::Pop(2); // pop the linkItem and the HbufC created for linkItem->link
+ if ( linkadded )
+ {
+ CleanupStack::Pop(2); // pop the linkItem and the HbufC created for linkItem->link
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(2); //pop and destroy linkItem and the HbufC created for linkItem->link
+ }
}
CleanupStack::PopAndDestroy(2); // buffer, recognizer
@@ -636,6 +649,8 @@
iLinkCount = 0;
TInt ret = KErrNone;
+
+ TBool linkadded = EFalse;
if ( aAsxParser )
{
@@ -650,6 +665,9 @@
for (TInt i=1; i <= urlCount; i++)
{
+
+ linkadded = EFalse;
+
// Get the asx struct from the parser
asxItem = aAsxParser->GetUrl(i);
// Set the url to the bufferptr
@@ -677,15 +695,23 @@
{
ptr2.TrimRight();
iLinkArray.Append( linkItem );
+ linkadded = ETrue;
}
}
else
{
iLinkArray.Append( linkItem );
+ linkadded = ETrue;
}
-
- CleanupStack::Pop(2); // pop the linkItem and the HbufC created for linkItem->link
-
+
+ if ( linkadded )
+ {
+ CleanupStack::Pop(2); // pop the linkItem and the HbufC created for linkItem->link
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(2); //pop and destroy linkItem and the HbufC created for linkItem->link
+ }
}
CleanupStack::PopAndDestroy(); //recognizer
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/conf/mpxplaybackutilitytest.cfg Tue Aug 24 03:26:23 2010 -0500
@@ -26,6 +26,12 @@
// Timers
KTimerEndTest 5000 // 5 sec
+// Properties for SetL
+EPbPropertyVolume 0
+EPbPropertyPosition 10
+
+
+
[Enddefine]
@@ -251,3 +257,526 @@
delete pbutil
[Endtest]
+[Test]
+//
+// Test Video play
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play
+//
+title 14 MMPXPlaybackUtilityVideoCommandPlayL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video play, then stop
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Stop
+//
+title 15 MMPXPlaybackUtilityVideoCommandPlayClose(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video play, then pause
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Pause
+//
+title 16 MMPXPlaybackUtilityVideoCommandPlayandPause(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video play, then playpause
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, PlayPause
+//
+title 17 MMPXPlaybackUtilityVideoCommandPlayPause(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video play, then playpause twice
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, PlayPause, PlayPause
+//
+title 18 MMPXPlaybackUtilityVideoCommandPlayPausePlay(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayPauseL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video playcomplete
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Play Complete
+//
+title 19 MMPXPlaybackUtilityVideoCommandPlayComplete(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayCompleteL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video seeking forward
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Seek Forward
+//
+title 20 MMPXPlaybackUtilityVideoCommandSeekForwardPlayState(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandSeekForwardL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video seeking backward
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Seek Backward
+//
+title 21 MMPXPlaybackUtilityVideoCommandSeekBackwardPlayState(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandSeekBackwardL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video seeking forward while paused
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Pause, Seek Forward
+//
+title 22 MMPXPlaybackUtilityVideoCommandSeekForwardPauseState(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandSeekForwardL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video seeking backward while paused
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Pause, Seek Backward
+//
+title 23 MMPXPlaybackUtilityVideoCommandSeekBackwardPauseState(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandSeekBackwardL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video play with RFile64
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - Init64L with RFile64, File MPEG4_VBR_176x144_15fps.3gp
+// - File64L to get RFile64 file handler
+//
+title 24 MMPXPlaybackUtilityVideoFile64PlayL
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInit64L MPEG4_VBR_176x144_15fps.3gp
+pause 1000
+pbutil MMPXPlaybackUtilityFile64L
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video close after stop
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Stop, close
+//
+title 25 MMPXPlaybackUtilityVideoCommandPlayStopClose(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandCloseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video close
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Close
+//
+title 26 MMPXPlaybackUtilityVideoCommandPlayClose(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandCloseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video set position (jump while playing)
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Set Position
+//
+title 27 MMPXPlaybackUtilityVideoSetPosition(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilitySetL EPbPropertyPosition 100
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+
+[Test]
+//
+// Test Video set volume
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Set Volume
+//
+title 28 MMPXPlaybackUtilityVideoSetVolume(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilitySetL EPbPropertyVolume 15
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video play command while already playing
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play
+//
+title 29 MMPXPlaybackUtilityVideoCommandPlayPlayL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video playpause command in stopped state
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Stop, PlayPause
+//
+title 30 MMPXPlaybackUtilityVideoCommandStopPlayPause(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video pause command while already paused
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Pause, Pause
+//
+title 31 MMPXPlaybackUtilityVideoCommandPausePauseL(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video pause command in stopped state
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Stop, Pause
+//
+title 32 MMPXPlaybackUtilityVideoCommandStopPause(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPauseL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video stop command in stopped state
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Play, Stop, Stop
+//
+title 33 MMPXPlaybackUtilityVideoCommandStopStop(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandPlayL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
+
+[Test]
+//
+// Test Video stop command while in buffering state
+// - UtilityL with Mode NewPlayer, Category Video
+// - Add Observer
+// - SelectPlayerL with HelixPlugin UID
+// - InitL with URI, File Battle_160x100_30kbps.rm
+// - Init, Stop
+//
+title 34 MMPXPlaybackUtilityVideoCommandInitStop(uri)
+create mpxplaybackutilitytest pbutil
+pbutil MMPXPlaybackUtilityUtilityWithCatL KMPXCategoryVideo KPbModeNewPlayer
+pbutil MMPXPlaybackUtilityAddObserverL
+pbutil MMPXPlaybackUtilityPlayerManagerSelectPlayerL KVideoHelixPlaybackPluginUid
+pbutil MMPXPlaybackUtilityInitWithUriL Battle_160x100_30kbps.rm
+pause 1000
+pbutil MMPXPlaybackUtilityCommandStopL
+pause KTimerEndTest
+pbutil EndTest
+delete pbutil
+[Endtest]
\ No newline at end of file
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/group/bld.inf Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/group/bld.inf Tue Aug 24 03:26:23 2010 -0500
@@ -28,5 +28,6 @@
PRJ_TESTMMPFILES
#include "../mpxplaybackutilitytest/group/bld.inf"
+#include "../testvideoplaybackplugin/group/bld.inf"
// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/inc/testcollectionplugintype.h Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: define collection collection plugin type enum
+*
+*/
+
+#ifndef TESTCOLLECTIONPLUGINTYPE_H
+#define TESTCOLLECTIONPLUGINTYPE_H
+
+#include "testcommonpluginuids.h"
+
+// Collection Plugin Test Types.
+//
+enum TCollectionTestPluginType
+ {
+ ECollectionTestPluginType = KCollectionTestPluginType,
+ ECollectionTestPluginType2 = KCollectionTestPluginType2,
+ ECollectionTestPluginType3 = KCollectionTestPluginType3
+ };
+
+
+#endif // TESTCOLLECTIONPLUGINTYPE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/inc/testcommonpluginuids.h Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: define commonly used uids
+*
+*/
+
+#ifndef TESTCOMMONPLUGINUIDS_H
+#define TESTCOMMONPLUGINUIDS_H
+
+#define KCollectionTestPlugin 0xE0000101 // dll uid
+#define KCollectionTestPluginImpId 0xE0000102 // implementation uid
+#define KCollectionTestPluginType 0xE0000103 // refer TCollectionTestPluginType
+#define KCollectionTestPlugin2 0xE0000111 // dll uid
+#define KCollectionTestPluginImpId2 0xE0000112 // implementation uid
+#define KCollectionTestPluginType2 0xE0000113 // refer TCollectionTestPluginType
+#define KCollectionTestPlugin3 0xE0000121 // dll uid
+#define KCollectionTestPluginImpId3 0xE0000122 // implementation uid
+#define KCollectionTestPluginType3 0xE0000123 // refer TCollectionTestPluginType
+
+#define KPlaybackTestVideoPlugin 0xE0000201 // dll uid
+#define KPlaybackTestVideoPluginImpId 0xE0000202 // implementation uid
+#define KPlaybackTestPluginType 0xE0000203 // refer TPlaybackTestPluginType
+#define KPlaybackTestPlugin2 0xE0000211 // dll uid
+#define KPlaybackTestPluginImpId2 0xE0000212 // implementation uid
+#define KPlaybackTestPluginType2 0xE0000213 // refer TPlaybackTestPluginType
+#define KPlaybackTestPlugin3 0xE0000221 // dll uid
+#define KPlaybackTestPluginImpId3 0xE0000222 // implementation uid
+#define KPlaybackTestPluginType3 0xE0000223 // refer TPlaybackTestPluginType
+
+#define KViewTestPlugin 0xE0000301 // dll uid
+#define KViewTestPluginImpId 0xE0000302 // implementation uid
+#define KViewTestPluginType 0xE0000303
+
+#define KViewTestPlugin2 0xE0000304 // dll uid
+#define KViewTestPlugin2ImpId 0xE0000305 // implementation uid
+#define KViewTestPluginType2 0xE0000306
+
+#define KViewTestPlugin3 0xE0000307 // dll uid
+#define KViewTestPlugin3ImpId 0xE0000308 // implementation uid
+#define KViewTestPluginType3 0xE0000309
+
+#define KViewTestPlugin4 0xE000030A // dll uid
+#define KViewTestPlugin4ImpId 0xE000030B // implementation uid
+#define KViewTestPluginType4 0xE000030C
+#define KViewTestPlugin4BetterMatch 0xE000030D // dll uid
+#define KViewTestPlugin4BetterMatchImpId 0xE000030E // implementation uid
+#define KViewTestPlugin4BetterMatchCriteria 0xE000030F
+
+#define KViewTestPlugin5Low 0xE0000311 // dll uid
+#define KViewTestPlugin5LowImpId 0xE0000312 // implementation uid
+#define KViewTestPluginType5 0xE0000313
+#define KViewTestPlugin5High 0xE0000314 // dll uid
+#define KViewTestPlugin5HighImpId 0xE0000315 // implementation uid
+
+#define KViewTestPlugin6 0xE0000317 // dll uid
+#define KViewTestPlugin6ImpId 0xE0000318 // implementation uid
+#define KViewTestPluginType6 0xE0000319
+
+
+#define KPlaylistTestPluginM3u 0xE000031A // dll uid
+#define KPlaylistTestPluginM3uImpId 0xE000031B // implementation uid
+
+#endif // TESTCOMMONPLUGINUIDS_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/inc/testplaybackplugintype.h Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: define playback plugin type enum
+*
+*/
+
+#ifndef TESTPLAYBACKPLUGINTYPE_H
+#define TESTPLAYBACKPLUGINTYPE_H
+
+#include "testcommonpluginuids.h"
+
+// Collection Plugin Test Types.
+//
+enum TPlaybackTestPluginType
+ {
+ EPlaybackTestPluginType = KPlaybackTestPluginType,
+ EPlaybackTestPluginType2 = KPlaybackTestPluginType2,
+ EPlaybackTestPluginType3 = KPlaybackTestPluginType3
+ };
+
+
+#endif // TESTPLAYBACKPLUGINTYPE_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/inc/testviewplugintype.h Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: define view plugin type enum
+*
+*/
+
+#ifndef TESTVIEWPLUGINTYPE_H
+#define TESTVIEWPLUGINTYPE_H
+
+#include "testcommonpluginuids.h"
+
+// View Plugin Test Types.
+//
+enum TViewTestPluginType
+ {
+ EViewPluginTypeTest = KViewPluginTypeTest,
+ EViewPluginTypeTest2 = KViewPluginTypeTest2,
+ EViewPluginTypeTest3 = KViewPluginTypeTest3,
+ EViewPluginTypeTest4 = KViewPluginTypeTest4,
+ EViewPluginTypeTest5 = KViewPluginTypeTest5,
+ EViewPluginTypeTest6 = KViewPluginTypeTest6
+ };
+
+enum TViewTestPluginMatchCriteria
+ {
+ EViewPluginMatchCriteria4 = KViewTestPlugin4BetterMatchCriteria
+ };
+
+#endif // TESTVIEWPLUGINTYPE_H
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/bld.inf Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/bld.inf Tue Aug 24 03:26:23 2010 -0500
@@ -25,6 +25,9 @@
PRJ_TESTEXPORTS
// NOTE: If using ARS requirements all export operations should be done under this.
// 'abld test export'
+../../conf/mpxplaybackutilitytest.cfg /epoc32/winscw/c/testframework/mpxplaybackutilitytest.cfg
+../../init/Testframework.ini /epoc32/winscw/c/testframework/testframework.ini
+
PRJ_EXPORTS
// Specify the source file followed by its destination here
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.mmp Tue Aug 24 03:26:23 2010 -0500
@@ -36,7 +36,9 @@
MW_LAYER_SYSTEMINCLUDE
-USERINCLUDE ../inc
+USERINCLUDE ../inc
+
+USERINCLUDE ../../inc
SOURCEPATH ../src
@@ -54,7 +56,9 @@
LIBRARY stiftestengine.lib
LIBRARY mpxplaybackutility.lib
LIBRARY mpxcommon.lib
-LIBRARY mpxcollectionutility.lib
+LIBRARY mpxcollectionutility.lib
+LIBRARY bafl.lib
+
LANG SC
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/group/mpxplaybackutilitytest.pkg Tue Aug 24 03:26:23 2010 -0500
@@ -34,14 +34,8 @@
; Install files
"\epoc32\release\armv5\udeb\mpxplaybackutilitytest.dll" - "!:\Sys\Bin\mpxplaybackutilitytest.dll"
+"\epoc32\release\armv5\udeb\testvideoplaybackplugin.dll" - "!:\Sys\Bin\testvideoplaybackplugin.dll"
+"\epoc32\data\z\resource\plugins\testvideoplaybackplugin.rsc" - "!:\resource\plugins\testvideoplaybackplugin.rsc"
+
"..\..\init\TestFramework.ini" - "c:\testframework\TestFramework.ini"
"..\..\conf\mpxplaybackutilitytest.cfg" - "c:\testframework\mpxplaybackutilitytest.cfg"
-
-"..\..\data\mmc\Battle_160x100_30kbps.rm" - "f:\testing\data\Battle_160x100_30kbps.rm"
-"..\..\data\mmc\20k_H263_WB_176x144_15fps.3gp" - "f:\testing\data\20k_H263_WB_176x144_15fps.3gp"
-"..\..\data\mmc\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4" - "f:\testing\data\30k_MPEG4_AAC_8Khz_176x144_15fps_30secs.mp4"
-"..\..\data\mmc\80k_H264_AAC16M22_176x144_15fps.3gp" - "f:\testing\data\80k_H264_AAC16M22_176x144_15fps.3gp"
-"..\..\data\mmc\DivX_MP3_256x112_30fps_300Kbps.avi" - "f:\testing\data\DivX_MP3_256x112_30fps_300Kbps.avi"
-"..\..\data\mmc\honey_im_home_horror_ad.avi" - "f:\testing\data\honey_im_home_horror_ad.avi"
-"..\..\data\mmc\MPEG4_VBR_176x144_15fps.3gp" - "f:\testing\data\MPEG4_VBR_176x144_15fps.3gp"
-"..\..\data\mmc\XVID_176x144_15fps_261Kbps.avi" - "f:\testing\data\XVID_176x144_15fps_261Kbps.avi"
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytest.h Tue Aug 24 03:26:23 2010 -0500
@@ -40,14 +40,14 @@
_LIT( KmpxplaybackutilitytestLogFile, "mpxplaybackutilitytest.txt" );
_LIT( KmpxplaybackutilitytestLogFileWithTitle, "mpxplaybackutilitytest_[%S].txt" );
// data file
-_LIT( KmpxplaybackutilityTestFilePath, "C:\\testing\\data\\" );
+_LIT( KmpxplaybackutilityTestFilePath, "C:\\" );
#else
-_LIT( KmpxplaybackutilitytestLogPath, "f:\\logs\\testframework\\mpxplaybackutilitytest\\" );
+_LIT( KmpxplaybackutilitytestLogPath, "c:\\logs\\testframework\\mpxplaybackutilitytest\\" );
// Log file
_LIT( KmpxplaybackutilitytestLogFile, "mpxplaybackutilitytest.txt" );
_LIT( KmpxplaybackutilitytestLogFileWithTitle, "mpxplaybackutilitytest_[%S].txt" );
// data file
-_LIT( KmpxplaybackutilityTestFilePath, "f:\\testing\\data\\" );
+_LIT( KmpxplaybackutilityTestFilePath, "c:\\" );
#endif
// FUNCTION PROTOTYPES
@@ -204,6 +204,17 @@
TInt MMPXPlaybackUtilityAddObserverL(CStifItemParser& /*aItem*/);
TInt MMPXPlaybackUtilityRemoveObserverL(CStifItemParser& /*aItem*/);
TInt MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& /*aItem*/);
+
+ TInt MMPXPlaybackUtilityCommandPlayL ( CStifItemParser & /*aItem*/ );
+ TInt MMPXPlaybackUtilityCommandStopL ( CStifItemParser & /*aItem*/ );
+ TInt MMPXPlaybackUtilityCommandPauseL ( CStifItemParser & /*aItem*/);
+ TInt MMPXPlaybackUtilityCommandPlayPauseL ( CStifItemParser & /*Item*/);
+ TInt MMPXPlaybackUtilityCommandPlayCompleteL ( CStifItemParser & /*Item*/);
+ TInt MMPXPlaybackUtilityCommandSeekForwardL ( CStifItemParser & /*Item*/);
+ TInt MMPXPlaybackUtilityCommandSeekBackwardL ( CStifItemParser & /*Item*/);
+ TInt MMPXPlaybackUtilityCommandCloseL ( CStifItemParser & /*Item*/);
+ TInt MMPXPlaybackUtilitySetL(CStifItemParser& /*aItem*/ );
+
TInt EndTest(CStifItemParser& /*aItem*/);
/**
@@ -219,6 +230,8 @@
RFs iFs;
TInt iCallbackError;
RFile iFile;
+ TFileName iFileName;
+
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
RFile64 iFile64;
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytestdefs.h Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/inc/mpxplaybackutilitytestdefs.h Tue Aug 24 03:26:23 2010 -0500
@@ -21,8 +21,26 @@
const TInt KGeneralPlaybackMsgOffset = 0;
const TInt KVideoPlaybackMsgOffset = 100;
const TInt KStifPlaybackMsgOffset = 200;
+
+
+
+
const TInt KMPXMessageStif = 0x20011397;
+//
+// TInt for Command Id
+//
+const TMPXAttributeData KMPXStifPlaybackCommand = { KMPXMessageStif, 0x01 };
+
+
+enum TMPXStifCommand
+{
+ EPbStifPlayComplete,
+ EPbStifSeekForward,
+ EPbStifSeekBackward
+
+};
+
#endif // MPXPLAYBACKUTILITYTESTDEFS_H
--- a/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/mpxplaybackutilitytest/src/mpxplaybackutilitytestBlocks.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -18,6 +18,10 @@
// [INCLUDE FILES] - do not remove
+#include <sysutil.h>
+#include <s32file.h>
+#include <bautils.h>
+
#include <e32svr.h>
#include <StifParser.h>
#include <Stiftestinterface.h>
@@ -32,6 +36,9 @@
#include <mpxcollectionplaylist.h>
#include "mpxplaybackutilitytest.h"
#include "mpxplaybackutilitytestdefs.h"
+#include "testcommonpluginuids.h"
+
+const TUid KPbTestVideoPlugin = {KPlaybackTestVideoPluginImpId};
// ============================ MEMBER FUNCTIONS ===============================
// ---------------------------------------------------------------------------
@@ -40,52 +47,54 @@
// ---------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError )");
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage: Error %d"), aError);
+ if ( !aError )
{
- iLog->Log(_L("Cmpxharvestertest::HandlePlaybackMessage: Error %d"), aError);
- if ( !aError )
- {
TMPXMessageId id( *(aMessage->Value<TMPXMessageId>(KMPXMessageGeneralId)) );
TInt event( *aMessage->Value<TInt>( KMPXMessageGeneralEvent ) );
TInt type( *aMessage->Value<TInt>( KMPXMessageGeneralType ) );
TInt data( *aMessage->Value<TInt>( KMPXMessageGeneralData ) );
if ( KMPXMessageGeneral == id )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() General event = %d type = %d value = %d"),
event, type, data );
RemoveExpectedEventL( KGeneralPlaybackMsgOffset + event, type, data );
- }
+ }
else if ( KMPXMediaIdVideoPlayback == id )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() Video event = %d type = %d value = %d"),
event, type, data );
RemoveExpectedEventL( KVideoPlaybackMsgOffset + event, type, data );
- }
+ }
else if ( KMPXMessageStif )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackMessage() STIF event = %d type = %d value = %d"),
event, type, data );
RemoveExpectedEventL( KStifPlaybackMsgOffset + event, type, data );
- }
- }
- else
- {
- if ( !iCallbackError )
- {
- iCallbackError = aError;
- }
}
}
+ else
+ {
+ if ( !iCallbackError )
+ {
+ iCallbackError = aError;
+ }
+ }
+}
// ---------------------------------------------------------------------------
// Handle playback property.
// ---------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError )
- {
- iLog->Log(_L("Cmpxharvestertest::HandlePropertyL: Property %d, Value %d, Error %d"),
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::HandlePropertyL( TMPXPlaybackProperty aProperty, TInt aValue, TInt aError )");
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePropertyL: Property %d, Value %d, Error %d"),
aProperty, aValue, aError);
- }
+}
// ---------------------------------------------------------------------------
// Method is called continously until aComplete=ETrue, signifying that
@@ -97,18 +106,20 @@
const MDesCArray* aSubPlayers,
TBool aComplete,
TInt aError )
- {
- iLog->Log(_L("Cmpxharvestertest::HandleSubPlayerNamesL: Complete %d, Error %d"), aComplete, aError);
- }
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::HandleSubPlayerNamesL( TUid aPlayer, const MDesCArray* aSubPlayers, TBool aComplete, TInt aError)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandleSubPlayerNamesL: Complete %d, Error %d"), aComplete, aError);
+}
// ---------------------------------------------------------------------------
// Call back of media request.
// ---------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::HandleMediaL( const CMPXMedia& aProperties, TInt aError )
- {
- iLog->Log(_L("Cmpxharvestertest::HandleMediaL: Error %d"), aError);
- }
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::HandleMediaL( const CMPXMedia& aProperties, TInt aError )");
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandleMediaL: Error %d"), aError);
+}
// ---------------------------------------------------------------------------
// Handle completion of a asynchronous command.
@@ -116,9 +127,10 @@
// ---------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::HandlePlaybackCommandComplete( CMPXCommand* aCommandResult, TInt aError )
- {
- iLog->Log(_L("Cmpxharvestertest::HandlePlaybackCommandComplete: Error %d"), aError);
- }
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::HandlePlaybackCommandComplete( CMPXCommand* aCommandResult, TInt aError )");
+ iLog->Log(_L("Cmpxplaybackutilitytest::HandlePlaybackCommandComplete: Error %d"), aError);
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::Delete
@@ -127,15 +139,26 @@
// -----------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::Delete()
- {
- iMPXPlaybackUtility->Close();
+{
+ TInt delerr = KErrNone;
+
+ iMPXPlaybackUtility->Close();
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
iFile64.Close();
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
iFile.Close();
+
+ if ( BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ User::After( 1000000 * 10 );
+ delerr = BaflUtils::DeleteFile(iFs,iFileName);
+ iLog->Log(_L("deleting tempfile delerr=%d"),delerr);
+ }
iFs.Close();
iExpectedEventArray->ResetAndDestroy();
- }
+
+}
+
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::CreateL
@@ -144,21 +167,22 @@
// -----------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::CreateL()
- {
+{
iFs.Connect();
iFs.ShareProtected();
iExpectedEventArray = new (ELeave) CArrayPtrFlat<TMpxPlaybackTestEvent>( 1 );
iCallbackError = KErrNone;
iMPXPlaybackUtility = NULL;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::AddExpectedEventL
// -----------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::AddExpectedEventL( TInt aEvent, TInt aType, TInt aData )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::AddExpectedEventL( TInt aEvent, TInt aType, TInt aData )");
iLog->Log(_L("Cmpxplaybackutilitytest::AddExpectedEventL() event = %d type = %d value = %d"),
aEvent, aType, aData );
@@ -167,24 +191,25 @@
event->iType = aType;
event->iData = aData;
iExpectedEventArray->AppendL( event );
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::RemoveExpectedEventL
// -----------------------------------------------------------------------------
//
void Cmpxplaybackutilitytest::RemoveExpectedEventL( TInt aEvent, TInt aType, TInt aData )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::RemoveExpectedEventL( TInt aEvent, TInt aType, TInt aData )");
iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d type = %d value = %d"),
aEvent, aType, aData );
if ( (iExpectedEventArray->Count() > 0) &&
- ((*iExpectedEventArray)[0]->iEvent == aEvent) )
- {
+ ((*iExpectedEventArray)[0]->iEvent == aEvent) && ((*iExpectedEventArray)[0]->iType == aType))
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::RemoveExpectedEventL() event = %d removed."), aEvent);
iExpectedEventArray->Delete( 0 );
- }
}
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::RunMethodL
@@ -192,9 +217,9 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::RunMethodL( CStifItemParser& aItem )
- {
+{
static TStifFunctionInfo const KFunctions[] =
- {
+ {
// Copy this line for every implemented function.
// First string is the function name used in TestScripter script file.
// Second is the actual implementation member function.
@@ -216,14 +241,25 @@
ENTRY( "MMPXPlaybackUtilityAddObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL ),
ENTRY( "MMPXPlaybackUtilityRemoveObserverL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL ),
ENTRY( "MMPXPlaybackUtilityPlayerManagerSelectPlayerL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL ),
+
+ ENTRY( "MMPXPlaybackUtilityCommandPlayL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayL ),
+ ENTRY( "MMPXPlaybackUtilityCommandStopL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandStopL ),
+ ENTRY( "MMPXPlaybackUtilityCommandPauseL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPauseL ),
+ ENTRY( "MMPXPlaybackUtilityCommandPlayPauseL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayPauseL ),
+ ENTRY( "MMPXPlaybackUtilityCommandPlayCompleteL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayCompleteL ),
+ ENTRY( "MMPXPlaybackUtilityCommandSeekForwardL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekForwardL ),
+ ENTRY( "MMPXPlaybackUtilityCommandSeekBackwardL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekBackwardL ),
+ ENTRY( "MMPXPlaybackUtilityCommandCloseL", Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandCloseL ),
+ ENTRY( "MMPXPlaybackUtilitySetL", Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL),
+
ENTRY( "EndTest", Cmpxplaybackutilitytest::EndTest ),
- };
+ };
const TInt count = sizeof( KFunctions ) /
sizeof( TStifFunctionInfo );
return RunInternalL( KFunctions, count, aItem );
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL
@@ -232,28 +268,29 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL( CStifItemParser& aItem )
- {
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL"));
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL( CStifItemParser& aItem )");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL"));
TInt err = KErrNone;
TInt mode;
if ( aItem.GetNextInt(mode) != KErrNone )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityNewL - Missing playback mode."));
err = KErrArgument;
return err;
- }
+ }
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: mode %d"), mode);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL: mode %d"), mode);
TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL(TUid::Uid(mode), this ));
if (err!= KErrNone)
- {
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewL: error %d"), err);
- }
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewL: error %d"), err);
+ }
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL
@@ -262,35 +299,36 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL"));
TInt err = KErrNone;
TInt mode;
TInt category;
if ( aItem.GetNextInt(category) != KErrNone )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category."));
err = KErrArgument;
return err;
- }
+ }
if ( aItem.GetNextInt(mode) != KErrNone )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing playback mode."));
err = KErrArgument;
return err;
- }
+ }
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: category %d"), category);
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: mode %d"), mode);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL: category %d"), category);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL: mode %d"), mode);
TRAP( err,iMPXPlaybackUtility = MMPXPlaybackUtility::NewL((TMPXCategory)category, TUid::Uid(mode), this ));
if (err!= KErrNone)
- {
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityNewWithCatL: error %d"), err);
- }
+ {
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityNewWithCatL: error %d"), err);
+ }
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL
@@ -299,26 +337,27 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL"));
TInt err = KErrNone;
TInt mode = 0;
aItem.GetNextInt(mode);
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: mode %d"), mode);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL: mode %d"), mode);
if ( mode )
- {
+ {
TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL(TUid::Uid(mode)));
- }
+ }
else
- {
+ {
TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL());
- }
+ }
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityL: error %d"), err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityL: error %d"), err);
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL
@@ -327,35 +366,36 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL"));
TInt err = KErrNone;
TInt category;
TInt mode = 0;
if ( aItem.GetNextInt(category) != KErrNone )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityNewWithCatL - Missing category."));
err = KErrArgument;
return err;
- }
+ }
aItem.GetNextInt(mode);
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: category %d"), category);
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: mode %d"), mode);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL: category %d"), category);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL: mode %d"), mode);
if ( mode )
- {
+ {
TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category, TUid::Uid(mode)));
- }
+ }
else
- {
+ {
TRAP(err,iMPXPlaybackUtility = MMPXPlaybackUtility::UtilityL((TMPXCategory)category));
- }
+ }
- iLog->Log(_L("Cmpxharvestertest::MMPXPlaybackUtilityUtilityWithCatL: error %d"), err);
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityUtilityWithCatL: error %d"), err);
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL
@@ -364,7 +404,8 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL( CStifItemParser& /*aItem*/ )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL( CStifItemParser& )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL"));
TInt err = KErrNone;
CMPXCollectionPlaylist* playlist = CMPXCollectionPlaylist::NewL();
@@ -373,7 +414,7 @@
CleanupStack::PopAndDestroy(playlist);
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithPlaylistL - error=%d"),err);
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL
@@ -382,35 +423,60 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL"));
- TInt err = KErrNone;
+ TInt err = KErrNone;
TPtrC string;
-
+
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
+
if( aItem.GetNextString( string ) == KErrNone )
- {
- TBuf<120> uri;
+ {
+ //TBuf<120> uri;
+ TFileName uri;
uri.Append(KmpxplaybackutilityTestFilePath);
uri.Append(string);
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - uri = %S."), &uri);
+ iFileName = uri;
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile.Create( iFs, uri, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile.Close();
+ }
+
TRAP(err,iMPXPlaybackUtility->InitL(uri));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - error=%d"),err);
}
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithUriL - error=%d"),err);
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInitWithUriL - Missing file name."));
err = KErrArgument;
- }
+ }
+
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL
@@ -419,43 +485,68 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL"));
TInt err = KErrNone;
TPtrC string;
+
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
if( aItem.GetNextString( string ) == KErrNone )
- {
+ {
TBuf<120> KFrom;
KFrom.Append(KmpxplaybackutilityTestFilePath);
KFrom.Append(string);
+ iFileName = KFrom;
+
if ( iFile.SubSessionHandle() )
- {
+ {
iFile.Close();
- }
+ }
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile.Create( iFs, KFrom, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile.Close();
+ }
+
err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
+
if ( err == KErrNone )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - Open passed."));
TRAP(err,iMPXPlaybackUtility->InitL(iFile));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
}
+ }
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitWithRFileL - error=%d"),err);
- }
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInitWithRFileL - Missing file name."));
err = KErrArgument;
- }
+ }
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL
@@ -464,36 +555,60 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL"));
TInt err = KErrNone;
TPtrC string;
TInt accessPoint = 1;
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
+
if( aItem.GetNextString( string ) == KErrNone )
- {
+ {
TBuf<120> uri;
uri.Append(KmpxplaybackutilityTestFilePath);
uri.Append(string);
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - uri = %S."), &uri);
+ iFileName = uri;
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile.Create( iFs, uri, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile.Close();
+ }
+
TRAP(err,iMPXPlaybackUtility->InitStreamingL(uri, NULL, accessPoint));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
- iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - error=%d"),err);
+
}
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithUriL - error=%d"),err);
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithUriL - Missing file name."));
err = KErrArgument;
- }
+ }
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL
@@ -502,44 +617,69 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL"));
TInt err = KErrNone;
TPtrC string;
TInt accessPoint = 1;
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
+
if( aItem.GetNextString( string ) == KErrNone )
- {
+ {
TBuf<120> KFrom;
KFrom.Append(KmpxplaybackutilityTestFilePath);
KFrom.Append(string);
+ iFileName = KFrom;
+
if ( iFile.SubSessionHandle() )
- {
+ {
iFile.Close();
- }
+ }
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile.Create( iFs, KFrom, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile.Close();
+ }
+
err = iFile.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
if ( err == KErrNone )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - Open passed."));
TRAP(err,iMPXPlaybackUtility->InitStreamingL(iFile, accessPoint));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
+
}
+ }
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreamingWithRFileL - error=%d"),err);
- }
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInitStreamingWithRFileL - Missing file name."));
err = KErrArgument;
- }
+ }
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L
@@ -548,7 +688,8 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -557,39 +698,64 @@
#else // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
TPtrC string;
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
+
if( aItem.GetNextString( string ) == KErrNone )
- {
+ {
TBuf<120> KFrom;
KFrom.Append(KmpxplaybackutilityTestFilePath);
KFrom.Append(string);
+ iFileName = KFrom;
+
if ( iFile64.SubSessionHandle() )
- {
+ {
iFile64.Close();
- }
+ }
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile64.Create( iFs, KFrom, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile64.Close();
+ }
+
err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
+
if ( err == KErrNone )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - Open passed."));
TRAP(err,iMPXPlaybackUtility->Init64L(iFile64));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
+
}
+ }
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInit64L - error=%d"),err);
- }
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInit64L - Missing file name."));
err = KErrArgument;
- }
+ }
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L
@@ -598,7 +764,8 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L( CStifItemParser& aItem )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L( CStifItemParser& aItem )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -608,39 +775,63 @@
TPtrC string;
TInt accessPoint = 1;
+ MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
+ MMPXPlayer* player = manager.CurrentPlayer();
+
if( aItem.GetNextString( string ) == KErrNone )
- {
+ {
TBuf<120> KFrom;
KFrom.Append(KmpxplaybackutilityTestFilePath);
KFrom.Append(string);
+ iFileName = KFrom;
+
if ( iFile64.SubSessionHandle() )
- {
+ {
iFile64.Close();
- }
+ }
+
+ if ( ! BaflUtils::FileExists( iFs, iFileName ) )
+ {
+ err = iFile64.Create( iFs, KFrom, EFileShareAny );
+ iLog->Log(_L("creating tempfile error=%d"),err);
+ iFile64.Close();
+ }
+
err = iFile64.Open(iFs, KFrom, EFileRead | EFileShareReadersOrWriters);
+
if ( err == KErrNone )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - Open passed."));
TRAP(err,iMPXPlaybackUtility->InitStreaming64L(iFile64, accessPoint));
if ( !err )
- {
+ {
TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPlayerChanged;
AddExpectedEventL(event, 0, 0);
+
event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EInitializeComplete;
AddExpectedEventL(event, 0, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateInitialised, 0);
+
+ if ( player->UidL() == KPbTestVideoPlugin )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateBuffering, 0);
}
}
+ }
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityInitStreaming64L - error=%d"),err);
- }
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityInitStreaming64L - Missing file name."));
err = KErrArgument;
- }
+ }
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L
@@ -649,7 +840,8 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L( CStifItemParser& /*aItem*/ )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L( CStifItemParser& )");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L"));
TInt err = KErrNone;
#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -659,13 +851,13 @@
RFile64* file64Ptr=NULL;
TRAP(err, file64Ptr=iMPXPlaybackUtility->Source()->File64L());
if ( !file64Ptr->SubSessionHandle() )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityFile64L - file64 = NULL."));
- }
+ }
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityFile64L - error=%d"),err);
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL
@@ -674,13 +866,14 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL( CStifItemParser& /*aItem*/ )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL( CStifItemParser&)");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL"));
TInt err = KErrNone;
TRAP(err, iMPXPlaybackUtility->AddObserverL(*this));
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityAddObserverL - error=%d"),err);
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL
@@ -689,13 +882,14 @@
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL( CStifItemParser& /*aItem*/ )
- {
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL( CStifItemParser&)");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL"));
TInt err = KErrNone;
TRAP(err, iMPXPlaybackUtility->RemoveObserverL(*this));
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityRemoveObserverL - error=%d"),err);
return err;
- }
+}
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL
@@ -703,51 +897,499 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& aItem)
- {
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL( CStifItemParser& aItem )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL(CStifItemParser& aItem)");
iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityPlayerManagerSelectPlayerL"));
TInt uidInt;
TInt err = KErrNone;
// read in UID
if ( aItem.GetNextInt(uidInt) != KErrNone )
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - Missing UID."));
err = KErrArgument;
return err;
- }
+ }
iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - UID = 0x%x."), uidInt);
if ( iMPXPlaybackUtility )
- {
+ {
MMPXPlayerManager& manager = iMPXPlaybackUtility->PlayerManager();
- TRAP( err, manager.SelectPlayerL( TUid::Uid(uidInt) ) );
+
+ if (uidInt == 0x10282551)
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL video uid"));
+ MPX_DEBUG2(("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - uidInt = %d."), uidInt);
+ TRAP( err, manager.SelectPlayerL( KPbTestVideoPlugin ) );
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL NOT video uid"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityPlayerManagerSelectPlayerL NOT video uid"));
+ TRAP( err, manager.SelectPlayerL( TUid::Uid(uidInt) ) );
+ }
iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - SelectPlayer err = %d."), err);
- }
+ }
else
- {
+ {
iLog->Log(_L("MMPXPlaybackUtilityPlayerManagerSelectPlayerL - MPX Playback Utility not created."));
err = KErrGeneral;
+ }
+ return err;
+}
+
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayL"));
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralType, EPbCmdPlay);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayL err from commandl: , err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandPlayL err from commandl: , err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayL no error from commandl:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPlayL no err from commandl:"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ if ( s != EPbStatePlaying )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePlaying, 0);
}
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
return err;
+}
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandStopL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandStopL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandStopL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandStopL"));
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralType, EPbCmdStop);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandStopL err from commandl: , err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandStopL err from commandl: , err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandStopL no error from commandl:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandStopL no err from commandl:"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ if ( s != EPbStateStopped )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateStopped, 0);
+ }
+
}
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPauseL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPauseL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPauseL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPauseL"));
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralType, EPbCmdPause);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPauseL err from commandl: , err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandPauseL err from commandl: , err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPauseL no error from commandl:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPauseL no err from commandl:"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ if ( s == EPbStatePlaying )
+ {
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePaused, 0);
+ }
+
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayPauseL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayPauseL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayPauseL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayPauseL"));
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralType, EPbCmdPlayPause);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayPauseL err from commandl: err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandPlayPauseL err from commandl: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayPauseL no error from commandl"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPlayPauseL no error from commandl"));
+
+
+
+ if (s == EPbStatePlaying)
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayPauseL EPbStatePlaying:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPlayPauseL EPbStatePlaying:"));
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePaused, 0);
+ }
+ else
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayPauseL State is not playing:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPlayPauseL State is not playing:"));
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePlaying, 0);
+ }
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayCompleteL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayCompleteL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayCompleteL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandPlayCompleteL"));
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXMessageStif);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+ cmd->SetTObjectValueL<TMPXStifCommand>( KMPXStifPlaybackCommand,
+ EPbStifPlayComplete );
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayCompleteL error from commandl: err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandPlayCompleteL error from commandl: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandPlayCompleteL no error from commandl"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandPlayCompleteL no error from commandl"));
+
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPropertyChanged;
+ AddExpectedEventL(event, EPbPropertyPosition, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateStopped, 0);
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekForwardL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekForwardL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekForwardL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekForwardL"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXMessageStif);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TMPXStifCommand>( KMPXStifPlaybackCommand,
+ EPbStifSeekForward );
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, s);
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandSeekForwardL error from commandl: err = %d"), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandSeekForwardL error from commandl: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandSeekForwardL no error from commandl"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandSeekForwardL no error from commandl"));
+
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePluginSeeking, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPropertyChanged;
+ AddExpectedEventL(event, EPbPropertyPosition, 0);
+
+ if ( s == EPbStatePlaying )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePlaying, 0);
+ }
+ else if ( s == EPbStatePaused )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePaused, 0);
+ }
+ }
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekBackwardL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekBackwardL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekBackwardL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandSeekBackwardL"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXMessageStif);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TMPXStifCommand>( KMPXStifPlaybackCommand,
+ EPbStifSeekBackward );
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, s);
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandSeekBackwardL error from commandl: err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandSeekBackwardL error from commandl: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandSeekForwardL no error from commandl"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandSeekForwardL no error from commandl"));
+
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePluginSeeking, 0);
+
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPropertyChanged;
+ AddExpectedEventL(event, EPbPropertyPosition, 0);
+
+ if ( s == EPbStatePlaying )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePlaying, 0);
+ }
+ else if ( s == EPbStatePaused )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStatePaused, 0);
+ }
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandCloseL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandCloseL( CStifItemParser& /*aItem*/ )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandCloseL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilityCommandCloseL"));
+
+ TMPXPlaybackState s = iMPXPlaybackUtility->StateL();
+
+ //create command
+ CMPXCommand* cmd = CMPXCommand::NewL();
+ CleanupStack::PushL( cmd );
+
+ cmd->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KMPXCommandIdPlaybackGeneral);
+ cmd->SetTObjectValueL<TBool>(KMPXCommandGeneralDoSync, ETrue);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralType, EPbCmdClose);
+ cmd->SetTObjectValueL<TInt>(KMPXCommandPlaybackGeneralData, 0);
+
+ TRAPD(err,iMPXPlaybackUtility->CommandL( *cmd ));
+
+ iLog->Log(_L("MMPXPlaybackUtilityCommandCloseL err from commandl: err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilityCommandCloseL err from commandl: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilityCommandCloseL no error from commandl:"));
+ MPX_DEBUG1(("MMPXPlaybackUtilityCommandCloseL no err from commandl:"));
+
+ TInt event;
+
+ if ( s != EPbStateStopped )
+ {
+ event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EStateChanged;
+ AddExpectedEventL(event, EPbStateStopped, 0);
+ }
+ }
+
+ CleanupStack::PopAndDestroy (cmd);
+
+ return err;
+}
+
+
+// -----------------------------------------------------------------------------
+// Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL
+// -----------------------------------------------------------------------------
+//
+TInt Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL( CStifItemParser& aItem )
+{
+ MPX_FUNC_EX("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL(CStifItemParser&)");
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL"));
+
+ TInt err = KErrNone;
+ TInt property;
+ TInt value;
+
+
+ if( aItem.GetNextInt( property ) != KErrNone )
+ {
+ MPX_DEBUG1(("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL missing property " ));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL missing property " ));
+ err = KErrArgument;
+ return err;
+ }
+
+ if ( aItem.GetNextInt( value ) != KErrNone)
+ {
+ MPX_DEBUG1(("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL missing value " ));
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL missing value " ));
+ err = KErrArgument;
+ return err;
+ }
+
+ MPX_DEBUG3(("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL property = %d, value = %d"), property, value );
+ iLog->Log(_L("Cmpxplaybackutilitytest::MMPXPlaybackUtilitySetL property = %d, value %d") , property, value );
+
+ TRAP(err, iMPXPlaybackUtility->SetL((TMPXPlaybackProperty)property, value ));
+
+ iLog->Log(_L("MMPXPlaybackUtilitySetL err from SetL: err = %d."), err);
+ MPX_DEBUG2(("MMPXPlaybackUtilitySetL err from SetL: err = %d."), err);
+
+ if ( !err )
+ {
+ iLog->Log(_L("MMPXPlaybackUtilitySetL no error from SetL"));
+ MPX_DEBUG1(("MMPXPlaybackUtilitySetL no err from SetL"));
+
+ TInt event = KGeneralPlaybackMsgOffset + TMPXPlaybackMessage::EPropertyChanged;
+ AddExpectedEventL(event, property, value);
+ }
+
+ return err;
+}
+
// -----------------------------------------------------------------------------
// Cmpxplaybackutilitytest::EndTest
// -----------------------------------------------------------------------------
//
TInt Cmpxplaybackutilitytest::EndTest( CStifItemParser& /*aItem*/ )
- {
+{
iLog->Log(_L("Cmpxplaybackutilitytest::EndTest"));
TInt err = iCallbackError;
// check if event queue is empty
if ( !err && (iExpectedEventArray->Count() > 0 ) )
- {
+ {
iLog->Log(_L("Cmpxplaybackutilitytest::EndTest error = KErrTimedOut"));
err = KErrTimedOut;
- }
+ }
+
return err;
- }
+}
// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/data/e0000201.rss Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Resource file
+*
+*/
+
+/*
+ * The opaque_data syntax is made up of three parts:
+ * a list of Uids for resolving the view plugin, feature flags, priority.
+ *
+ * <p>uid1;uid2;uid3</p>
+ * uid*: Supported plugin types.
+ * E.g. if podcast plugin may support music plugin as well,
+ * KMPXColPluginMusic
+ *
+ * <t>uid</t>
+ * uid: plugin type uid.
+ * E.g. for music plugin will be: 0x101FFCDA
+ *
+ * <f>flags</f> [optional]
+ * flags: sum of the required feature flags, not used now
+ *
+ * <i>priority</i> [optional]
+ * priority: a value of type TMPXCollectionPluginPriorities. This value
+ * determines the returning order when several plugins can
+ * support the same set of Uids.
+ * Default value of this field is EMPXCollectionPluginPriorityNormal.
+ */
+
+#include <Ecom/RegistryInfo.rh>
+#include <mpxplaybackplugin.hrh>
+#include "testcommonpluginuids.h"
+#include "testplaybackplugintype.h"
+
+RESOURCE REGISTRY_INFO theInfo
+{
+ dll_uid = KPlaybackTestVideoPlugin;
+
+ interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = KMPXPlaybackPluginInterfaceUid;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = KPlaybackTestVideoPluginImpId;
+ version_no = 1;
+ display_name = "TestVideoPlaybackPlugin";
+ default_data = "";
+ opaque_data =
+ "<s><e>"
+ "<t>"EPbUnknown"</t>"
+ "<i>"EMPXPlaybackPluginPriorityHighest"</i>"
+ "<z>"MPXPlaybackPluginVersion2"</z>";
+ }
+ };
+ }
+ };
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/group/bld.inf Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information file for Playback test plugin
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_TESTMMPFILES
+testvideoplaybackplugin.mmp
+
+PRJ_MMPFILES
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/group/testvideoplaybackplugin.mmp Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Playback test plugin project specification
+*
+*/
+
+#include <bldvariant.hrh>
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+#include "../../inc/testcommonpluginuids.h"
+
+TARGET testvideoplaybackplugin.dll
+TARGETTYPE PLUGIN
+UID 0x10009D8D KPlaybackTestVideoPlugin
+
+VENDORID VID_DEFAULT
+CAPABILITY CAP_ECOM_PLUGIN
+
+SOURCEPATH ../src
+SOURCE testvideoplaybackplugin.cpp
+
+SOURCEPATH ../data
+START RESOURCE e0000201.RSS
+TARGET testvideoplaybackplugin.rsc
+END
+
+USERINCLUDE ../inc
+USERINCLUDE ../../inc
+USERINCLUDE ../../mpxplaybackutilitytest/inc
+
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY ecom.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY BAFL.lib
+LIBRARY flogger.lib
+LIBRARY mpxcommon.lib
+
+SOURCEPATH ../src
+SOURCE testvideoplaybackpluginproxy.cpp
+
+//end of file
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/inc/testvideoplaybackplugin.h Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of testvideoplaybackplugin interface
+*
+*/
+
+#ifndef _CTESTVIDEOPLAYBACKPLUGIN_H_
+#define _CTESTVIDEOPLAYBACKPLUGIN_H_
+
+//
+// INCLUDES
+//
+#include <e32base.h>
+
+#include <mpxplaybackplugin.h>
+#include <mpxplaybackpluginversion2.h>
+#include <mpxplaybackengineobserver.h>
+#include <mpxvideoplaybackdefs.h>
+
+#include "mpxplaybackutilitytest.h"
+
+
+
+
+#include <e32svr.h>
+#include <stifparser.h>
+#include <stiftestinterface.h>
+
+#include <mpxmediageneraldefs.h>
+#include <mpxcommandgeneraldefs.h>
+#include <mmf/common/mmferrors.h>
+#include <mpxplaybackpluginversion2.h>
+#include <mpxmessagegeneraldefs.h>
+
+#include <accpolnamevaluerecord.h>
+#include <accconfigfileparser.h>
+#include <acccongenericid.h>
+#include <accpolnamevaluerecord.h>
+
+#include <mpxvideoplaybackdefs.h>
+#include "mpxmediavideodefs.h"
+
+typedef struct
+{
+ TInt iEvent;
+ TInt iData;
+ TInt iError;
+} TTestVideoPlaybackCallbackEvent;
+
+typedef CArrayPtrFlat<TTestVideoPlaybackCallbackEvent> CCallbackArray;
+
+//
+// CLASS DECLARATION
+//
+
+/*
+ * CTestVideoPlaybackPlugin class
+ *
+ */
+
+NONSHARABLE_CLASS( CTestVideoPlaybackPlugin ) : public CMPXPlaybackPluginVersion2
+
+{
+ public:
+ //
+ // Constructors and destructor
+ //
+
+ /*
+ * Two-phased constructor.
+ * @param aInitParams, initialization parameter
+ * @return a pointer to the created instance
+ */
+ static CTestVideoPlaybackPlugin* NewL(TAny* aInitParams);
+
+ /*
+ * Destructor
+ * Destroy the object and release all memory objects
+ */
+ ~CTestVideoPlaybackPlugin();
+
+ /*
+ * Returns the current file handle iFile
+ */
+ RFile GetFileHandle();
+
+ /**
+ * Initializes a file for playback.
+ *
+ * @since S60 9.2
+ * @param aUri URI of the item
+ * @param aType the mime type of the item
+ * @param aAccessPoint the access point
+ */
+ void InitStreamingL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint, TInt aPosition);
+
+ /**
+ * Initializes a file handle for playback.
+ *
+ * @since S60 9.2
+ * @param aFile file handle of a file
+ * @param aAccessPoint the access point
+ */
+ void InitStreamingL(RFile& aFile, TInt aAccessPoint, TInt aPosition);
+
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+ /**
+ * Initializes a file handle for playback.
+ *
+ * @since S60 9.2
+ * @param aFile 64 bit file handle of a file
+ * @param aAccessPoint the access point
+ */
+ void InitStreaming64L(RFile64& aFile, TInt aAccessPoint, TInt aPosition);
+
+ /**
+ * Initializes a song for playback.
+ *
+ * @since S60 9.2
+ * @param aFile 64 bit file handle of a song
+ */
+ void Initialise64L(RFile64& aFile, TInt aPosition);
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+ /**
+ * Initializes a song for playback.
+ *
+ * @since S60 9.2
+ * @param aSong the song path
+ * @param aPosition the starting position
+ */
+ virtual void InitialiseWithPositionL(const TDesC& aSong, TInt aPosition = 0 );
+
+ /**
+ * Initializes a song for playback.
+ *
+ * @since S60 9.2
+ * @param aFile file handle of a song
+ * @param aPosition the starting position
+ */
+ virtual void InitialiseWithPositionL(RFile& aSong, TInt aPosition = 0);
+
+ //runl for active object
+ void RunL();
+
+ void DoCancel();
+
+ private:
+ //
+ // CMPXPlaybackPlugin Implementation
+ //
+
+ /*
+ * Set observer
+ *
+ * @param aObs observer
+ */
+ void SetObserver( MMPXPlaybackPluginObserver& aObs );
+
+ /*
+ * Initializes a clip for playback
+ * @param aSong the song path
+ */
+ void InitialiseL( const TDesC& aSong );
+
+ /*
+ * Initializes a song for playback
+ * @param aFile file handle of a song
+ */
+ void InitialiseL( RFile& aFile );
+
+ /*
+ * Executes a command on the selected song
+ * @param aCmd a command
+ * @param aData, data
+ */
+ void CommandL( CMPXCommand& aCmd );
+
+ // Supposedly being deprecated
+ // We're forced to implement this as its declared as a
+ // pure virtual function by the MPX framework
+ void CommandL(TMPXPlaybackCommand aCmd, TInt aData=0);
+
+ /*
+ * Sets a property of the plugin
+ * @param aProperty a property
+ * @param aValue the value of the setting
+ */
+ void SetL( TMPXPlaybackProperty aProperty , TInt aValue );
+
+ /*
+ * Gets a property of the plugin (async)
+ * @param aProperty a property
+ */
+ void PropertyL( TMPXPlaybackProperty aProperty ) const;
+
+ /*
+ * Gets a list of sub players
+ * @return a list of names of sub players
+ */
+ void SubPlayerNamesL();
+
+ /*
+ * Select a sub player
+ * @param aIndex index to the sub player
+ */
+ void SelectSubPlayerL( TInt aIndex );
+
+ /*
+ * Returns current sub player name
+ * @return friendly name of the current the sub player
+ */
+ const TDesC& SubPlayerName();
+
+ /*
+ * Current sub player index
+ * @return index to the sub player
+ */
+ TInt SubPlayerIndex() const;
+
+ /*
+ * Media properties of the current file (async)
+ * @param aAttrs attributes requested
+ */
+ void MediaL( const TArray<TMPXAttribute>& aAttrs );
+
+ /*
+ * Cancel async request
+ */
+ void CancelRequest();
+
+ private:
+ /*
+ * C++ default constructor
+ */
+ CTestVideoPlaybackPlugin();
+
+ /*
+ * the second phase constructor ConstructL to safely construct things
+ * that can leave
+ */
+ void ConstructL();
+
+ void AddCallbackEvent( TTestVideoPlaybackCallbackEvent* event );
+ static TInt SendEvent( TAny* aPtr );
+ void DoSendEvent();
+
+ private:
+
+ HBufC* iClipName;
+ RFs iFs;
+ RFile iFile;
+ CIdle* iCallback; //active object
+ CCallbackArray* iEventArray;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/src/testvideoplaybackplugin.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,793 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: CTestVideoPlaybackPlugin implementation
+*
+*/
+
+//
+// INCLUDE FILES
+//
+#include <apgcli.h>
+#include <e32cmn.h>
+#include <mpxmediageneraldefs.h>
+#include <mpxcommandgeneraldefs.h>
+#include <mpxmessagegeneraldefs.h>
+#include <mpxplaybackcommanddefs.h>
+#include <mpxvideoplaybackdefs.h>
+#include <mpxplaybackpluginobserver.h>
+#include <mpxplaybackplugin.h>
+#include <mpxlog.h>
+#include <mpxmedia.h>
+
+#include "testvideoplaybackplugin.h"
+#include "mpxplaybackutilitytestdefs.h"
+#include "mpxplaybackutilitytest.h"
+
+
+//
+// CONSTANTS
+//
+const TUid KLocalPlaybackUid = { 0x10282556 };
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------------------------------
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CTestVideoPlaybackPlugin* CTestVideoPlaybackPlugin::NewL( TAny* /*aInitParams*/ )
+{
+
+ CTestVideoPlaybackPlugin* p = new (ELeave) CTestVideoPlaybackPlugin();
+ CleanupStack::PushL(p);
+ p->ConstructL();
+ CleanupStack::Pop(p);
+ return p;
+}
+
+// ----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::ConstructL()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::ConstructL()");
+ User::LeaveIfError( iFs.Connect() );
+ iFs.ShareProtected();
+
+ iEventArray = new (ELeave) CArrayPtrFlat<TTestVideoPlaybackCallbackEvent>( 1 );
+ iCallback = CIdle::NewL( CActive::EPriorityLow );
+}
+
+// ----------------------------------------------------------------------------
+// C++ constructor
+// ----------------------------------------------------------------------------
+//
+CTestVideoPlaybackPlugin::CTestVideoPlaybackPlugin()
+
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::CTestVideoPlaybackPlugin()");
+}
+
+// ----------------------------------------------------------------------------
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CTestVideoPlaybackPlugin::~CTestVideoPlaybackPlugin()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::~CTestVideoPlaybackPlugin()");
+ iFile.Close();
+ iFs.Close();
+
+ if ( iCallback->IsActive() )
+ {
+ iCallback->Cancel();
+ }
+
+ delete iCallback;
+
+ iEventArray->ResetAndDestroy();
+}
+
+// ----------------------------------------------------------------------------
+// Set observer
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::SetObserver( MMPXPlaybackPluginObserver& aObs )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::SetObserver( MMPXPlaybackPluginObserver& aObs )");
+ iObs = &aObs;
+}
+
+// ----------------------------------------------------------------------------
+// Initializes a clip for playback from a file name
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::InitialiseL( const TDesC& aSong )
+{
+
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitialiseL( const TDesc& aSong)");
+
+ delete iClipName;
+ iClipName = NULL;
+ iClipName = aSong.AllocL();
+
+ iFile.Close();
+
+ TInt err = iFile.Open( iFs, aSong, EFileRead | EFileShareReadersOrWriters );
+
+ //
+ // Remap KErrNotReady to KErrNotFound, because it is referencing a drive
+ // that is not existent
+ //
+ if ( KErrNotReady == err )
+ {
+ err = KErrNotFound;
+ }
+
+ // if aSong is an streaming link and contains one of the streaming schemas
+ // eg. rtsp:// , http:// etc. then a file handle can not be opened
+ // ignore KErrBadName
+ if (err != KErrBadName)
+ {
+ User::LeaveIfError( err );
+ }
+
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+// ----------------------------------------------------------------------------
+// Initializes a clip for playback from a file handle
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::InitialiseL( RFile& aSong )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitialiseL( RFile& aSong )");
+
+ delete iClipName;
+ iClipName = NULL;
+ iClipName = HBufC::NewL( KMaxFileName );
+ TPtr ptr = iClipName->Des();
+ aSong.FullName( ptr );
+
+ iFile.Close();
+ User::LeaveIfError( iFile.Duplicate( aSong ));
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+/**
+* Initializes a file for playback.
+*
+* @since S60 9.2
+* @param aUri URI of the item
+* @param aType the mime type of the item
+* @param aAccessPoint the access point
+*/
+void CTestVideoPlaybackPlugin::InitStreamingL(const TDesC& /*aUri*/,
+ const TDesC8& /*aType*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitStreamingL(const TDesC& /*aUri*/, const TDesC8& /*aType*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+/**
+* Initializes a file handle for playback.
+*
+* @since S60 9.2
+* @param aFile file handle of a file
+* @param aAccessPoint the access point
+*/
+void CTestVideoPlaybackPlugin::InitStreamingL(RFile& /*aFile*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitStreamingL(RFile& /*aFile*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+/**
+* Initializes a file handle for playback.
+*
+* @since S60 9.2
+* @param aFile 64 bit file handle of a file
+* @param aAccessPoint the access point
+*/
+void CTestVideoPlaybackPlugin::InitStreaming64L(RFile64& /*aFile*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitStreaming64L(RFile64& /*aFile*/, TInt /*aAccessPoint*/, TInt /*aPosition*/)");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+/**
+* Initializes a song for playback.
+*
+* @since S60 9.2
+* @param aFile 64 bit file handle of a song
+*/
+void CTestVideoPlaybackPlugin::Initialise64L(RFile64& /*aSong*/, TInt /*aPosition*/)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::Initialise64L(RFile64& /*aSong*/, TInt /*aPosition*/)");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+// ----------------------------------------------------------------------------
+// Executes a command on the selected song
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::CommandL( CMPXCommand& aCmd )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::CommandL( CMPXCommand& aCmd )");
+
+ if ( aCmd.IsSupported( KMPXStifPlaybackCommand ) )
+ {
+ TMPXStifCommand cmd = static_cast<TMPXStifCommand>(aCmd.ValueTObjectL<TInt>(KMPXStifPlaybackCommand));
+ TMPXPlaybackState state = static_cast<TMPXPlaybackState>(aCmd.ValueTObjectL<TInt>(KMPXCommandPlaybackGeneralData));
+
+ MPX_DEBUG3("CTestVideoPlaybackPlugin::CommandL cmd = %d, state = %d ", cmd, state);
+
+ switch ( cmd )
+ {
+ case EPbStifPlayComplete:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbStifPlaybackComplete");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPlayComplete;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+ case EPbStifSeekForward:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbStifSeekForward");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPluginSeeking;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPositionChanged;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ if ( state == EPbStatePlaying )
+ {
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPlaying;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+ }
+ else if ( state == EPbStatePaused )
+ {
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPaused;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ }
+ break;
+ }
+
+ case EPbStifSeekBackward:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbStifSeekBackward");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPluginSeeking;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPositionChanged;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ if ( state == EPbStatePlaying )
+ {
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPlaying;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+ }
+ else if ( state == EPbStatePaused )
+ {
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPaused;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+ }
+ break;
+ }
+
+ default:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd default");
+ break;
+ }
+ }
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// Executes a command on the selected song
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::CommandL(TMPXPlaybackCommand aCmd, TInt /*aData*/)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::CommandL(TMPXPlaybackCommand aCmd, TInt /*aData*/)");
+
+ MPX_DEBUG2("CTestVideoPlaybackPlugin::CommandL aCmd = %d", aCmd);
+
+ switch (aCmd)
+ {
+ case EPbCmdPlay:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbCmdPlay");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPlaying;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+
+ case EPbCmdClose:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbCmdClose");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPClosed;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+
+ case EPbCmdStop:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbCmdStop");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPStopped;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+
+ case EPbCmdPause:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbCmdPause");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPaused;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+
+ case EPbCmdStartSeekForward:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd is EPbCmdStartSeekForward");
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPPluginSeeking;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPositionChanged;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPPlaying;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ break;
+ }
+
+ default:
+ {
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::CommandL aCmd default");
+ break;
+ }
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// Sets a property of the plugin
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::SetL( TMPXPlaybackProperty aProperty, TInt aValue )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::SetL( TMPXPlaybackProperty /*aProperty*/, TInt /*aValue*/ )");
+ MPX_DEBUG3("CTestVideoPlaybackPlugin::SetL aProperty = %d, aValue = %d", aProperty, aValue);
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPSetComplete;
+ event->iData = aProperty;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+// ----------------------------------------------------------------------------
+// Gets a property of the plugin (async)
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::PropertyL( TMPXPlaybackProperty /*aProperty*/ ) const
+{
+
+}
+
+// ----------------------------------------------------------------------------
+// Gets a list of sub players, UPnP only
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::SubPlayerNamesL()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::SubPlayerNamesL()");
+
+ iObs->HandleSubPlayerNames( KLocalPlaybackUid, NULL, ETrue, KErrNone );
+}
+
+// ----------------------------------------------------------------------------
+// Select a sub player
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::SelectSubPlayerL( TInt /*aIndex*/ )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::SelectSubPlayerL( TInt aIndex )");
+
+ User::Leave( KErrNotSupported );
+}
+
+// ----------------------------------------------------------------------------
+// Returns current sub player name
+// ----------------------------------------------------------------------------
+//
+const TDesC& CTestVideoPlaybackPlugin::SubPlayerName()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::SubPlayerName()");
+
+ return KNullDesC;
+}
+
+// ----------------------------------------------------------------------------
+// Current sub player index
+// ----------------------------------------------------------------------------
+//
+TInt CTestVideoPlaybackPlugin::SubPlayerIndex() const
+{
+
+ return KErrNotFound;
+}
+
+// ----------------------------------------------------------------------------
+// Gets media properties
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::MediaL( const TArray<TMPXAttribute>& /*aAttrs*/ )
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::MediaL( const TArray TMPXAttribute )");
+}
+
+// ----------------------------------------------------------------------------
+// Cancel request
+// ----------------------------------------------------------------------------
+//
+void CTestVideoPlaybackPlugin::CancelRequest()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::CancelRequest()");
+}
+
+// ----------------------------------------------------------------------------
+// CTestVideoPlaybackPlugin::GetFileHandle()
+// ----------------------------------------------------------------------------
+//
+RFile CTestVideoPlaybackPlugin::GetFileHandle()
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::GetFileHandle()");
+
+ return iFile;
+}
+
+/**
+* Initializes a song for playback.
+*
+* @since S60 9.2
+* @param aSong the song path
+* @param aPosition the starting position
+*/
+void CTestVideoPlaybackPlugin::InitialiseWithPositionL(const TDesC& aSong, TInt aPosition)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitialiseWithPositionL(const TDesC& /*aSong*/, TInt /*aPosition*/)");
+
+ delete iClipName;
+ iClipName = NULL;
+ iClipName = aSong.AllocL();
+
+ iFile.Close();
+
+ TInt err = iFile.Open( iFs, aSong, EFileRead | EFileShareReadersOrWriters );
+
+ //
+ // Remap KErrNotReady to KErrNotFound, because it is referencing a drive
+ // that is not existent
+ //
+ if ( KErrNotReady == err )
+ {
+ err = KErrNotFound;
+ }
+
+ // if aSong is an streaming link and contains one of the streaming schemas
+ // eg. rtsp:// , http:// etc. then a file handle can not be opened
+ // ignore KErrBadName
+ if (err != KErrBadName)
+ {
+ User::LeaveIfError( err );
+ }
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+/**
+* Initializes a song for playback.
+*
+* @since S60 9.2
+* @param aFile file handle of a song
+* @param aPosition the starting position
+*/
+void CTestVideoPlaybackPlugin::InitialiseWithPositionL(RFile& aSong, TInt aPosition)
+{
+ MPX_FUNC_EX("CTestVideoPlaybackPlugin::InitialiseWithPositionL(RFile& aSong, TInt aPosition)");
+
+ delete iClipName;
+ iClipName = NULL;
+ iClipName = HBufC::NewL( KMaxFileName );
+ TPtr ptr = iClipName->Des();
+ aSong.FullName( ptr );
+
+ iFile.Close();
+ User::LeaveIfError( iFile.Duplicate( aSong ));
+
+
+ TTestVideoPlaybackCallbackEvent* event = new (ELeave) TTestVideoPlaybackCallbackEvent;
+
+ event->iEvent = MMPXPlaybackPluginObserver::EPInitialised;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+
+ event = new TTestVideoPlaybackCallbackEvent;
+ event->iEvent = MMPXPlaybackPluginObserver::EPBufferingStarted;
+ event->iData = 0;
+ event->iError = KErrNone;
+
+ AddCallbackEvent( event );
+}
+
+
+void CTestVideoPlaybackPlugin::RunL()
+{
+ MPX_FUNC_EX("CTestVideoPaybackPlugin::RunL");
+}
+
+void CTestVideoPlaybackPlugin::DoCancel()
+{
+ MPX_FUNC_EX("CTestVideoPaybackPlugin::DoCancel");
+}
+
+void CTestVideoPlaybackPlugin::AddCallbackEvent( TTestVideoPlaybackCallbackEvent* event )
+{
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::AddCallbackEvent");
+
+ iEventArray->AppendL( event );
+
+ if ( ! iCallback->IsActive() )
+ {
+ iCallback->Start( TCallBack( CTestVideoPlaybackPlugin::SendEvent, this ) );
+ }
+}
+
+TInt CTestVideoPlaybackPlugin::SendEvent (TAny* aPtr )
+{
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::SendEvent");
+
+ static_cast<CTestVideoPlaybackPlugin*>(aPtr)->DoSendEvent();
+
+ return KErrNone;
+}
+
+void CTestVideoPlaybackPlugin::DoSendEvent()
+{
+ MPX_DEBUG1("-->CTestVideoPlaybackPlugin::DoSendEvent");
+
+ TInt count = iEventArray->Count();
+
+ if ( count > 0 )
+ {
+ TTestVideoPlaybackCallbackEvent* event = (*iEventArray)[0];
+
+ MMPXPlaybackPluginObserver::TEvent myevent = static_cast<MMPXPlaybackPluginObserver::TEvent>(event->iEvent);
+
+ iObs->HandlePluginEvent( myevent, event->iData, event->iError);
+
+ if ( count > 1 )
+ {
+ //
+ // More events exist, start another callback
+ //
+ MPX_DEBUG1("CTestVideoPlaybackPlugin::DoSendEvent - there are more events, start another callback");
+ iCallback->Start( TCallBack( CTestVideoPlaybackPlugin::SendEvent, this ) );
+ }
+
+ iEventArray->Delete( 0 );
+ }
+ MPX_DEBUG1("<--CTestVideoPlaybackPlugin::DoSendEvent");
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmappfw_plat/mpx_playback_utility_api/tsrc/testvideoplaybackplugin/src/testvideoplaybackpluginproxy.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Standard proxy of the ECOM plugin
+*
+*/
+
+#include <ecom/implementationproxy.h>
+#include "testcommonpluginuids.h"
+#include "testvideoplaybackplugin.h"
+
+#if ( ! defined IMPLEMENTATION_PROXY_ENTRY )
+typedef TAny* TProxyNewLPtr;
+#define IMPLEMENTATION_PROXY_ENTRY(aUid,aFuncPtr) \
+ { {aUid}, (TProxyNewLPtr)(aFuncPtr) }
+#endif
+
+// ----------------------------------------------------------------------------
+// The list of implementations
+// ----------------------------------------------------------------------------
+//
+const TImplementationProxy ImplementationTable[] =
+ { IMPLEMENTATION_PROXY_ENTRY( KPlaybackTestVideoPluginImpId,
+ CTestVideoPlaybackPlugin::NewL ) };
+
+// ----------------------------------------------------------------------------
+// The proxy of implementations
+// ----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+{
+ aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+ return ImplementationTable;
+}
+
+// End of File
--- a/mpx/collectionframework/collectionutility/src/mpxcollectionopenutility.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mpx/collectionframework/collectionutility/src/mpxcollectionopenutility.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -221,8 +221,8 @@
EXPORT_C void CMPXCollectionOpenUtility::SetDirection( TDirection aDirection )
{
iFetchDirection = aDirection;
-
- if( iFetchStep == EFetchItems || iFetchStep == EFetchCommand )
+
+ if( iFetchStep == EFetchItems || iFetchStep == EFetchCommand || iFetchStep == EFetchCount )
{
TBool skipFirst = iFetchStep == EFetchCommand ? ETrue : EFalse;
@@ -602,10 +602,8 @@
MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL <---" );
// Task is done, and compact the list
//
- TInt curOffset(0);
if( iIncrementalChunks.Count() )
{
- curOffset = iIncrementalChunks[0].iOffset;
iIncrementalChunks.Remove(0);
DoCompactTaskListL( aEntries );
}
@@ -651,12 +649,9 @@
iFetchStep = EFetchNone;
}
- // Callback to observer with some treshold to avoid over redrawing
- // Playlists need every handle open to update the path
+ // Callback to observer
//
- if( iObs &&
- (Abs<TInt>(aIndex-curOffset) < iFetchInfo.iSize ||
- iFirstOpen || iMode == KMcModePlaylist || complete ) )
+ if( iObs )
{
iFirstOpen = EFalse;
MPX_DEBUG1("CMPXCollectionOpenUtility::DoHandleFetchItemsL callback" );
--- a/mpx/collectionframework/collectionutility/src/mpxcollectionplaylist.cpp Fri Aug 06 17:13:32 2010 -0500
+++ b/mpx/collectionframework/collectionutility/src/mpxcollectionplaylist.cpp Tue Aug 24 03:26:23 2010 -0500
@@ -37,9 +37,9 @@
#include "mpxcollectionplaylist.h"
// CONSTANTS
-const TInt KIncrementalFetchSize = 400;
-
-const TInt KIncrementalDelay = 250000;
+const TInt KIncrementalFetchSize = 1000;
+const TInt KIncrementalDelayNone = 0;
+const TInt KIncrementalDelay = 100000; // 100 ms
// -----------------------------------------------------------------------------
// Two-phased constructor.
@@ -1412,13 +1412,11 @@
RArray<TMPXAttribute> attrs;
CleanupClosePushL( attrs );
TArray<TMPXAttribute> ary = attrs.Array();
-
- // Start the utility, 2 second delays so we don't flood the collection
- // Have some delay as playlists are often destroyed!
- //
- iIncOpenUtil->SetDelay( KIncrementalDelay );
- iIncOpenUtil->StartL( *copy, ary, KIncrementalFetchSize, iPath->Index() ,
- CMPXCollectionOpenUtility::EFetchNormal );
+
+ iIncOpenUtil->SetDelay( KIncrementalDelayNone );
+ iIncOpenUtil->StartL( *copy, ary, KIncrementalFetchSize, iPath->Index() ,
+ CMPXCollectionOpenUtility::EFetchDown );
+ iIncOpenUtil->SetDelay( KIncrementalDelay );
CleanupStack::PopAndDestroy( &attrs );
CleanupStack::PopAndDestroy( copy );
}