1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/vclnt/TestPlayer.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,411 @@
1.4 +
1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// Header file: Basic tests.
1.19 +//
1.20 +//
1.21 +
1.22 +/**
1.23 + @file TESTPLAYER.h
1.24 +*/
1.25 +
1.26 +#ifndef TESTPLAYER_H__
1.27 +#define TESTPLAYER_H__
1.28 +
1.29 +#include "TSI_MMFVCLNT.h"
1.30 +
1.31 +/**
1.32 + * Load and initialise a video file.
1.33 + *
1.34 + * @class CTestVclntVideoFile
1.35 + *
1.36 + * Req. under test REQ172.2.4 REQ172.2.7 REQ172.2.10
1.37 + */
1.38 +class CTestVclntVideoFile : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
1.39 + {
1.40 +public:
1.41 + CTestVclntVideoFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.42 + static CTestVclntVideoFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.43 + static CTestVclntVideoFile* NewLC(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.44 + virtual TVerdict DoTestStepL();
1.45 + virtual TVerdict DoTestL(CVideoPlayerUtility* aVideo);
1.46 + // MVideoPlayerUtilityObserver
1.47 + virtual void MvpuoOpenComplete(TInt aError);
1.48 + virtual void MvpuoPrepareComplete(TInt aError);
1.49 + virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
1.50 + virtual void MvpuoPlayComplete(TInt aError);
1.51 + virtual void MvpuoEvent(const TMMFEvent& aEvent);
1.52 +protected:
1.53 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.54 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.55 + TInt iError;
1.56 + const TBool iPlay; // Does this test require playing the video
1.57 + TTimeIntervalMicroSeconds iDuration; // Stores duration of video
1.58 + };
1.59 +
1.60 +
1.61 +/**
1.62 + * Load and initialise an video descriptor.
1.63 + *
1.64 + * @class CTestVclntVideoDes
1.65 + *
1.66 + * Req. under test REQ172.2.4 REQ172.2.8 REQ172.2.10
1.67 + */
1.68 +class CTestVclntVideoDes : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
1.69 + {
1.70 +public:
1.71 + CTestVclntVideoDes(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay) ;
1.72 + static CTestVclntVideoDes* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.73 + static CTestVclntVideoDes* NewLC(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.74 + virtual TVerdict DoTestStepL();
1.75 + virtual TVerdict DoTestStepPreambleL();
1.76 + virtual TVerdict DoTestStepPostambleL();
1.77 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.78 + // MVideoPlayerUtilityObserver
1.79 + virtual void MvpuoOpenComplete(TInt aError);
1.80 + virtual void MvpuoPrepareComplete(TInt aError);
1.81 + virtual void MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError);
1.82 + virtual void MvpuoPlayComplete(TInt aError);
1.83 + virtual void MvpuoEvent(const TMMFEvent& aEvent);
1.84 +
1.85 +protected:
1.86 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.87 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.88 + HBufC8* iVideo; // Buffer for holding video descriptor data
1.89 + TTimeIntervalMicroSeconds iDuration;// Stores duration of video
1.90 + TInt iError; // Stores error values for testing
1.91 + const TBool iPlay; // Does this test require playing the video
1.92 + } ;
1.93 +
1.94 +/**
1.95 + * Open video form a URL and play.
1.96 + *
1.97 + * @class CTestVclntVideoUrl
1.98 + *
1.99 + */
1.100 +class CTestVclntVideoUrl : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
1.101 + {
1.102 +public:
1.103 + CTestVclntVideoUrl(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.104 + static CTestVclntVideoUrl* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.105 + static CTestVclntVideoUrl* NewLC(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
1.106 + virtual TVerdict DoTestStepL();
1.107 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.108 + // MVideoPlayerUtilityObserver
1.109 + virtual void MvpuoOpenComplete(TInt aError);
1.110 + virtual void MvpuoPrepareComplete(TInt aError);
1.111 + virtual void MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError);
1.112 + virtual void MvpuoPlayComplete(TInt aError);
1.113 + virtual void MvpuoEvent(const TMMFEvent& aEvent);
1.114 +
1.115 +protected:
1.116 + TBuf<KNameBufSize> iSectName; // Section name for retrieving filename
1.117 + TBuf<KNameBufSize> iKeyName; // Key name for retrieving filename
1.118 + TTimeIntervalMicroSeconds iDuration;// Stores duration of video
1.119 + TInt iError; // Stores error values for testing
1.120 + const TBool iPlay; // Does this test require playing the video
1.121 + HBufC8* iVideo; // Buffer for holding video descriptor data
1.122 + };
1.123 +
1.124 +/**
1.125 + * Set and enquire framerate
1.126 + *
1.127 + * @class CTestVclntEnqFrameRate
1.128 + *
1.129 + * Req. under test REQ172.2.28
1.130 + */
1.131 +class CTestVclntEnqFrameRate : public CTestVclntVideoFile
1.132 + {
1.133 +public:
1.134 + static CTestVclntEnqFrameRate* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameRate);
1.135 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.136 +private:
1.137 + CTestVclntEnqFrameRate(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameRate);
1.138 +
1.139 +private:
1.140 + TInt iFrameRate;
1.141 + };
1.142 +
1.143 +
1.144 +/**
1.145 + * set position and play form this position.
1.146 + *
1.147 + * @class CTestVclntPosition
1.148 + *
1.149 + * Req. under test REQ172.2.13 REQ172.2.14
1.150 + */
1.151 +class CTestVclntPosition : public CTestVclntVideoFile
1.152 + {
1.153 +public:
1.154 + static CTestVclntPosition* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aPosition);
1.155 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.156 +private:
1.157 + CTestVclntPosition(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aPosition);
1.158 +
1.159 +private:
1.160 + TTimeIntervalMicroSeconds iPosition;
1.161 + };
1.162 +
1.163 +/**
1.164 + * Video priority
1.165 + *
1.166 + * @class CTestVclntPriority
1.167 + *
1.168 + * Req. under test REQ172.2.25
1.169 + */
1.170 +class CTestVclntPriority : public CTestVclntVideoFile
1.171 + {
1.172 +public:
1.173 + static CTestVclntPriority* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aPriority);
1.174 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.175 +private:
1.176 + CTestVclntPriority(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aPriority);
1.177 +
1.178 +private:
1.179 + TInt iPriority;
1.180 + };
1.181 +
1.182 +
1.183 +/**
1.184 + * Video duration
1.185 + *
1.186 + * @class CTestVclntDuration
1.187 + *
1.188 + * Req. under test REQ172.2.15
1.189 + */
1.190 +class CTestVclntDuration : public CTestVclntVideoFile
1.191 + {
1.192 +public:
1.193 + static CTestVclntDuration* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aDuration);
1.194 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.195 +private:
1.196 + CTestVclntDuration(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aDuration);
1.197 + };
1.198 +
1.199 +
1.200 +/**
1.201 + * Video Volume
1.202 + *
1.203 + * @class CTestVclntVolume
1.204 + *
1.205 + * Req. under test REQ172.2.16 REQ172.2.17 REQ172.2.18
1.206 + */
1.207 +class CTestVclntVolume : public CTestVclntVideoFile
1.208 + {
1.209 +public:
1.210 + static CTestVclntVolume* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aVolume);
1.211 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.212 +private:
1.213 + CTestVclntVolume(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aVolume);
1.214 +
1.215 +private:
1.216 + TInt iVolume;
1.217 + };
1.218 +
1.219 +
1.220 +/**
1.221 + * Video open, close and then open again.
1.222 + *
1.223 + * @class CTestVclntCloseOpen
1.224 + *
1.225 + * Req. under test REQ172.2.4 REQ172.2.5 REQ172.2.6
1.226 + */
1.227 +class CTestVclntCloseOpen : public CTestVclntVideoFile
1.228 + {
1.229 +public:
1.230 + static CTestVclntCloseOpen* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.231 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.232 +private:
1.233 + CTestVclntCloseOpen(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.234 + };
1.235 +
1.236 +
1.237 +
1.238 +/**
1.239 + * Video pause.
1.240 + *
1.241 + * @class CTestVclntPause
1.242 + *
1.243 + * Req. under test REQ172.2.10 REQ172.2.11
1.244 + */
1.245 +class CTestVclntPause : public CTestVclntVideoFile
1.246 + {
1.247 +public:
1.248 + static CTestVclntPause* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.249 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.250 +private:
1.251 + CTestVclntPause(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.252 + };
1.253 +
1.254 +
1.255 +/**
1.256 + * Video pause.
1.257 + *
1.258 + * @class CTestVclntBalance
1.259 + *
1.260 + * Req. under test REQ172.2.30 REQ172.2.31
1.261 + */
1.262 +class CTestVclntBalance : public CTestVclntVideoFile
1.263 + {
1.264 +public:
1.265 + static CTestVclntBalance* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aBalance);
1.266 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.267 +private:
1.268 + CTestVclntBalance(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aBalance);
1.269 +
1.270 +private:
1.271 + TInt iBalance;
1.272 + };
1.273 +
1.274 +
1.275 +
1.276 +/**
1.277 + * Video set play window and delete play window.
1.278 + *
1.279 + * @class CTestVclntPlayWindow
1.280 + *
1.281 + * Req. under test REQ172.2.21 REQ172.2.22
1.282 + */
1.283 +class CTestVclntPlayWindow : public CTestVclntVideoFile
1.284 + {
1.285 +public:
1.286 + static CTestVclntPlayWindow* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aStart, const TTimeIntervalMicroSeconds aEnd);
1.287 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.288 +private:
1.289 + CTestVclntPlayWindow(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aStart, const TTimeIntervalMicroSeconds aEnd);
1.290 +
1.291 +private:
1.292 + TTimeIntervalMicroSeconds iStart;
1.293 + TTimeIntervalMicroSeconds iEnd;
1.294 + };
1.295 +
1.296 +
1.297 +/**
1.298 + * Video get meta data.
1.299 + *
1.300 + * @class CTestVclntMeta
1.301 + *
1.302 + * Req. under test REQ172.2.20
1.303 + */
1.304 +class CTestVclntMeta : public CTestVclntVideoFile
1.305 + {
1.306 +public:
1.307 + static CTestVclntMeta* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.308 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.309 +private:
1.310 + CTestVclntMeta(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.311 +
1.312 +private:
1.313 + TTimeIntervalMicroSeconds iStart;
1.314 + TTimeIntervalMicroSeconds iEnd;
1.315 + };
1.316 +
1.317 +
1.318 +/**
1.319 + * Video get framesize.
1.320 + *
1.321 + * @class CTestVclntFrameSize
1.322 + *
1.323 + * Req. under test REQ172.2.27
1.324 + */
1.325 +class CTestVclntFrameSize : public CTestVclntVideoFile
1.326 + {
1.327 +public:
1.328 + static CTestVclntFrameSize* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameSize);
1.329 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.330 +private:
1.331 + CTestVclntFrameSize(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameSize);
1.332 +
1.333 +private:
1.334 + TInt iFrameSize;
1.335 + };
1.336 +
1.337 +
1.338 +/**
1.339 + * Video get mime type.
1.340 + *
1.341 + * @class CTestVclntMimeType
1.342 + *
1.343 + * Req. not mapped
1.344 + */
1.345 +class CTestVclntMimeType : public CTestVclntVideoFile
1.346 + {
1.347 +public:
1.348 + static CTestVclntMimeType* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.349 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.350 +private:
1.351 + CTestVclntMimeType(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.352 +
1.353 + };
1.354 +
1.355 +
1.356 +/**
1.357 + * Video rebuffering.
1.358 + *
1.359 + * @class CTestVclntRebuffering
1.360 + *
1.361 + * Req. not mapped
1.362 + */
1.363 +class CTestVclntRebuffering : public CTestVclntVideoFile, public MVideoLoadingObserver
1.364 + {
1.365 +public:
1.366 + static CTestVclntRebuffering* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.367 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.368 + void MvloLoadingStarted();
1.369 + void MvloLoadingComplete();
1.370 +private:
1.371 + CTestVclntRebuffering(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.372 +
1.373 + };
1.374 +
1.375 +/**
1.376 + * Video get framesize.
1.377 + *
1.378 + * @class CTestVclntRepeat
1.379 + *
1.380 + * Req. under test REQ172.2.23
1.381 + */
1.382 +class CTestVclntRepeat : public CTestVclntVideoFile
1.383 + {
1.384 +public:
1.385 + static CTestVclntRepeat* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aRepeat);
1.386 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.387 +private:
1.388 + CTestVclntRepeat(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aRepeat);
1.389 +
1.390 +private:
1.391 + TInt iRepeat;
1.392 + };
1.393 +
1.394 +
1.395 +
1.396 +/**
1.397 + * Video Delete object while playing
1.398 + *
1.399 + * @class CTestVclntDelete
1.400 + *
1.401 + * Req. under test REQ172.2.4 REQ172.2.7 REQ172.2.10
1.402 + */
1.403 +class CTestVclntDelete : public CTestVclntVideoFile
1.404 + {
1.405 +public:
1.406 + static CTestVclntDelete* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.407 + virtual TVerdict DoTestStepL();
1.408 + virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
1.409 +private:
1.410 + CTestVclntDelete(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
1.411 + };
1.412 +
1.413 +
1.414 +#endif