equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: Test Harness for VideoHelixPlaybackPlugin |
14 * Description: Test Harness for VideoHelixPlaybackPlugin |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: 19 % |
18 // Version : %version: 21 % |
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> |
1416 { |
1416 { |
1417 TCallbackEvent* callback = new TCallbackEvent; |
1417 TCallbackEvent* callback = new TCallbackEvent; |
1418 |
1418 |
1419 callback->iEvent = EPbCmdTvOutEvent; |
1419 callback->iEvent = EPbCmdTvOutEvent; |
1420 callback->iData = *aMsg->Value<TInt>( KMPXMediaVideoTvOutConnected ); |
1420 callback->iData = *aMsg->Value<TInt>( KMPXMediaVideoTvOutConnected ); |
1421 callback->iError = *aMsg->Value<TInt>( KMPXMediaVideoTvOutPlayAllowed ); |
1421 callback->iError = KErrNone; |
1422 |
1422 |
1423 ProcessEvent( callback ); |
1423 ProcessEvent( callback ); |
1424 |
1424 |
1425 break; |
1425 break; |
1426 } |
1426 } |
1962 |
1962 |
1963 if ( err == KErrNone ) |
1963 if ( err == KErrNone ) |
1964 { |
1964 { |
1965 iAccObserver->SetTvOutPlaybackAllowed( playable ); |
1965 iAccObserver->SetTvOutPlaybackAllowed( playable ); |
1966 |
1966 |
1967 if ( ! playable ) |
|
1968 { |
|
1969 TCallbackEvent* event = new TCallbackEvent; |
|
1970 |
|
1971 event->iEvent = EPPaused; |
|
1972 event->iData = 0; |
|
1973 event->iError = 0; |
|
1974 |
|
1975 AddExpectedEvent( event ); |
|
1976 |
|
1977 iExpectedError = KMPXVideoTvOutPlaybackNotAllowed; |
|
1978 } |
|
1979 |
|
1980 // |
1967 // |
1981 // Add event for callback |
1968 // Add event for callback |
1982 // |
1969 // |
1983 TCallbackEvent* event = new TCallbackEvent; |
1970 TCallbackEvent* event = new TCallbackEvent; |
1984 |
1971 |
1985 event->iEvent = EPbCmdTvOutEvent; |
1972 event->iEvent = EPbCmdTvOutEvent; |
1986 event->iData = ETrue; |
1973 event->iData = ETrue; |
1987 event->iError = playable; |
1974 event->iError = KErrNone; |
1988 |
1975 |
1989 AddExpectedEvent( event ); |
1976 AddExpectedEvent( event ); |
1990 } |
1977 } |
1991 |
1978 |
1992 iAccObserver->UpdateTvOutStatusL( ETrue ); |
1979 iAccObserver->UpdateTvOutStatusL( ETrue ); |
2005 // |
1992 // |
2006 TCallbackEvent* event = new TCallbackEvent; |
1993 TCallbackEvent* event = new TCallbackEvent; |
2007 |
1994 |
2008 event->iEvent = EPbCmdTvOutEvent; |
1995 event->iEvent = EPbCmdTvOutEvent; |
2009 event->iData = EFalse; |
1996 event->iData = EFalse; |
2010 event->iError = ETrue; |
1997 event->iError = KErrNone; |
2011 |
1998 |
2012 AddExpectedEvent( event ); |
1999 AddExpectedEvent( event ); |
2013 |
2000 |
2014 iAccObserver->UpdateTvOutStatusL( EFalse ); |
2001 iAccObserver->UpdateTvOutStatusL( EFalse ); |
2015 |
2002 |
2016 return KErrNone; |
2003 return KErrNone; |
2017 } |
2004 } |
2018 |
2005 |
2371 { |
2358 { |
2372 PreparePluginL(); |
2359 PreparePluginL(); |
2373 |
2360 |
2374 RFs fs; |
2361 RFs fs; |
2375 TInt error = fs.Connect(); |
2362 TInt error = fs.Connect(); |
2376 TInt fileError = KErrNone; |
|
2377 |
2363 |
2378 // |
2364 // |
2379 // Open a file handle to the clip |
2365 // Open a file handle to the clip |
2380 // |
2366 // |
2381 if ( fileHandle32 ) |
2367 if ( fileHandle32 ) |
2382 { |
2368 { |
2383 RFile file; |
2369 RFile file; |
2384 fileError = file.Open( fs, fullPath, EFileRead ); |
2370 file.Open( fs, fullPath, EFileRead ); |
2385 iPlaybackPlugin->InitialiseWithPositionL( file, position ); |
2371 iPlaybackPlugin->InitialiseWithPositionL( file, position ); |
2386 file.Close(); |
2372 file.Close(); |
2387 } |
2373 } |
2388 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
2374 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
2389 else |
2375 else |
2390 { |
2376 { |
2391 RFile64 file64; |
2377 RFile64 file64; |
2392 fileError = file64.Open( fs, fullPath, EFileRead ); |
2378 file64.Open( fs, fullPath, EFileRead ); |
2393 iPlaybackPlugin->Initialise64L( file64, position ); |
2379 iPlaybackPlugin->Initialise64L( file64, position ); |
2394 file64.Close(); |
2380 file64.Close(); |
2395 } |
2381 } |
2396 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
2382 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
2397 |
2383 |