|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Header file: Video Player 2 Tests. |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef TESTVIDEOPLAYER2_H |
|
19 #define TESTVIDEOPLAYER2_H |
|
20 |
|
21 #include "tsi_mmf_vclntavi_stepbase.h" |
|
22 #include <surfaceeventhandler.h> |
|
23 |
|
24 /** |
|
25 * Load and play a video file using graphics surface |
|
26 * |
|
27 * RTestVclnt2PlayFile |
|
28 * |
|
29 */ |
|
30 class RTestVclnt2PlayFile : public RTestVclnt2AviPlayerStep |
|
31 { |
|
32 public: |
|
33 static RTestVclnt2PlayFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
34 |
|
35 protected: |
|
36 virtual TVerdict DoTestStepPreambleL(); |
|
37 virtual TVerdict DoTestStepPostambleL(); |
|
38 |
|
39 virtual void FsmL(TVclntTestPlayEvents aEventCode); |
|
40 |
|
41 virtual void HandleIdleL(); |
|
42 virtual void HandleOpenCompleteL(); |
|
43 virtual void HandlePrepareCompleteL(); |
|
44 virtual void HandlePlayCompleteL(); |
|
45 |
|
46 // called by HandlePrepareCompleteL to trigger the video playback |
|
47 virtual void StartPlayback(); |
|
48 |
|
49 // constructor |
|
50 RTestVclnt2PlayFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
51 }; |
|
52 #ifdef SYMBIAN_BUILD_GCE |
|
53 /** |
|
54 * Test CMediaClientVideoDisplay.This test makes sure that the new dll |
|
55 * (mediaclientvideodisplay) is loaded and used. |
|
56 * |
|
57 * RTestMediaClientVideoDisplay |
|
58 * |
|
59 */ |
|
60 class RTestMediaClientVideoDisplay : public RTestVclnt2AviPlayerStep |
|
61 { |
|
62 public: |
|
63 static RTestMediaClientVideoDisplay* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
64 |
|
65 protected: |
|
66 virtual TVerdict DoTestStepPreambleL(); |
|
67 virtual TVerdict DoTestStepPostambleL(); |
|
68 |
|
69 virtual void FsmL(TVclntTestPlayEvents aEventCode); |
|
70 |
|
71 virtual void HandleIdleL(); |
|
72 virtual void HandleOpenCompleteL(); |
|
73 virtual void HandlePrepareCompleteL(); |
|
74 virtual void HandlePlayCompleteL(); |
|
75 |
|
76 // called by HandlePrepareCompleteL to trigger the video playback |
|
77 virtual void StartPlayback(); |
|
78 |
|
79 // constructor |
|
80 RTestMediaClientVideoDisplay(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
81 }; |
|
82 |
|
83 #endif |
|
84 |
|
85 |
|
86 /** |
|
87 * Load and play a video file using graphics surface with default window position, video |
|
88 * extent and clip rect, then during playback, perform some actions specified within the |
|
89 * implementation of the function DoThisActionDuringPlaybackL(). Before exiting |
|
90 * DoThisActionDuringPlaybackL, SetActionPerformed() should be called to signal that |
|
91 * all user action to be performed during video playback is completed. |
|
92 * |
|
93 * RTestVclnt2ActionDuringVideoPlayback |
|
94 * |
|
95 */ |
|
96 class RTestVclnt2PerformActionDuringVideoPlayback : public RTestVclnt2PlayFile |
|
97 { |
|
98 protected: |
|
99 RTestVclnt2PerformActionDuringVideoPlayback(const TDesC& aTestName, |
|
100 const TDesC& aSectName, |
|
101 const TDesC& aKeyName, |
|
102 TInt aExpectedError); |
|
103 |
|
104 // overriden in this class to trigger start video playback and then proceed to |
|
105 // perform the action detailed within DoThisActionDuringPlaybackL |
|
106 virtual void StartPlayback(); |
|
107 |
|
108 virtual void HandlePlayCompleteL(); |
|
109 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer) = 0; |
|
110 |
|
111 private: |
|
112 TInt iActionError; |
|
113 }; |
|
114 |
|
115 |
|
116 /** |
|
117 * Load and play a video file using graphics surface with specific window position, video |
|
118 * extent and clip rect |
|
119 * |
|
120 * RTestVclnt2AddWin |
|
121 * |
|
122 */ |
|
123 class RTestVclnt2AddWin : public RTestVclnt2PlayFile |
|
124 { |
|
125 public: |
|
126 static RTestVclnt2AddWin* NewL(const TDesC& aTestName, |
|
127 const TDesC& aSectName, |
|
128 const TDesC& aKeyName, |
|
129 TInt aExpectedError); |
|
130 |
|
131 protected: |
|
132 // constructor |
|
133 RTestVclnt2AddWin(const TDesC& aTestName, |
|
134 const TDesC& aSectName, |
|
135 const TDesC& aKeyName, |
|
136 TInt aExpectedError); |
|
137 |
|
138 virtual void HandlePrepareCompleteL(); |
|
139 }; |
|
140 |
|
141 |
|
142 /** |
|
143 * Load and play a video file using graphics surface, then change the display window during playback |
|
144 * |
|
145 * RTestVclnt2RemoveWin |
|
146 * |
|
147 */ |
|
148 class RTestVclnt2RemoveWin : public RTestVclnt2PerformActionDuringVideoPlayback |
|
149 { |
|
150 public: |
|
151 static RTestVclnt2RemoveWin* NewL(const TDesC& aTestName, |
|
152 const TDesC& aSectName, |
|
153 const TDesC& aKeyName, |
|
154 TInt aExpectedError, |
|
155 TBool aAddBack); |
|
156 |
|
157 protected: |
|
158 virtual void HandlePrepareCompleteL(); |
|
159 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
160 |
|
161 private: |
|
162 // constructor |
|
163 RTestVclnt2RemoveWin(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TBool aAddBack); |
|
164 |
|
165 private: |
|
166 /** If true, Add the display back again after removing it. */ |
|
167 TBool iAddBack; |
|
168 }; |
|
169 |
|
170 |
|
171 /** |
|
172 * Load and play a video file using graphics surface, then change the window position during playback |
|
173 * |
|
174 * RTestVclnt2WinPos |
|
175 * |
|
176 */ |
|
177 class RTestVclnt2WinPos : public RTestVclnt2PerformActionDuringVideoPlayback |
|
178 { |
|
179 public: |
|
180 static RTestVclnt2WinPos* NewL(const TDesC& aTestName, |
|
181 const TDesC& aSectName, |
|
182 const TDesC& aKeyName, |
|
183 TInt aExpectedError); |
|
184 |
|
185 protected: |
|
186 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
187 |
|
188 private: |
|
189 RTestVclnt2WinPos(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
190 }; |
|
191 |
|
192 |
|
193 /** |
|
194 * Load and play a video file using graphics surface, then change the video extent during playback |
|
195 * |
|
196 * RTestVclnt2VideoExt |
|
197 * |
|
198 */ |
|
199 class RTestVclnt2VideoExt : public RTestVclnt2PerformActionDuringVideoPlayback |
|
200 { |
|
201 public: |
|
202 static RTestVclnt2VideoExt* NewL(const TDesC& aTestName, |
|
203 const TDesC& aSectName, |
|
204 const TDesC& aKeyName, |
|
205 TInt aExpectedError); |
|
206 |
|
207 protected: |
|
208 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
209 |
|
210 private: |
|
211 // constructor |
|
212 RTestVclnt2VideoExt(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
213 }; |
|
214 |
|
215 |
|
216 /** |
|
217 * Load and play a video file using graphics surface, then change the clipping rect during playback |
|
218 * |
|
219 * RTestVclnt2ClipRect |
|
220 * |
|
221 */ |
|
222 class RTestVclnt2ClipRect : public RTestVclnt2PerformActionDuringVideoPlayback |
|
223 { |
|
224 public: |
|
225 static RTestVclnt2ClipRect* NewL(const TDesC& aTestName, |
|
226 const TDesC& aSectName, |
|
227 const TDesC& aKeyName, |
|
228 TInt aExpectedError); |
|
229 |
|
230 protected: |
|
231 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
232 |
|
233 private: |
|
234 RTestVclnt2ClipRect(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
235 }; |
|
236 |
|
237 |
|
238 /** |
|
239 * Load and play a video file using graphics surface, then change the scale factor during playback |
|
240 * |
|
241 * RTestVclnt2Scale |
|
242 * |
|
243 */ |
|
244 class RTestVclnt2Scale : public RTestVclnt2PerformActionDuringVideoPlayback |
|
245 { |
|
246 public: |
|
247 static RTestVclnt2Scale* NewL(const TDesC& aTestName, |
|
248 const TDesC& aSectName, |
|
249 const TDesC& aKeyName, |
|
250 TInt aExpectedError); |
|
251 |
|
252 protected: |
|
253 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
254 |
|
255 virtual void HandlePrepareCompleteL(); |
|
256 |
|
257 private: |
|
258 // constructor |
|
259 RTestVclnt2Scale(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
260 }; |
|
261 |
|
262 /** |
|
263 * Load a video file, set the crop region and then play video using graphics surface with non-default window |
|
264 * clipping rect or video extent |
|
265 * |
|
266 * RTestVclnt2Viewport |
|
267 * |
|
268 */ |
|
269 class RTestVclnt2Viewport : public RTestVclnt2PlayFile |
|
270 { |
|
271 public: |
|
272 static RTestVclnt2Viewport* NewL(const TDesC& aTestName, |
|
273 const TDesC& aSectName, |
|
274 const TDesC& aKeyName, |
|
275 const TSize& aViewportSize, |
|
276 TInt aExpectedError = KErrNone); |
|
277 |
|
278 protected: |
|
279 virtual void HandlePrepareCompleteL(); |
|
280 |
|
281 private: |
|
282 void HandlePrepareCompleteL(const TRect& aCropRegion, const TRect& aVideoExtent, const TRect& aClipRect); |
|
283 |
|
284 // constructor |
|
285 RTestVclnt2Viewport(const TDesC& aTestName, |
|
286 const TDesC& aSectName, |
|
287 const TDesC& aKeyName, |
|
288 const TSize& aViewportSize, |
|
289 TInt aExpectedError); |
|
290 |
|
291 protected: |
|
292 TSize iViewportSize; |
|
293 }; |
|
294 |
|
295 /** |
|
296 * Load a video file, set an invalid crop region and then play video using graphics surface |
|
297 * |
|
298 * RTestVclnt2InvalidViewport |
|
299 * |
|
300 */ |
|
301 class RTestVclnt2InvalidViewport : public RTestVclnt2PlayFile |
|
302 { |
|
303 public: |
|
304 static RTestVclnt2InvalidViewport* NewL(const TDesC& aTestName, |
|
305 const TDesC& aSectName, |
|
306 const TDesC& aKeyName, |
|
307 TInt aExpectedError = KErrNone); |
|
308 |
|
309 protected: |
|
310 virtual void HandlePrepareCompleteL(); |
|
311 |
|
312 private: |
|
313 // constructor |
|
314 RTestVclnt2InvalidViewport(const TDesC& aTestName, |
|
315 const TDesC& aSectName, |
|
316 const TDesC& aKeyName, |
|
317 TInt aExpectedError); |
|
318 }; |
|
319 |
|
320 /** |
|
321 * Load and play a video file using graphics surface with rotation set |
|
322 * |
|
323 * RTestVclnt2Rotation |
|
324 * |
|
325 */ |
|
326 class RTestVclnt2Rotation : public RTestVclnt2PlayFile |
|
327 { |
|
328 public: |
|
329 static RTestVclnt2Rotation* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
330 |
|
331 protected: |
|
332 virtual void HandlePrepareCompleteL(); |
|
333 |
|
334 private: |
|
335 // constructor |
|
336 RTestVclnt2Rotation(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError) ; |
|
337 }; |
|
338 |
|
339 |
|
340 /** |
|
341 * Load and play a video file using graphics surface with specific crop region, autoscale, |
|
342 * video extent and clip rect settings. |
|
343 * |
|
344 * RTestVclnt2Settings |
|
345 * |
|
346 */ |
|
347 class RTestVclnt2Settings : public RTestVclnt2PlayFile |
|
348 { |
|
349 public: |
|
350 static RTestVclnt2Settings* NewL(const TDesC& aTestName, |
|
351 const TDesC& aSectName, |
|
352 const TDesC& aKeyName, |
|
353 TInt aExpectedError = KErrNone); |
|
354 |
|
355 protected: |
|
356 virtual void HandlePrepareCompleteL(); |
|
357 |
|
358 private: |
|
359 // constructor |
|
360 RTestVclnt2Settings(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError) ; |
|
361 }; |
|
362 |
|
363 /** |
|
364 * Load and play a video file using graphics surface with specific crop region, content alignment, |
|
365 * scale factor, video extent and clip rect settings. The video clip will be playbacked multiple times, |
|
366 * each with a different combination of the settings. |
|
367 * |
|
368 * RTestVclnt2SettingsAndAlignments |
|
369 * |
|
370 */ |
|
371 class RTestVclnt2SettingsAndAlignments : public RTestVclnt2PlayFile |
|
372 { |
|
373 public: |
|
374 static RTestVclnt2SettingsAndAlignments* NewL(const TDesC& aTestName, |
|
375 const TDesC& aSectName, |
|
376 const TDesC& aKeyName, |
|
377 TInt aExpectedError = KErrNone); |
|
378 |
|
379 protected: |
|
380 virtual void HandlePrepareCompleteL(); |
|
381 virtual void HandlePlayCompleteL(); |
|
382 virtual TVerdict DoTestStepPreambleL(); |
|
383 |
|
384 private: |
|
385 // constructor |
|
386 RTestVclnt2SettingsAndAlignments(const TDesC& aTestName, |
|
387 const TDesC& aSectName, |
|
388 const TDesC& aKeyName, |
|
389 TInt aExpectedError); |
|
390 |
|
391 // helpers |
|
392 void AddDisplayWindowL(const TRect& aCropRegion); |
|
393 void SetCropRegionL(TRect& aCropRegion); |
|
394 void SetContentOffsetL(); |
|
395 void SetScaleFactorL(); |
|
396 void SetContentAlignmentL(); |
|
397 |
|
398 private: |
|
399 TInt iCount; |
|
400 }; |
|
401 |
|
402 |
|
403 /** |
|
404 * Load and play a video file using graphics surface on a second display |
|
405 * |
|
406 * RTestVclnt2SecDisplay |
|
407 * |
|
408 */ |
|
409 class RTestVclnt2SecDisplay : public RTestVclnt2PlayFile |
|
410 { |
|
411 public: |
|
412 static RTestVclnt2SecDisplay* NewL(const TDesC& aTestName, |
|
413 const TDesC& aSectName, |
|
414 const TDesC& aKeyName, |
|
415 TInt aExpectedError = KErrNone); |
|
416 |
|
417 protected: |
|
418 // test framework |
|
419 virtual TVerdict DoTestStepPreambleL(); |
|
420 virtual TVerdict DoTestStepPostambleL(); |
|
421 |
|
422 virtual void HandlePrepareCompleteL(); |
|
423 |
|
424 private: |
|
425 // constructor |
|
426 RTestVclnt2SecDisplay(const TDesC& aTestName, |
|
427 const TDesC& aSectName, |
|
428 const TDesC& aKeyName, |
|
429 TInt aExpectedError); |
|
430 |
|
431 private: |
|
432 CWsScreenDevice* iSecondScreen; |
|
433 }; |
|
434 |
|
435 |
|
436 /** |
|
437 * Load and play a video file using graphics surface, then pause the video and attempt |
|
438 * to change the crop region and continue to playback the video. |
|
439 * |
|
440 * RTestVclnt2CropRectPause |
|
441 * |
|
442 */ |
|
443 class RTestVclnt2CropRectPause : public RTestVclnt2PerformActionDuringVideoPlayback |
|
444 { |
|
445 public: |
|
446 static RTestVclnt2CropRectPause* NewL(const TDesC& aTestName, |
|
447 const TDesC& aSectName, |
|
448 const TDesC& aKeyName, |
|
449 TInt aExpectedError = KErrNone); |
|
450 |
|
451 protected: |
|
452 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayfser); |
|
453 |
|
454 private: |
|
455 RTestVclnt2CropRectPause(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
456 }; |
|
457 |
|
458 |
|
459 /** |
|
460 * Load and play a video file using graphics surface with overlay graphics on top of video picture |
|
461 * |
|
462 * RTestVclnt2Overlay |
|
463 * |
|
464 */ |
|
465 class RTestVclnt2Overlay : public RTestVclnt2PlayFile |
|
466 { |
|
467 public: |
|
468 static RTestVclnt2Overlay* NewL(const TDesC& aTestName, |
|
469 const TDesC& aSectName, |
|
470 const TDesC& aKeyName, |
|
471 TInt aExpectedError); |
|
472 |
|
473 protected: |
|
474 // constructor |
|
475 RTestVclnt2Overlay(const TDesC& aTestName, |
|
476 const TDesC& aSectName, |
|
477 const TDesC& aKeyName, |
|
478 TInt aExpectedError); |
|
479 |
|
480 virtual TVerdict DoTestStepPreambleL(); |
|
481 virtual TVerdict DoTestStepPostambleL(); |
|
482 |
|
483 virtual void HandlePrepareCompleteL(); |
|
484 |
|
485 private: |
|
486 CFont* iFont; |
|
487 }; |
|
488 |
|
489 /** |
|
490 * Load and play a video file using graphics surface and attempting to add the same display window twice |
|
491 * using default values |
|
492 * |
|
493 * RTestVclnt2AddWin2 |
|
494 * |
|
495 */ |
|
496 class RTestVclnt2AddWin2 : public RTestVclnt2PlayFile |
|
497 { |
|
498 public: |
|
499 static RTestVclnt2AddWin2* NewL(const TDesC& aTestName, |
|
500 const TDesC& aSectName, |
|
501 const TDesC& aKeyName, |
|
502 TInt aExpectedError); |
|
503 |
|
504 protected: |
|
505 // constructor |
|
506 RTestVclnt2AddWin2(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
507 |
|
508 virtual void HandlePrepareCompleteL(); |
|
509 }; |
|
510 |
|
511 /** |
|
512 * Load and play a video file using graphics surface and attempting to add the display window with specific |
|
513 * settings then add the same display window using default values again |
|
514 * |
|
515 * RTestVclnt2AddWin2WithSettings |
|
516 * |
|
517 */ |
|
518 class RTestVclnt2AddWin2WithSettings : public RTestVclnt2PlayFile |
|
519 { |
|
520 public: |
|
521 static RTestVclnt2AddWin2WithSettings* NewL(const TDesC& aTestName, |
|
522 const TDesC& aSectName, |
|
523 const TDesC& aKeyName, |
|
524 TInt aExpectedError); |
|
525 |
|
526 protected: |
|
527 // constructor |
|
528 RTestVclnt2AddWin2WithSettings(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
529 |
|
530 // state machine |
|
531 virtual void HandlePrepareCompleteL(); |
|
532 }; |
|
533 |
|
534 /** |
|
535 * Load and play a video file using graphics surface and set content offset and/or content alignment |
|
536 * |
|
537 * RTestVclnt2ContOffset |
|
538 * |
|
539 */ |
|
540 class RTestVclnt2ContOffset : public RTestVclnt2PlayFile |
|
541 { |
|
542 public: |
|
543 static RTestVclnt2ContOffset* NewL(const TDesC& aTestName, |
|
544 const TDesC& aSectName, |
|
545 const TDesC& aKeyName, |
|
546 TInt aExpectedError); |
|
547 |
|
548 protected: |
|
549 // state machine |
|
550 virtual void HandlePrepareCompleteL(); |
|
551 |
|
552 private: |
|
553 // constructor |
|
554 RTestVclnt2ContOffset(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
555 }; |
|
556 |
|
557 /** |
|
558 * Load and play a video file using graphics surface and set content offset during playback |
|
559 * |
|
560 * RTestVclnt2ContOffsetAtPlay |
|
561 * |
|
562 */ |
|
563 class RTestVclnt2ContOffsetAtPlay : public RTestVclnt2PerformActionDuringVideoPlayback |
|
564 { |
|
565 public: |
|
566 static RTestVclnt2ContOffsetAtPlay* NewL(const TDesC& aTestName, |
|
567 const TDesC& aSectName, |
|
568 const TDesC& aKeyName, |
|
569 TInt aExpectedError); |
|
570 |
|
571 protected: |
|
572 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
573 |
|
574 private: |
|
575 // constructor |
|
576 RTestVclnt2ContOffsetAtPlay(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
577 }; |
|
578 |
|
579 /** |
|
580 * Load and play a video file using graphics surface and set content aligment during playback |
|
581 * |
|
582 * RTestVclnt2Align |
|
583 * |
|
584 */ |
|
585 class RTestVclnt2Align : public RTestVclnt2PerformActionDuringVideoPlayback |
|
586 { |
|
587 public: |
|
588 static RTestVclnt2Align* NewL(const TDesC& aTestName, |
|
589 const TDesC& aSectName, |
|
590 const TDesC& aKeyName, |
|
591 TInt aExpectedError); |
|
592 |
|
593 protected: |
|
594 virtual void HandlePrepareCompleteL(); |
|
595 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
596 |
|
597 private: |
|
598 // constructor |
|
599 RTestVclnt2Align(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
600 }; |
|
601 |
|
602 /** |
|
603 * Load and play a video file using graphics surface and set auto scale |
|
604 * |
|
605 * RTestVclnt2AutoScale |
|
606 * |
|
607 */ |
|
608 class RTestVclnt2AutoScale : public RTestVclnt2PerformActionDuringVideoPlayback |
|
609 { |
|
610 public: |
|
611 static RTestVclnt2AutoScale* NewL(const TDesC& aTestName, |
|
612 const TDesC& aSectName, |
|
613 const TDesC& aKeyName, |
|
614 TInt aExpectedError); |
|
615 |
|
616 protected: |
|
617 virtual void HandlePrepareCompleteL(); |
|
618 virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer); |
|
619 |
|
620 private: |
|
621 RTestVclnt2AutoScale(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError); |
|
622 }; |
|
623 |
|
624 /** |
|
625 * Load and play a video file using graphics surface |
|
626 * |
|
627 * RTestVclnt2PlayFile |
|
628 * |
|
629 */ |
|
630 class RTestVclnt2OldController : public RTestVclnt2PlayFile |
|
631 { |
|
632 public: |
|
633 static RTestVclnt2OldController* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
634 |
|
635 protected: |
|
636 virtual void HandleIdleL(); |
|
637 virtual void HandlePrepareCompleteL(); |
|
638 |
|
639 private: |
|
640 RTestVclnt2OldController(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
641 }; |
|
642 |
|
643 /** |
|
644 * Without opening a file, try doing surface related functions |
|
645 * |
|
646 * RTestVclnt2NoFile |
|
647 * |
|
648 */ |
|
649 class RTestVclnt2NoFile : public RTestVclnt2PlayFile |
|
650 { |
|
651 public: |
|
652 static RTestVclnt2NoFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
653 |
|
654 protected: |
|
655 virtual void HandleIdleL(); |
|
656 |
|
657 private: |
|
658 RTestVclnt2NoFile(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
659 }; |
|
660 |
|
661 /** |
|
662 * Attempt to play video without display |
|
663 * |
|
664 * RTestVclnt2PlayAfterRemoveWin |
|
665 * |
|
666 */ |
|
667 class RTestVclnt2PlayAfterRemoveWin : public RTestVclnt2PlayFile |
|
668 { |
|
669 public: |
|
670 static RTestVclnt2PlayAfterRemoveWin* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
671 |
|
672 protected: |
|
673 virtual void HandlePrepareCompleteL(); |
|
674 virtual void HandlePlayCompleteL(); |
|
675 |
|
676 private: |
|
677 RTestVclnt2PlayAfterRemoveWin(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
678 |
|
679 private: |
|
680 TInt iPlayAttempt; |
|
681 }; |
|
682 |
|
683 /** |
|
684 * Use surface utility API without GCE support |
|
685 * |
|
686 * RTestVclnt2NoGce |
|
687 * |
|
688 */ |
|
689 class RTestVclnt2NoGce : public RTestVclnt2PlayFile |
|
690 { |
|
691 public: |
|
692 static RTestVclnt2NoGce* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
693 |
|
694 protected: |
|
695 virtual void HandleIdleL(); |
|
696 virtual void HandleOpenCompleteL(); |
|
697 |
|
698 private: |
|
699 RTestVclnt2NoGce(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
700 }; |
|
701 |
|
702 /** |
|
703 * Alloc tests (using Client heap) for Video Player utility 2. |
|
704 * |
|
705 * RTestVclnt2Alloc |
|
706 * |
|
707 */ |
|
708 class RTestVclnt2Alloc : public RTestVclnt2PlayFile |
|
709 { |
|
710 public: |
|
711 static RTestVclnt2Alloc* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
712 virtual TVerdict DoTestStepL(); |
|
713 |
|
714 protected: |
|
715 virtual TVerdict DoTestStepPreambleL(); |
|
716 virtual TVerdict PerformTestL(); |
|
717 |
|
718 private: |
|
719 RTestVclnt2Alloc(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
720 }; |
|
721 |
|
722 class RTestVclnt2InvalidScaleFactor : public RTestVclnt2PlayFile |
|
723 { |
|
724 public: |
|
725 static RTestVclnt2InvalidScaleFactor* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
726 |
|
727 protected: |
|
728 // From RTestVclnt2PlayFile |
|
729 void HandlePrepareCompleteL(); |
|
730 |
|
731 private: |
|
732 RTestVclnt2InvalidScaleFactor(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError); |
|
733 }; |
|
734 |
|
735 #endif // TESTVIDEOPLAYER2_H |