os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/vclnt/inc/TestPlayer.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 
     2 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // All rights reserved.
     4 // This component and the accompanying materials are made available
     5 // under the terms of "Eclipse Public License v1.0"
     6 // which accompanies this distribution, and is available
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description:
    15 // Header file: Basic  tests.
    16 // 
    17 //
    18 
    19 /**
    20  @file TESTPLAYER.h
    21 */
    22 
    23 #ifndef TESTPLAYER_H__
    24 #define TESTPLAYER_H__
    25 
    26 #include "TSI_MMFVCLNT.h"
    27 
    28 /**
    29  * Load and initialise a video file.
    30  *
    31  * @class CTestVclntVideoFile
    32  *
    33  * Req. under test REQ172.2.4           REQ172.2.7        REQ172.2.10
    34  */
    35 class CTestVclntVideoFile : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
    36 	{
    37 public:
    38 	CTestVclntVideoFile(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
    39 	static CTestVclntVideoFile* NewL(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
    40 	static CTestVclntVideoFile* NewLC(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
    41 	virtual TVerdict DoTestStepL();
    42 	virtual TVerdict DoTestL(CVideoPlayerUtility* aVideo);
    43 	// MVideoPlayerUtilityObserver
    44 	virtual void MvpuoOpenComplete(TInt aError);
    45 	virtual void MvpuoPrepareComplete(TInt aError);
    46 	virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
    47 	virtual void MvpuoPlayComplete(TInt aError);
    48 	virtual void MvpuoEvent(const TMMFEvent& aEvent);
    49 protected:
    50 	TBuf<KNameBufSize> iSectName;			// Section name for retrieving filename
    51 	TBuf<KNameBufSize> iKeyName;			// Key name for retrieving filename
    52 	TInt iError;
    53 	const TBool iPlay;						// Does this test require playing the video
    54 	TTimeIntervalMicroSeconds iDuration;	// Stores duration of video
    55 	};
    56 
    57 
    58 /**
    59  * Load and initialise an video descriptor.
    60  *
    61  * @class CTestVclntVideoDes
    62  *
    63  * Req. under test REQ172.2.4        REQ172.2.8        REQ172.2.10
    64  */
    65 class CTestVclntVideoDes : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
    66 	{
    67 public:
    68 	CTestVclntVideoDes(const TDesC& aTestName,const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay) ;
    69 	static CTestVclntVideoDes* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
    70 	static CTestVclntVideoDes* NewLC(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
    71 	virtual TVerdict DoTestStepL();
    72 	virtual TVerdict DoTestStepPreambleL();
    73 	virtual TVerdict DoTestStepPostambleL();
    74 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
    75 	// MVideoPlayerUtilityObserver
    76 	virtual void MvpuoOpenComplete(TInt aError);
    77 	virtual void MvpuoPrepareComplete(TInt aError);
    78 	virtual void MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError);
    79 	virtual void MvpuoPlayComplete(TInt aError);
    80 	virtual void MvpuoEvent(const TMMFEvent& aEvent);
    81 
    82 protected:
    83 	TBuf<KNameBufSize> iSectName;		// Section name for retrieving filename
    84 	TBuf<KNameBufSize> iKeyName;		// Key name for retrieving filename
    85 	HBufC8* iVideo;						// Buffer for holding video descriptor data
    86 	TTimeIntervalMicroSeconds iDuration;// Stores duration of video
    87 	TInt iError;						// Stores error values for testing
    88 	const TBool iPlay;					// Does this test require playing the video
    89 	} ;
    90 
    91 /**
    92  * Open video form a URL and play.
    93  *
    94  * @class CTestVclntVideoUrl
    95  *
    96  */
    97 class CTestVclntVideoUrl : public CTestMmfVclntStep , public MVideoPlayerUtilityObserver
    98 	{
    99 public:
   100 	CTestVclntVideoUrl(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
   101 	static CTestVclntVideoUrl* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
   102 	static CTestVclntVideoUrl* NewLC(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName,const TBool aPlay);
   103 	virtual TVerdict DoTestStepL();
   104 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   105 	// MVideoPlayerUtilityObserver
   106 	virtual void MvpuoOpenComplete(TInt aError);
   107 	virtual void MvpuoPrepareComplete(TInt aError);
   108 	virtual void MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError);
   109 	virtual void MvpuoPlayComplete(TInt aError);
   110 	virtual void MvpuoEvent(const TMMFEvent& aEvent);	
   111 
   112 protected:
   113 	TBuf<KNameBufSize> iSectName;		// Section name for retrieving filename
   114 	TBuf<KNameBufSize> iKeyName;		// Key name for retrieving filename
   115 	TTimeIntervalMicroSeconds iDuration;// Stores duration of video
   116 	TInt iError;						// Stores error values for testing
   117 	const TBool iPlay;					// Does this test require playing the video
   118 	HBufC8* iVideo;						// Buffer for holding video descriptor data
   119 	};
   120 
   121 /**
   122  * Set and enquire framerate
   123  *
   124  * @class CTestVclntEnqFrameRate
   125  *
   126  * Req. under test REQ172.2.28      
   127  */
   128 class CTestVclntEnqFrameRate : public CTestVclntVideoFile
   129 	{
   130 public:
   131 	static CTestVclntEnqFrameRate* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameRate);
   132 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   133 private:
   134 	CTestVclntEnqFrameRate(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameRate);
   135 
   136 private:
   137 	TInt iFrameRate;
   138 	};
   139 
   140 
   141 /**
   142  * set position and play form this position.
   143  * 
   144  * @class CTestVclntPosition
   145  *
   146  * Req. under test REQ172.2.13 REQ172.2.14
   147  */
   148 class CTestVclntPosition : public CTestVclntVideoFile
   149 	{
   150 public:
   151 	static CTestVclntPosition* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aPosition);
   152 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   153 private:
   154 	CTestVclntPosition(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aPosition);
   155 
   156 private:
   157 	TTimeIntervalMicroSeconds iPosition;
   158 	};
   159 
   160 /**
   161  * Video priority
   162  * 
   163  * @class CTestVclntPriority
   164  *
   165  * Req. under test REQ172.2.25
   166  */
   167 class CTestVclntPriority : public CTestVclntVideoFile
   168 	{
   169 public:
   170 	static CTestVclntPriority* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aPriority);
   171 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   172 private:
   173 	CTestVclntPriority(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aPriority);
   174 
   175 private:
   176 	TInt iPriority;
   177 	};
   178 
   179 
   180 /**
   181  * Video duration
   182  * 
   183  * @class CTestVclntDuration
   184  *
   185  * Req. under test REQ172.2.15
   186  */
   187 class CTestVclntDuration : public CTestVclntVideoFile
   188 	{
   189 public:
   190 	static CTestVclntDuration* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aDuration);
   191 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   192 private:
   193 	CTestVclntDuration(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aDuration);
   194 	};
   195 
   196 
   197 /**
   198  * Video Volume
   199  * 
   200  * @class CTestVclntVolume
   201  *
   202  * Req. under test REQ172.2.16        REQ172.2.17        REQ172.2.18
   203  */
   204 class CTestVclntVolume : public CTestVclntVideoFile
   205 	{
   206 public:
   207 	static CTestVclntVolume* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aVolume);
   208 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   209 private:
   210 	CTestVclntVolume(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aVolume);
   211 
   212 private:
   213 	TInt iVolume;
   214 	};
   215 
   216 
   217 /**
   218  * Video open, close and then open again.
   219  * 
   220  * @class CTestVclntCloseOpen
   221  *
   222  * Req. under test REQ172.2.4        REQ172.2.5       REQ172.2.6
   223  */
   224 class CTestVclntCloseOpen : public CTestVclntVideoFile
   225 	{
   226 public:
   227 	static CTestVclntCloseOpen* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   228 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   229 private:
   230 	CTestVclntCloseOpen(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   231 	};
   232 
   233 
   234 
   235 /**
   236  * Video pause.
   237  * 
   238  * @class CTestVclntPause
   239  *
   240  * Req. under test REQ172.2.10     REQ172.2.11
   241  */
   242 class CTestVclntPause : public CTestVclntVideoFile
   243 	{
   244 public:
   245 	static CTestVclntPause* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   246 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   247 private:
   248 	CTestVclntPause(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   249 	};
   250 
   251 
   252 /**
   253  * Video pause.
   254  * 
   255  * @class CTestVclntBalance
   256  *
   257  * Req. under test REQ172.2.30       REQ172.2.31
   258  */
   259 class CTestVclntBalance : public CTestVclntVideoFile
   260 	{
   261 public:
   262 	static CTestVclntBalance* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aBalance);
   263 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   264 private:
   265 	CTestVclntBalance(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aBalance);
   266 
   267 private:
   268 	TInt iBalance;
   269 	};
   270 
   271 
   272 
   273 /**
   274  * Video set play window and delete play window.
   275  * 
   276  * @class CTestVclntPlayWindow
   277  *
   278  * Req. under test REQ172.2.21          REQ172.2.22
   279  */
   280 class CTestVclntPlayWindow : public CTestVclntVideoFile
   281 	{
   282 public:
   283 	static CTestVclntPlayWindow* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aStart, const TTimeIntervalMicroSeconds aEnd);
   284 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   285 private:
   286 	CTestVclntPlayWindow(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TTimeIntervalMicroSeconds aStart, const TTimeIntervalMicroSeconds aEnd);
   287 
   288 private:
   289 	TTimeIntervalMicroSeconds iStart;
   290 	TTimeIntervalMicroSeconds iEnd;
   291 	};
   292 
   293 
   294 /**
   295  * Video get meta data.
   296  * 
   297  * @class CTestVclntMeta
   298  *
   299  * Req. under test REQ172.2.20
   300  */
   301 class CTestVclntMeta : public CTestVclntVideoFile
   302 	{
   303 public:
   304 	static CTestVclntMeta* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   305 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   306 private:
   307 	CTestVclntMeta(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   308 
   309 private:
   310 	TTimeIntervalMicroSeconds iStart;
   311 	TTimeIntervalMicroSeconds iEnd;
   312 	};
   313 
   314 
   315 /**
   316  * Video get framesize.
   317  * 
   318  * @class CTestVclntFrameSize
   319  *
   320  * Req. under test REQ172.2.27
   321  */
   322 class CTestVclntFrameSize : public CTestVclntVideoFile
   323 	{
   324 public:
   325 	static CTestVclntFrameSize* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameSize);
   326 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   327 private:
   328 	CTestVclntFrameSize(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aFrameSize);
   329 
   330 private:
   331 	TInt iFrameSize;
   332 	};
   333 
   334 
   335 /**
   336  * Video get mime type.
   337  * 
   338  * @class CTestVclntMimeType
   339  *
   340  * Req. not mapped
   341  */
   342 class CTestVclntMimeType : public CTestVclntVideoFile
   343 	{
   344 public:
   345 	static CTestVclntMimeType* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   346 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   347 private:
   348 	CTestVclntMimeType(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   349 
   350 	};
   351 
   352 
   353 /**
   354  * Video rebuffering.
   355  * 
   356  * @class CTestVclntRebuffering
   357  *
   358  * Req. not mapped
   359  */
   360 class CTestVclntRebuffering : public CTestVclntVideoFile, public MVideoLoadingObserver
   361 	{
   362 public:
   363 	static CTestVclntRebuffering* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   364 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   365 	void MvloLoadingStarted();
   366 	void MvloLoadingComplete();
   367 private:
   368 	CTestVclntRebuffering(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   369 
   370 	};
   371 
   372 /**
   373  * Video get framesize.
   374  * 
   375  * @class CTestVclntRepeat
   376  *
   377  * Req. under test REQ172.2.23
   378  */
   379 class CTestVclntRepeat : public CTestVclntVideoFile
   380 	{
   381 public:
   382 	static CTestVclntRepeat* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aRepeat);
   383 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   384 private:
   385 	CTestVclntRepeat(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName, const TInt aRepeat);
   386 
   387 private:
   388 	TInt iRepeat;
   389 	};
   390 
   391 
   392 
   393 /**
   394  * Video Delete object while playing
   395  * 
   396  * @class CTestVclntDelete
   397  *
   398  * Req. under test REQ172.2.4           REQ172.2.7        REQ172.2.10
   399  */
   400 class CTestVclntDelete : public CTestVclntVideoFile
   401 	{
   402 public:
   403 	static CTestVclntDelete* NewL(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   404 	virtual TVerdict DoTestStepL();
   405 	virtual TVerdict DoTestL(CVideoPlayerUtility* aPlayer);
   406 private:
   407 	CTestVclntDelete(const TDesC& aTestName, const TDesC& aSectName,const TDesC& aKeyName);
   408 	};
   409 
   410 
   411 #endif