os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevVideo/src/TestDevVideoPlayTwo.cpp
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
sl@0
     2
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
// All rights reserved.
sl@0
     4
// This component and the accompanying materials are made available
sl@0
     5
// under the terms of "Eclipse Public License v1.0"
sl@0
     6
// which accompanies this distribution, and is available
sl@0
     7
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
//
sl@0
     9
// Initial Contributors:
sl@0
    10
// Nokia Corporation - initial contribution.
sl@0
    11
//
sl@0
    12
// Contributors:
sl@0
    13
//
sl@0
    14
// Description:
sl@0
    15
// TestDevVideoPlay.cpp
sl@0
    16
// 
sl@0
    17
//
sl@0
    18
sl@0
    19
#include "TestDevVideoPlay.h"
sl@0
    20
#include "TestDevVideoPlayTestData.h"
sl@0
    21
#include "TestDevVideoPlugins/decoder.h"
sl@0
    22
#include "TestDevVideoPlugins/postproc.h"
sl@0
    23
#include <e32math.h>
sl@0
    24
sl@0
    25
CTestDevVideoPlaySetInputCrop::CTestDevVideoPlaySetInputCrop(const TDesC& aTestName, TTestType aTestType)
sl@0
    26
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
    27
	{
sl@0
    28
	}
sl@0
    29
sl@0
    30
CTestDevVideoPlaySetInputCrop* CTestDevVideoPlaySetInputCrop::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
    31
	{
sl@0
    32
	CTestDevVideoPlaySetInputCrop* self = new(ELeave) CTestDevVideoPlaySetInputCrop(aTestName, aTestType);
sl@0
    33
	return self;
sl@0
    34
	}
sl@0
    35
sl@0
    36
