videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp
changeset 39 f6d44a0cd476
parent 38 ff53afa8ad05
child 44 518105d52e45
equal deleted inserted replaced
38:ff53afa8ad05 39:f6d44a0cd476
    13 *
    13 *
    14 * Description:  Test Harness for VideoHelixPlaybackPlugin
    14 * Description:  Test Harness for VideoHelixPlaybackPlugin
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 23 %
    18 // Version : %version: e003sa33#24.1.1 %
    19 
    19 
    20 
    20 
    21 // [INCLUDE FILES] - do not remove
    21 // [INCLUDE FILES] - do not remove
    22 #include <e32svr.h>
    22 #include <e32svr.h>
    23 #include <stifparser.h>
    23 #include <stifparser.h>
    40 #include "mpxvideoaccessoryobserver_stub.h"
    40 #include "mpxvideoaccessoryobserver_stub.h"
    41 #include <mpxvideoplaybackdefs.h>
    41 #include <mpxvideoplaybackdefs.h>
    42 #include "mpxmediavideodefs.h"
    42 #include "mpxmediavideodefs.h"
    43 #include "mpxvideo_debug.h"
    43 #include "mpxvideo_debug.h"
    44 #include "mpxvideoplayerutility_stub.h"
    44 #include "mpxvideoplayerutility_stub.h"
       
    45 #include "mpxhelixplaybackplugindefs.h"
    45 
    46 
    46 #ifdef __WINSCW__
    47 #ifdef __WINSCW__
    47     _LIT( KVideoTestPath, "c:\\data\\Videos\\" );
    48     _LIT( KVideoTestPath, "c:\\data\\Videos\\" );
    48 #else
    49 #else
    49     _LIT( KVideoTestPath, "f:\\testing\\data\\" );
    50     _LIT( KVideoTestPath, "f:\\testing\\data\\" );
   116         ENTRY( "IssueSeekedToEndCommand", CVHPPTestClass::IssueSeekedToEndCommandL),
   117         ENTRY( "IssueSeekedToEndCommand", CVHPPTestClass::IssueSeekedToEndCommandL),
   117         ENTRY( "HandleVolume", CVHPPTestClass::HandleVolumeL ),
   118         ENTRY( "HandleVolume", CVHPPTestClass::HandleVolumeL ),
   118 
   119 
   119         ENTRY ("InitializeWithPositionL", CVHPPTestClass::InitializeWithPositionL),
   120         ENTRY ("InitializeWithPositionL", CVHPPTestClass::InitializeWithPositionL),
   120         ENTRY ("InitializeLinkWithPositionL", CVHPPTestClass::InitializeLinkWithPositionL),
   121         ENTRY ("InitializeLinkWithPositionL", CVHPPTestClass::InitializeLinkWithPositionL),
   121         ENTRY ("InitializeHandleWithPositionL", CVHPPTestClass::InitializeHandleWithPositionL)
   122         ENTRY ("InitializeHandleWithPositionL", CVHPPTestClass::InitializeHandleWithPositionL),
       
   123         ENTRY ( "InitializeStreamingWithSdpFileHandleL", 
       
   124         		CVHPPTestClass::InitializeStreamingWithSdpFileHandleL ),
       
   125         ENTRY ( "RetrieveFileNameAndModeL", CVHPPTestClass::RetrieveFileNameAndModeL )        
   122 
   126 
   123         //
   127         //
   124         //  ADD NEW ENTRIES HERE
   128         //  ADD NEW ENTRIES HERE
   125         //
   129         //
   126         // ENTRY( "SendPlayCommandToServer",
   130         // ENTRY( "SendPlayCommandToServer",
  1140 CVHPPTestClass::ConnectToDownloadL( CStifItemParser& aItem )
  1144 CVHPPTestClass::ConnectToDownloadL( CStifItemParser& aItem )
  1141 {
  1145 {
  1142     MPX_ENTER_EXIT(_L("CVHPPTestClass::ConnectToDownloadL()"));
  1146     MPX_ENTER_EXIT(_L("CVHPPTestClass::ConnectToDownloadL()"));
  1143     iLog->Log(_L("CVHPPTestClass::ConnectToDownloadL()"));
  1147     iLog->Log(_L("CVHPPTestClass::ConnectToDownloadL()"));
  1144 
  1148 
       
  1149     TInt err = KErrNone;
       
  1150     
       
  1151 #ifdef USE_S60_DOWNLOAD_MANAGER       
       
  1152     
  1145     iDlMgrTester = CDlMgrTestClass::NewL();
  1153     iDlMgrTester = CDlMgrTestClass::NewL();
  1146     iDlMgrTester->AddStifObserver( this );
  1154     iDlMgrTester->AddStifObserver( this );
  1147 
  1155 
  1148     TInt dlId;
  1156     TInt dlId;
  1149     TPtrC filename;
  1157     TPtrC filename;
  1150     TBuf<120> fullPath;
  1158     TBuf<120> fullPath;
  1151 
  1159 
  1152     //
  1160     //
  1153     //   Read in the download id and filename
  1161     //   Read in the download id and filename
  1154     //
  1162     //
  1155     TInt err = aItem.GetNextInt( dlId );
  1163     err = aItem.GetNextInt( dlId );
  1156 
  1164 
  1157     if ( err == KErrNone )
  1165     if ( err == KErrNone )
  1158     {
  1166     {
  1159         err = aItem.GetNextString( filename );
  1167         err = aItem.GetNextString( filename );
  1160 
  1168 
  1186             iPlaybackPlugin->CommandL( *cmd );
  1194             iPlaybackPlugin->CommandL( *cmd );
  1187 
  1195 
  1188             CleanupStack::PopAndDestroy( cmd );
  1196             CleanupStack::PopAndDestroy( cmd );
  1189         }
  1197         }
  1190     }
  1198     }
  1191 
  1199     
       
  1200 #else // USE_S60_DOWNLOAD_MANAGER    
       
  1201      
       
  1202 	// suppress build warning
       
  1203     MPX_DEBUG(_L("CVHPPTestClass::ConnectToDownloadL() : parsing type = %d"), aItem.ParsingType()); 
       
  1204 	
       
  1205 	// Signal TestScripter to continue from waittestclass
       
  1206     Signal();
       
  1207 	
       
  1208 #endif // USE_S60_DOWNLOAD_MANAGER
       
  1209     
  1192     return err;
  1210     return err;
  1193 }
  1211 }
  1194 
  1212 
  1195 // -------------------------------------------------------------------------------------------------
  1213 // -------------------------------------------------------------------------------------------------
  1196 //   CVHPPTestClass::SendPdlCustomCommandL()
  1214 //   CVHPPTestClass::SendPdlCustomCommandL()
  1200 CVHPPTestClass::SendPdlCustomCommandL( TMPXPlaybackPdCommand aCustomCmd )
  1218 CVHPPTestClass::SendPdlCustomCommandL( TMPXPlaybackPdCommand aCustomCmd )
  1201 {
  1219 {
  1202     MPX_ENTER_EXIT(_L("CVHPPTestClass::SendPdlCustomCommandL"),
  1220     MPX_ENTER_EXIT(_L("CVHPPTestClass::SendPdlCustomCommandL"),
  1203                    _L("aCustomCmd = %d"), aCustomCmd );
  1221                    _L("aCustomCmd = %d"), aCustomCmd );
  1204 
  1222 
       
  1223 #ifdef USE_S60_DOWNLOAD_MANAGER     
       
  1224 
  1205     CMPXCommand* cmd = CMPXCommand::NewL();
  1225     CMPXCommand* cmd = CMPXCommand::NewL();
  1206     CleanupStack::PushL( cmd );
  1226     CleanupStack::PushL( cmd );
  1207 
  1227 
  1208     cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
  1228     cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
  1209     cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXCommandIdPlaybackPD );
  1229     cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXCommandIdPlaybackPD );
  1210     cmd->SetTObjectValueL<TMPXPlaybackPdCommand>( KMPXCommandPlaybackGeneralType, aCustomCmd );
  1230     cmd->SetTObjectValueL<TMPXPlaybackPdCommand>( KMPXCommandPlaybackGeneralType, aCustomCmd );
  1211 
  1231 
  1212     iPlaybackPlugin->CommandL( *cmd );
  1232     iPlaybackPlugin->CommandL( *cmd );
  1213 
  1233 
  1214     CleanupStack::PopAndDestroy( cmd );
  1234     CleanupStack::PopAndDestroy( cmd );
       
  1235 	
       
  1236 #else // USE_S60_DOWNLOAD_MANAGER     
       
  1237 	
       
  1238 	// Signal TestScripter to continue from waittestclass
       
  1239     Signal();
       
  1240 	
       
  1241 #endif // USE_S60_DOWNLOAD_MANAGER
       
  1242 
  1215 }
  1243 }
  1216 
  1244 
  1217 // -----------------------------------------------------------------------------
  1245 // -----------------------------------------------------------------------------
  1218 //  CVHPPTestClass::PauseDownloadL
  1246 //  CVHPPTestClass::PauseDownloadL
  1219 // -----------------------------------------------------------------------------
  1247 // -----------------------------------------------------------------------------
  1222 CVHPPTestClass::PauseDownloadL( CStifItemParser& /*aItem*/ )
  1250 CVHPPTestClass::PauseDownloadL( CStifItemParser& /*aItem*/ )
  1223 {
  1251 {
  1224     MPX_ENTER_EXIT(_L("CVHPPTestClass::PauseDownloadL()"));
  1252     MPX_ENTER_EXIT(_L("CVHPPTestClass::PauseDownloadL()"));
  1225     iLog->Log(_L("CVHPPTestClass::PauseDownloadL()"));
  1253     iLog->Log(_L("CVHPPTestClass::PauseDownloadL()"));
  1226 
  1254 
       
  1255 #ifdef USE_S60_DOWNLOAD_MANAGER   
       
  1256     
  1227     TCallbackEvent* event = new TCallbackEvent;
  1257     TCallbackEvent* event = new TCallbackEvent;
  1228 
  1258 
  1229     event->iEvent = EPDownloadStateChanged;
  1259     event->iEvent = EPDownloadStateChanged;
  1230     event->iData  = EPbDlStateDownloadPaused;
  1260     event->iData  = EPbDlStateDownloadPaused;
  1231     event->iError = KErrNone;
  1261     event->iError = KErrNone;
  1232 
  1262 
  1233     AddExpectedEvent( event );
  1263     AddExpectedEvent( event );
  1234 
  1264 
  1235     iDlMgrTester->PauseDownload();
  1265     iDlMgrTester->PauseDownload();
  1236 
  1266     
       
  1267 #else // USE_S60_DOWNLOAD_MANAGER    
       
  1268 	
       
  1269 	// Signal TestScripter to continue from waittestclass
       
  1270     Signal();
       
  1271 	
       
  1272 #endif // USE_S60_DOWNLOAD_MANAGER 
       
  1273     
  1237     return KErrNone;
  1274     return KErrNone;
  1238 }
  1275 }
  1239 
  1276 
  1240 // -----------------------------------------------------------------------------
  1277 // -----------------------------------------------------------------------------
  1241 //  CVHPPTestClass::ResumeDownloadL
  1278 //  CVHPPTestClass::ResumeDownloadL
  1245 CVHPPTestClass::ResumeDownloadL( CStifItemParser& aItem )
  1282 CVHPPTestClass::ResumeDownloadL( CStifItemParser& aItem )
  1246 {
  1283 {
  1247     MPX_ENTER_EXIT(_L("CVHPPTestClass::ResumeDownloadL()"));
  1284     MPX_ENTER_EXIT(_L("CVHPPTestClass::ResumeDownloadL()"));
  1248     iLog->Log(_L("CVHPPTestClass::ResumeDownloadL()"));
  1285     iLog->Log(_L("CVHPPTestClass::ResumeDownloadL()"));
  1249 
  1286 
       
  1287     TInt err = KErrNone;
       
  1288     
       
  1289 #ifdef USE_S60_DOWNLOAD_MANAGER 
       
  1290     
  1250     TInt dlSize;
  1291     TInt dlSize;
  1251 
  1292 
  1252     TInt err = aItem.GetNextInt( dlSize );
  1293     err = aItem.GetNextInt( dlSize );
  1253 
  1294 
  1254     if ( err == KErrNone )
  1295     if ( err == KErrNone )
  1255     {
  1296     {
  1256         WriteControllerError( KDlMgrFile, dlSize );
  1297         WriteControllerError( KDlMgrFile, dlSize );
  1257 
  1298 
  1271 
  1312 
  1272         AddExpectedEvent( event );
  1313         AddExpectedEvent( event );
  1273 
  1314 
  1274         iDlMgrTester->ResumeDownload();
  1315         iDlMgrTester->ResumeDownload();
  1275     }
  1316     }
  1276 
  1317     
       
  1318 #else // USE_S60_DOWNLOAD_MANAGER    
       
  1319      
       
  1320 	// suppress build warning
       
  1321     MPX_DEBUG(_L("CVHPPTestClass::ResumeDownloadL() : parsing type = %d"), aItem.ParsingType()); 
       
  1322 	
       
  1323 	// Signal TestScripter to continue from waittestclass
       
  1324     Signal();
       
  1325 	
       
  1326 #endif // USE_S60_DOWNLOAD_MANAGER 
       
  1327     
  1277     return err;
  1328     return err;
  1278 }
  1329 }
  1279 
  1330 
  1280 // -----------------------------------------------------------------------------
  1331 // -----------------------------------------------------------------------------
  1281 //  CVHPPTestClass::CancelDownloadL
  1332 //  CVHPPTestClass::CancelDownloadL
  1285 CVHPPTestClass::CancelDownloadL( CStifItemParser& /*aItem*/ )
  1336 CVHPPTestClass::CancelDownloadL( CStifItemParser& /*aItem*/ )
  1286 {
  1337 {
  1287     MPX_ENTER_EXIT(_L("CVHPPTestClass::CancelDownloadL()"));
  1338     MPX_ENTER_EXIT(_L("CVHPPTestClass::CancelDownloadL()"));
  1288     iLog->Log(_L("CVHPPTestClass::CancelDownloadL()"));
  1339     iLog->Log(_L("CVHPPTestClass::CancelDownloadL()"));
  1289 
  1340 
       
  1341 #ifdef USE_S60_DOWNLOAD_MANAGER 
       
  1342     
  1290     TCallbackEvent* event = new TCallbackEvent;
  1343     TCallbackEvent* event = new TCallbackEvent;
  1291 
  1344 
  1292     event->iEvent = EPDownloadStateChanged;
  1345     event->iEvent = EPDownloadStateChanged;
  1293     event->iData  = EPbDlStateDownloadCanceled;
  1346     event->iData  = EPbDlStateDownloadCanceled;
  1294     event->iError = KErrNone;
  1347     event->iError = KErrNone;
  1295 
  1348 
  1296     AddExpectedEvent( event );
  1349     AddExpectedEvent( event );
  1297 
  1350 
  1298     iDlMgrTester->CancelDownload();
  1351     iDlMgrTester->CancelDownload();
  1299 
  1352 
       
  1353 #else // USE_S60_DOWNLOAD_MANAGER    
       
  1354 	
       
  1355 	// Signal TestScripter to continue from waittestclass
       
  1356     Signal();
       
  1357 	
       
  1358 #endif // USE_S60_DOWNLOAD_MANAGER 
       
  1359     
  1300     return KErrNone;
  1360     return KErrNone;
  1301 }
  1361 }
  1302 
  1362 
  1303 // -----------------------------------------------------------------------------
  1363 // -----------------------------------------------------------------------------
  1304 //  CVHPPTestClass::RetrievePdlStatusL
  1364 //  CVHPPTestClass::RetrievePdlStatusL
  1308 CVHPPTestClass::RetrievePdlStatusL( CStifItemParser& aItem )
  1368 CVHPPTestClass::RetrievePdlStatusL( CStifItemParser& aItem )
  1309 {
  1369 {
  1310     MPX_ENTER_EXIT(_L("CVHPPTestClass::RetrievePdlStatusL()"));
  1370     MPX_ENTER_EXIT(_L("CVHPPTestClass::RetrievePdlStatusL()"));
  1311     iLog->Log(_L("CVHPPTestClass::RetrievePdlStatusL()"));
  1371     iLog->Log(_L("CVHPPTestClass::RetrievePdlStatusL()"));
  1312 
  1372 
       
  1373     TInt err = KErrNone;
       
  1374     
       
  1375 #ifdef USE_S60_DOWNLOAD_MANAGER 
       
  1376     
  1313     TInt pdlState;
  1377     TInt pdlState;
  1314     TInt expectedPdlState;
  1378     TInt expectedPdlState;
  1315     TInt downloadedBytes;
  1379     TInt downloadedBytes;
  1316     TInt expectedDownloadedBytes;
  1380     TInt expectedDownloadedBytes;
  1317     TInt downloadSize;
  1381     TInt downloadSize;
  1318     TInt expectedDownloadSize;
  1382     TInt expectedDownloadSize;
  1319 
  1383 
  1320     //
  1384     //
  1321     //   Read in the expected download data
  1385     //   Read in the expected download data
  1322     //
  1386     //
  1323     TInt err = aItem.GetNextInt( expectedPdlState );
  1387     err = aItem.GetNextInt( expectedPdlState );
  1324 
  1388 
  1325     if ( err == KErrNone )
  1389     if ( err == KErrNone )
  1326     {
  1390     {
  1327         err = aItem.GetNextInt( expectedDownloadedBytes );
  1391         err = aItem.GetNextInt( expectedDownloadedBytes );
  1328 
  1392 
  1366         }
  1430         }
  1367 
  1431 
  1368         CleanupStack::PopAndDestroy( cmd );
  1432         CleanupStack::PopAndDestroy( cmd );
  1369     }
  1433     }
  1370 
  1434 
       
  1435 #else // USE_S60_DOWNLOAD_MANAGER 
       
  1436      
       
  1437 	// suppress build warning
       
  1438     MPX_DEBUG(_L("CVHPPTestClass::RetrievePdlStatusL() : parsing type = %d"), aItem.ParsingType()); 
       
  1439 	
       
  1440 	// Signal TestScripter to continue from waittestclass
       
  1441     Signal();
       
  1442 	
       
  1443 #endif // USE_S60_DOWNLOAD_MANAGER 
       
  1444     
  1371     return err;
  1445     return err;
  1372 }
  1446 }
  1373 
  1447 
  1374 void
  1448 void
  1375 CVHPPTestClass::HandlePluginEvent( TEvent aEvent, TInt aData, TInt aError )
  1449 CVHPPTestClass::HandlePluginEvent( TEvent aEvent, TInt aData, TInt aError )
  1546 }
  1620 }
  1547 
  1621 
  1548 void
  1622 void
  1549 CVHPPTestClass::ProcessEvent( TCallbackEvent* aCallback )
  1623 CVHPPTestClass::ProcessEvent( TCallbackEvent* aCallback )
  1550 {
  1624 {
       
  1625     MPX_ENTER_EXIT(_L("CVHPPTestClass::ProcessEvent"));
       
  1626     
  1551     if ( iExpectedCallbackArray->Count() > 0 )
  1627     if ( iExpectedCallbackArray->Count() > 0 )
  1552     {
  1628     {
  1553         TCallbackEvent* expectedCallback = (*iExpectedCallbackArray)[0];
  1629         TCallbackEvent* expectedCallback = (*iExpectedCallbackArray)[0];
  1554 
  1630 
  1555         MPX_DEBUG(_L("CVHPPTestClass::ProcessEvent(%d,%d,%d) Expected(%d,%d,%d)"),
  1631         MPX_DEBUG(_L("CVHPPTestClass::ProcessEvent(%d,%d,%d) Expected(%d,%d,%d)"),
  2350     } 
  2426     } 
  2351 
  2427 
  2352     return err;
  2428     return err;
  2353 }
  2429 }
  2354 
  2430 
       
  2431 TInt
       
  2432 CVHPPTestClass::InitializeStreamingWithSdpFileHandleL( CStifItemParser& aItem )
       
  2433 {
       
  2434     MPX_ENTER_EXIT(_L("CVHPPTestClass::InitializeStreamingWithSdpFileHandleL()"));
       
  2435     iLog->Log(_L("CVHPPTestClass::InitializeStreamingWithSdpFileHandleL()"));
       
  2436 
       
  2437     TInt duration;
       
  2438     TInt volumeSteps;
       
  2439     TInt fileHandle32;
       
  2440     
       
  2441     TInt err = aItem.GetNextInt( fileHandle32 );
       
  2442     
       
  2443     if ( err == KErrNone )
       
  2444     {        
       
  2445     
       
  2446 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
       
  2447         //
       
  2448         // set RFile as default if the 64-bit flag is not defined
       
  2449         //
       
  2450         fileHandle32 = ETrue;
       
  2451 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
       
  2452         
       
  2453         err = aItem.GetNextInt( duration );
       
  2454     
       
  2455         if ( err == KErrNone )
       
  2456         {
       
  2457             //
       
  2458             //  We will always get an Init Complete message out
       
  2459             //
       
  2460             TCallbackEvent* event = new TCallbackEvent;
       
  2461     
       
  2462             event->iEvent = EPInitialised;
       
  2463             event->iData  = duration;
       
  2464             event->iError = KErrNone;
       
  2465     
       
  2466             AddExpectedEvent( event );
       
  2467     
       
  2468             // 
       
  2469             // read number of volume steps
       
  2470             //
       
  2471             err = aItem.GetNextInt( volumeSteps );
       
  2472             
       
  2473             if ( err == KErrNone )
       
  2474             {        
       
  2475                 //
       
  2476                 // set volume steps
       
  2477                 //
       
  2478                 SetVolumeSteps( volumeSteps );
       
  2479                
       
  2480                 TBuf<120> fullPath;
       
  2481                 err = ReadFileInitializationParameters( aItem, fullPath );
       
  2482 
       
  2483                 if ( err == KErrNone )
       
  2484                 {
       
  2485 					PreparePluginL();
       
  2486 					
       
  2487 					MPX_DEBUG( _L("Initialize the Plugin:  link = %S"), &fullPath );
       
  2488 					iLog->Log( _L("Initialize the Plugin:  link = %S"), &fullPath );
       
  2489 					
       
  2490 					//
       
  2491 					//  Extract the streaming link from the ram file and
       
  2492 					//  Initalize the Plugin with the file handle and an access point
       
  2493 					//
       
  2494 					RFs fs;
       
  2495 					TInt error = fs.Connect();
       
  2496 					
       
  2497 					if ( fileHandle32 )
       
  2498 					{
       
  2499 						RFile file;
       
  2500 						error = file.Open( fs, fullPath, EFileRead | EFileShareAny );
       
  2501 						
       
  2502 						MPX_DEBUG( _L("Initialize the Plugin:  file open error = %d"),
       
  2503 								error );   
       
  2504 						
       
  2505 						User::LeaveIfError( error );
       
  2506 				  
       
  2507 						iPlaybackPlugin->InitStreamingL( file, 11 );
       
  2508 						file.Close();
       
  2509 					}
       
  2510     #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
       
  2511 					else
       
  2512 					{
       
  2513 						RFile64 file64;
       
  2514 						error = file64.Open( fs, fullPath, EFileRead | EFileShareAny  );
       
  2515 						
       
  2516 						MPX_DEBUG( _L("Initialize the Plugin:  file open error = %d"),
       
  2517 								error );
       
  2518 						
       
  2519 						User::LeaveIfError( error );
       
  2520 						
       
  2521 						iPlaybackPlugin->InitStreaming64L( file64, 11 );
       
  2522 						file64.Close();
       
  2523 					}
       
  2524 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
       
  2525 					
       
  2526 					fs.Close();
       
  2527                 }
       
  2528             } 
       
  2529         } 
       
  2530     } 
       
  2531     return err;
       
  2532 }
       
  2533 
       
  2534 TInt
       
  2535 CVHPPTestClass::RetrieveFileNameAndModeL( CStifItemParser& aItem )
       
  2536 {
       
  2537     MPX_ENTER_EXIT( _L("CVHPPTestClass::RetrieveFileNameAndModeL()") );
       
  2538     iLog->Log( _L("CVHPPTestClass::RetrieveFileNameAndModeL()") );
       
  2539 
       
  2540     TBuf<120>	fullPath;
       
  2541     TPtrC		fileName;
       
  2542     TInt		err;
       
  2543     
       
  2544     err = aItem.GetNextString( fileName );
       
  2545 
       
  2546     if ( err == KErrNone )
       
  2547     {
       
  2548         //
       
  2549         //  Build the full path to the file
       
  2550         //
       
  2551         fullPath.Append( KVideoTestPath );
       
  2552         fullPath.Append( fileName );
       
  2553         
       
  2554         TInt mode;
       
  2555         err = aItem.GetNextInt( mode);
       
  2556         
       
  2557         if ( err == KErrNone )
       
  2558         {
       
  2559  			CMPXCommand* cmd = CMPXCommand::NewL();
       
  2560 			CleanupStack::PushL( cmd );
       
  2561 	
       
  2562 			cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
       
  2563 			cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId,
       
  2564 										 KMPXMediaIdVideoPlayback );
       
  2565 			cmd->SetTObjectValueL<TInt>( KMPXMediaVideoPlaybackCommand, EPbCmdInitView );
       
  2566 			
       
  2567 			iPlaybackPlugin->CommandL( *cmd );
       
  2568 			
       
  2569 			TPtrC clipName( cmd->ValueText( KMPXMediaVideoPlaybackFileName ) );
       
  2570 			TMPXVideoMode  playbackMode = (TMPXVideoMode) cmd->ValueTObjectL<TInt>( KMPXMediaVideoMode );
       
  2571 	
       
  2572 			MPX_DEBUG( _L("    Expected Data:  filename = %S, playbackmode= %d" ),
       
  2573 				 &fullPath, mode );
       
  2574 			
       
  2575 			MPX_DEBUG( _L("    Retrieved Data: filename = %S, playbackmode= %d"),
       
  2576 				 &clipName, playbackMode );
       
  2577 			
       
  2578 			if ( fullPath.Compare( clipName) != 0 || mode != playbackMode )
       
  2579 			{
       
  2580 			    err = KErrGeneral;
       
  2581 				MPX_DEBUG( _L("    err = %d"), err );
       
  2582 			}
       
  2583 			
       
  2584 			CleanupStack::PopAndDestroy( cmd );
       
  2585         }
       
  2586     }
       
  2587 
       
  2588     return err;
       
  2589 }
       
  2590 
  2355 //  EOF
  2591 //  EOF