1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // [INCLUDE FILES] - do not remove |
|
20 #include <e32svr.h> |
|
21 #include <StifParser.h> |
|
22 #include <Stiftestinterface.h> |
|
23 #include "FusionMpxPlayer_ApiTest.h" |
|
24 #include "FusionMpxPlayerTestCommon.h" |
|
25 |
|
26 #include "VCXTestLog.h" |
|
27 #include "VCXTestCommon.h" |
|
28 #include "VCXTestPSSubscriber.h" |
|
29 #include "CIptvTestTimer.h" |
|
30 #include "CIptvTestActiveWait.h" |
|
31 #include "VCXTestTimerWait.h" |
|
32 #include <mpxvideoplaybackdefs.h> |
|
33 |
|
34 #include <e32math.h> |
|
35 #include <mpxplaybackutility.h> |
|
36 #include <mpxplaybackmessage.h> |
|
37 #include <mpxmessagegeneraldefs.h> |
|
38 #include <mpxcommandgeneraldefs.h> |
|
39 #include <mpxviewutility.h> |
|
40 #include <mpxcollectionplaylist.h> |
|
41 |
|
42 |
|
43 // EXTERNAL DATA STRUCTURES |
|
44 //extern ?external_data; |
|
45 |
|
46 // EXTERNAL FUNCTION PROTOTYPES |
|
47 //extern ?external_function( ?arg_type,?arg_type ); |
|
48 |
|
49 // CONSTANTS |
|
50 |
|
51 // MACROS |
|
52 //#define ?macro ?macro_def |
|
53 |
|
54 // LOCAL CONSTANTS AND MACROS |
|
55 //const ?type ?constant_var = ?constant; |
|
56 //#define ?macro_name ?macro_def |
|
57 |
|
58 // MODULE DATA STRUCTURES |
|
59 //enum ?declaration |
|
60 //typedef ?declaration |
|
61 |
|
62 // LOCAL FUNCTION PROTOTYPES |
|
63 //?type ?function_name( ?arg_type, ?arg_type ); |
|
64 |
|
65 // FORWARD DECLARATIONS |
|
66 //class ?FORWARD_CLASSNAME; |
|
67 |
|
68 // ============================= LOCAL FUNCTIONS =============================== |
|
69 |
|
70 // ============================ MEMBER FUNCTIONS =============================== |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CFusionMpxPlayer_ApiTest::Delete |
|
74 // Delete here all resources allocated and opened from test methods. |
|
75 // Called from destructor. |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 void CFusionMpxPlayer_ApiTest::Delete() |
|
79 { |
|
80 VCXLOGLO1("CFusionMpxPlayer_ApiTest::Delete"); |
|
81 |
|
82 if( !iShutdownCalled ) |
|
83 { |
|
84 CStifItemParser* fakeParser = NULL; |
|
85 TRAP_IGNORE( ShutdownTesterL( *fakeParser ) ); |
|
86 } |
|
87 |
|
88 delete iTestCommon; |
|
89 iTestCommon = NULL; |
|
90 |
|
91 if( iTimeoutTimer ) |
|
92 { |
|
93 iTimeoutTimer->CancelTimer(); |
|
94 delete iTimeoutTimer; |
|
95 iTimeoutTimer = NULL; |
|
96 } |
|
97 |
|
98 delete iWait; |
|
99 iWait = NULL; |
|
100 |
|
101 delete iTesterGetAckResponseSubscriber; |
|
102 iTesterGetAckResponseSubscriber = NULL; |
|
103 |
|
104 delete iTesterGetMessageListResponseSubscriber; |
|
105 iTesterGetMessageListResponseSubscriber = NULL; |
|
106 |
|
107 iFs.Close(); |
|
108 } |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // CFusionMpxPlayer_ApiTest::RunMethodL |
|
112 // Run specified method. Contains also table of test mothods and their names. |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 TInt CFusionMpxPlayer_ApiTest::RunMethodL( |
|
116 CStifItemParser& aItem ) |
|
117 { |
|
118 |
|
119 static TStifFunctionInfo const KFunctions[] = |
|
120 { |
|
121 // Copy this line for every implemented function. |
|
122 // First string is the function name used in TestScripter script file. |
|
123 // Second is the actual implementation member function. |
|
124 |
|
125 ENTRY( "SetCommandCompletionWait", CFusionMpxPlayer_ApiTest::SetCommandCompletionWaitL ), |
|
126 ENTRY( "PrepareCase", CFusionMpxPlayer_ApiTest::PrepareCaseL ), |
|
127 ENTRY( "ShutdownTester", CFusionMpxPlayer_ApiTest::ShutdownTesterL ), |
|
128 |
|
129 ENTRY( "Create", CFusionMpxPlayer_ApiTest::CreateL ), |
|
130 |
|
131 ENTRY( "OpenRandomFile", CFusionMpxPlayer_ApiTest::OpenRandomFileL ), |
|
132 ENTRY( "OpenLocalFile", CFusionMpxPlayer_ApiTest::OpenLocalFileL ), |
|
133 ENTRY( "OpenUrl", CFusionMpxPlayer_ApiTest::OpenUrlL ), |
|
134 |
|
135 ENTRY( "Play", CFusionMpxPlayer_ApiTest::PlayL ), |
|
136 ENTRY( "PlayWithFadeIn", CFusionMpxPlayer_ApiTest::PlayWithFadeInL ), |
|
137 ENTRY( "Pause", CFusionMpxPlayer_ApiTest::PauseL ), |
|
138 ENTRY( "Stop", CFusionMpxPlayer_ApiTest::StopL ), |
|
139 ENTRY( "PlayPause", CFusionMpxPlayer_ApiTest::PlayPauseL ), |
|
140 ENTRY( "Next", CFusionMpxPlayer_ApiTest::NextL ), |
|
141 ENTRY( "Previous", CFusionMpxPlayer_ApiTest::PreviousL ), |
|
142 ENTRY( "Replay", CFusionMpxPlayer_ApiTest::ReplayL ), |
|
143 ENTRY( "StartSeekForward", CFusionMpxPlayer_ApiTest::StartSeekForwardL ), |
|
144 ENTRY( "StartSeekBackward", CFusionMpxPlayer_ApiTest::StartSeekBackwardL ), |
|
145 ENTRY( "StopSeeking", CFusionMpxPlayer_ApiTest::StopSeekingL ), |
|
146 ENTRY( "DecreaseVolume", CFusionMpxPlayer_ApiTest::DecreaseVolumeL ), |
|
147 ENTRY( "IncreaseVolume", CFusionMpxPlayer_ApiTest::IncreaseVolumeL ), |
|
148 ENTRY( "MuteVolume", CFusionMpxPlayer_ApiTest::MuteVolumeL ), |
|
149 ENTRY( "UnMuteVolume", CFusionMpxPlayer_ApiTest::UnMuteVolumeL ), |
|
150 ENTRY( "SetVolume", CFusionMpxPlayer_ApiTest::SetVolumeL ), |
|
151 ENTRY( "Close", CFusionMpxPlayer_ApiTest::CloseL ), |
|
152 ENTRY( "ApplyEffect", CFusionMpxPlayer_ApiTest::ApplyEffectL ), |
|
153 ENTRY( "DisableEffect", CFusionMpxPlayer_ApiTest::DisableEffectL ), |
|
154 ENTRY( "PreservePosition", CFusionMpxPlayer_ApiTest::PreservePositionL ), |
|
155 ENTRY( "PreserveState", CFusionMpxPlayer_ApiTest::PreserveStateL ), |
|
156 ENTRY( "CloseItem", CFusionMpxPlayer_ApiTest::CloseItemL ), |
|
157 ENTRY( "CancelInit", CFusionMpxPlayer_ApiTest::CancelInitL ), |
|
158 ENTRY( "ResetPreserveState", CFusionMpxPlayer_ApiTest::ResetPreserveStateL ), |
|
159 ENTRY( "UnloadNonActivePlugin", CFusionMpxPlayer_ApiTest::UnloadNonActivePluginL ), |
|
160 ENTRY( "ClearKeyBuffer", CFusionMpxPlayer_ApiTest::ClearKeyBufferL ), |
|
161 |
|
162 ENTRY( "VideoSeekForward", CFusionMpxPlayer_ApiTest::VideoSeekForwardL ), |
|
163 ENTRY( "VideoSeekBackward", CFusionMpxPlayer_ApiTest::VideoSeekBackwardL ), |
|
164 ENTRY( "VideoEndSeek", CFusionMpxPlayer_ApiTest::VideoEndSeekL ), |
|
165 ENTRY( "VideoNaturalAspectRatio", CFusionMpxPlayer_ApiTest::VideoNaturalAspectRatioL ), |
|
166 ENTRY( "VideoZoomAspectRatio", CFusionMpxPlayer_ApiTest::VideoZoomAspectRatioL ), |
|
167 ENTRY( "VideoStretchAspectRatio", CFusionMpxPlayer_ApiTest::VideoStretchAspectRatioL ), |
|
168 ENTRY( "VideoDefaultAspectRatio", CFusionMpxPlayer_ApiTest::VideoDefaultAspectRatioL ), |
|
169 ENTRY( "VideoHandleForeground", CFusionMpxPlayer_ApiTest::VideoHandleForegroundL ), |
|
170 ENTRY( "VideoHandleBackground", CFusionMpxPlayer_ApiTest::VideoHandleBackgroundL ), |
|
171 |
|
172 //ADD NEW ENTRY HERE |
|
173 // [test cases entries] - Do not remove |
|
174 |
|
175 }; |
|
176 |
|
177 const TInt count = sizeof( KFunctions ) / |
|
178 sizeof( TStifFunctionInfo ); |
|
179 |
|
180 return RunInternalL( KFunctions, count, aItem ); |
|
181 |
|
182 } |
|
183 |
|
184 // ----------------------------------------------------------------------------- |
|
185 // CFusionMpxPlayer_ApiTest::PrepareCaseL |
|
186 // ----------------------------------------------------------------------------- |
|
187 // |
|
188 TInt CFusionMpxPlayer_ApiTest::PrepareCaseL( CStifItemParser& /* aItem */ ) |
|
189 { |
|
190 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PrepareCaseL ------>"); |
|
191 // Print to UI |
|
192 _LIT( KTestModule, "CFusionMpxPlayer_ApiTest" ); |
|
193 _LIT( KWhere, "In PrepareCaseL" ); |
|
194 TestModuleIf().Printf( 0, KTestModule, KWhere ); |
|
195 // Print to log file |
|
196 iLog->Log( KWhere ); |
|
197 |
|
198 TInt err = CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExeGlobalShutdownKey, 1 ); |
|
199 if( err != KErrNone ) |
|
200 { |
|
201 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Could not read KFusionMpxPlayerTestExeGlobalShutdownKey from PS. err: %d", err); |
|
202 } |
|
203 |
|
204 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PrepareCaseL"); |
|
205 return KErrNone; |
|
206 } |
|
207 |
|
208 // ----------------------------------------------------------------------------- |
|
209 // CFusionMpxPlayer_ApiTest::SetCommandCompletionWaitL |
|
210 // ----------------------------------------------------------------------------- |
|
211 // |
|
212 TInt CFusionMpxPlayer_ApiTest::SetCommandCompletionWaitL( CStifItemParser& aItem ) |
|
213 { |
|
214 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::SetCommandCompletionWaitL ------>"); |
|
215 // Print to UI |
|
216 _LIT( KTestModule, "CFusionMpxPlayer_ApiTest" ); |
|
217 _LIT( KWhere, "In SetCommandCompletionWaitL" ); |
|
218 TestModuleIf().Printf( 0, KTestModule, KWhere ); |
|
219 // Print to log file |
|
220 iLog->Log( KWhere ); |
|
221 |
|
222 TInt ack; |
|
223 User::LeaveIfError( aItem.GetNextInt( ack ) ); |
|
224 |
|
225 iCommandWait = static_cast<TBool>( ack ); |
|
226 |
|
227 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::SetCommandCompletionWaitL"); |
|
228 return KErrNone; |
|
229 } |
|
230 |
|
231 // ----------------------------------------------------------------------------- |
|
232 // CFusionMpxPlayer_ApiTest::ShutdownTesterL |
|
233 // ----------------------------------------------------------------------------- |
|
234 // |
|
235 TInt CFusionMpxPlayer_ApiTest::ShutdownTesterL( CStifItemParser& /* aItem */ ) |
|
236 { |
|
237 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ShutdownTesterL ------>"); |
|
238 // Print to UI |
|
239 _LIT( KTestModule, "CFusionMpxPlayer_ApiTest" ); |
|
240 _LIT( KWhere, "In ShutdownTesterL" ); |
|
241 TestModuleIf().Printf( 0, KTestModule, KWhere ); |
|
242 // Print to log file |
|
243 iLog->Log( KWhere ); |
|
244 |
|
245 iShutdownCalled = ETrue; |
|
246 |
|
247 // Tell tester exe to shutdown. |
|
248 if( iProcess.ExitReason() == KErrNone && iProcess.ExitType() == EExitPending ) |
|
249 { |
|
250 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: Setting cmd EVcxFusionMpxPlayerCommandShutdown and waiting response ----->"); |
|
251 TRAP_IGNORE( SendExeCmdL( EVcxFusionMpxPlayerCommandShutdown ) ); |
|
252 User::After( 3000 ); |
|
253 } |
|
254 |
|
255 // Check the shutdown. |
|
256 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit type: %d", iProcess.ExitType()); |
|
257 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit reason: %d", iProcess.ExitReason()); |
|
258 TExitCategoryName exitCatName = iProcess.ExitCategory(); |
|
259 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit category: %S", &exitCatName); |
|
260 |
|
261 TInt err = iProcess.ExitReason(); |
|
262 |
|
263 if( err == KErrNone && iProcess.ExitType() != EExitKill && exitCatName.Length() == 0 ) |
|
264 { |
|
265 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: No exit error, no panic but exit type is unusual or exe is stil running."); |
|
266 //err = KErrGeneral; // We don't care, test classes have been destroyed by now. |
|
267 } |
|
268 |
|
269 // Stop listening P&S changes. |
|
270 delete iTesterGetAckResponseSubscriber; |
|
271 iTesterGetAckResponseSubscriber = NULL; |
|
272 |
|
273 delete iTesterGetMessageListResponseSubscriber; |
|
274 iTesterGetMessageListResponseSubscriber = NULL; |
|
275 |
|
276 // Remove the P&S keys for this process. |
|
277 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase); |
|
278 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyCmdIntParam1 + iPSKeyBase); |
|
279 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyCmdIntParam2 + iPSKeyBase); |
|
280 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyCmdDescParam1 + iPSKeyBase); |
|
281 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase); |
|
282 RProperty::Delete( KFusionMpxPlayerTestPScategory, KFusionMpxPlayerTestExePsKeyResponseError + iPSKeyBase); |
|
283 |
|
284 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ShutdownTesterL"); |
|
285 return err; |
|
286 } |
|
287 |
|
288 // ----------------------------------------------------------------------------- |
|
289 // CFusionMpxPlayer_ApiTest::CreateL |
|
290 // ----------------------------------------------------------------------------- |
|
291 // |
|
292 TInt CFusionMpxPlayer_ApiTest::CreateL( CStifItemParser& aItem ) |
|
293 { |
|
294 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::CreateL ------>"); |
|
295 |
|
296 // Print to UI |
|
297 _LIT( KFusionMpxPlayer_ApiTest, "FusionMpxPlayer_ApiTest" ); |
|
298 _LIT( KWhere, "In Create" ); |
|
299 TestModuleIf().Printf( 0, KFusionMpxPlayer_ApiTest, KWhere ); |
|
300 // Print to log file |
|
301 iLog->Log( KWhere ); |
|
302 |
|
303 iCommandWait = ETrue; |
|
304 |
|
305 User::LeaveIfError( iFs.Connect() ); |
|
306 |
|
307 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
308 |
|
309 iTestCommon = CVCXTestCommon::NewL(); |
|
310 iWait = CIptvTestActiveWait::NewL(); |
|
311 iTimeoutTimer = CIptvTestTimer::NewL( *this, KTimeoutTimerId ); |
|
312 |
|
313 // Start tester exe process |
|
314 User::LeaveIfError( iProcess.Create( _L("FusionMpxPlayerTestExeUi.exe"), _L("") ) ); |
|
315 User::After( 2000000 ); |
|
316 iProcess.Resume(); |
|
317 User::After( 2000000 ); |
|
318 |
|
319 TesterExeAliveL(); |
|
320 |
|
321 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: tester exe started ok ------>"); |
|
322 |
|
323 User::LeaveIfError( CVCXTestCommon::GetPSProperty( KFusionMpxPlayerTestPScategory, |
|
324 KFusionMpxPlayerTestExeGlobalTesterCount, iPSKeyBase ) ); |
|
325 iPSKeyBase = iPSKeyBase * 1000 + iProcess.Id(); |
|
326 |
|
327 // Start listening P&S for the tester responses. |
|
328 iTesterGetAckResponseSubscriber = CVCXTestPSSubscriber::NewL( KFusionMpxPlayerTestPScategory, |
|
329 KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase, RProperty::EInt, this ); |
|
330 iTesterGetAckResponseSubscriber->Start(); |
|
331 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Listening P&S key KFusionMpxPlayerTestExePsKeyResponse: %d", KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase); |
|
332 |
|
333 TTime time; |
|
334 time.HomeTime(); |
|
335 iRandomSeed = time.Int64(); |
|
336 |
|
337 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::CreateL"); |
|
338 return KErrNone; |
|
339 } |
|
340 |
|
341 // ----------------------------------------------------------------------------- |
|
342 // CFusionMpxPlayer_ApiTest::OpenRandomFileL |
|
343 // ----------------------------------------------------------------------------- |
|
344 // |
|
345 TInt CFusionMpxPlayer_ApiTest::OpenRandomFileL( CStifItemParser& aItem ) |
|
346 { |
|
347 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::OpenRandomFileL ------>"); |
|
348 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
349 |
|
350 TInt fileNum = ( Math::Rand( iRandomSeed ) % 5 ); |
|
351 TBuf<256> file( _L(":\\testing\\data\\") ); |
|
352 |
|
353 switch( fileNum ) |
|
354 { |
|
355 case 0: |
|
356 { |
|
357 file.Append( _L("sotajumala1.3gp") ); |
|
358 } |
|
359 break; |
|
360 case 1: |
|
361 { |
|
362 file.Append( _L("happytreefriends_mpeg4.mp4") ); |
|
363 } |
|
364 break; |
|
365 case 2: |
|
366 { |
|
367 file.Append( _L("prettyfu.3gp") ); |
|
368 } |
|
369 break; |
|
370 case 3: |
|
371 { |
|
372 file.Append( _L("SufferWell.3gp") ); |
|
373 } |
|
374 break; |
|
375 case 4: |
|
376 { |
|
377 file.Append( _L("5thelement_mpeg4.mp4") ); |
|
378 } |
|
379 break; |
|
380 default: |
|
381 { |
|
382 file.Append( _L("5thelement_mpeg4.mp4") ); |
|
383 } |
|
384 break; |
|
385 } |
|
386 |
|
387 // Find which drive the file is on. |
|
388 TBuf<256> path; |
|
389 path.Copy( _L("c") ); |
|
390 path.Append( file ); |
|
391 if( !BaflUtils::FileExists( iFs, path ) ) |
|
392 { |
|
393 path.Copy( _L("e") ); |
|
394 path.Append( file ); |
|
395 if( !BaflUtils::FileExists( iFs, path ) ) |
|
396 { |
|
397 path.Copy( _L("f") ); |
|
398 path.Append( file ); |
|
399 if( !BaflUtils::FileExists( iFs, path ) ) |
|
400 { |
|
401 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: Error! Test video not found!"); |
|
402 User::Leave( KErrNotFound ); |
|
403 } |
|
404 } |
|
405 } |
|
406 |
|
407 SendExeCmdL( EVcxFusionMpxPlayerCommandOpenLocalFile, path ); |
|
408 |
|
409 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::OpenRandomFileL"); |
|
410 return KErrNone; |
|
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // CFusionMpxPlayer_ApiTest::OpenLocalFileL |
|
415 // ----------------------------------------------------------------------------- |
|
416 // |
|
417 TInt CFusionMpxPlayer_ApiTest::OpenLocalFileL( CStifItemParser& aItem ) |
|
418 { |
|
419 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::OpenLocalFileL ------>"); |
|
420 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
421 |
|
422 TPtrC file; |
|
423 User::LeaveIfError( aItem.GetNextString( file ) ); |
|
424 |
|
425 SendExeCmdL( EVcxFusionMpxPlayerCommandOpenLocalFile, file ); |
|
426 |
|
427 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::OpenLocalFileL"); |
|
428 return KErrNone; |
|
429 } |
|
430 |
|
431 // ----------------------------------------------------------------------------- |
|
432 // CFusionMpxPlayer_ApiTest::OpenUrlL |
|
433 // ----------------------------------------------------------------------------- |
|
434 // |
|
435 TInt CFusionMpxPlayer_ApiTest::OpenUrlL( CStifItemParser& aItem ) |
|
436 { |
|
437 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::OpenUrlL ------>"); |
|
438 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
439 |
|
440 TPtrC url; |
|
441 User::LeaveIfError( aItem.GetNextString( url ) ); |
|
442 |
|
443 TPtrC iapName; |
|
444 User::LeaveIfError( aItem.GetNextString( iapName ) ); |
|
445 |
|
446 TUint32 iapId; |
|
447 User::LeaveIfError( iTestCommon->GetIapIdL( iapName, iapId ) ); |
|
448 |
|
449 SendExeCmdL( EVcxFusionMpxPlayerCommandOpenUrl, url, iapId ); |
|
450 |
|
451 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::OpenUrlL"); |
|
452 return KErrNone; |
|
453 } |
|
454 |
|
455 // ----------------------------------------------------------------------------- |
|
456 // CFusionMpxPlayer_ApiTest::PlayL |
|
457 // ----------------------------------------------------------------------------- |
|
458 // |
|
459 TInt CFusionMpxPlayer_ApiTest::PlayL( CStifItemParser& aItem ) |
|
460 { |
|
461 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PlayL ------>"); |
|
462 |
|
463 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
464 |
|
465 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPlay ); |
|
466 |
|
467 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PlayL"); |
|
468 return KErrNone; |
|
469 } |
|
470 |
|
471 // ----------------------------------------------------------------------------- |
|
472 // CFusionMpxPlayer_ApiTest::PlayWithFadeInL |
|
473 // ----------------------------------------------------------------------------- |
|
474 // |
|
475 TInt CFusionMpxPlayer_ApiTest::PlayWithFadeInL( CStifItemParser& aItem ) |
|
476 { |
|
477 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PlayWithFadeInL ------>"); |
|
478 |
|
479 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
480 |
|
481 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPlayWithFadeIn ); |
|
482 |
|
483 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PlayWithFadeInL"); |
|
484 return KErrNone; |
|
485 } |
|
486 // ----------------------------------------------------------------------------- |
|
487 // CFusionMpxPlayer_ApiTest::PauseL |
|
488 // ----------------------------------------------------------------------------- |
|
489 // |
|
490 TInt CFusionMpxPlayer_ApiTest::PauseL( CStifItemParser& aItem ) |
|
491 { |
|
492 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PauseL ------>"); |
|
493 |
|
494 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
495 |
|
496 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPause ); |
|
497 |
|
498 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PauseL"); |
|
499 return KErrNone; |
|
500 } |
|
501 |
|
502 // ----------------------------------------------------------------------------- |
|
503 // CFusionMpxPlayer_ApiTest::StopL |
|
504 // ----------------------------------------------------------------------------- |
|
505 // |
|
506 TInt CFusionMpxPlayer_ApiTest::StopL( CStifItemParser& aItem ) |
|
507 { |
|
508 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::StopL ------>"); |
|
509 |
|
510 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
511 |
|
512 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdStop ); |
|
513 |
|
514 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::StopL"); |
|
515 return KErrNone; |
|
516 } |
|
517 |
|
518 // ----------------------------------------------------------------------------- |
|
519 // CFusionMpxPlayer_ApiTest::PlayPauseL |
|
520 // ----------------------------------------------------------------------------- |
|
521 // |
|
522 TInt CFusionMpxPlayer_ApiTest::PlayPauseL( CStifItemParser& aItem ) |
|
523 { |
|
524 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PlayPauseL ------>"); |
|
525 |
|
526 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
527 |
|
528 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPlayPause ); |
|
529 |
|
530 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PlayPauseL"); |
|
531 return KErrNone; |
|
532 } |
|
533 |
|
534 // ----------------------------------------------------------------------------- |
|
535 // CFusionMpxPlayer_ApiTest::NextL |
|
536 // ----------------------------------------------------------------------------- |
|
537 // |
|
538 TInt CFusionMpxPlayer_ApiTest::NextL( CStifItemParser& aItem ) |
|
539 { |
|
540 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::NextL ------>"); |
|
541 |
|
542 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
543 |
|
544 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdNext ); |
|
545 |
|
546 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::NextL"); |
|
547 return KErrNone; |
|
548 } |
|
549 |
|
550 // ----------------------------------------------------------------------------- |
|
551 // CFusionMpxPlayer_ApiTest::PreviousL |
|
552 // ----------------------------------------------------------------------------- |
|
553 // |
|
554 TInt CFusionMpxPlayer_ApiTest::PreviousL( CStifItemParser& aItem ) |
|
555 { |
|
556 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PreviousL ------>"); |
|
557 |
|
558 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
559 |
|
560 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPrevious ); |
|
561 |
|
562 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PreviousL"); |
|
563 return KErrNone; |
|
564 } |
|
565 |
|
566 // ----------------------------------------------------------------------------- |
|
567 // CFusionMpxPlayer_ApiTest::ReplayL |
|
568 // ----------------------------------------------------------------------------- |
|
569 // |
|
570 TInt CFusionMpxPlayer_ApiTest::ReplayL( CStifItemParser& aItem ) |
|
571 { |
|
572 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ReplayL ------>"); |
|
573 |
|
574 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
575 |
|
576 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdReplay ); |
|
577 |
|
578 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ReplayL"); |
|
579 return KErrNone; |
|
580 } |
|
581 |
|
582 // ----------------------------------------------------------------------------- |
|
583 // CFusionMpxPlayer_ApiTest::StartSeekForwardL |
|
584 // ----------------------------------------------------------------------------- |
|
585 // |
|
586 TInt CFusionMpxPlayer_ApiTest::StartSeekForwardL( CStifItemParser& aItem ) |
|
587 { |
|
588 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::StartSeekForwardL ------>"); |
|
589 |
|
590 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
591 |
|
592 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdStartSeekForward ); |
|
593 |
|
594 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::StartSeekForwardL"); |
|
595 return KErrNone; |
|
596 } |
|
597 |
|
598 // ----------------------------------------------------------------------------- |
|
599 // CFusionMpxPlayer_ApiTest::StartSeekBackwardL |
|
600 // ----------------------------------------------------------------------------- |
|
601 // |
|
602 TInt CFusionMpxPlayer_ApiTest::StartSeekBackwardL( CStifItemParser& aItem ) |
|
603 { |
|
604 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::StartSeekBackwardL ------>"); |
|
605 |
|
606 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
607 |
|
608 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdStartSeekBackward ); |
|
609 |
|
610 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::StartSeekBackwardL"); |
|
611 return KErrNone; |
|
612 } |
|
613 |
|
614 // ----------------------------------------------------------------------------- |
|
615 // CFusionMpxPlayer_ApiTest::StopSeekingL |
|
616 // ----------------------------------------------------------------------------- |
|
617 // |
|
618 TInt CFusionMpxPlayer_ApiTest::StopSeekingL( CStifItemParser& aItem ) |
|
619 { |
|
620 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::StopSeekingL ------>"); |
|
621 |
|
622 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
623 |
|
624 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdStopSeeking ); |
|
625 |
|
626 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::StopSeekingL"); |
|
627 return KErrNone; |
|
628 } |
|
629 |
|
630 // ----------------------------------------------------------------------------- |
|
631 // CFusionMpxPlayer_ApiTest::DecreaseVolumeL |
|
632 // ----------------------------------------------------------------------------- |
|
633 // |
|
634 TInt CFusionMpxPlayer_ApiTest::DecreaseVolumeL( CStifItemParser& aItem ) |
|
635 { |
|
636 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::DecreaseVolumeL ------>"); |
|
637 |
|
638 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
639 |
|
640 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdDecreaseVolume ); |
|
641 |
|
642 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::DecreaseVolumeL"); |
|
643 return KErrNone; |
|
644 } |
|
645 |
|
646 // ----------------------------------------------------------------------------- |
|
647 // CFusionMpxPlayer_ApiTest::IncreaseVolumeL |
|
648 // ----------------------------------------------------------------------------- |
|
649 // |
|
650 TInt CFusionMpxPlayer_ApiTest::IncreaseVolumeL( CStifItemParser& aItem ) |
|
651 { |
|
652 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::IncreaseVolumeL ------>"); |
|
653 |
|
654 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
655 |
|
656 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdIncreaseVolume ); |
|
657 |
|
658 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::IncreaseVolumeL"); |
|
659 return KErrNone; |
|
660 } |
|
661 |
|
662 // ----------------------------------------------------------------------------- |
|
663 // CFusionMpxPlayer_ApiTest::MuteVolumeL |
|
664 // ----------------------------------------------------------------------------- |
|
665 // |
|
666 TInt CFusionMpxPlayer_ApiTest::MuteVolumeL( CStifItemParser& aItem ) |
|
667 { |
|
668 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::MuteVolumeL ------>"); |
|
669 |
|
670 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
671 |
|
672 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdMuteVolume ); |
|
673 |
|
674 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::MuteVolumeL"); |
|
675 return KErrNone; |
|
676 } |
|
677 |
|
678 // ----------------------------------------------------------------------------- |
|
679 // CFusionMpxPlayer_ApiTest::UnMuteVolumeL |
|
680 // ----------------------------------------------------------------------------- |
|
681 // |
|
682 TInt CFusionMpxPlayer_ApiTest::UnMuteVolumeL( CStifItemParser& aItem ) |
|
683 { |
|
684 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::UnMuteVolumeL ------>"); |
|
685 |
|
686 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
687 |
|
688 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdUnMuteVolume ); |
|
689 |
|
690 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::UnMuteVolumeL"); |
|
691 return KErrNone; |
|
692 } |
|
693 |
|
694 // ----------------------------------------------------------------------------- |
|
695 // CFusionMpxPlayer_ApiTest::SetVolumeL |
|
696 // ----------------------------------------------------------------------------- |
|
697 // |
|
698 TInt CFusionMpxPlayer_ApiTest::SetVolumeL( CStifItemParser& aItem ) |
|
699 { |
|
700 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::SetVolumeL ------>"); |
|
701 |
|
702 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
703 |
|
704 TInt volume; |
|
705 User::LeaveIfError( aItem.GetNextInt( volume ) ); |
|
706 |
|
707 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdSetVolume, volume ); |
|
708 |
|
709 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::SetVolumeL"); |
|
710 return KErrNone; |
|
711 } |
|
712 |
|
713 // ----------------------------------------------------------------------------- |
|
714 // CFusionMpxPlayer_ApiTest::CloseL |
|
715 // ----------------------------------------------------------------------------- |
|
716 // |
|
717 TInt CFusionMpxPlayer_ApiTest::CloseL( CStifItemParser& aItem ) |
|
718 { |
|
719 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::CloseL ------>"); |
|
720 |
|
721 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
722 |
|
723 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdClose ); |
|
724 |
|
725 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::CloseL"); |
|
726 return KErrNone; |
|
727 } |
|
728 |
|
729 // ----------------------------------------------------------------------------- |
|
730 // CFusionMpxPlayer_ApiTest::ApplyEffectL |
|
731 // ----------------------------------------------------------------------------- |
|
732 // |
|
733 TInt CFusionMpxPlayer_ApiTest::ApplyEffectL( CStifItemParser& aItem ) |
|
734 { |
|
735 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ApplyEffectL ------>"); |
|
736 |
|
737 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
738 |
|
739 TInt effect; |
|
740 User::LeaveIfError( aItem.GetNextInt( effect ) ); |
|
741 |
|
742 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbApplyEffect, effect ); |
|
743 |
|
744 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ApplyEffectL"); |
|
745 return KErrNone; |
|
746 } |
|
747 |
|
748 // ----------------------------------------------------------------------------- |
|
749 // CFusionMpxPlayer_ApiTest::DisableEffectL |
|
750 // ----------------------------------------------------------------------------- |
|
751 // |
|
752 TInt CFusionMpxPlayer_ApiTest::DisableEffectL( CStifItemParser& aItem ) |
|
753 { |
|
754 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::DisableEffectL ------>"); |
|
755 |
|
756 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
757 |
|
758 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdDisableEffect ); |
|
759 |
|
760 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::DisableEffectL"); |
|
761 return KErrNone; |
|
762 } |
|
763 |
|
764 // ----------------------------------------------------------------------------- |
|
765 // CFusionMpxPlayer_ApiTest::PreservePositionL |
|
766 // ----------------------------------------------------------------------------- |
|
767 // |
|
768 TInt CFusionMpxPlayer_ApiTest::PreservePositionL( CStifItemParser& aItem ) |
|
769 { |
|
770 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PreservePositionL ------>"); |
|
771 |
|
772 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
773 |
|
774 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPreservePosition ); |
|
775 |
|
776 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PreservePositionL"); |
|
777 return KErrNone; |
|
778 } |
|
779 |
|
780 // ----------------------------------------------------------------------------- |
|
781 // CFusionMpxPlayer_ApiTest::PreserveStateL |
|
782 // ----------------------------------------------------------------------------- |
|
783 // |
|
784 TInt CFusionMpxPlayer_ApiTest::PreserveStateL( CStifItemParser& aItem ) |
|
785 { |
|
786 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::PreserveStateL ------>"); |
|
787 |
|
788 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
789 |
|
790 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdPreserveState ); |
|
791 |
|
792 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::PreserveStateL"); |
|
793 return KErrNone; |
|
794 } |
|
795 |
|
796 // ----------------------------------------------------------------------------- |
|
797 // CFusionMpxPlayer_ApiTest::CloseItemL |
|
798 // ----------------------------------------------------------------------------- |
|
799 // |
|
800 TInt CFusionMpxPlayer_ApiTest::CloseItemL( CStifItemParser& aItem ) |
|
801 { |
|
802 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::CloseItemL ------>"); |
|
803 |
|
804 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
805 |
|
806 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdCloseItem ); |
|
807 |
|
808 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::CloseItemL"); |
|
809 return KErrNone; |
|
810 } |
|
811 |
|
812 // ----------------------------------------------------------------------------- |
|
813 // CFusionMpxPlayer_ApiTest::CancelInitL |
|
814 // ----------------------------------------------------------------------------- |
|
815 // |
|
816 TInt CFusionMpxPlayer_ApiTest::CancelInitL( CStifItemParser& aItem ) |
|
817 { |
|
818 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::CancelInitL ------>"); |
|
819 |
|
820 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
821 |
|
822 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdCancelInit ); |
|
823 |
|
824 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::CancelInitL"); |
|
825 return KErrNone; |
|
826 } |
|
827 |
|
828 // ----------------------------------------------------------------------------- |
|
829 // CFusionMpxPlayer_ApiTest::ResetPreserveStateL |
|
830 // ----------------------------------------------------------------------------- |
|
831 // |
|
832 TInt CFusionMpxPlayer_ApiTest::ResetPreserveStateL( CStifItemParser& aItem ) |
|
833 { |
|
834 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ResetPreserveStateL ------>"); |
|
835 |
|
836 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
837 |
|
838 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdResetPreserveState ); |
|
839 |
|
840 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ResetPreserveStateL"); |
|
841 return KErrNone; |
|
842 } |
|
843 |
|
844 // ----------------------------------------------------------------------------- |
|
845 // CFusionMpxPlayer_ApiTest::UnloadNonActivePluginL |
|
846 // ----------------------------------------------------------------------------- |
|
847 // |
|
848 TInt CFusionMpxPlayer_ApiTest::UnloadNonActivePluginL( CStifItemParser& aItem ) |
|
849 { |
|
850 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::UnloadNonActivePluginL ------>"); |
|
851 |
|
852 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
853 |
|
854 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdUnloadNonActivePlugin ); |
|
855 |
|
856 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::UnloadNonActivePluginL"); |
|
857 return KErrNone; |
|
858 } |
|
859 |
|
860 // ----------------------------------------------------------------------------- |
|
861 // CFusionMpxPlayer_ApiTest::ClearKeyBufferL |
|
862 // ----------------------------------------------------------------------------- |
|
863 // |
|
864 TInt CFusionMpxPlayer_ApiTest::ClearKeyBufferL( CStifItemParser& aItem ) |
|
865 { |
|
866 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ClearKeyBufferL ------>"); |
|
867 |
|
868 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
869 |
|
870 SendExeCmdL( EVcxFusionMpxPlayerCommandGeneralPlaybackCommand, EPbCmdClearKeyBuffer ); |
|
871 |
|
872 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ClearKeyBufferL"); |
|
873 return KErrNone; |
|
874 } |
|
875 |
|
876 // ----------------------------------------------------------------------------- |
|
877 // CFusionMpxPlayer_ApiTest::VideoSeekForwardL |
|
878 // ----------------------------------------------------------------------------- |
|
879 // |
|
880 TInt CFusionMpxPlayer_ApiTest::VideoSeekForwardL( CStifItemParser& aItem ) |
|
881 { |
|
882 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoSeekForwardL ------>"); |
|
883 |
|
884 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
885 |
|
886 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdStartVideoSeekingForward ); |
|
887 |
|
888 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoSeekForwardL"); |
|
889 return KErrNone; |
|
890 } |
|
891 |
|
892 // ----------------------------------------------------------------------------- |
|
893 // CFusionMpxPlayer_ApiTest::VideoSeekBackwardL |
|
894 // ----------------------------------------------------------------------------- |
|
895 // |
|
896 TInt CFusionMpxPlayer_ApiTest::VideoSeekBackwardL( CStifItemParser& aItem ) |
|
897 { |
|
898 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoSeekBackwardL ------>"); |
|
899 |
|
900 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
901 |
|
902 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdStartVideoSeekingBackward ); |
|
903 |
|
904 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoSeekBackwardL"); |
|
905 return KErrNone; |
|
906 } |
|
907 |
|
908 // ----------------------------------------------------------------------------- |
|
909 // CFusionMpxPlayer_ApiTest::VideoEndSeekL |
|
910 // ----------------------------------------------------------------------------- |
|
911 // |
|
912 TInt CFusionMpxPlayer_ApiTest::VideoEndSeekL( CStifItemParser& aItem ) |
|
913 { |
|
914 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoEndSeekL ------>"); |
|
915 |
|
916 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
917 |
|
918 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdStopVideoSeeking ); |
|
919 |
|
920 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoEndSeekL"); |
|
921 return KErrNone; |
|
922 } |
|
923 |
|
924 // ----------------------------------------------------------------------------- |
|
925 // CFusionMpxPlayer_ApiTest::VideoNaturalAspectRatioL |
|
926 // ----------------------------------------------------------------------------- |
|
927 // |
|
928 TInt CFusionMpxPlayer_ApiTest::VideoNaturalAspectRatioL( CStifItemParser& aItem ) |
|
929 { |
|
930 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoNaturalAspectRatioL ------>"); |
|
931 |
|
932 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
933 |
|
934 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdNaturalAspectRatio ); |
|
935 |
|
936 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoNaturalAspectRatioL"); |
|
937 return KErrNone; |
|
938 } |
|
939 |
|
940 // ----------------------------------------------------------------------------- |
|
941 // CFusionMpxPlayer_ApiTest::VideoZoomAspectRatioL |
|
942 // ----------------------------------------------------------------------------- |
|
943 // |
|
944 TInt CFusionMpxPlayer_ApiTest::VideoZoomAspectRatioL( CStifItemParser& aItem ) |
|
945 { |
|
946 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoZoomAspectRatioL ------>"); |
|
947 |
|
948 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
949 |
|
950 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdZoomAspectRatio ); |
|
951 |
|
952 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoZoomAspectRatioL"); |
|
953 return KErrNone; |
|
954 } |
|
955 |
|
956 // ----------------------------------------------------------------------------- |
|
957 // CFusionMpxPlayer_ApiTest::VideoStretchAspectRatioL |
|
958 // ----------------------------------------------------------------------------- |
|
959 // |
|
960 TInt CFusionMpxPlayer_ApiTest::VideoStretchAspectRatioL( CStifItemParser& aItem ) |
|
961 { |
|
962 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoStretchAspectRatioL ------>"); |
|
963 |
|
964 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
965 |
|
966 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdStretchAspectRatio ); |
|
967 |
|
968 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoStretchAspectRatioL"); |
|
969 return KErrNone; |
|
970 } |
|
971 |
|
972 // ----------------------------------------------------------------------------- |
|
973 // CFusionMpxPlayer_ApiTest::VideoDefaultAspectRatioL |
|
974 // ----------------------------------------------------------------------------- |
|
975 // |
|
976 TInt CFusionMpxPlayer_ApiTest::VideoDefaultAspectRatioL( CStifItemParser& aItem ) |
|
977 { |
|
978 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoDefaultAspectRatioL ------>"); |
|
979 |
|
980 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
981 |
|
982 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdSetDefaultAspectRatio ); |
|
983 |
|
984 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoDefaultAspectRatioL"); |
|
985 return KErrNone; |
|
986 } |
|
987 |
|
988 // ----------------------------------------------------------------------------- |
|
989 // CFusionMpxPlayer_ApiTest::VideoHandleForegroundL |
|
990 // ----------------------------------------------------------------------------- |
|
991 // |
|
992 TInt CFusionMpxPlayer_ApiTest::VideoHandleForegroundL( CStifItemParser& aItem ) |
|
993 { |
|
994 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoHandleForegroundL ------>"); |
|
995 |
|
996 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
997 |
|
998 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdHandleForeground ); |
|
999 |
|
1000 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoHandleForegroundL"); |
|
1001 return KErrNone; |
|
1002 } |
|
1003 |
|
1004 // ----------------------------------------------------------------------------- |
|
1005 // CFusionMpxPlayer_ApiTest::VideoHandleBackgroundL |
|
1006 // ----------------------------------------------------------------------------- |
|
1007 // |
|
1008 TInt CFusionMpxPlayer_ApiTest::VideoHandleBackgroundL( CStifItemParser& aItem ) |
|
1009 { |
|
1010 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::VideoHandleBackgroundL ------>"); |
|
1011 |
|
1012 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
1013 |
|
1014 SendExeCmdL( EVcxFusionMpxPlayerCommandVideoPlaybackCommand, EPbCmdHandleBackground); |
|
1015 |
|
1016 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::VideoHandleBackgroundL"); |
|
1017 return KErrNone; |
|
1018 } |
|
1019 |
|
1020 // ----------------------------------------------------------------------------- |
|
1021 // CFusionMpxPlayer_ApiTest::ValueChangedL |
|
1022 // ----------------------------------------------------------------------------- |
|
1023 // |
|
1024 void CFusionMpxPlayer_ApiTest::ValueChangedL( const TUid& aUid, const TUint32& aKey, const TInt& aValue ) |
|
1025 { |
|
1026 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ValueChangedL ------>"); |
|
1027 |
|
1028 if( aUid == KFusionMpxPlayerTestPScategory ) |
|
1029 { |
|
1030 if( aKey == KFusionMpxPlayerTestExePsKeyResponse + iPSKeyBase ) |
|
1031 { |
|
1032 switch( aValue ) |
|
1033 { |
|
1034 case EVcxFusionMpxPlayerResponseGeneralError: |
|
1035 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: received response EVcxFusionMpxPlayerResponseGeneralError ------>"); |
|
1036 iTimeoutTimer->Cancel(); |
|
1037 iWait->Stop(); |
|
1038 break; |
|
1039 |
|
1040 case EVcxFusionMpxPlayerResponseCommandComplete: |
|
1041 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: received response EVcxFusionMpxPlayerResponseCommandComplete ------>"); |
|
1042 iTimeoutTimer->Cancel(); |
|
1043 iWait->Stop(); |
|
1044 iCommandComplete = ETrue; |
|
1045 break; |
|
1046 |
|
1047 case EVcxFusionMpxPlayerResponseShutdown: |
|
1048 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: received response EVcxFusionMpxPlayerResponseShutdown ------>"); |
|
1049 iTimeoutTimer->Cancel(); |
|
1050 iWait->Stop(); |
|
1051 iCommandComplete = ETrue; |
|
1052 break; |
|
1053 |
|
1054 default: |
|
1055 break; |
|
1056 } |
|
1057 |
|
1058 CVCXTestCommon::GetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1059 KFusionMpxPlayerTestExePsKeyResponseError + iPSKeyBase, iError ); |
|
1060 |
|
1061 if( iError != KErrNone ) |
|
1062 { |
|
1063 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: response error: %d ----->", iError); |
|
1064 User::Leave( iError ); |
|
1065 } |
|
1066 } |
|
1067 } |
|
1068 |
|
1069 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ValueChangedL"); |
|
1070 } |
|
1071 |
|
1072 // ----------------------------------------------------------------------------- |
|
1073 // CFusionMpxPlayer_ApiTest::ValueChangedL |
|
1074 // ----------------------------------------------------------------------------- |
|
1075 // |
|
1076 void CFusionMpxPlayer_ApiTest::ValueChangedL( const TUid& aUid, const TUint32& /* aKey */, const TDesC& /* aValue */ ) |
|
1077 { |
|
1078 VCXLOGLO1(">>>CFusionMpxPlayer_ApiTest::ValueChangedL ------>"); |
|
1079 |
|
1080 if( aUid == KFusionMpxPlayerTestPScategory ) |
|
1081 { |
|
1082 |
|
1083 } |
|
1084 |
|
1085 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::ValueChangedL"); |
|
1086 } |
|
1087 |
|
1088 // ----------------------------------------------------------------------------- |
|
1089 // CFusionMpxPlayer_ApiTest::TimerComplete |
|
1090 // ----------------------------------------------------------------------------- |
|
1091 // |
|
1092 void CFusionMpxPlayer_ApiTest::TimerComplete( TInt aTimerId, TInt aError ) |
|
1093 { |
|
1094 VCXLOGLO2(">>>CFusionMpxPlayer_ApiTest::TimerComplete, err: %d ------>", aError); |
|
1095 |
|
1096 if( aError == KErrNone && aTimerId == KTimeoutTimerId ) |
|
1097 { |
|
1098 iError = KErrTimedOut; |
|
1099 iWait->Stop(); |
|
1100 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: TIMEOUT!"); |
|
1101 } |
|
1102 |
|
1103 VCXLOGLO1("<<<CFusionMpxPlayer_ApiTest::TimerComplete"); |
|
1104 } |
|
1105 |
|
1106 // ----------------------------------------------------------------------------- |
|
1107 // CFusionMpxPlayer_ApiTest::TesterExeAliveL |
|
1108 // ----------------------------------------------------------------------------- |
|
1109 // |
|
1110 void CFusionMpxPlayer_ApiTest::TesterExeAliveL() |
|
1111 { |
|
1112 if( iProcess.ExitType() != EExitPending || iProcess.ExitReason() != KErrNone ) |
|
1113 { |
|
1114 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: ERROR: Tester process has terminated!"); |
|
1115 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit type: %d", iProcess.ExitType()); |
|
1116 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit reason: %d", iProcess.ExitReason()); |
|
1117 TExitCategoryName exitCatName = iProcess.ExitCategory(); |
|
1118 VCXLOGLO2("CFusionMpxPlayer_ApiTest:: Exit category: %S", &exitCatName); |
|
1119 User::Leave( KErrGeneral ); |
|
1120 } |
|
1121 } |
|
1122 |
|
1123 // ----------------------------------------------------------------------------- |
|
1124 // CFusionMpxPlayer_ApiTest::SendExeCmdL |
|
1125 // ----------------------------------------------------------------------------- |
|
1126 // |
|
1127 void CFusionMpxPlayer_ApiTest::SendExeCmdL( TInt aCmd ) |
|
1128 { |
|
1129 iCommandComplete = EFalse; |
|
1130 |
|
1131 VCXLOGLO2("CFusionMpxPlayer_ApiTest::SendExeCmdL aCmd: %d", aCmd); |
|
1132 |
|
1133 // Set the cmd. |
|
1134 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1135 KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase, aCmd ) ); |
|
1136 |
|
1137 WaitForCommandL(); |
|
1138 } |
|
1139 |
|
1140 // ----------------------------------------------------------------------------- |
|
1141 // CFusionMpxPlayer_ApiTest::SendExeCmdL |
|
1142 // ----------------------------------------------------------------------------- |
|
1143 // |
|
1144 void CFusionMpxPlayer_ApiTest::SendExeCmdL( TInt aCmd, TInt aParam1 ) |
|
1145 { |
|
1146 iCommandComplete = EFalse; |
|
1147 |
|
1148 VCXLOGLO3("CFusionMpxPlayer_ApiTest::SendExeCmdL aCmd: %d, aParam1: %d", aCmd, aParam1); |
|
1149 |
|
1150 // Set parameter for the command |
|
1151 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1152 KFusionMpxPlayerTestExePsKeyCmdIntParam1 + iPSKeyBase, aParam1 ) ); |
|
1153 |
|
1154 // Set the cmd. |
|
1155 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1156 KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase, aCmd ) ); |
|
1157 |
|
1158 WaitForCommandL(); |
|
1159 } |
|
1160 |
|
1161 // ----------------------------------------------------------------------------- |
|
1162 // CFusionMpxPlayer_ApiTest::SendExeCmdL |
|
1163 // ----------------------------------------------------------------------------- |
|
1164 // |
|
1165 void CFusionMpxPlayer_ApiTest::SendExeCmdL( TInt aCmd, TInt aParam1, TInt aParam2 ) |
|
1166 { |
|
1167 iCommandComplete = EFalse; |
|
1168 |
|
1169 VCXLOGLO4("CFusionMpxPlayer_ApiTest::SendExeCmdL aCmd: %d, aParam1: %d, aParam2: %d", aCmd, aParam1, aParam2); |
|
1170 |
|
1171 // Set parameter for the command |
|
1172 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1173 KFusionMpxPlayerTestExePsKeyCmdIntParam1 + iPSKeyBase, aParam1 ) ); |
|
1174 |
|
1175 // Set parameter for the command |
|
1176 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1177 KFusionMpxPlayerTestExePsKeyCmdIntParam2 + iPSKeyBase, aParam2 ) ); |
|
1178 |
|
1179 // Set the cmd. |
|
1180 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1181 KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase, aCmd ) ); |
|
1182 |
|
1183 WaitForCommandL(); |
|
1184 } |
|
1185 |
|
1186 // ----------------------------------------------------------------------------- |
|
1187 // CFusionMpxPlayer_ApiTest::SendExeCmdL |
|
1188 // ----------------------------------------------------------------------------- |
|
1189 // |
|
1190 void CFusionMpxPlayer_ApiTest::SendExeCmdL( TInt aCmd, const TDesC& aParam1 ) |
|
1191 { |
|
1192 iCommandComplete = EFalse; |
|
1193 |
|
1194 VCXLOGLO3("CFusionMpxPlayer_ApiTest::SendExeCmdL aCmd: %d, aParam1: '%S'", aCmd, &aParam1); |
|
1195 |
|
1196 // Set parameter for the command |
|
1197 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1198 KFusionMpxPlayerTestExePsKeyCmdDescParam1 + iPSKeyBase, aParam1 ) ); |
|
1199 |
|
1200 // Set the cmd. |
|
1201 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1202 KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase, aCmd ) ); |
|
1203 |
|
1204 WaitForCommandL(); |
|
1205 } |
|
1206 |
|
1207 // ----------------------------------------------------------------------------- |
|
1208 // CFusionMpxPlayer_ApiTest::SendExeCmdL |
|
1209 // ----------------------------------------------------------------------------- |
|
1210 // |
|
1211 void CFusionMpxPlayer_ApiTest::SendExeCmdL( TInt aCmd, const TDesC& aParam1, TInt aParam2 ) |
|
1212 { |
|
1213 iCommandComplete = EFalse; |
|
1214 |
|
1215 VCXLOGLO4("CFusionMpxPlayer_ApiTest::SendExeCmdL aCmd: %d, aParam1: '%S', aParam2: %d", aCmd, &aParam1, aParam2); |
|
1216 |
|
1217 // Set parameter for the command |
|
1218 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1219 KFusionMpxPlayerTestExePsKeyCmdDescParam1 + iPSKeyBase, aParam1 ) ); |
|
1220 |
|
1221 // Set parameter for the command |
|
1222 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1223 KFusionMpxPlayerTestExePsKeyCmdIntParam1 + iPSKeyBase, aParam2 ) ); |
|
1224 |
|
1225 // Set the cmd. |
|
1226 User::LeaveIfError( CVCXTestCommon::SetPSProperty( KFusionMpxPlayerTestPScategory, |
|
1227 KFusionMpxPlayerTestExePsKeyCmd + iPSKeyBase, aCmd ) ); |
|
1228 |
|
1229 WaitForCommandL(); |
|
1230 } |
|
1231 |
|
1232 // ----------------------------------------------------------------------------- |
|
1233 // CFusionMpxPlayer_ApiTest::WaitForCommandL |
|
1234 // ----------------------------------------------------------------------------- |
|
1235 // |
|
1236 void CFusionMpxPlayer_ApiTest::WaitForCommandL() |
|
1237 { |
|
1238 if( !iCommandWait ) return; |
|
1239 |
|
1240 if( !iCommandComplete ) |
|
1241 { |
|
1242 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: Waiting for command ------>"); |
|
1243 iTimeoutTimer->After( KFusionTestCommandTimeout ); |
|
1244 iWait->Start(); |
|
1245 VCXLOGLO1("CFusionMpxPlayer_ApiTest:: Wait done"); |
|
1246 } |
|
1247 |
|
1248 User::LeaveIfError( iError ); |
|
1249 } |
|
1250 |
|
1251 |
|
1252 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
1253 // None |
|
1254 |
|
1255 // [End of File] - Do not remove |
|