1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/inc/testvideoplayer2.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,735 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Header file: Video Player 2 Tests.
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef TESTVIDEOPLAYER2_H
1.22 +#define TESTVIDEOPLAYER2_H
1.23 +
1.24 +#include "tsi_mmf_vclntavi_stepbase.h"
1.25 +#include <surfaceeventhandler.h>
1.26 +
1.27 +/**
1.28 + * Load and play a video file using graphics surface
1.29 + *
1.30 + * RTestVclnt2PlayFile
1.31 + *
1.32 + */
1.33 +class RTestVclnt2PlayFile : public RTestVclnt2AviPlayerStep
1.34 + {
1.35 +public:
1.36 + static RTestVclnt2PlayFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.37 +
1.38 +protected:
1.39 + virtual TVerdict DoTestStepPreambleL();
1.40 + virtual TVerdict DoTestStepPostambleL();
1.41 +
1.42 + virtual void FsmL(TVclntTestPlayEvents aEventCode);
1.43 +
1.44 + virtual void HandleIdleL();
1.45 + virtual void HandleOpenCompleteL();
1.46 + virtual void HandlePrepareCompleteL();
1.47 + virtual void HandlePlayCompleteL();
1.48 +
1.49 + // called by HandlePrepareCompleteL to trigger the video playback
1.50 + virtual void StartPlayback();
1.51 +
1.52 + // constructor
1.53 + RTestVclnt2PlayFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.54 + };
1.55 +#ifdef SYMBIAN_BUILD_GCE
1.56 +/**
1.57 + * Test CMediaClientVideoDisplay.This test makes sure that the new dll
1.58 + * (mediaclientvideodisplay) is loaded and used.
1.59 + *
1.60 + * RTestMediaClientVideoDisplay
1.61 + *
1.62 + */
1.63 +class RTestMediaClientVideoDisplay : public RTestVclnt2AviPlayerStep
1.64 + {
1.65 +public:
1.66 + static RTestMediaClientVideoDisplay* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.67 +
1.68 +protected:
1.69 + virtual TVerdict DoTestStepPreambleL();
1.70 + virtual TVerdict DoTestStepPostambleL();
1.71 +
1.72 + virtual void FsmL(TVclntTestPlayEvents aEventCode);
1.73 +
1.74 + virtual void HandleIdleL();
1.75 + virtual void HandleOpenCompleteL();
1.76 + virtual void HandlePrepareCompleteL();
1.77 + virtual void HandlePlayCompleteL();
1.78 +
1.79 + // called by HandlePrepareCompleteL to trigger the video playback
1.80 + virtual void StartPlayback();
1.81 +
1.82 + // constructor
1.83 + RTestMediaClientVideoDisplay(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.84 + };
1.85 +
1.86 +#endif
1.87 +
1.88 +
1.89 +/**
1.90 + * Load and play a video file using graphics surface with default window position, video
1.91 + * extent and clip rect, then during playback, perform some actions specified within the
1.92 + * implementation of the function DoThisActionDuringPlaybackL(). Before exiting
1.93 + * DoThisActionDuringPlaybackL, SetActionPerformed() should be called to signal that
1.94 + * all user action to be performed during video playback is completed.
1.95 + *
1.96 + * RTestVclnt2ActionDuringVideoPlayback
1.97 + *
1.98 + */
1.99 +class RTestVclnt2PerformActionDuringVideoPlayback : public RTestVclnt2PlayFile
1.100 + {
1.101 +protected:
1.102 + RTestVclnt2PerformActionDuringVideoPlayback(const TDesC& aTestName,
1.103 + const TDesC& aSectName,
1.104 + const TDesC& aKeyName,
1.105 + TInt aExpectedError);
1.106 +
1.107 + // overriden in this class to trigger start video playback and then proceed to
1.108 + // perform the action detailed within DoThisActionDuringPlaybackL
1.109 + virtual void StartPlayback();
1.110 +
1.111 + virtual void HandlePlayCompleteL();
1.112 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer) = 0;
1.113 +
1.114 +private:
1.115 + TInt iActionError;
1.116 + };
1.117 +
1.118 +
1.119 +/**
1.120 + * Load and play a video file using graphics surface with specific window position, video
1.121 + * extent and clip rect
1.122 + *
1.123 + * RTestVclnt2AddWin
1.124 + *
1.125 + */
1.126 +class RTestVclnt2AddWin : public RTestVclnt2PlayFile
1.127 + {
1.128 +public:
1.129 + static RTestVclnt2AddWin* NewL(const TDesC& aTestName,
1.130 + const TDesC& aSectName,
1.131 + const TDesC& aKeyName,
1.132 + TInt aExpectedError);
1.133 +
1.134 +protected:
1.135 + // constructor
1.136 + RTestVclnt2AddWin(const TDesC& aTestName,
1.137 + const TDesC& aSectName,
1.138 + const TDesC& aKeyName,
1.139 + TInt aExpectedError);
1.140 +
1.141 + virtual void HandlePrepareCompleteL();
1.142 + };
1.143 +
1.144 +
1.145 +/**
1.146 + * Load and play a video file using graphics surface, then change the display window during playback
1.147 + *
1.148 + * RTestVclnt2RemoveWin
1.149 + *
1.150 + */
1.151 +class RTestVclnt2RemoveWin : public RTestVclnt2PerformActionDuringVideoPlayback
1.152 + {
1.153 +public:
1.154 + static RTestVclnt2RemoveWin* NewL(const TDesC& aTestName,
1.155 + const TDesC& aSectName,
1.156 + const TDesC& aKeyName,
1.157 + TInt aExpectedError,
1.158 + TBool aAddBack);
1.159 +
1.160 +protected:
1.161 + virtual void HandlePrepareCompleteL();
1.162 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.163 +
1.164 +private:
1.165 + // constructor
1.166 + RTestVclnt2RemoveWin(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError, TBool aAddBack);
1.167 +
1.168 +private:
1.169 + /** If true, Add the display back again after removing it. */
1.170 + TBool iAddBack;
1.171 + };
1.172 +
1.173 +
1.174 +/**
1.175 + * Load and play a video file using graphics surface, then change the window position during playback
1.176 + *
1.177 + * RTestVclnt2WinPos
1.178 + *
1.179 + */
1.180 +class RTestVclnt2WinPos : public RTestVclnt2PerformActionDuringVideoPlayback
1.181 + {
1.182 + public:
1.183 + static RTestVclnt2WinPos* NewL(const TDesC& aTestName,
1.184 + const TDesC& aSectName,
1.185 + const TDesC& aKeyName,
1.186 + TInt aExpectedError);
1.187 +
1.188 + protected:
1.189 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.190 +
1.191 + private:
1.192 + RTestVclnt2WinPos(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.193 + };
1.194 +
1.195 +
1.196 +/**
1.197 + * Load and play a video file using graphics surface, then change the video extent during playback
1.198 + *
1.199 + * RTestVclnt2VideoExt
1.200 + *
1.201 + */
1.202 +class RTestVclnt2VideoExt : public RTestVclnt2PerformActionDuringVideoPlayback
1.203 + {
1.204 + public:
1.205 + static RTestVclnt2VideoExt* NewL(const TDesC& aTestName,
1.206 + const TDesC& aSectName,
1.207 + const TDesC& aKeyName,
1.208 + TInt aExpectedError);
1.209 +
1.210 + protected:
1.211 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.212 +
1.213 + private:
1.214 + // constructor
1.215 + RTestVclnt2VideoExt(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.216 + };
1.217 +
1.218 +
1.219 +/**
1.220 + * Load and play a video file using graphics surface, then change the clipping rect during playback
1.221 + *
1.222 + * RTestVclnt2ClipRect
1.223 + *
1.224 + */
1.225 +class RTestVclnt2ClipRect : public RTestVclnt2PerformActionDuringVideoPlayback
1.226 + {
1.227 + public:
1.228 + static RTestVclnt2ClipRect* NewL(const TDesC& aTestName,
1.229 + const TDesC& aSectName,
1.230 + const TDesC& aKeyName,
1.231 + TInt aExpectedError);
1.232 +
1.233 + protected:
1.234 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.235 +
1.236 + private:
1.237 + RTestVclnt2ClipRect(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.238 + };
1.239 +
1.240 +
1.241 +/**
1.242 + * Load and play a video file using graphics surface, then change the scale factor during playback
1.243 + *
1.244 + * RTestVclnt2Scale
1.245 + *
1.246 + */
1.247 +class RTestVclnt2Scale : public RTestVclnt2PerformActionDuringVideoPlayback
1.248 + {
1.249 + public:
1.250 + static RTestVclnt2Scale* NewL(const TDesC& aTestName,
1.251 + const TDesC& aSectName,
1.252 + const TDesC& aKeyName,
1.253 + TInt aExpectedError);
1.254 +
1.255 + protected:
1.256 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.257 +
1.258 + virtual void HandlePrepareCompleteL();
1.259 +
1.260 + private:
1.261 + // constructor
1.262 + RTestVclnt2Scale(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.263 + };
1.264 +
1.265 +/**
1.266 + * Load a video file, set the crop region and then play video using graphics surface with non-default window
1.267 + * clipping rect or video extent
1.268 + *
1.269 + * RTestVclnt2Viewport
1.270 + *
1.271 + */
1.272 +class RTestVclnt2Viewport : public RTestVclnt2PlayFile
1.273 + {
1.274 +public:
1.275 + static RTestVclnt2Viewport* NewL(const TDesC& aTestName,
1.276 + const TDesC& aSectName,
1.277 + const TDesC& aKeyName,
1.278 + const TSize& aViewportSize,
1.279 + TInt aExpectedError = KErrNone);
1.280 +
1.281 +protected:
1.282 + virtual void HandlePrepareCompleteL();
1.283 +
1.284 +private:
1.285 + void HandlePrepareCompleteL(const TRect& aCropRegion, const TRect& aVideoExtent, const TRect& aClipRect);
1.286 +
1.287 + // constructor
1.288 + RTestVclnt2Viewport(const TDesC& aTestName,
1.289 + const TDesC& aSectName,
1.290 + const TDesC& aKeyName,
1.291 + const TSize& aViewportSize,
1.292 + TInt aExpectedError);
1.293 +
1.294 +protected:
1.295 + TSize iViewportSize;
1.296 + };
1.297 +
1.298 +/**
1.299 + * Load a video file, set an invalid crop region and then play video using graphics surface
1.300 + *
1.301 + * RTestVclnt2InvalidViewport
1.302 + *
1.303 + */
1.304 +class RTestVclnt2InvalidViewport : public RTestVclnt2PlayFile
1.305 + {
1.306 +public:
1.307 + static RTestVclnt2InvalidViewport* NewL(const TDesC& aTestName,
1.308 + const TDesC& aSectName,
1.309 + const TDesC& aKeyName,
1.310 + TInt aExpectedError = KErrNone);
1.311 +
1.312 +protected:
1.313 + virtual void HandlePrepareCompleteL();
1.314 +
1.315 +private:
1.316 + // constructor
1.317 + RTestVclnt2InvalidViewport(const TDesC& aTestName,
1.318 + const TDesC& aSectName,
1.319 + const TDesC& aKeyName,
1.320 + TInt aExpectedError);
1.321 + };
1.322 +
1.323 +/**
1.324 + * Load and play a video file using graphics surface with rotation set
1.325 + *
1.326 + * RTestVclnt2Rotation
1.327 + *
1.328 + */
1.329 +class RTestVclnt2Rotation : public RTestVclnt2PlayFile
1.330 + {
1.331 +public:
1.332 + static RTestVclnt2Rotation* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.333 +
1.334 +protected:
1.335 + virtual void HandlePrepareCompleteL();
1.336 +
1.337 +private:
1.338 + // constructor
1.339 + RTestVclnt2Rotation(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError) ;
1.340 + };
1.341 +
1.342 +
1.343 +/**
1.344 + * Load and play a video file using graphics surface with specific crop region, autoscale,
1.345 + * video extent and clip rect settings.
1.346 + *
1.347 + * RTestVclnt2Settings
1.348 + *
1.349 + */
1.350 +class RTestVclnt2Settings : public RTestVclnt2PlayFile
1.351 + {
1.352 +public:
1.353 + static RTestVclnt2Settings* NewL(const TDesC& aTestName,
1.354 + const TDesC& aSectName,
1.355 + const TDesC& aKeyName,
1.356 + TInt aExpectedError = KErrNone);
1.357 +
1.358 +protected:
1.359 + virtual void HandlePrepareCompleteL();
1.360 +
1.361 +private:
1.362 + // constructor
1.363 + RTestVclnt2Settings(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError) ;
1.364 + };
1.365 +
1.366 +/**
1.367 + * Load and play a video file using graphics surface with specific crop region, content alignment,
1.368 + * scale factor, video extent and clip rect settings. The video clip will be playbacked multiple times,
1.369 + * each with a different combination of the settings.
1.370 + *
1.371 + * RTestVclnt2SettingsAndAlignments
1.372 + *
1.373 + */
1.374 +class RTestVclnt2SettingsAndAlignments : public RTestVclnt2PlayFile
1.375 + {
1.376 +public:
1.377 + static RTestVclnt2SettingsAndAlignments* NewL(const TDesC& aTestName,
1.378 + const TDesC& aSectName,
1.379 + const TDesC& aKeyName,
1.380 + TInt aExpectedError = KErrNone);
1.381 +
1.382 +protected:
1.383 + virtual void HandlePrepareCompleteL();
1.384 + virtual void HandlePlayCompleteL();
1.385 + virtual TVerdict DoTestStepPreambleL();
1.386 +
1.387 +private:
1.388 + // constructor
1.389 + RTestVclnt2SettingsAndAlignments(const TDesC& aTestName,
1.390 + const TDesC& aSectName,
1.391 + const TDesC& aKeyName,
1.392 + TInt aExpectedError);
1.393 +
1.394 + // helpers
1.395 + void AddDisplayWindowL(const TRect& aCropRegion);
1.396 + void SetCropRegionL(TRect& aCropRegion);
1.397 + void SetContentOffsetL();
1.398 + void SetScaleFactorL();
1.399 + void SetContentAlignmentL();
1.400 +
1.401 +private:
1.402 + TInt iCount;
1.403 + };
1.404 +
1.405 +
1.406 +/**
1.407 + * Load and play a video file using graphics surface on a second display
1.408 + *
1.409 + * RTestVclnt2SecDisplay
1.410 + *
1.411 + */
1.412 +class RTestVclnt2SecDisplay : public RTestVclnt2PlayFile
1.413 + {
1.414 +public:
1.415 + static RTestVclnt2SecDisplay* NewL(const TDesC& aTestName,
1.416 + const TDesC& aSectName,
1.417 + const TDesC& aKeyName,
1.418 + TInt aExpectedError = KErrNone);
1.419 +
1.420 +protected:
1.421 + // test framework
1.422 + virtual TVerdict DoTestStepPreambleL();
1.423 + virtual TVerdict DoTestStepPostambleL();
1.424 +
1.425 + virtual void HandlePrepareCompleteL();
1.426 +
1.427 +private:
1.428 + // constructor
1.429 + RTestVclnt2SecDisplay(const TDesC& aTestName,
1.430 + const TDesC& aSectName,
1.431 + const TDesC& aKeyName,
1.432 + TInt aExpectedError);
1.433 +
1.434 +private:
1.435 + CWsScreenDevice* iSecondScreen;
1.436 + };
1.437 +
1.438 +
1.439 +/**
1.440 + * Load and play a video file using graphics surface, then pause the video and attempt
1.441 + * to change the crop region and continue to playback the video.
1.442 + *
1.443 + * RTestVclnt2CropRectPause
1.444 + *
1.445 + */
1.446 +class RTestVclnt2CropRectPause : public RTestVclnt2PerformActionDuringVideoPlayback
1.447 + {
1.448 + public:
1.449 + static RTestVclnt2CropRectPause* NewL(const TDesC& aTestName,
1.450 + const TDesC& aSectName,
1.451 + const TDesC& aKeyName,
1.452 + TInt aExpectedError = KErrNone);
1.453 +
1.454 + protected:
1.455 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayfser);
1.456 +
1.457 + private:
1.458 + RTestVclnt2CropRectPause(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.459 + };
1.460 +
1.461 +
1.462 +/**
1.463 + * Load and play a video file using graphics surface with overlay graphics on top of video picture
1.464 + *
1.465 + * RTestVclnt2Overlay
1.466 + *
1.467 + */
1.468 +class RTestVclnt2Overlay : public RTestVclnt2PlayFile
1.469 + {
1.470 +public:
1.471 + static RTestVclnt2Overlay* NewL(const TDesC& aTestName,
1.472 + const TDesC& aSectName,
1.473 + const TDesC& aKeyName,
1.474 + TInt aExpectedError);
1.475 +
1.476 +protected:
1.477 + // constructor
1.478 + RTestVclnt2Overlay(const TDesC& aTestName,
1.479 + const TDesC& aSectName,
1.480 + const TDesC& aKeyName,
1.481 + TInt aExpectedError);
1.482 +
1.483 + virtual TVerdict DoTestStepPreambleL();
1.484 + virtual TVerdict DoTestStepPostambleL();
1.485 +
1.486 + virtual void HandlePrepareCompleteL();
1.487 +
1.488 +private:
1.489 + CFont* iFont;
1.490 + };
1.491 +
1.492 +/**
1.493 + * Load and play a video file using graphics surface and attempting to add the same display window twice
1.494 + * using default values
1.495 + *
1.496 + * RTestVclnt2AddWin2
1.497 + *
1.498 + */
1.499 +class RTestVclnt2AddWin2 : public RTestVclnt2PlayFile
1.500 + {
1.501 +public:
1.502 + static RTestVclnt2AddWin2* NewL(const TDesC& aTestName,
1.503 + const TDesC& aSectName,
1.504 + const TDesC& aKeyName,
1.505 + TInt aExpectedError);
1.506 +
1.507 +protected:
1.508 + // constructor
1.509 + RTestVclnt2AddWin2(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.510 +
1.511 + virtual void HandlePrepareCompleteL();
1.512 + };
1.513 +
1.514 +/**
1.515 + * Load and play a video file using graphics surface and attempting to add the display window with specific
1.516 + * settings then add the same display window using default values again
1.517 + *
1.518 + * RTestVclnt2AddWin2WithSettings
1.519 + *
1.520 + */
1.521 +class RTestVclnt2AddWin2WithSettings : public RTestVclnt2PlayFile
1.522 + {
1.523 + public:
1.524 + static RTestVclnt2AddWin2WithSettings* NewL(const TDesC& aTestName,
1.525 + const TDesC& aSectName,
1.526 + const TDesC& aKeyName,
1.527 + TInt aExpectedError);
1.528 +
1.529 + protected:
1.530 + // constructor
1.531 + RTestVclnt2AddWin2WithSettings(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.532 +
1.533 + // state machine
1.534 + virtual void HandlePrepareCompleteL();
1.535 + };
1.536 +
1.537 +/**
1.538 + * Load and play a video file using graphics surface and set content offset and/or content alignment
1.539 + *
1.540 + * RTestVclnt2ContOffset
1.541 + *
1.542 + */
1.543 +class RTestVclnt2ContOffset : public RTestVclnt2PlayFile
1.544 + {
1.545 + public:
1.546 + static RTestVclnt2ContOffset* NewL(const TDesC& aTestName,
1.547 + const TDesC& aSectName,
1.548 + const TDesC& aKeyName,
1.549 + TInt aExpectedError);
1.550 +
1.551 + protected:
1.552 + // state machine
1.553 + virtual void HandlePrepareCompleteL();
1.554 +
1.555 + private:
1.556 + // constructor
1.557 + RTestVclnt2ContOffset(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.558 + };
1.559 +
1.560 +/**
1.561 + * Load and play a video file using graphics surface and set content offset during playback
1.562 + *
1.563 + * RTestVclnt2ContOffsetAtPlay
1.564 + *
1.565 + */
1.566 +class RTestVclnt2ContOffsetAtPlay : public RTestVclnt2PerformActionDuringVideoPlayback
1.567 + {
1.568 + public:
1.569 + static RTestVclnt2ContOffsetAtPlay* NewL(const TDesC& aTestName,
1.570 + const TDesC& aSectName,
1.571 + const TDesC& aKeyName,
1.572 + TInt aExpectedError);
1.573 +
1.574 + protected:
1.575 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.576 +
1.577 + private:
1.578 + // constructor
1.579 + RTestVclnt2ContOffsetAtPlay(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.580 + };
1.581 +
1.582 +/**
1.583 + * Load and play a video file using graphics surface and set content aligment during playback
1.584 + *
1.585 + * RTestVclnt2Align
1.586 + *
1.587 + */
1.588 +class RTestVclnt2Align : public RTestVclnt2PerformActionDuringVideoPlayback
1.589 + {
1.590 + public:
1.591 + static RTestVclnt2Align* NewL(const TDesC& aTestName,
1.592 + const TDesC& aSectName,
1.593 + const TDesC& aKeyName,
1.594 + TInt aExpectedError);
1.595 +
1.596 + protected:
1.597 + virtual void HandlePrepareCompleteL();
1.598 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.599 +
1.600 + private:
1.601 + // constructor
1.602 + RTestVclnt2Align(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.603 + };
1.604 +
1.605 +/**
1.606 + * Load and play a video file using graphics surface and set auto scale
1.607 + *
1.608 + * RTestVclnt2AutoScale
1.609 + *
1.610 + */
1.611 +class RTestVclnt2AutoScale : public RTestVclnt2PerformActionDuringVideoPlayback
1.612 + {
1.613 + public:
1.614 + static RTestVclnt2AutoScale* NewL(const TDesC& aTestName,
1.615 + const TDesC& aSectName,
1.616 + const TDesC& aKeyName,
1.617 + TInt aExpectedError);
1.618 +
1.619 + protected:
1.620 + virtual void HandlePrepareCompleteL();
1.621 + virtual void DoThisActionDuringPlaybackL(CVideoPlayerUtility2& aPlayer);
1.622 +
1.623 + private:
1.624 + RTestVclnt2AutoScale(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName, TInt aExpectedError);
1.625 + };
1.626 +
1.627 +/**
1.628 + * Load and play a video file using graphics surface
1.629 + *
1.630 + * RTestVclnt2PlayFile
1.631 + *
1.632 + */
1.633 +class RTestVclnt2OldController : public RTestVclnt2PlayFile
1.634 + {
1.635 +public:
1.636 + static RTestVclnt2OldController* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.637 +
1.638 +protected:
1.639 + virtual void HandleIdleL();
1.640 + virtual void HandlePrepareCompleteL();
1.641 +
1.642 +private:
1.643 + RTestVclnt2OldController(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.644 + };
1.645 +
1.646 +/**
1.647 + * Without opening a file, try doing surface related functions
1.648 + *
1.649 + * RTestVclnt2NoFile
1.650 + *
1.651 + */
1.652 +class RTestVclnt2NoFile : public RTestVclnt2PlayFile
1.653 + {
1.654 +public:
1.655 + static RTestVclnt2NoFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.656 +
1.657 +protected:
1.658 + virtual void HandleIdleL();
1.659 +
1.660 +private:
1.661 + RTestVclnt2NoFile(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.662 + };
1.663 +
1.664 +/**
1.665 + * Attempt to play video without display
1.666 + *
1.667 + * RTestVclnt2PlayAfterRemoveWin
1.668 + *
1.669 + */
1.670 +class RTestVclnt2PlayAfterRemoveWin : public RTestVclnt2PlayFile
1.671 + {
1.672 +public:
1.673 + static RTestVclnt2PlayAfterRemoveWin* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.674 +
1.675 +protected:
1.676 + virtual void HandlePrepareCompleteL();
1.677 + virtual void HandlePlayCompleteL();
1.678 +
1.679 +private:
1.680 + RTestVclnt2PlayAfterRemoveWin(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.681 +
1.682 +private:
1.683 + TInt iPlayAttempt;
1.684 + };
1.685 +
1.686 +/**
1.687 + * Use surface utility API without GCE support
1.688 + *
1.689 + * RTestVclnt2NoGce
1.690 + *
1.691 + */
1.692 +class RTestVclnt2NoGce : public RTestVclnt2PlayFile
1.693 + {
1.694 +public:
1.695 + static RTestVclnt2NoGce* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.696 +
1.697 +protected:
1.698 + virtual void HandleIdleL();
1.699 + virtual void HandleOpenCompleteL();
1.700 +
1.701 +private:
1.702 + RTestVclnt2NoGce(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.703 + };
1.704 +
1.705 +/**
1.706 + * Alloc tests (using Client heap) for Video Player utility 2.
1.707 + *
1.708 + * RTestVclnt2Alloc
1.709 + *
1.710 + */
1.711 +class RTestVclnt2Alloc : public RTestVclnt2PlayFile
1.712 + {
1.713 +public:
1.714 + static RTestVclnt2Alloc* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.715 + virtual TVerdict DoTestStepL();
1.716 +
1.717 +protected:
1.718 + virtual TVerdict DoTestStepPreambleL();
1.719 + virtual TVerdict PerformTestL();
1.720 +
1.721 +private:
1.722 + RTestVclnt2Alloc(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.723 + };
1.724 +
1.725 +class RTestVclnt2InvalidScaleFactor : public RTestVclnt2PlayFile
1.726 + {
1.727 +public:
1.728 + static RTestVclnt2InvalidScaleFactor* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.729 +
1.730 +protected:
1.731 + // From RTestVclnt2PlayFile
1.732 + void HandlePrepareCompleteL();
1.733 +
1.734 +private:
1.735 + RTestVclnt2InvalidScaleFactor(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName, TInt aExpectedError);
1.736 + };
1.737 +
1.738 +#endif // TESTVIDEOPLAYER2_H