TVerdict CTestDevVideoPlaySetInputCrop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
    37
	{
sl@0
    38
	TVerdict ret = EPass;
sl@0
    39
	TInt expErr = KErrNone;
sl@0
    40
	
sl@0
    41
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetInputCrop"));
sl@0
    42
	
sl@0
    43
	// expected results
sl@0
    44
	if (iTestType != ETestValid)
sl@0
    45
		{
sl@0
    46
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
    47
		return EInconclusive;
sl@0
    48
		}
sl@0
    49
sl@0
    50
	TInt err = KErrNone;
sl@0
    51
	TInt err2 = KErrNone;
sl@0
    52
sl@0
    53
	THwDeviceId hwDecoder = 0;
sl@0
    54
	THwDeviceId hwPostProc = 0;
sl@0
    55
sl@0
    56
	// select decoder
sl@0
    57
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
    58
	if (err != KErrNone)
sl@0
    59
		{
sl@0
    60
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
    61
			return EInconclusive;
sl@0
    62
		}
sl@0
    63
sl@0
    64
	// select post-processor
sl@0
    65
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
    66
	if (err != KErrNone)
sl@0
    67
		{
sl@0
    68
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
    69
			return EInconclusive;
sl@0
    70
		}
sl@0
    71
sl@0
    72
	// set input crop on decoder
sl@0
    73
	TRect testRect1(KTestInputCropRectA, KTestInputCropRectB, KTestInputCropRectC, KTestInputCropRectD);
sl@0
    74
	TRAP(err, aDevVideoPlay.SetInputCropOptionsL(hwDecoder, testRect1) )
sl@0
    75
	
sl@0
    76
	// set input crop on post-processor
sl@0
    77
	TRect testRect2(KTestInputCropRectD, KTestInputCropRectC, KTestInputCropRectB, KTestInputCropRectA);
sl@0
    78
	TRAP(err2, aDevVideoPlay.SetInputCropOptionsL(hwPostProc, testRect2) )
sl@0
    79
sl@0
    80
sl@0
    81
	if ((err != expErr) || (err2 != expErr))
sl@0
    82
		{
sl@0
    83
		ERR_PRINTF3(_L("SetInputCropOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
    84
		ERR_PRINTF3(_L("SetInputCropOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
    85
		ret = EFail;
sl@0
    86
		}
sl@0
    87
	else
sl@0
    88
		INFO_PRINTF4(_L("SetInputCropOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
    89
	
sl@0
    90
	return ret;
sl@0
    91
	}
sl@0
    92
//------------------------------------------------------------------
sl@0
    93
sl@0
    94
CTestDevVideoPlaySetYuvToRgbOptionsFormat::CTestDevVideoPlaySetYuvToRgbOptionsFormat(const TDesC& aTestName, TTestType aTestType)
sl@0
    95
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
    96
	{
sl@0
    97
	}
sl@0
    98
sl@0
    99
CTestDevVideoPlaySetYuvToRgbOptionsFormat* CTestDevVideoPlaySetYuvToRgbOptionsFormat::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   100
	{
sl@0
   101
	CTestDevVideoPlaySetYuvToRgbOptionsFormat* self = new(ELeave) CTestDevVideoPlaySetYuvToRgbOptionsFormat(aTestName, aTestType);
sl@0
   102
	return self;
sl@0
   103
	}
sl@0
   104
sl@0
   105
TVerdict CTestDevVideoPlaySetYuvToRgbOptionsFormat::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   106
	{
sl@0
   107
	TVerdict ret = EPass;
sl@0
   108
	TInt expErr = KErrNone;
sl@0
   109
	
sl@0
   110
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetYuvToRgbOptionsFormat"));
sl@0
   111
	
sl@0
   112
	// expected results
sl@0
   113
	if (iTestType != ETestValid)
sl@0
   114
		{
sl@0
   115
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   116
		return EInconclusive;
sl@0
   117
		}
sl@0
   118
sl@0
   119
	TInt err = KErrNone;
sl@0
   120
	TInt err2 = KErrNone;
sl@0
   121
sl@0
   122
	THwDeviceId hwDecoder = 0;
sl@0
   123
	THwDeviceId hwPostProc = 0;
sl@0
   124
sl@0
   125
	// select decoder
sl@0
   126
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   127
	if (err != KErrNone)
sl@0
   128
		{
sl@0
   129
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   130
			return EInconclusive;
sl@0
   131
		}
sl@0
   132
sl@0
   133
	// select post-processor
sl@0
   134
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   135
	if (err != KErrNone)
sl@0
   136
		{
sl@0
   137
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   138
			return EInconclusive;
sl@0
   139
		}
sl@0
   140
sl@0
   141
	// set YUV to RGB options with formats on decoder
sl@0
   142
	TRAP(err, aDevVideoPlay.SetYuvToRgbOptionsL(hwDecoder, KTestYuvToRgb1, KTestYuvFormat1, KTestRgbFormat1) );
sl@0
   143
	
sl@0
   144
	// set YUV to RGB options with formats on post-processor
sl@0
   145
	TRAP(err2, aDevVideoPlay.SetYuvToRgbOptionsL(hwPostProc, KTestYuvToRgb2, KTestYuvFormat2, KTestRgbFormat2) );
sl@0
   146
sl@0
   147
sl@0
   148
	if ((err != expErr) || (err2 != expErr))
sl@0
   149
		{
sl@0
   150
		ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   151
		ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   152
		ret = EFail;
sl@0
   153
		}
sl@0
   154
	else
sl@0
   155
		INFO_PRINTF4(_L("SetYuvToRgbOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   156
	
sl@0
   157
	return ret;
sl@0
   158
	}
sl@0
   159
//------------------------------------------------------------------
sl@0
   160
sl@0
   161
CTestDevVideoPlaySetYuvToRgbOptions::CTestDevVideoPlaySetYuvToRgbOptions(const TDesC& aTestName, TTestType aTestType)
sl@0
   162
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   163
	{
sl@0
   164
	}
sl@0
   165
sl@0
   166
CTestDevVideoPlaySetYuvToRgbOptions* CTestDevVideoPlaySetYuvToRgbOptions::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   167
	{
sl@0
   168
	CTestDevVideoPlaySetYuvToRgbOptions* self = new(ELeave) CTestDevVideoPlaySetYuvToRgbOptions(aTestName, aTestType);
sl@0
   169
	return self;
sl@0
   170
	}
sl@0
   171
sl@0
   172
TVerdict CTestDevVideoPlaySetYuvToRgbOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   173
	{
sl@0
   174
	TVerdict ret = EPass;
sl@0
   175
	TInt expErr = KErrNone;
sl@0
   176
	
sl@0
   177
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetYuvToRgbOptions"));
sl@0
   178
	
sl@0
   179
	// expected results
sl@0
   180
	if (iTestType != ETestValid)
sl@0
   181
		{
sl@0
   182
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   183
		return EInconclusive;
sl@0
   184
		}
sl@0
   185
sl@0
   186
	TInt err = KErrNone;
sl@0
   187
	TInt err2 = KErrNone;
sl@0
   188
sl@0
   189
	THwDeviceId hwDecoder = 0;
sl@0
   190
	THwDeviceId hwPostProc = 0;
sl@0
   191
sl@0
   192
	// select decoder
sl@0
   193
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   194
	if (err != KErrNone)
sl@0
   195
		{
sl@0
   196
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   197
			return EInconclusive;
sl@0
   198
		}
sl@0
   199
sl@0
   200
	// select post-processor
sl@0
   201
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   202
	if (err != KErrNone)
sl@0
   203
		{
sl@0
   204
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   205
			return EInconclusive;
sl@0
   206
		}
sl@0
   207
sl@0
   208
	// set YUV to RGB options with formats on decoder
sl@0
   209
	TRAP(err, aDevVideoPlay.SetYuvToRgbOptionsL(hwDecoder, KTestYuvToRgb1) );
sl@0
   210
	
sl@0
   211
	// set YUV to RGB options with formats on post-processor
sl@0
   212
	TRAP(err2, aDevVideoPlay.SetYuvToRgbOptionsL(hwPostProc, KTestYuvToRgb2) );
sl@0
   213
sl@0
   214
sl@0
   215
	if ((err != expErr) || (err2 != expErr))
sl@0
   216
		{
sl@0
   217
		ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   218
		ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   219
		ret = EFail;
sl@0
   220
		}
sl@0
   221
	else
sl@0
   222
		INFO_PRINTF4(_L("SetYuvToRgbOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   223
	
sl@0
   224
	return ret;
sl@0
   225
	}
sl@0
   226
//------------------------------------------------------------------
sl@0
   227
sl@0
   228
CTestDevVideoPlaySetRotate::CTestDevVideoPlaySetRotate(const TDesC& aTestName, TTestType aTestType)
sl@0
   229
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   230
	{
sl@0
   231
	}
sl@0
   232
sl@0
   233
CTestDevVideoPlaySetRotate* CTestDevVideoPlaySetRotate::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   234
	{
sl@0
   235
	CTestDevVideoPlaySetRotate* self = new(ELeave) CTestDevVideoPlaySetRotate(aTestName, aTestType);
sl@0
   236
	return self;
sl@0
   237
	}
sl@0
   238
sl@0
   239
TVerdict CTestDevVideoPlaySetRotate::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   240
	{
sl@0
   241
	TVerdict ret = EPass;
sl@0
   242
	TInt expErr = KErrNone;
sl@0
   243
	
sl@0
   244
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetRotate"));
sl@0
   245
	
sl@0
   246
	// expected results
sl@0
   247
	if (iTestType != ETestValid)
sl@0
   248
		{
sl@0
   249
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   250
		return EInconclusive;
sl@0
   251
		}
sl@0
   252
sl@0
   253
	TInt err = KErrNone;
sl@0
   254
	TInt err2 = KErrNone;
sl@0
   255
sl@0
   256
	THwDeviceId hwDecoder = 0;
sl@0
   257
	THwDeviceId hwPostProc = 0;
sl@0
   258
sl@0
   259
	// select decoder
sl@0
   260
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   261
	if (err != KErrNone)
sl@0
   262
		{
sl@0
   263
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   264
			return EInconclusive;
sl@0
   265
		}
sl@0
   266
sl@0
   267
	// select post-processor
sl@0
   268
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   269
	if (err != KErrNone)
sl@0
   270
		{
sl@0
   271
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   272
			return EInconclusive;
sl@0
   273
		}
sl@0
   274
sl@0
   275
	// set rotate options on decoder
sl@0
   276
	TRAP(err, aDevVideoPlay.SetRotateOptionsL(hwDecoder, KTestRotate1) );
sl@0
   277
	
sl@0
   278
	// set rotate options on post-processor
sl@0
   279
	TRAP(err2, aDevVideoPlay.SetRotateOptionsL(hwPostProc, KTestRotate2) );
sl@0
   280
sl@0
   281
sl@0
   282
	if ((err != expErr) || (err2 != expErr))
sl@0
   283
		{
sl@0
   284
		ERR_PRINTF3(_L("SetRotateOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   285
		ERR_PRINTF3(_L("SetRotateOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   286
		ret = EFail;
sl@0
   287
		}
sl@0
   288
	else
sl@0
   289
		INFO_PRINTF4(_L("SetRotateOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   290
	
sl@0
   291
	return ret;
sl@0
   292
	}
sl@0
   293
//------------------------------------------------------------------
sl@0
   294
sl@0
   295
CTestDevVideoPlaySetScale::CTestDevVideoPlaySetScale(const TDesC& aTestName, TTestType aTestType)
sl@0
   296
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   297
	{
sl@0
   298
	}
sl@0
   299
sl@0
   300
CTestDevVideoPlaySetScale* CTestDevVideoPlaySetScale::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   301
	{
sl@0
   302
	CTestDevVideoPlaySetScale* self = new(ELeave) CTestDevVideoPlaySetScale(aTestName, aTestType);
sl@0
   303
	return self;
sl@0
   304
	}
sl@0
   305
sl@0
   306
TVerdict CTestDevVideoPlaySetScale::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   307
	{
sl@0
   308
	TVerdict ret = EPass;
sl@0
   309
	TInt expErr = KErrNone;
sl@0
   310
	
sl@0
   311
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetScale"));
sl@0
   312
	
sl@0
   313
	// expected results
sl@0
   314
	if (iTestType != ETestValid)
sl@0
   315
		{
sl@0
   316
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   317
		return EInconclusive;
sl@0
   318
		}
sl@0
   319
sl@0
   320
	TInt err = KErrNone;
sl@0
   321
	TInt err2 = KErrNone;
sl@0
   322
sl@0
   323
	THwDeviceId hwDecoder = 0;
sl@0
   324
	THwDeviceId hwPostProc = 0;
sl@0
   325
sl@0
   326
	// select decoder
sl@0
   327
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   328
	if (err != KErrNone)
sl@0
   329
		{
sl@0
   330
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   331
			return EInconclusive;
sl@0
   332
		}
sl@0
   333
sl@0
   334
	// select post-processor
sl@0
   335
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   336
	if (err != KErrNone)
sl@0
   337
		{
sl@0
   338
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   339
			return EInconclusive;
sl@0
   340
		}
sl@0
   341
sl@0
   342
	// set scale options on decoder
sl@0
   343
	TSize testScale1(KTestScaleX, KTestScaleY);
sl@0
   344
	TRAP(err, aDevVideoPlay.SetScaleOptionsL(hwDecoder, testScale1, ETrue) );
sl@0
   345
	
sl@0
   346
	TSize testScale2(KTestScaleY, KTestScaleX);
sl@0
   347
	// set scale options on post-processor
sl@0
   348
	TRAP(err2, aDevVideoPlay.SetScaleOptionsL(hwPostProc, testScale2, ETrue) );
sl@0
   349
sl@0
   350
sl@0
   351
	if ((err != expErr) || (err2 != expErr))
sl@0
   352
		{
sl@0
   353
		ERR_PRINTF3(_L("SetScaleOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   354
		ERR_PRINTF3(_L("SetScaleOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   355
		ret = EFail;
sl@0
   356
		}
sl@0
   357
	else
sl@0
   358
		INFO_PRINTF4(_L("SetScaleOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   359
	
sl@0
   360
	return ret;
sl@0
   361
	}
sl@0
   362
//------------------------------------------------------------------
sl@0
   363
sl@0
   364
CTestDevVideoPlaySetCrop::CTestDevVideoPlaySetCrop(const TDesC& aTestName, TTestType aTestType)
sl@0
   365
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   366
	{
sl@0
   367
	}
sl@0
   368
sl@0
   369
CTestDevVideoPlaySetCrop* CTestDevVideoPlaySetCrop::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   370
	{
sl@0
   371
	CTestDevVideoPlaySetCrop* self = new(ELeave) CTestDevVideoPlaySetCrop(aTestName, aTestType);
sl@0
   372
	return self;
sl@0
   373
	}
sl@0
   374
sl@0
   375
TVerdict CTestDevVideoPlaySetCrop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   376
	{
sl@0
   377
	TVerdict ret = EPass;
sl@0
   378
	TInt expErr = KErrNone;
sl@0
   379
	
sl@0
   380
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetCrop"));
sl@0
   381
	
sl@0
   382
	// expected results
sl@0
   383
	if (iTestType != ETestValid)
sl@0
   384
		{
sl@0
   385
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   386
		return EInconclusive;
sl@0
   387
		}
sl@0
   388
sl@0
   389
	TInt err = KErrNone;
sl@0
   390
	TInt err2 = KErrNone;
sl@0
   391
sl@0
   392
	THwDeviceId hwDecoder = 0;
sl@0
   393
	THwDeviceId hwPostProc = 0;
sl@0
   394
sl@0
   395
	// select decoder
sl@0
   396
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   397
	if (err != KErrNone)
sl@0
   398
		{
sl@0
   399
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   400
			return EInconclusive;
sl@0
   401
		}
sl@0
   402
sl@0
   403
	// select post-processor
sl@0
   404
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   405
	if (err != KErrNone)
sl@0
   406
		{
sl@0
   407
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   408
			return EInconclusive;
sl@0
   409
		}
sl@0
   410
sl@0
   411
	// set output crop options on decoder
sl@0
   412
	TRect testRect1(KTestOutputCropRectA, KTestOutputCropRectB, KTestOutputCropRectC, KTestOutputCropRectD);
sl@0
   413
	TRAP(err, aDevVideoPlay.SetOutputCropOptionsL(hwDecoder, testRect1) );
sl@0
   414
	
sl@0
   415
	// set output crop options on post-processor
sl@0
   416
	TRect testRect2(KTestOutputCropRectD, KTestOutputCropRectC, KTestOutputCropRectB, KTestOutputCropRectA);
sl@0
   417
	TRAP(err2, aDevVideoPlay.SetOutputCropOptionsL(hwPostProc, testRect2) );
sl@0
   418
sl@0
   419
sl@0
   420
	if ((err != expErr) || (err2 != expErr))
sl@0
   421
		{
sl@0
   422
		ERR_PRINTF3(_L("SetOutputCropOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   423
		ERR_PRINTF3(_L("SetOutputCropOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   424
		ret = EFail;
sl@0
   425
		}
sl@0
   426
	else
sl@0
   427
		INFO_PRINTF4(_L("SetOutputCropOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   428
	
sl@0
   429
	return ret;
sl@0
   430
	}
sl@0
   431
//------------------------------------------------------------------
sl@0
   432
sl@0
   433
CTestDevVideoPlaySetPostProcOptions::CTestDevVideoPlaySetPostProcOptions(const TDesC& aTestName, TTestType aTestType)
sl@0
   434
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   435
	{
sl@0
   436
	}
sl@0
   437
sl@0
   438
CTestDevVideoPlaySetPostProcOptions* CTestDevVideoPlaySetPostProcOptions::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   439
	{
sl@0
   440
	CTestDevVideoPlaySetPostProcOptions* self = new(ELeave) CTestDevVideoPlaySetPostProcOptions(aTestName, aTestType);
sl@0
   441
	return self;
sl@0
   442
	}
sl@0
   443
sl@0
   444
TVerdict CTestDevVideoPlaySetPostProcOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   445
	{
sl@0
   446
	TVerdict ret = EPass;
sl@0
   447
	TInt expErr = KErrNone;
sl@0
   448
	
sl@0
   449
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetPostProcOptions"));
sl@0
   450
	
sl@0
   451
	// expected results
sl@0
   452
	if (iTestType != ETestValid)
sl@0
   453
		{
sl@0
   454
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   455
		return EInconclusive;
sl@0
   456
		}
sl@0
   457
sl@0
   458
	TInt err = KErrNone;
sl@0
   459
	TInt err2 = KErrNone;
sl@0
   460
sl@0
   461
	THwDeviceId hwDecoder = 0;
sl@0
   462
	THwDeviceId hwPostProc = 0;
sl@0
   463
sl@0
   464
	// select decoder
sl@0
   465
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   466
	if (err != KErrNone)
sl@0
   467
		{
sl@0
   468
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   469
			return EInconclusive;
sl@0
   470
		}
sl@0
   471
sl@0
   472
	// select post-processor
sl@0
   473
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   474
	if (err != KErrNone)
sl@0
   475
		{
sl@0
   476
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   477
			return EInconclusive;
sl@0
   478
		}
sl@0
   479
sl@0
   480
	// set post-processor options on decoder
sl@0
   481
	TRAP(err, aDevVideoPlay.SetPostProcSpecificOptionsL(hwDecoder, KTestPostProcOptions1) );
sl@0
   482
	
sl@0
   483
	// set post-processor options on post-processor
sl@0
   484
	TRAP(err2, aDevVideoPlay.SetPostProcSpecificOptionsL(hwPostProc, KTestPostProcOptions2) );
sl@0
   485
sl@0
   486
sl@0
   487
	if ((err != expErr) || (err2 != expErr))
sl@0
   488
		{
sl@0
   489
		ERR_PRINTF3(_L("SetPostProcSpecificOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
   490
		ERR_PRINTF3(_L("SetPostProcSpecificOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
   491
		ret = EFail;
sl@0
   492
		}
sl@0
   493
	else
sl@0
   494
		INFO_PRINTF4(_L("SetPostProcSpecificOptionsL(), %d, %d= %d"), err, err2, expErr);
sl@0
   495
	
sl@0
   496
	return ret;
sl@0
   497
	}
sl@0
   498
//------------------------------------------------------------------
sl@0
   499
sl@0
   500
CTestDevVideoPlaySetClockSource::CTestDevVideoPlaySetClockSource(const TDesC& aTestName, TTestType aTestType)
sl@0
   501
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   502
	{
sl@0
   503
	}
sl@0
   504
sl@0
   505
CTestDevVideoPlaySetClockSource* CTestDevVideoPlaySetClockSource::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   506
	{
sl@0
   507
	CTestDevVideoPlaySetClockSource* self = new(ELeave) CTestDevVideoPlaySetClockSource(aTestName, aTestType);
sl@0
   508
	return self;
sl@0
   509
	}
sl@0
   510
sl@0
   511
TVerdict CTestDevVideoPlaySetClockSource::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   512
	{
sl@0
   513
	TVerdict ret = EPass;
sl@0
   514
//	TInt expErr = KErrNone;
sl@0
   515
	TBool selDec = ETrue;
sl@0
   516
	TBool selPost = ETrue;
sl@0
   517
sl@0
   518
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetClockSource"));
sl@0
   519
	
sl@0
   520
	// expected results
sl@0
   521
	switch(iTestType)
sl@0
   522
		{
sl@0
   523
		case ETestValid:
sl@0
   524
//			expErr = KErrNone;	// EABI warning removal
sl@0
   525
			break;
sl@0
   526
		case ETestDecoderOnly:
sl@0
   527
			selPost = EFalse;
sl@0
   528
			break;
sl@0
   529
		case ETestPostProcOnly:
sl@0
   530
			selDec = EFalse;
sl@0
   531
			break;
sl@0
   532
		default:
sl@0
   533
			ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   534
			return EInconclusive;
sl@0
   535
		}
sl@0
   536
sl@0
   537
	TInt err = KErrNone;
sl@0
   538
sl@0
   539
//	THwDeviceId hwDecoder = 0;
sl@0
   540
//	THwDeviceId hwPostProc = 0;
sl@0
   541
sl@0
   542
	// select decoder
sl@0
   543
	if (selDec)
sl@0
   544
		{
sl@0
   545
//		TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   546
		TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   547
		if (err != KErrNone)
sl@0
   548
			{
sl@0
   549
			ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   550
				return EInconclusive;
sl@0
   551
			}
sl@0
   552
		}
sl@0
   553
sl@0
   554
	// select post-processor
sl@0
   555
	if (selPost)
sl@0
   556
		{
sl@0
   557
		TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   558
//		TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   559
		if (err != KErrNone)
sl@0
   560
			{
sl@0
   561
			ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   562
				return EInconclusive;
sl@0
   563
			}
sl@0
   564
		}
sl@0
   565
sl@0
   566
	CSystemClockSource *time1 = NULL;
sl@0
   567
sl@0
   568
	// no parameters so no need to have a separate 'test clock source'
sl@0
   569
	TRAP(err, time1 = CSystemClockSource::NewL());
sl@0
   570
	if (err != KErrNone)
sl@0
   571
		{
sl@0
   572
		ERR_PRINTF1(_L("Error - couldn't construct system clock class"));
sl@0
   573
		
sl@0
   574
		return EInconclusive;
sl@0
   575
		}
sl@0
   576
	
sl@0
   577
	// set clock source 
sl@0
   578
	aDevVideoPlay.SetClockSource(time1);
sl@0
   579
	
sl@0
   580
	// if there is no panic then test has passed
sl@0
   581
sl@0
   582
	INFO_PRINTF1(_L("SetClockSourceL() called correctly on HW Devices."));
sl@0
   583
	
sl@0
   584
	// delete clock source
sl@0
   585
	delete time1; time1 = NULL;
sl@0
   586
sl@0
   587
	return ret;
sl@0
   588
	}
sl@0
   589
//------------------------------------------------------------------
sl@0
   590
sl@0
   591
CTestDevVideoPlaySetVideoOutput::CTestDevVideoPlaySetVideoOutput(const TDesC& aTestName, TTestType aTestType)
sl@0
   592
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   593
	{
sl@0
   594
	}
sl@0
   595
sl@0
   596
CTestDevVideoPlaySetVideoOutput* CTestDevVideoPlaySetVideoOutput::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   597
	{
sl@0
   598
	CTestDevVideoPlaySetVideoOutput* self = new(ELeave) CTestDevVideoPlaySetVideoOutput(aTestName, aTestType);
sl@0
   599
	return self;
sl@0
   600
	}
sl@0
   601
sl@0
   602
TVerdict CTestDevVideoPlaySetVideoOutput::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   603
	{
sl@0
   604
	TVerdict ret = EPass;
sl@0
   605
	TInt expErr = KErrNone;
sl@0
   606
	
sl@0
   607
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetVideoOutput"));
sl@0
   608
	
sl@0
   609
	// expected results
sl@0
   610
	if (iTestType != ETestValid)
sl@0
   611
		{
sl@0
   612
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   613
		return EInconclusive;
sl@0
   614
		}
sl@0
   615
sl@0
   616
	TInt err = KErrNone;
sl@0
   617
sl@0
   618
//	THwDeviceId hwDecoder = 0;
sl@0
   619
//	THwDeviceId hwPostProc = 0;
sl@0
   620
sl@0
   621
	// select decoder
sl@0
   622
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   623
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   624
	if (err != KErrNone)
sl@0
   625
		{
sl@0
   626
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   627
			return EInconclusive;
sl@0
   628
		}
sl@0
   629
sl@0
   630
	// select post-processor
sl@0
   631
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   632
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   633
	if (err != KErrNone)
sl@0
   634
		{
sl@0
   635
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   636
			return EInconclusive;
sl@0
   637
		}
sl@0
   638
sl@0
   639
	expErr = KErrHardwareNotAvailable;//Post processor plugin will leave with this if it gets
sl@0
   640
									  //the method call correctly
sl@0
   641
sl@0
   642
	TRAP(err, aDevVideoPlay.SetVideoDestScreenL(ETrue) )
sl@0
   643
sl@0
   644
	if (err != expErr)
sl@0
   645
		{
sl@0
   646
		ERR_PRINTF3(_L("SetVideoDestScreenL() gave error %d (expected %d)"),err, expErr);
sl@0
   647
		ret = EFail;
sl@0
   648
		}
sl@0
   649
	else
sl@0
   650
		INFO_PRINTF3(_L("SetVideoDestScreenL(), %d = %d"), err, expErr);
sl@0
   651
	
sl@0
   652
	return ret;
sl@0
   653
	}
sl@0
   654
//------------------------------------------------------------------
sl@0
   655
sl@0
   656
CTestDevVideoPlaySynchronizeDecoding::CTestDevVideoPlaySynchronizeDecoding(const TDesC& aTestName, TTestType aTestType)
sl@0
   657
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   658
	{
sl@0
   659
	}
sl@0
   660
sl@0
   661
CTestDevVideoPlaySynchronizeDecoding* CTestDevVideoPlaySynchronizeDecoding::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   662
	{
sl@0
   663
	CTestDevVideoPlaySynchronizeDecoding* self = new(ELeave) CTestDevVideoPlaySynchronizeDecoding(aTestName, aTestType);
sl@0
   664
	return self;
sl@0
   665
	}
sl@0
   666
sl@0
   667
TVerdict CTestDevVideoPlaySynchronizeDecoding::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   668
	{
sl@0
   669
	TVerdict ret = EPass;
sl@0
   670
	
sl@0
   671
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SynchronizeDecoding"));
sl@0
   672
	
sl@0
   673
	// expected results
sl@0
   674
	if (iTestType != ETestValid)
sl@0
   675
		{
sl@0
   676
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   677
		return EInconclusive;
sl@0
   678
		}
sl@0
   679
sl@0
   680
	TInt err = KErrNone;
sl@0
   681
sl@0
   682
//	THwDeviceId hwDecoder = 0;
sl@0
   683
//	THwDeviceId hwPostProc = 0;
sl@0
   684
sl@0
   685
	// select decoder
sl@0
   686
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   687
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// eABI warning removal
sl@0
   688
	if (err != KErrNone)
sl@0
   689
		{
sl@0
   690
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   691
			return EInconclusive;
sl@0
   692
		}
sl@0
   693
sl@0
   694
	// select post-processor
sl@0
   695
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   696
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// eABI warning removal
sl@0
   697
	if (err != KErrNone)
sl@0
   698
		{
sl@0
   699
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   700
			return EInconclusive;
sl@0
   701
		}
sl@0
   702
sl@0
   703
	// call synchronize decoding on Decoder
sl@0
   704
	aDevVideoPlay.SynchronizeDecoding(ETrue);
sl@0
   705
	// if this doesn't panic then test passes
sl@0
   706
sl@0
   707
	INFO_PRINTF1(_L("SynchronizeDecoding() called successfully."));
sl@0
   708
	
sl@0
   709
	return ret;
sl@0
   710
	}
sl@0
   711
//------------------------------------------------------------------
sl@0
   712
sl@0
   713
CTestDevVideoPlaySetBufferOptions::CTestDevVideoPlaySetBufferOptions(const TDesC& aTestName, TTestType aTestType)
sl@0
   714
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   715
	{
sl@0
   716
	}
sl@0
   717
sl@0
   718
CTestDevVideoPlaySetBufferOptions* CTestDevVideoPlaySetBufferOptions::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   719
	{
sl@0
   720
	CTestDevVideoPlaySetBufferOptions* self = new(ELeave) CTestDevVideoPlaySetBufferOptions(aTestName, aTestType);
sl@0
   721
	return self;
sl@0
   722
	}
sl@0
   723
sl@0
   724
TVerdict CTestDevVideoPlaySetBufferOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   725
	{
sl@0
   726
	TVerdict ret = EPass;
sl@0
   727
	TInt expErr = KErrNone;
sl@0
   728
	
sl@0
   729
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetBufferOptions"));
sl@0
   730
	
sl@0
   731
	// expected results
sl@0
   732
	if (iTestType != ETestValid)
sl@0
   733
		{
sl@0
   734
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   735
		return EInconclusive;
sl@0
   736
		}
sl@0
   737
sl@0
   738
	TInt err = KErrNone;
sl@0
   739
sl@0
   740
//	THwDeviceId hwDecoder = 0;
sl@0
   741
//	THwDeviceId hwPostProc = 0;
sl@0
   742
sl@0
   743
	// select decoder
sl@0
   744
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   745
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   746
	if (err != KErrNone)
sl@0
   747
		{
sl@0
   748
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   749
			return EInconclusive;
sl@0
   750
		}
sl@0
   751
sl@0
   752
	// select post-processor
sl@0
   753
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   754
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   755
	if (err != KErrNone)
sl@0
   756
		{
sl@0
   757
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   758
			return EInconclusive;
sl@0
   759
		}
sl@0
   760
sl@0
   761
	// initialize buffer options to the test data
sl@0
   762
	CMMFDevVideoPlay::TBufferOptions buffOptions = GetTestBufferOptions();
sl@0
   763
sl@0
   764
	// set buffer options on decoder [will leave on error]
sl@0
   765
	TRAP(err, aDevVideoPlay.SetBufferOptionsL(buffOptions) );
sl@0
   766
sl@0
   767
	if (err != expErr)
sl@0
   768
		{
sl@0
   769
		ERR_PRINTF3(_L("SetBufferOptionsL() gave error %d (expected %d)"),err, expErr);
sl@0
   770
		ret = EFail;
sl@0
   771
		}
sl@0
   772
	else
sl@0
   773
		INFO_PRINTF3(_L("SetBufferOptions(), %d = %d"), err, expErr);
sl@0
   774
	
sl@0
   775
	return ret;
sl@0
   776
	}
sl@0
   777
//------------------------------------------------------------------
sl@0
   778
sl@0
   779
CTestDevVideoPlayGetBufferOptions::CTestDevVideoPlayGetBufferOptions(const TDesC& aTestName, TTestType aTestType)
sl@0
   780
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   781
	{
sl@0
   782
	}
sl@0
   783
sl@0
   784
CTestDevVideoPlayGetBufferOptions* CTestDevVideoPlayGetBufferOptions::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   785
	{
sl@0
   786
	CTestDevVideoPlayGetBufferOptions* self = new(ELeave) CTestDevVideoPlayGetBufferOptions(aTestName, aTestType);
sl@0
   787
	return self;
sl@0
   788
	}
sl@0
   789
sl@0
   790
TVerdict CTestDevVideoPlayGetBufferOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   791
	{
sl@0
   792
	TVerdict ret = EPass;
sl@0
   793
	TInt expErr = KErrNone;
sl@0
   794
	
sl@0
   795
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetBufferOptions"));
sl@0
   796
	
sl@0
   797
	// expected results
sl@0
   798
	if (iTestType != ETestValid)
sl@0
   799
		{
sl@0
   800
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   801
		return EInconclusive;
sl@0
   802
		}
sl@0
   803
sl@0
   804
	TInt err = KErrNone;
sl@0
   805
sl@0
   806
//	THwDeviceId hwDecoder = 0;
sl@0
   807
//	THwDeviceId hwPostProc = 0;
sl@0
   808
sl@0
   809
	// select decoder
sl@0
   810
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   811
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   812
	if (err != KErrNone)
sl@0
   813
		{
sl@0
   814
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   815
			return EInconclusive;
sl@0
   816
		}
sl@0
   817
sl@0
   818
	// select post-processor
sl@0
   819
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   820
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   821
	if (err != KErrNone)
sl@0
   822
		{
sl@0
   823
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   824
			return EInconclusive;
sl@0
   825
		}
sl@0
   826
sl@0
   827
	// get buffer options from the decoder
sl@0
   828
	CMMFDevVideoPlay::TBufferOptions buffOptions;
sl@0
   829
	aDevVideoPlay.GetBufferOptions(buffOptions);
sl@0
   830
sl@0
   831
	// compare this to the test data
sl@0
   832
	if ( !CompareBufferOptions(buffOptions, GetTestBufferOptions()) )
sl@0
   833
		{
sl@0
   834
		ERR_PRINTF1(_L("GetBufferOptions() comparison with test data failed!"));
sl@0
   835
		ret = EFail;
sl@0
   836
		}
sl@0
   837
	else 
sl@0
   838
		{
sl@0
   839
		INFO_PRINTF1(_L("GetBufferOptions() comparison with test data passed."));
sl@0
   840
		INFO_PRINTF3(_L("GetBufferOptions(), %d = %d"), err, expErr);
sl@0
   841
		}
sl@0
   842
	
sl@0
   843
	return ret;
sl@0
   844
	}
sl@0
   845
//------------------------------------------------------------------
sl@0
   846
sl@0
   847
CTestDevVideoPlaySetHrdVbv::CTestDevVideoPlaySetHrdVbv(const TDesC& aTestName, TTestType aTestType)
sl@0
   848
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   849
	{
sl@0
   850
	}
sl@0
   851
sl@0
   852
CTestDevVideoPlaySetHrdVbv* CTestDevVideoPlaySetHrdVbv::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   853
	{
sl@0
   854
	CTestDevVideoPlaySetHrdVbv* self = new(ELeave) CTestDevVideoPlaySetHrdVbv(aTestName, aTestType);
sl@0
   855
	return self;
sl@0
   856
	}
sl@0
   857
sl@0
   858
TVerdict CTestDevVideoPlaySetHrdVbv::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   859
	{
sl@0
   860
	TVerdict ret = EPass;
sl@0
   861
	
sl@0
   862
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetHrdVbv"));
sl@0
   863
	
sl@0
   864
	// expected results
sl@0
   865
	if (iTestType != ETestValid)
sl@0
   866
		{
sl@0
   867
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   868
		return EInconclusive;
sl@0
   869
		}
sl@0
   870
sl@0
   871
	TInt err = KErrNone;
sl@0
   872
sl@0
   873
//	THwDeviceId hwDecoder = 0;
sl@0
   874
//	THwDeviceId hwPostProc = 0;
sl@0
   875
sl@0
   876
	// select decoder
sl@0
   877
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   878
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   879
	if (err != KErrNone)
sl@0
   880
		{
sl@0
   881
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   882
			return EInconclusive;
sl@0
   883
		}
sl@0
   884
sl@0
   885
	// select post-processor
sl@0
   886
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   887
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   888
	if (err != KErrNone)
sl@0
   889
		{
sl@0
   890
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   891
			return EInconclusive;
sl@0
   892
		}
sl@0
   893
sl@0
   894
	HBufC8* hrdVbvParams = NULL; 
sl@0
   895
	TRAP(err, hrdVbvParams = KTestHrdVbvParams().AllocL());
sl@0
   896
	if (err != KErrNone)
sl@0
   897
		{
sl@0
   898
		ERR_PRINTF1(_L("Error - couldn't initialize hrd/vbv params"));
sl@0
   899
			return EInconclusive;
sl@0
   900
		}
sl@0
   901
sl@0
   902
	// set hrd/vbv spec on decoder
sl@0
   903
	aDevVideoPlay.SetHrdVbvSpec(KTestHrdVbvSpec, *hrdVbvParams);
sl@0
   904
	// if this doesn't panic then test has passed
sl@0
   905
sl@0
   906
	// delete copy
sl@0
   907
	delete hrdVbvParams; hrdVbvParams = NULL;
sl@0
   908
sl@0
   909
	INFO_PRINTF1(_L("SetHrdVbvSpec() called successfully."));
sl@0
   910
	
sl@0
   911
	return ret;
sl@0
   912
	}
sl@0
   913
sl@0
   914
//------------------------------------------------------------------
sl@0
   915
sl@0
   916
void CTestDevVideoPlayInit::MdvpoInitComplete(TInt aError)
sl@0
   917
	{
sl@0
   918
	INFO_PRINTF2(_L("MdvpoInitComplete():  Error = %d"), aError);
sl@0
   919
	
sl@0
   920
	iError = aError;
sl@0
   921
	}
sl@0
   922
sl@0
   923
CTestDevVideoPlayInit::CTestDevVideoPlayInit(const TDesC& aTestName, TTestType aTestType)
sl@0
   924
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   925
	{
sl@0
   926
	}
sl@0
   927
sl@0
   928
CTestDevVideoPlayInit* CTestDevVideoPlayInit::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   929
	{
sl@0
   930
	CTestDevVideoPlayInit* self = new(ELeave) CTestDevVideoPlayInit(aTestName, aTestType);
sl@0
   931
	return self;
sl@0
   932
	}
sl@0
   933
sl@0
   934
TVerdict CTestDevVideoPlayInit::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   935
	{
sl@0
   936
	TVerdict ret = EPass;
sl@0
   937
	TInt expErr = KErrNone;
sl@0
   938
	
sl@0
   939
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Init"));
sl@0
   940
	
sl@0
   941
	// expected results
sl@0
   942
	if (iTestType != ETestValid)
sl@0
   943
		{
sl@0
   944
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   945
		return EInconclusive;
sl@0
   946
		}
sl@0
   947
sl@0
   948
	TInt err = KErrNone;
sl@0
   949
sl@0
   950
//	THwDeviceId hwDecoder = 0;
sl@0
   951
//	THwDeviceId hwPostProc = 0;
sl@0
   952
sl@0
   953
	// select decoder
sl@0
   954
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
   955
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
   956
	if (err != KErrNone)
sl@0
   957
		{
sl@0
   958
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
   959
			return EInconclusive;
sl@0
   960
		}
sl@0
   961
sl@0
   962
	// select post-processor
sl@0
   963
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
   964
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
   965
	if (err != KErrNone)
sl@0
   966
		{
sl@0
   967
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
   968
			return EInconclusive;
sl@0
   969
		}
sl@0
   970
sl@0
   971
	// initialize CDevVideoPlay and wait for response in iError
sl@0
   972
	// iError is set by the MdvpoInitComplete callback
sl@0
   973
	aDevVideoPlay.Initialize();
sl@0
   974
sl@0
   975
	if (iError != expErr)
sl@0
   976
		{
sl@0
   977
		ERR_PRINTF3(_L("Initialize() gave error %d (expected %d)"),iError, expErr);
sl@0
   978
		ret = EFail;
sl@0
   979
		}
sl@0
   980
	else
sl@0
   981
		INFO_PRINTF3(_L("Initialize(), %d = %d"), iError, expErr);
sl@0
   982
	
sl@0
   983
	return ret;
sl@0
   984
	}
sl@0
   985
sl@0
   986
//------------------------------------------------------------------
sl@0
   987
sl@0
   988
void CTestDevVideoPlayStartDSA::MdvpoInitComplete(TInt aError)
sl@0
   989
	{
sl@0
   990
	INFO_PRINTF2(_L("CTestDevVideoPlayStartDSA::MdvpoInitComplete():  Error = %d"), aError);
sl@0
   991
	
sl@0
   992
	iError = aError;
sl@0
   993
	}
sl@0
   994
sl@0
   995
CTestDevVideoPlayStartDSA::CTestDevVideoPlayStartDSA(const TDesC& aTestName, TTestType aTestType)
sl@0
   996
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   997
	{
sl@0
   998
	}
sl@0
   999
sl@0
  1000
CTestDevVideoPlayStartDSA* CTestDevVideoPlayStartDSA::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1001
	{
sl@0
  1002
	CTestDevVideoPlayStartDSA* self = new(ELeave) CTestDevVideoPlayStartDSA(aTestName, aTestType);
sl@0
  1003
	return self;
sl@0
  1004
	}
sl@0
  1005
sl@0
  1006
TVerdict CTestDevVideoPlayStartDSA::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1007
	{
sl@0
  1008
	TVerdict ret = EPass;
sl@0
  1009
	TInt expErr = KErrNone;
sl@0
  1010
	
sl@0
  1011
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  StartDSA"));
sl@0
  1012
	
sl@0
  1013
	// expected results
sl@0
  1014
	if (iTestType != ETestValid)
sl@0
  1015
		{
sl@0
  1016
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1017
		return EInconclusive;
sl@0
  1018
		}
sl@0
  1019
sl@0
  1020
	TInt err = KErrNone;
sl@0
  1021
sl@0
  1022
//	THwDeviceId hwDecoder = 0;
sl@0
  1023
//	THwDeviceId hwPostProc = 0;
sl@0
  1024
sl@0
  1025
	// select decoder
sl@0
  1026
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1027
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1028
	if (err != KErrNone)
sl@0
  1029
		{
sl@0
  1030
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1031
			return EInconclusive;
sl@0
  1032
		}
sl@0
  1033
sl@0
  1034
	// select post-processor
sl@0
  1035
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1036
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1037
	if (err != KErrNone)
sl@0
  1038
		{
sl@0
  1039
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1040
			return EInconclusive;
sl@0
  1041
		}
sl@0
  1042
sl@0
  1043
	// initialize CDevVideoPlay and wait for response
sl@0
  1044
	// iError is set by the MdvpoInitComplete callback
sl@0
  1045
	aDevVideoPlay.Initialize();
sl@0
  1046
	if (iError != KErrNone)
sl@0
  1047
		{
sl@0
  1048
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1049
			return EInconclusive;
sl@0
  1050
		}
sl@0
  1051
sl@0
  1052
	// screen device is independant of DevVideo so we can construct one here
sl@0
  1053
	// and just check that it is non NULL at the plugin
sl@0
  1054
	CFbsScreenDevice *screenDev = NULL;
sl@0
  1055
	TRAP(err, screenDev = CFbsScreenDevice::NewL(_L("scdv"), EColor16));
sl@0
  1056
	if (err != KErrNone)
sl@0
  1057
		{
sl@0
  1058
		ERR_PRINTF1(_L("Error - couldn't initialize screen device"));
sl@0
  1059
		//return EInconclusive;
sl@0
  1060
		}
sl@0
  1061
sl@0
  1062
	TRect dsaRect(KTestDSARectA, KTestDSARectB, KTestDSARectC, KTestDSARectD);
sl@0
  1063
	TRegionFix<1> reg1(dsaRect);
sl@0
  1064
	
sl@0
  1065
	// start direct screen access
sl@0
  1066
	TRAP(err, aDevVideoPlay.StartDirectScreenAccessL(dsaRect, *screenDev, reg1) );
sl@0
  1067
	
sl@0
  1068
	// delete screen device and rect
sl@0
  1069
	delete screenDev;  
sl@0
  1070
	screenDev = NULL;
sl@0
  1071
sl@0
  1072
	reg1.Clear();
sl@0
  1073
sl@0
  1074
	if (err != expErr)
sl@0
  1075
		{
sl@0
  1076
		ERR_PRINTF3(_L("StartDirectScreenAccessL() gave error %d (expected %d)"),err, expErr);
sl@0
  1077
		ret = EFail;
sl@0
  1078
		}
sl@0
  1079
	else
sl@0
  1080
		INFO_PRINTF3(_L("StartDirectScreenAccessL(), %d = %d"), err, expErr);
sl@0
  1081
	
sl@0
  1082
	return ret;
sl@0
  1083
	}
sl@0
  1084
//------------------------------------------------------------------
sl@0
  1085
sl@0
  1086
void CTestDevVideoPlaySetClipRegion::MdvpoInitComplete(TInt aError)
sl@0
  1087
	{
sl@0
  1088
	INFO_PRINTF2(_L("CTestDevVideoPlaySetClipRegion::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1089
	
sl@0
  1090
	iError = aError;
sl@0
  1091
	}
sl@0
  1092
sl@0
  1093
CTestDevVideoPlaySetClipRegion::CTestDevVideoPlaySetClipRegion(const TDesC& aTestName, TTestType aTestType)
sl@0
  1094
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1095
	{
sl@0
  1096
	}
sl@0
  1097
sl@0
  1098
CTestDevVideoPlaySetClipRegion* CTestDevVideoPlaySetClipRegion::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1099
	{
sl@0
  1100
	CTestDevVideoPlaySetClipRegion* self = new(ELeave) CTestDevVideoPlaySetClipRegion(aTestName, aTestType);
sl@0
  1101
	return self;
sl@0
  1102
	}
sl@0
  1103
sl@0
  1104
TVerdict CTestDevVideoPlaySetClipRegion::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1105
	{
sl@0
  1106
	TVerdict ret = EPass;
sl@0
  1107
	
sl@0
  1108
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetClipRegion"));
sl@0
  1109
	
sl@0
  1110
	// expected results
sl@0
  1111
	if (iTestType != ETestValid)
sl@0
  1112
		{
sl@0
  1113
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1114
		return EInconclusive;
sl@0
  1115
		}
sl@0
  1116
sl@0
  1117
	TInt err = KErrNone;
sl@0
  1118
sl@0
  1119
//	THwDeviceId hwDecoder = 0;
sl@0
  1120
//	THwDeviceId hwPostProc = 0;
sl@0
  1121
sl@0
  1122
	// select decoder
sl@0
  1123
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1124
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// eABI warning removal
sl@0
  1125
	if (err != KErrNone)
sl@0
  1126
		{
sl@0
  1127
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1128
			return EInconclusive;
sl@0
  1129
		}
sl@0
  1130
sl@0
  1131
	// select post-processor
sl@0
  1132
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1133
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1134
	if (err != KErrNone)
sl@0
  1135
		{
sl@0
  1136
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1137
			return EInconclusive;
sl@0
  1138
		}
sl@0
  1139
sl@0
  1140
	// initialize CDevVideoPlay and wait for response
sl@0
  1141
	// iError is set by the MdvpoInitComplete callback
sl@0
  1142
	aDevVideoPlay.Initialize();
sl@0
  1143
	
sl@0
  1144
	if (iError != KErrNone)
sl@0
  1145
		{
sl@0
  1146
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1147
			return EInconclusive;
sl@0
  1148
		}
sl@0
  1149
sl@0
  1150
	TRect dsaRect(KTestDSARectA, KTestDSARectB, KTestDSARectC, KTestDSARectD);
sl@0
  1151
	TRegionFix<1> reg1(dsaRect);
sl@0
  1152
	
sl@0
  1153
	// set clip region 
sl@0
  1154
	aDevVideoPlay.SetScreenClipRegion(reg1);
sl@0
  1155
	
sl@0
  1156
	// clear region
sl@0
  1157
	reg1.Clear();
sl@0
  1158
sl@0
  1159
	// if no PANIC then test has passed
sl@0
  1160
	INFO_PRINTF1(_L("SetScreenClipRegion() called successfully"));
sl@0
  1161
	
sl@0
  1162
	return ret;
sl@0
  1163
	}
sl@0
  1164
//------------------------------------------------------------------
sl@0
  1165
sl@0
  1166
void CTestDevVideoPlaySetPauseClipFail::MdvpoInitComplete(TInt aError)
sl@0
  1167
	{
sl@0
  1168
	INFO_PRINTF2(_L("CTestDevVideoPlaySetPauseClipFail::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1169
	
sl@0
  1170
	iError = aError;
sl@0
  1171
	}
sl@0
  1172
sl@0
  1173
CTestDevVideoPlaySetPauseClipFail::CTestDevVideoPlaySetPauseClipFail(const TDesC& aTestName, TTestType aTestType)
sl@0
  1174
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1175
	{
sl@0
  1176
	}
sl@0
  1177
sl@0
  1178
CTestDevVideoPlaySetPauseClipFail* CTestDevVideoPlaySetPauseClipFail::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1179
	{
sl@0
  1180
	CTestDevVideoPlaySetPauseClipFail* self = new(ELeave) CTestDevVideoPlaySetPauseClipFail(aTestName, aTestType);
sl@0
  1181
	return self;
sl@0
  1182
	}
sl@0
  1183
sl@0
  1184
TVerdict CTestDevVideoPlaySetPauseClipFail::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1185
	{
sl@0
  1186
	TVerdict ret = EPass;
sl@0
  1187
	
sl@0
  1188
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetPauseClipFail"));
sl@0
  1189
	
sl@0
  1190
	// expected results
sl@0
  1191
	if (iTestType != ETestValid)
sl@0
  1192
		{
sl@0
  1193
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1194
		return EInconclusive;
sl@0
  1195
		}
sl@0
  1196
sl@0
  1197
	TInt err = KErrNone;
sl@0
  1198
sl@0
  1199
//	THwDeviceId hwDecoder = 0;
sl@0
  1200
//	THwDeviceId hwPostProc = 0;
sl@0
  1201
sl@0
  1202
	// select decoder
sl@0
  1203
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1204
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1205
	if (err != KErrNone)
sl@0
  1206
		{
sl@0
  1207
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1208
			return EInconclusive;
sl@0
  1209
		}
sl@0
  1210
sl@0
  1211
	// select post-processor
sl@0
  1212
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1213
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1214
	if (err != KErrNone)
sl@0
  1215
		{
sl@0
  1216
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1217
			return EInconclusive;
sl@0
  1218
		}
sl@0
  1219
sl@0
  1220
	// initialize CDevVideoPlay and wait for response
sl@0
  1221
	// iError is set by the MdvpoInitComplete callback
sl@0
  1222
	aDevVideoPlay.Initialize();
sl@0
  1223
	
sl@0
  1224
	if (iError != KErrNone)
sl@0
  1225
		{
sl@0
  1226
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1227
			return EInconclusive;
sl@0
  1228
		}
sl@0
  1229
sl@0
  1230
	// set pause on clip fail to ETrue
sl@0
  1231
	aDevVideoPlay.SetPauseOnClipFail(ETrue);
sl@0
  1232
sl@0
  1233
	// if no PANIC then test has passed
sl@0
  1234
	INFO_PRINTF1(_L("SetPauseClipFail() called successfully"));
sl@0
  1235
	
sl@0
  1236
	return ret;
sl@0
  1237
	}
sl@0
  1238
//------------------------------------------------------------------
sl@0
  1239
sl@0
  1240
void CTestDevVideoPlayAbortDSA::MdvpoInitComplete(TInt aError)
sl@0
  1241
	{
sl@0
  1242
	INFO_PRINTF2(_L("CTestDevVideoPlayAbortDSA::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1243
	
sl@0
  1244
	iError = aError;
sl@0
  1245
	}
sl@0
  1246
sl@0
  1247
CTestDevVideoPlayAbortDSA::CTestDevVideoPlayAbortDSA(const TDesC& aTestName, TTestType aTestType)
sl@0
  1248
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1249
	{
sl@0
  1250
	}
sl@0
  1251
sl@0
  1252
CTestDevVideoPlayAbortDSA* CTestDevVideoPlayAbortDSA::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1253
	{
sl@0
  1254
	CTestDevVideoPlayAbortDSA* self = new(ELeave) CTestDevVideoPlayAbortDSA(aTestName, aTestType);
sl@0
  1255
	return self;
sl@0
  1256
	}
sl@0
  1257
sl@0
  1258
TVerdict CTestDevVideoPlayAbortDSA::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1259
	{
sl@0
  1260
	TVerdict ret = EPass;
sl@0
  1261
	
sl@0
  1262
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  AbortDSA"));
sl@0
  1263
	
sl@0
  1264
	// expected results
sl@0
  1265
	if (iTestType != ETestValid)
sl@0
  1266
		{
sl@0
  1267
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1268
		return EInconclusive;
sl@0
  1269
		}
sl@0
  1270
sl@0
  1271
	TInt err = KErrNone;
sl@0
  1272
sl@0
  1273
//	THwDeviceId hwDecoder = 0;
sl@0
  1274
//	THwDeviceId hwPostProc = 0;
sl@0
  1275
sl@0
  1276
	// select decoder
sl@0
  1277
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1278
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1279
	if (err != KErrNone)
sl@0
  1280
		{
sl@0
  1281
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1282
			return EInconclusive;
sl@0
  1283
		}
sl@0
  1284
sl@0
  1285
	// select post-processor
sl@0
  1286
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1287
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// eABI warning removal
sl@0
  1288
	if (err != KErrNone)
sl@0
  1289
		{
sl@0
  1290
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1291
			return EInconclusive;
sl@0
  1292
		}
sl@0
  1293
sl@0
  1294
	// initialize CDevVideoPlay and wait for response
sl@0
  1295
	// iError is set by the MdvpoInitComplete callback
sl@0
  1296
	aDevVideoPlay.Initialize();
sl@0
  1297
	
sl@0
  1298
	if (iError != KErrNone)
sl@0
  1299
		{
sl@0
  1300
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1301
			return EInconclusive;
sl@0
  1302
		}
sl@0
  1303
sl@0
  1304
	// abort direct screen access [is there a way to check this?]
sl@0
  1305
	aDevVideoPlay.AbortDirectScreenAccess();
sl@0
  1306
sl@0
  1307
	INFO_PRINTF1(_L("AbortDirectScreenAccess() called successfully"));
sl@0
  1308
	
sl@0
  1309
	return ret;
sl@0
  1310
	}
sl@0
  1311
//------------------------------------------------------------------
sl@0
  1312
sl@0
  1313
void CTestDevVideoPlayIsPlaying::MdvpoInitComplete(TInt aError)
sl@0
  1314
	{
sl@0
  1315
	INFO_PRINTF2(_L("CTestDevVideoPlayIsPlaying::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1316
	
sl@0
  1317
	iError = aError;
sl@0
  1318
	}
sl@0
  1319
sl@0
  1320
CTestDevVideoPlayIsPlaying::CTestDevVideoPlayIsPlaying(const TDesC& aTestName, TTestType aTestType)
sl@0
  1321
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1322
	{
sl@0
  1323
	}
sl@0
  1324
sl@0
  1325
CTestDevVideoPlayIsPlaying* CTestDevVideoPlayIsPlaying::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1326
	{
sl@0
  1327
	CTestDevVideoPlayIsPlaying* self = new(ELeave) CTestDevVideoPlayIsPlaying(aTestName, aTestType);
sl@0
  1328
	return self;
sl@0
  1329
	}
sl@0
  1330
sl@0
  1331
TVerdict CTestDevVideoPlayIsPlaying::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1332
	{
sl@0
  1333
	TVerdict ret = EPass;
sl@0
  1334
	
sl@0
  1335
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  IsPlaying"));
sl@0
  1336
	
sl@0
  1337
	// expected results
sl@0
  1338
	if (iTestType != ETestValid)
sl@0
  1339
		{
sl@0
  1340
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1341
		return EInconclusive;
sl@0
  1342
		}
sl@0
  1343
sl@0
  1344
	TInt err = KErrNone;
sl@0
  1345
sl@0
  1346
//	THwDeviceId hwDecoder = 0;
sl@0
  1347
//	THwDeviceId hwPostProc = 0;
sl@0
  1348
sl@0
  1349
	// select decoder
sl@0
  1350
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1351
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1352
	if (err != KErrNone)
sl@0
  1353
		{
sl@0
  1354
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1355
			return EInconclusive;
sl@0
  1356
		}
sl@0
  1357
sl@0
  1358
	// select post-processor
sl@0
  1359
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1360
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1361
	if (err != KErrNone)
sl@0
  1362
		{
sl@0
  1363
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1364
			return EInconclusive;
sl@0
  1365
		}
sl@0
  1366
sl@0
  1367
	// initialize CDevVideoPlay and wait for response
sl@0
  1368
	// iError is set by the MdvpoInitComplete callback
sl@0
  1369
	aDevVideoPlay.Initialize();
sl@0
  1370
	
sl@0
  1371
	if (iError != KErrNone)
sl@0
  1372
		{
sl@0
  1373
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1374
			return EInconclusive;
sl@0
  1375
		}
sl@0
  1376
sl@0
  1377
	TBool playing = ETrue;
sl@0
  1378
sl@0
  1379
	// check DevVideoPlay is not playing
sl@0
  1380
	playing = aDevVideoPlay.IsPlaying();
sl@0
  1381
sl@0
  1382
	if (playing)
sl@0
  1383
		{
sl@0
  1384
		ERR_PRINTF1(_L("IsPlaying() reported ETrue - expected EFalse!"));
sl@0
  1385
		ret = EFail;
sl@0
  1386
		}
sl@0
  1387
	else
sl@0
  1388
		INFO_PRINTF1(_L("IsPlaying() returned EFalse as expected"));
sl@0
  1389
	
sl@0
  1390
	return ret;
sl@0
  1391
	}
sl@0
  1392
//------------------------------------------------------------------
sl@0
  1393
sl@0
  1394
void CTestDevVideoPlayRedraw::MdvpoInitComplete(TInt aError)
sl@0
  1395
	{
sl@0
  1396
	INFO_PRINTF2(_L("CTestDevVideoPlayRedraw::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1397
	
sl@0
  1398
	iError = aError;
sl@0
  1399
	}
sl@0
  1400
sl@0
  1401
CTestDevVideoPlayRedraw::CTestDevVideoPlayRedraw(const TDesC& aTestName, TTestType aTestType)
sl@0
  1402
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1403
	{
sl@0
  1404
	}
sl@0
  1405
sl@0
  1406
CTestDevVideoPlayRedraw* CTestDevVideoPlayRedraw::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1407
	{
sl@0
  1408
	CTestDevVideoPlayRedraw* self = new(ELeave) CTestDevVideoPlayRedraw(aTestName, aTestType);
sl@0
  1409
	return self;
sl@0
  1410
	}
sl@0
  1411
sl@0
  1412
TVerdict CTestDevVideoPlayRedraw::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1413
	{
sl@0
  1414
	TVerdict ret = EPass;
sl@0
  1415
	
sl@0
  1416
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Redraw"));
sl@0
  1417
	
sl@0
  1418
	// expected results
sl@0
  1419
	if (iTestType != ETestValid)
sl@0
  1420
		{
sl@0
  1421
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1422
		return EInconclusive;
sl@0
  1423
		}
sl@0
  1424
sl@0
  1425
	TInt err = KErrNone;
sl@0
  1426
sl@0
  1427
//	THwDeviceId hwDecoder = 0;
sl@0
  1428
//	THwDeviceId hwPostProc = 0;
sl@0
  1429
sl@0
  1430
	// select decoder
sl@0
  1431
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1432
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1433
	if (err != KErrNone)
sl@0
  1434
		{
sl@0
  1435
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1436
			return EInconclusive;
sl@0
  1437
		}
sl@0
  1438
sl@0
  1439
	// select post-processor
sl@0
  1440
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1441
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1442
	if (err != KErrNone)
sl@0
  1443
		{
sl@0
  1444
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1445
			return EInconclusive;
sl@0
  1446
		}
sl@0
  1447
sl@0
  1448
	// initialize CDevVideoPlay and wait for response
sl@0
  1449
	// iError is set by the MdvpoInitComplete callback
sl@0
  1450
	aDevVideoPlay.Initialize();
sl@0
  1451
	
sl@0
  1452
	if (iError != KErrNone)
sl@0
  1453
		{
sl@0
  1454
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1455
			return EInconclusive;
sl@0
  1456
		}
sl@0
  1457
sl@0
  1458
	// call redraw [is there a way to check this?]
sl@0
  1459
	aDevVideoPlay.Redraw();
sl@0
  1460
sl@0
  1461
	INFO_PRINTF1(_L("Redraw() called successfully"));
sl@0
  1462
	
sl@0
  1463
	return ret;
sl@0
  1464
	}
sl@0
  1465
//------------------------------------------------------------------
sl@0
  1466
sl@0
  1467
void CTestDevVideoPlayStart::MdvpoInitComplete(TInt aError)
sl@0
  1468
	{
sl@0
  1469
	INFO_PRINTF2(_L("CTestDevVideoPlayStart::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1470
	
sl@0
  1471
	iError = aError;
sl@0
  1472
	}
sl@0
  1473
sl@0
  1474
CTestDevVideoPlayStart::CTestDevVideoPlayStart(const TDesC& aTestName, TTestType aTestType)
sl@0
  1475
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1476
	{
sl@0
  1477
	}
sl@0
  1478
sl@0
  1479
CTestDevVideoPlayStart* CTestDevVideoPlayStart::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1480
	{
sl@0
  1481
	CTestDevVideoPlayStart* self = new(ELeave) CTestDevVideoPlayStart(aTestName, aTestType);
sl@0
  1482
	return self;
sl@0
  1483
	}
sl@0
  1484
sl@0
  1485
TVerdict CTestDevVideoPlayStart::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1486
	{
sl@0
  1487
	TVerdict ret = EPass;
sl@0
  1488
//	TInt expErr = KErrNone;
sl@0
  1489
	TBool selDec = ETrue;
sl@0
  1490
	TBool selPost = ETrue;
sl@0
  1491
sl@0
  1492
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Start"));
sl@0
  1493
	
sl@0
  1494
	// expected results
sl@0
  1495
	switch(iTestType)
sl@0
  1496
		{
sl@0
  1497
		case ETestValid:
sl@0
  1498
//			expErr = KErrNone;	// EABI warning removal
sl@0
  1499
			break;
sl@0
  1500
		case ETestDecoderOnly:
sl@0
  1501
			selPost = EFalse;
sl@0
  1502
			break;
sl@0
  1503
		case ETestPostProcOnly:
sl@0
  1504
			selDec = EFalse;
sl@0
  1505
			break;
sl@0
  1506
		default:
sl@0
  1507
			ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1508
			return EInconclusive;
sl@0
  1509
		}
sl@0
  1510
sl@0
  1511
	TInt err = KErrNone;
sl@0
  1512
sl@0
  1513
//	THwDeviceId hwDecoder = 0;
sl@0
  1514
//	THwDeviceId hwPostProc = 0;
sl@0
  1515
sl@0
  1516
	// select decoder
sl@0
  1517
	if (selDec)
sl@0
  1518
		{
sl@0
  1519
//		TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1520
		TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1521
		if (err != KErrNone)
sl@0
  1522
			{
sl@0
  1523
			ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1524
				return EInconclusive;
sl@0
  1525
			}
sl@0
  1526
		}
sl@0
  1527
sl@0
  1528
	// select post-processor
sl@0
  1529
	if (selPost)
sl@0
  1530
		{
sl@0
  1531
//		TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1532
		TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABIO warning removal
sl@0
  1533
		if (err != KErrNone)
sl@0
  1534
			{
sl@0
  1535
			ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1536
				return EInconclusive;
sl@0
  1537
			}
sl@0
  1538
		}
sl@0
  1539
sl@0
  1540
	// initialize CDevVideoPlay and wait for response
sl@0
  1541
	// iError is set by the MdvpoInitComplete callback
sl@0
  1542
	aDevVideoPlay.Initialize();
sl@0
  1543
	
sl@0
  1544
	if (iError != KErrNone)
sl@0
  1545
		{
sl@0
  1546
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1547
			return EInconclusive;
sl@0
  1548
		}
sl@0
  1549
sl@0
  1550
	// check not already playing
sl@0
  1551
	TBool playing = aDevVideoPlay.IsPlaying();
sl@0
  1552
	if (playing)
sl@0
  1553
		{
sl@0
  1554
		ERR_PRINTF1(_L("Error - DevVideoPlay already playing!"));
sl@0
  1555
			return EInconclusive;
sl@0
  1556
		}
sl@0
  1557
sl@0
  1558
	// call start on DevVideoPlay then check IsPlaying()
sl@0
  1559
	aDevVideoPlay.Start();
sl@0
  1560
	playing = aDevVideoPlay.IsPlaying();
sl@0
  1561
sl@0
  1562
	if (!playing)
sl@0
  1563
		{
sl@0
  1564
		ERR_PRINTF1(_L("IsPlaying() returned EFalse - expected ETrue"));
sl@0
  1565
		ret = EFail;
sl@0
  1566
		}
sl@0
  1567
	else
sl@0
  1568
		INFO_PRINTF1(_L("Start() called successfully"));
sl@0
  1569
	
sl@0
  1570
	return ret;
sl@0
  1571
	}
sl@0
  1572
//------------------------------------------------------------------
sl@0
  1573
sl@0
  1574
void CTestDevVideoPlayStop::MdvpoInitComplete(TInt aError)
sl@0
  1575
	{
sl@0
  1576
	INFO_PRINTF2(_L("CTestDevVideoPlayStop::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1577
	
sl@0
  1578
	iError = aError;
sl@0
  1579
	}
sl@0
  1580
sl@0
  1581
CTestDevVideoPlayStop::CTestDevVideoPlayStop(const TDesC& aTestName, TTestType aTestType)
sl@0
  1582
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1583
	{
sl@0
  1584
	}
sl@0
  1585
sl@0
  1586
CTestDevVideoPlayStop* CTestDevVideoPlayStop::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1587
	{
sl@0
  1588
	CTestDevVideoPlayStop* self = new(ELeave) CTestDevVideoPlayStop(aTestName, aTestType);
sl@0
  1589
	return self;
sl@0
  1590
	}
sl@0
  1591
sl@0
  1592
TVerdict CTestDevVideoPlayStop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1593
	{
sl@0
  1594
	TVerdict ret = EPass;
sl@0
  1595
//	TInt expErr = KErrNone;
sl@0
  1596
	TBool selDec = ETrue;
sl@0
  1597
	TBool selPost = ETrue;
sl@0
  1598
sl@0
  1599
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Stop"));
sl@0
  1600
	
sl@0
  1601
	// expected results
sl@0
  1602
	switch(iTestType)
sl@0
  1603
		{
sl@0
  1604
		case ETestValid:
sl@0
  1605
//			expErr = KErrNone;	// EABI warning removal
sl@0
  1606
			break;
sl@0
  1607
		case ETestDecoderOnly:
sl@0
  1608
			selPost = EFalse;
sl@0
  1609
			break;
sl@0
  1610
		case ETestPostProcOnly:
sl@0
  1611
			selDec = EFalse;
sl@0
  1612
			break;
sl@0
  1613
		default:
sl@0
  1614
			ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1615
			return EInconclusive;
sl@0
  1616
		}
sl@0
  1617
sl@0
  1618
	TInt err = KErrNone;
sl@0
  1619
sl@0
  1620
//	THwDeviceId hwDecoder = 0;
sl@0
  1621
//	THwDeviceId hwPostProc = 0;
sl@0
  1622
sl@0
  1623
	// select decoder
sl@0
  1624
	if (selDec)
sl@0
  1625
		{
sl@0
  1626
//		TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1627
		TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1628
		if (err != KErrNone)
sl@0
  1629
			{
sl@0
  1630
			ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1631
				return EInconclusive;
sl@0
  1632
			}
sl@0
  1633
		}
sl@0
  1634
sl@0
  1635
	// select post-processor
sl@0
  1636
	if (selPost)
sl@0
  1637
		{
sl@0
  1638
//		TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1639
		TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1640
		if (err != KErrNone)
sl@0
  1641
			{
sl@0
  1642
			ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1643
				return EInconclusive;
sl@0
  1644
			}
sl@0
  1645
		}
sl@0
  1646
	// initialize CDevVideoPlay and wait for response
sl@0
  1647
	// iError is set by the MdvpoInitComplete callback
sl@0
  1648
	aDevVideoPlay.Initialize();
sl@0
  1649
	
sl@0
  1650
	if (iError != KErrNone)
sl@0
  1651
		{
sl@0
  1652
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1653
			return EInconclusive;
sl@0
  1654
		}
sl@0
  1655
sl@0
  1656
	// check DevVideoPlay has started playing then call stop
sl@0
  1657
	aDevVideoPlay.Start();
sl@0
  1658
	TBool playing = aDevVideoPlay.IsPlaying();
sl@0
  1659
sl@0
  1660
	if (!playing)
sl@0
  1661
		{
sl@0
  1662
		ERR_PRINTF1(_L("Error - couldn't start playback!"));
sl@0
  1663
			return EInconclusive;
sl@0
  1664
		}
sl@0
  1665
sl@0
  1666
	// call stop
sl@0
  1667
	aDevVideoPlay.Stop();
sl@0
  1668
	playing = aDevVideoPlay.IsPlaying();
sl@0
  1669
sl@0
  1670
	if (playing)
sl@0
  1671
		{
sl@0
  1672
		ERR_PRINTF1(_L("IsPlaying() returned ETrue - expected EFalse"));
sl@0
  1673
		ret = EFail;
sl@0
  1674
		}
sl@0
  1675
	else
sl@0
  1676
		INFO_PRINTF1(_L("Stop() called successfully"));
sl@0
  1677
	
sl@0
  1678
	return ret;
sl@0
  1679
	}
sl@0
  1680
//------------------------------------------------------------------
sl@0
  1681
sl@0
  1682
void CTestDevVideoPlayPause::MdvpoInitComplete(TInt aError)
sl@0
  1683
	{
sl@0
  1684
	INFO_PRINTF2(_L("CTestDevVideoPlayPause::MdvpoInitComplete():  Error = %d"), aError);
sl@0
  1685
	
sl@0
  1686
	iError = aError;
sl@0
  1687
	}
sl@0
  1688
sl@0
  1689
CTestDevVideoPlayPause::CTestDevVideoPlayPause(const TDesC& aTestName, TTestType aTestType)
sl@0
  1690
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1691
	{
sl@0
  1692
	}
sl@0
  1693
sl@0
  1694
CTestDevVideoPlayPause* CTestDevVideoPlayPause::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1695
	{
sl@0
  1696
	CTestDevVideoPlayPause* self = new(ELeave) CTestDevVideoPlayPause(aTestName, aTestType);
sl@0
  1697
	return self;
sl@0
  1698
	}
sl@0
  1699
sl@0
  1700
TVerdict CTestDevVideoPlayPause::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1701
	{
sl@0
  1702
	TVerdict ret = EPass;
sl@0
  1703
//	TInt expErr = KErrNone;
sl@0
  1704
	TBool selDec = ETrue;
sl@0
  1705
	TBool selPost = ETrue;
sl@0
  1706
sl@0
  1707
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Pause"));
sl@0
  1708
	
sl@0
  1709
	// expected results
sl@0
  1710
	switch(iTestType)
sl@0
  1711
		{
sl@0
  1712
		case ETestValid:
sl@0
  1713
//			expErr = KErrNone;	// EABI warning removal
sl@0
  1714
			break;
sl@0
  1715
		case ETestDecoderOnly:
sl@0
  1716
			selPost = EFalse;
sl@0
  1717
			break;
sl@0
  1718
		case ETestPostProcOnly:
sl@0
  1719
			selDec = EFalse;
sl@0
  1720
			break;
sl@0
  1721
		default:
sl@0
  1722
			ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1723
			return EInconclusive;
sl@0
  1724
		}
sl@0
  1725
sl@0
  1726
	TInt err = KErrNone;
sl@0
  1727
sl@0
  1728
//	THwDeviceId hwDecoder = 0;
sl@0
  1729
//	THwDeviceId hwPostProc = 0;
sl@0
  1730
sl@0
  1731
	// select decoder
sl@0
  1732
	if (selDec)
sl@0
  1733
		{
sl@0
  1734
//		TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1735
		TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1736
		if (err != KErrNone)
sl@0
  1737
			{
sl@0
  1738
			ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1739
				return EInconclusive;
sl@0
  1740
			}
sl@0
  1741
		}
sl@0
  1742
sl@0
  1743
	// select post-processor
sl@0
  1744
	if (selPost)
sl@0
  1745
		{
sl@0
  1746
//		TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1747
		TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1748
		if (err != KErrNone)
sl@0
  1749
			{
sl@0
  1750
			ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1751
				return EInconclusive;
sl@0
  1752
			}
sl@0
  1753
		}
sl@0
  1754
sl@0
  1755
	// initialize CDevVideoPlay and wait for response
sl@0
  1756
	// iError is set by the MdvpoInitComplete callback
sl@0
  1757
	aDevVideoPlay.Initialize();
sl@0
  1758
	
sl@0
  1759
	if (iError != KErrNone)
sl@0
  1760
		{
sl@0
  1761
		ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
sl@0
  1762
			return EInconclusive;
sl@0
  1763
		}
sl@0
  1764
sl@0
  1765
	// check DevVideoPlay has started playing then call pause
sl@0
  1766
	aDevVideoPlay.Start();
sl@0
  1767
	TBool playing = aDevVideoPlay.IsPlaying();
sl@0
  1768
sl@0
  1769
	if (!playing)
sl@0
  1770
		{
sl@0
  1771
		ERR_PRINTF1(_L("Error - couldn't start playback!"));
sl@0
  1772
			return EInconclusive;
sl@0
  1773
		}
sl@0
  1774
sl@0
  1775
	// call pause
sl@0
  1776
	aDevVideoPlay.Pause();
sl@0
  1777
	playing = aDevVideoPlay.IsPlaying();
sl@0
  1778
sl@0
  1779
	if (playing)
sl@0
  1780
		{
sl@0
  1781
		ERR_PRINTF1(_L("IsPlaying() returned ETrue - expected EFalse"));
sl@0
  1782
		ret = EFail;
sl@0
  1783
		}
sl@0
  1784
	else
sl@0
  1785
		INFO_PRINTF1(_L("Pause() called successfully"));
sl@0
  1786
sl@0
  1787
	return ret;
sl@0
  1788
	}
sl@0
  1789
//------------------------------------------------------------------
sl@0
  1790