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