os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevVideo/src/TestDevVideoPlayOne.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
const TInt KTestScreenCount = 2;
sl@0
    26
// DevVideoPlay base class
sl@0
    27
sl@0
    28
const TUid KUidMDFVideoDecoderHwDeviceAdapter = { 0x102737ED };
sl@0
    29
sl@0
    30
CTestDevVideoPlayStep::CTestDevVideoPlayStep(const TDesC& aTestName, TTestType aTestType)
sl@0
    31
	{
sl@0
    32
	// store the name of this test case
sl@0
    33
	// this is the name that is used by the script file
sl@0
    34
	// Each test step initialises it's own name
sl@0
    35
	iTestStepName = aTestName;		
sl@0
    36
	iTestType = aTestType;		// included in case needed in future
sl@0
    37
	}
sl@0
    38
	
sl@0
    39
CTestDevVideoPlayStep::~CTestDevVideoPlayStep() 
sl@0
    40
	{
sl@0
    41
	delete iDevVideoPlay;
sl@0
    42
	}
sl@0
    43
sl@0
    44
TVerdict CTestDevVideoPlayStep::DoTestStepL()
sl@0
    45
	{
sl@0
    46
	// construct DevVideoPlay object
sl@0
    47
	__UHEAP_MARK;
sl@0
    48
	TRAPD(err, iDevVideoPlay = CMMFDevVideoPlay::NewL(*this));
sl@0
    49
	if (err != KErrNone)
sl@0
    50
		{
sl@0
    51
		ERR_PRINTF1(_L("Could not create a CMMFDevVideoPlay class!"));
sl@0
    52
		return EInconclusive;
sl@0
    53
		}
sl@0
    54
	
sl@0
    55
	TVerdict ret = EFail;
sl@0
    56
sl@0
    57
	// call the test step
sl@0
    58
	ret = DoTestL(*iDevVideoPlay);
sl@0
    59
		
sl@0
    60
	INFO_PRINTF1(_L("CMMFDevVideoPlay: Destroying"));
sl@0
    61
	delete iDevVideoPlay;
sl@0
    62
	iDevVideoPlay = NULL;
sl@0
    63
	__MM_HEAP_MARKEND;
sl@0
    64
	if(iError != KErrNone)
sl@0
    65
		ERR_PRINTF2( _L("CMMFDevVideoPlay failed with error %d"), iError );
sl@0
    66
	
sl@0
    67
	return ret;
sl@0
    68
	}
sl@0
    69
sl@0
    70
sl@0
    71
// MMMFDevVideoPlayObserver
sl@0
    72
void CTestDevVideoPlayStep::MdvpoNewBuffers()
sl@0
    73
	{
sl@0
    74
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoNewBuffers()"));
sl@0
    75
	}
sl@0
    76
sl@0
    77
void CTestDevVideoPlayStep::MdvpoReturnPicture(TVideoPicture* /*aPicture*/)
sl@0
    78
	{
sl@0
    79
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoReturnPicture()"));
sl@0
    80
	}
sl@0
    81
sl@0
    82
void CTestDevVideoPlayStep::MdvpoSupplementalInformation(const TDesC8& /*aData*/, 
sl@0
    83
								  const TTimeIntervalMicroSeconds& /*aTimestamp*/, 
sl@0
    84
								  const TPictureId& /*aPictureId*/)
sl@0
    85
	{
sl@0
    86
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoSupplementalInformation()"));
sl@0
    87
	}
sl@0
    88
sl@0
    89
void CTestDevVideoPlayStep::MdvpoPictureLoss()
sl@0
    90
	{
sl@0
    91
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoPictureLoss()"));
sl@0
    92
	}
sl@0
    93
sl@0
    94
void CTestDevVideoPlayStep::MdvpoPictureLoss(const TArray<TPictureId>& /*aPictures*/)
sl@0
    95
	{
sl@0
    96
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoPictureLoss(TArray)"));
sl@0
    97
	}
sl@0
    98
sl@0
    99
void CTestDevVideoPlayStep::MdvpoSliceLoss(TUint /*aFirstMacroblock*/, TUint /*aNumMacroblocks*/, const TPictureId& /*aPicture*/)
sl@0
   100
	{
sl@0
   101
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoSliceLoss()"));
sl@0
   102
	}
sl@0
   103
sl@0
   104
void CTestDevVideoPlayStep::MdvpoReferencePictureSelection(const TDesC8& /*aSelectionData*/)
sl@0
   105
	{
sl@0
   106
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoReferencePictureSelection()"));
sl@0
   107
	}
sl@0
   108
sl@0
   109
void CTestDevVideoPlayStep::MdvpoTimedSnapshotComplete(TInt /*aError*/, 
sl@0
   110
								TPictureData* /*aPictureData*/, 
sl@0
   111
								const TTimeIntervalMicroSeconds& /*aPresentationTimestamp*/, 
sl@0
   112
								const TPictureId& /*aPictureId*/)
sl@0
   113
	{
sl@0
   114
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoTimedSnapshotComplete()"));
sl@0
   115
	}
sl@0
   116
sl@0
   117
void CTestDevVideoPlayStep::MdvpoNewPictures()
sl@0
   118
	{
sl@0
   119
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoNewPictures()"));
sl@0
   120
	}
sl@0
   121
sl@0
   122
void CTestDevVideoPlayStep::MdvpoFatalError(TInt aError)
sl@0
   123
	{
sl@0
   124
	iError = aError;
sl@0
   125
	INFO_PRINTF2(_L("CTestDevVideoPlayStep::MdvpoFatalError():  Error = %d"), aError);
sl@0
   126
	}
sl@0
   127
sl@0
   128
void CTestDevVideoPlayStep::MdvpoInitComplete(TInt aError)
sl@0
   129
	{
sl@0
   130
	iError = aError;
sl@0
   131
	INFO_PRINTF2(_L("CTestDevVideoPlayStep::MdvpoInitComplete():  Error = %d"), aError);
sl@0
   132
	}
sl@0
   133
sl@0
   134
void CTestDevVideoPlayStep::MdvpoStreamEnd()
sl@0
   135
	{
sl@0
   136
	INFO_PRINTF1(_L("CTestDevVideoPlayStep::MdvpoStreamEnd()"));
sl@0
   137
	}
sl@0
   138
sl@0
   139
//------------------------------------------------------------------
sl@0
   140
sl@0
   141
CTestDevVideoPlayCommonFormat::CTestDevVideoPlayCommonFormat(const TDesC& aTestName, TTestType aTestType)
sl@0
   142
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   143
	{
sl@0
   144
	}
sl@0
   145
sl@0
   146
CTestDevVideoPlayCommonFormat* CTestDevVideoPlayCommonFormat::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   147
	{
sl@0
   148
	CTestDevVideoPlayCommonFormat* self = new(ELeave) CTestDevVideoPlayCommonFormat(aTestName, aTestType);
sl@0
   149
	return self;
sl@0
   150
	}
sl@0
   151
sl@0
   152
TVerdict CTestDevVideoPlayCommonFormat::DoTestL(CMMFDevVideoPlay& /*aDevVideoPlay*/)
sl@0
   153
	{
sl@0
   154
	TVerdict ret = EPass;
sl@0
   155
	TBool expErr = ETrue;
sl@0
   156
	
sl@0
   157
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  Find common format"));
sl@0
   158
	
sl@0
   159
	// expected results
sl@0
   160
	if (iTestType != ETestValid)
sl@0
   161
		{
sl@0
   162
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   163
		return EInconclusive;
sl@0
   164
		}
sl@0
   165
	
sl@0
   166
	// make a fake list of formats
sl@0
   167
	RArray<TUncompressedVideoFormat> vFormats1;
sl@0
   168
	RArray<TUncompressedVideoFormat> vFormats2;
sl@0
   169
sl@0
   170
	TUncompressedVideoFormat commonFormat;
sl@0
   171
	TUncompressedVideoFormat otherFormat;
sl@0
   172
sl@0
   173
	// push arrays to cleanup stack
sl@0
   174
	CleanupClosePushL(vFormats1);
sl@0
   175
	CleanupClosePushL(vFormats2);
sl@0
   176
sl@0
   177
	// setup vFormats1 
sl@0
   178
	User::LeaveIfError(vFormats1.Append(KTestVidFormat1));
sl@0
   179
	User::LeaveIfError(vFormats1.Append(KTestVidFormat2));
sl@0
   180
sl@0
   181
	// setup vFormats2
sl@0
   182
	User::LeaveIfError(vFormats2.Append(KTestVidFormat2));
sl@0
   183
	User::LeaveIfError(vFormats2.Append(KTestVidFormat3));
sl@0
   184
sl@0
   185
	TArray<TUncompressedVideoFormat> t1 = vFormats1.Array();
sl@0
   186
	TArray<TUncompressedVideoFormat> t2 = vFormats2.Array();
sl@0
   187
	TBool formatFound = EFalse;
sl@0
   188
		
sl@0
   189
	// attempt to find a common format
sl@0
   190
	formatFound = CMMFDevVideoPlay::FindCommonFormat(t1, t2, commonFormat);
sl@0
   191
sl@0
   192
	// now attempt to find a common format that doesn't exist
sl@0
   193
	vFormats1.Reset();
sl@0
   194
	User::LeaveIfError(vFormats1.Append(KTestVidFormat1));
sl@0
   195
	User::LeaveIfError(vFormats1.Append(KTestVidFormat1));
sl@0
   196
	TBool otherFormatFound = ETrue;
sl@0
   197
sl@0
   198
	// perform search for non-existent common format
sl@0
   199
	t1 = vFormats1.Array();	// need to get Array class again
sl@0
   200
	otherFormatFound = CMMFDevVideoPlay::FindCommonFormat(t1, t2, otherFormat);
sl@0
   201
sl@0
   202
	// close the arrays
sl@0
   203
	CleanupStack::PopAndDestroy(2, &vFormats1);
sl@0
   204
sl@0
   205
	// check format
sl@0
   206
	if ( (!formatFound) || !(commonFormat == KTestVidFormat2) )
sl@0
   207
		{
sl@0
   208
		ret = EFail;
sl@0
   209
		ERR_PRINTF1(_L("Error:  No common format found..."));
sl@0
   210
		}
sl@0
   211
	else if (otherFormatFound )
sl@0
   212
		{
sl@0
   213
		ret = EFail;
sl@0
   214
		ERR_PRINTF1(_L("Error:  Found a common format when there wasn't one!"));
sl@0
   215
		}
sl@0
   216
	else
sl@0
   217
		{
sl@0
   218
		INFO_PRINTF3(_L("FindCommonFormat(), %d = %d"), formatFound, expErr);
sl@0
   219
		}
sl@0
   220
	return ret;
sl@0
   221
	}
sl@0
   222
sl@0
   223
sl@0
   224
//------------------------------------------------------------------
sl@0
   225
sl@0
   226
sl@0
   227
sl@0
   228
//------------------------------------------------------------------
sl@0
   229
sl@0
   230
CTestDevVideoPlayFindDecoders::CTestDevVideoPlayFindDecoders(const TDesC& aTestName, TTestType aTestType)
sl@0
   231
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   232
	{
sl@0
   233
	}
sl@0
   234
sl@0
   235
CTestDevVideoPlayFindDecoders* CTestDevVideoPlayFindDecoders::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   236
	{
sl@0
   237
	CTestDevVideoPlayFindDecoders* self = new(ELeave) CTestDevVideoPlayFindDecoders(aTestName, aTestType);
sl@0
   238
	return self;
sl@0
   239
	}
sl@0
   240
sl@0
   241
TVerdict CTestDevVideoPlayFindDecoders::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   242
	{
sl@0
   243
	TVerdict ret = EFail;
sl@0
   244
sl@0
   245
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  FindDecoders"));
sl@0
   246
sl@0
   247
	RArray<TUid> foundDecoders;
sl@0
   248
	CleanupClosePushL(foundDecoders);
sl@0
   249
	RArray<TUid> expectedDecoders;
sl@0
   250
	CleanupClosePushL(expectedDecoders);
sl@0
   251
	RArray<TUid> unExpectedDecoders;
sl@0
   252
	CleanupClosePushL(unExpectedDecoders);
sl@0
   253
sl@0
   254
	TInt error = KErrNone;
sl@0
   255
	TUint32 requestedPostProcType = 0;
sl@0
   256
	
sl@0
   257
	// Unsupported mime type
sl@0
   258
	if (!error)
sl@0
   259
		{
sl@0
   260
		requestedPostProcType = 0;
sl@0
   261
		_LIT8(KMimeType1, "VIDEO/mpeg21");
sl@0
   262
		foundDecoders.Reset();
sl@0
   263
		expectedDecoders.Reset();
sl@0
   264
		unExpectedDecoders.Reset();
sl@0
   265
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   266
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   267
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   268
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   269
sl@0
   270
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType1(), requestedPostProcType, foundDecoders, EFalse));
sl@0
   271
sl@0
   272
		if (!error)
sl@0
   273
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   274
		}
sl@0
   275
sl@0
   276
	// Unsupported post proc type
sl@0
   277
	if (!error)
sl@0
   278
		{
sl@0
   279
		requestedPostProcType = EPpOutputCrop|EPpInputCrop;
sl@0
   280
		foundDecoders.Reset();
sl@0
   281
		_LIT8(KMimeType2, "videO/duMMy");
sl@0
   282
		expectedDecoders.Reset();
sl@0
   283
		unExpectedDecoders.Reset();
sl@0
   284
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   285
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   286
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   287
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   288
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   289
sl@0
   290
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType2(), requestedPostProcType, foundDecoders, EFalse));
sl@0
   291
		if (error == KErrNotFound)//we actually expect KErrNotFound here
sl@0
   292
			error = KErrNone;
sl@0
   293
		else
sl@0
   294
			error = KErrGeneral;
sl@0
   295
sl@0
   296
		if (!error)
sl@0
   297
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   298
		}
sl@0
   299
sl@0
   300
	// Unsupported mime type (by exact match)
sl@0
   301
	if (!error)
sl@0
   302
		{
sl@0
   303
		_LIT8(KMimeType3, "video/H263-2000; profile=45;level=40");
sl@0
   304
		requestedPostProcType = 0;
sl@0
   305
		foundDecoders.Reset();
sl@0
   306
		expectedDecoders.Reset();
sl@0
   307
		unExpectedDecoders.Reset();
sl@0
   308
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   309
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   310
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   311
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   312
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   313
sl@0
   314
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType3(), requestedPostProcType, foundDecoders, ETrue));
sl@0
   315
		if (error == KErrNotFound)//we actually expect KErrNotFound here
sl@0
   316
			error = KErrNone;
sl@0
   317
		else
sl@0
   318
			error = KErrGeneral;
sl@0
   319
sl@0
   320
		if (!error)
sl@0
   321
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   322
		}
sl@0
   323
	
sl@0
   324
	// Supported mime type (by unexact match)
sl@0
   325
	if (!error)
sl@0
   326
		{
sl@0
   327
		_LIT8(KMimeType4, "video/H263-2000; profile=1234;level=20");
sl@0
   328
		requestedPostProcType = 0;
sl@0
   329
		foundDecoders.Reset();
sl@0
   330
		expectedDecoders.Reset();
sl@0
   331
		unExpectedDecoders.Reset();
sl@0
   332
		User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   333
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   334
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   335
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   336
		User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   337
sl@0
   338
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType4(), requestedPostProcType, foundDecoders, EFalse));
sl@0
   339
sl@0
   340
		if (!error)
sl@0
   341
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   342
		}
sl@0
   343
	
sl@0
   344
	// Supported mime type and post proc type (by exact match)
sl@0
   345
	if (!error)
sl@0
   346
		{
sl@0
   347
		_LIT8(KMimeType5, "video/zippyvideo");
sl@0
   348
		requestedPostProcType = EPpMirror|EPpInputCrop;
sl@0
   349
		foundDecoders.Reset();
sl@0
   350
		expectedDecoders.Reset();
sl@0
   351
		unExpectedDecoders.Reset();
sl@0
   352
		User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   353
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   354
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   355
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   356
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   357
sl@0
   358
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType5(), requestedPostProcType, foundDecoders, ETrue));
sl@0
   359
sl@0
   360
		if (!error)
sl@0
   361
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   362
		}
sl@0
   363
	
sl@0
   364
	//Added to check that the mimetype comparison is not case sensitive
sl@0
   365
	if (!error)
sl@0
   366
		{
sl@0
   367
		_LIT8(KMimeType6, "VIDEO/ZIPPYvideo");
sl@0
   368
		requestedPostProcType = EPpMirror|EPpInputCrop;
sl@0
   369
		foundDecoders.Reset();
sl@0
   370
		expectedDecoders.Reset();
sl@0
   371
		unExpectedDecoders.Reset();
sl@0
   372
		User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   373
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   374
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   375
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   376
		User::LeaveIfError(unExpectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   377
sl@0
   378
		INFO_PRINTF1(_L("To check that the mime type comparison is not case sensitive"));
sl@0
   379
		TRAP(error, aDevVideoPlay.FindDecodersL(KMimeType6(), requestedPostProcType, foundDecoders, ETrue));
sl@0
   380
		INFO_PRINTF2(_L("error = %d"),error);
sl@0
   381
		if (!error)
sl@0
   382
			error = CheckDecoders(foundDecoders, expectedDecoders, unExpectedDecoders);
sl@0
   383
	
sl@0
   384
		}
sl@0
   385
sl@0
   386
	CleanupStack::PopAndDestroy(3); //foundDecoders, expectedDecoders, unExpectedDecoders
sl@0
   387
sl@0
   388
	if (!error)
sl@0
   389
		ret = EPass;
sl@0
   390
		
sl@0
   391
	return ret;
sl@0
   392
	}
sl@0
   393
sl@0
   394
TInt CTestDevVideoPlayFindDecoders::CheckDecoders(const RArray<TUid>& aFoundDecoders, 
sl@0
   395
												  const RArray<TUid>& aExpectedDecoders, 
sl@0
   396
												  const RArray<TUid>& aUnExpectedDecoders)
sl@0
   397
	{
sl@0
   398
	TInt ret = KErrGeneral;
sl@0
   399
sl@0
   400
	TBool foundUnExpected = EFalse;
sl@0
   401
	TInt numberToBeFoundInExpectedDecoders = aExpectedDecoders.Count();
sl@0
   402
sl@0
   403
	for (TInt i=0; i<aFoundDecoders.Count(); i++)
sl@0
   404
		{
sl@0
   405
		TUid uidToLookFor = aFoundDecoders[i];
sl@0
   406
		for (TInt j=0; j<aExpectedDecoders.Count(); j++)
sl@0
   407
			{
sl@0
   408
			if (aExpectedDecoders[j] == uidToLookFor)
sl@0
   409
				{
sl@0
   410
				numberToBeFoundInExpectedDecoders--;
sl@0
   411
				break;//j
sl@0
   412
				}
sl@0
   413
			}
sl@0
   414
		for (TInt k=0; k<aUnExpectedDecoders.Count(); k++)
sl@0
   415
			{
sl@0
   416
			if (aUnExpectedDecoders[k] == uidToLookFor)
sl@0
   417
				{
sl@0
   418
				foundUnExpected = ETrue;
sl@0
   419
				break;//k
sl@0
   420
				}
sl@0
   421
			}
sl@0
   422
		}
sl@0
   423
sl@0
   424
	if ((!foundUnExpected) && (numberToBeFoundInExpectedDecoders==0))
sl@0
   425
		ret = KErrNone;
sl@0
   426
sl@0
   427
	return ret;
sl@0
   428
	}
sl@0
   429
sl@0
   430
sl@0
   431
sl@0
   432
//------------------------------------------------------------------
sl@0
   433
sl@0
   434
CTestDevVideoPlayFindPostProc::CTestDevVideoPlayFindPostProc(const TDesC& aTestName, TTestType aTestType)
sl@0
   435
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   436
	{
sl@0
   437
	}
sl@0
   438
sl@0
   439
CTestDevVideoPlayFindPostProc* CTestDevVideoPlayFindPostProc::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   440
	{
sl@0
   441
	CTestDevVideoPlayFindPostProc* self = new(ELeave) CTestDevVideoPlayFindPostProc(aTestName, aTestType);
sl@0
   442
	return self;
sl@0
   443
	}
sl@0
   444
sl@0
   445
TVerdict CTestDevVideoPlayFindPostProc::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   446
	{
sl@0
   447
	TVerdict ret = EFail;
sl@0
   448
sl@0
   449
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  FindPostProc"));
sl@0
   450
sl@0
   451
	RArray<TUid> foundPostProx;
sl@0
   452
	CleanupClosePushL(foundPostProx);
sl@0
   453
	RArray<TUid> expectedPostProx;
sl@0
   454
	CleanupClosePushL(expectedPostProx);
sl@0
   455
	RArray<TUid> unExpectedPostProx;
sl@0
   456
	CleanupClosePushL(unExpectedPostProx);
sl@0
   457
sl@0
   458
	TInt error = KErrNone;
sl@0
   459
	TUint32 requestedPostProcType = 0;	
sl@0
   460
sl@0
   461
	// First ask for post processor isn't supported
sl@0
   462
	if (!error)
sl@0
   463
		{
sl@0
   464
		requestedPostProcType = EPpInputCrop|EPpMirror|EPpScale|EPpOutputPad|EPpNoiseFilter;
sl@0
   465
		foundPostProx.Reset();
sl@0
   466
		expectedPostProx.Reset();
sl@0
   467
		unExpectedPostProx.Reset();
sl@0
   468
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice1));
sl@0
   469
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice2));
sl@0
   470
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice3));
sl@0
   471
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice4));
sl@0
   472
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice5));
sl@0
   473
		
sl@0
   474
		TRAP(error, aDevVideoPlay.FindPostProcessorsL(requestedPostProcType, foundPostProx));
sl@0
   475
		if (error == KErrNotFound)//we actually expect KErrNotFound here
sl@0
   476
			error = KErrNone;
sl@0
   477
		else
sl@0
   478
			error = KErrGeneral;
sl@0
   479
sl@0
   480
		if (!error)
sl@0
   481
			error = CheckPostProx(foundPostProx, expectedPostProx, unExpectedPostProx);
sl@0
   482
		}
sl@0
   483
sl@0
   484
	// Next ask for all post processors
sl@0
   485
	if (!error)
sl@0
   486
		{
sl@0
   487
		requestedPostProcType = 0;
sl@0
   488
		foundPostProx.Reset();
sl@0
   489
		expectedPostProx.Reset();
sl@0
   490
		unExpectedPostProx.Reset();
sl@0
   491
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice1));
sl@0
   492
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice2));
sl@0
   493
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice3));
sl@0
   494
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice4));
sl@0
   495
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice5));
sl@0
   496
sl@0
   497
		TRAP(error, aDevVideoPlay.FindPostProcessorsL(requestedPostProcType, foundPostProx));
sl@0
   498
		if (!error)
sl@0
   499
			error = CheckPostProx(foundPostProx, expectedPostProx, unExpectedPostProx);
sl@0
   500
		}
sl@0
   501
sl@0
   502
	// Next ask for a specific subset of post processors
sl@0
   503
	if (!error)
sl@0
   504
		{
sl@0
   505
		requestedPostProcType = EPpMirror;
sl@0
   506
		foundPostProx.Reset();
sl@0
   507
		expectedPostProx.Reset();
sl@0
   508
		unExpectedPostProx.Reset();
sl@0
   509
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice1));
sl@0
   510
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice2));
sl@0
   511
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice3));
sl@0
   512
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice4));
sl@0
   513
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice5));
sl@0
   514
sl@0
   515
		TRAP(error, aDevVideoPlay.FindPostProcessorsL(requestedPostProcType, foundPostProx));
sl@0
   516
		if (!error)
sl@0
   517
			error = CheckPostProx(foundPostProx, expectedPostProx, unExpectedPostProx);
sl@0
   518
		}
sl@0
   519
	
sl@0
   520
	// Next ask for another specific subset of post processors
sl@0
   521
	if (!error)
sl@0
   522
		{
sl@0
   523
		requestedPostProcType = EPpMirror|EPpInputCrop;
sl@0
   524
		foundPostProx.Reset();
sl@0
   525
		expectedPostProx.Reset();
sl@0
   526
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice1));
sl@0
   527
		User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice2));
sl@0
   528
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice3));
sl@0
   529
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice4));
sl@0
   530
		User::LeaveIfError(unExpectedPostProx.Append(KUidDevVideoTestPostProcHwDevice5));
sl@0
   531
sl@0
   532
		TRAP(error, aDevVideoPlay.FindPostProcessorsL(requestedPostProcType, foundPostProx));
sl@0
   533
		if (!error)
sl@0
   534
			error = CheckPostProx(foundPostProx, expectedPostProx, unExpectedPostProx);
sl@0
   535
		}
sl@0
   536
sl@0
   537
	CleanupStack::PopAndDestroy(3);//foundPostProx, expectedPostProx, unExpectedPostProx
sl@0
   538
	
sl@0
   539
	if (!error)
sl@0
   540
		ret = EPass;
sl@0
   541
		
sl@0
   542
	return ret;
sl@0
   543
	}
sl@0
   544
sl@0
   545
sl@0
   546
TInt CTestDevVideoPlayFindPostProc::CheckPostProx(const RArray<TUid>& aFoundPostProx, 
sl@0
   547
												  const RArray<TUid>& aExpectedPostProx, 
sl@0
   548
												  const RArray<TUid>& aUnExpectedPostProx)
sl@0
   549
	{
sl@0
   550
	TInt ret = KErrGeneral;
sl@0
   551
sl@0
   552
	TBool foundUnExpected = EFalse;
sl@0
   553
	TInt numberToBeFoundInExpectedPostProx = aExpectedPostProx.Count();
sl@0
   554
sl@0
   555
	for (TInt i=0; i<aFoundPostProx.Count(); i++)
sl@0
   556
		{
sl@0
   557
		TUid uidToLookFor = aFoundPostProx[i];
sl@0
   558
		for (TInt j=0; j<aExpectedPostProx.Count(); j++)
sl@0
   559
			{
sl@0
   560
			if (aExpectedPostProx[j] == uidToLookFor)
sl@0
   561
				{
sl@0
   562
				numberToBeFoundInExpectedPostProx--;
sl@0
   563
				break;//j
sl@0
   564
				}
sl@0
   565
			}
sl@0
   566
		for (TInt k=0; k<aUnExpectedPostProx.Count(); k++)
sl@0
   567
			{
sl@0
   568
			if (aUnExpectedPostProx[k] == uidToLookFor)
sl@0
   569
				{
sl@0
   570
				foundUnExpected = ETrue;
sl@0
   571
				break;//k
sl@0
   572
				}
sl@0
   573
			}
sl@0
   574
		}
sl@0
   575
sl@0
   576
	if ((!foundUnExpected) && (numberToBeFoundInExpectedPostProx==0))
sl@0
   577
		ret = KErrNone;
sl@0
   578
sl@0
   579
	return ret;
sl@0
   580
	}
sl@0
   581
sl@0
   582
sl@0
   583
sl@0
   584
//------------------------------------------------------------------
sl@0
   585
sl@0
   586
CTestDevVideoPlayListDecoders::CTestDevVideoPlayListDecoders(const TDesC& aTestName, TTestType aTestType)
sl@0
   587
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   588
	{
sl@0
   589
	}
sl@0
   590
sl@0
   591
CTestDevVideoPlayListDecoders* CTestDevVideoPlayListDecoders::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   592
	{
sl@0
   593
	CTestDevVideoPlayListDecoders* self = new(ELeave) CTestDevVideoPlayListDecoders(aTestName, aTestType);
sl@0
   594
	return self;
sl@0
   595
	}
sl@0
   596
sl@0
   597
TVerdict CTestDevVideoPlayListDecoders::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   598
	{
sl@0
   599
	TVerdict ret = EFail;
sl@0
   600
	
sl@0
   601
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  ListDecoders"));
sl@0
   602
		
sl@0
   603
	RArray<TUid> foundDecoders;
sl@0
   604
	CleanupClosePushL(foundDecoders);
sl@0
   605
	RArray<TUid> expectedDecoders;
sl@0
   606
	CleanupClosePushL(expectedDecoders);
sl@0
   607
sl@0
   608
	User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice1));
sl@0
   609
	User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice2));
sl@0
   610
	User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice3));
sl@0
   611
	User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice4));
sl@0
   612
	User::LeaveIfError(expectedDecoders.Append(KUidDevVideoTestDecodeHwDevice5));
sl@0
   613
sl@0
   614
	TRAPD(err, aDevVideoPlay.GetDecoderListL(foundDecoders));
sl@0
   615
sl@0
   616
	if (!err)
sl@0
   617
		{		
sl@0
   618
		// Make sure that the video hardware device adapter is NOT in the array
sl@0
   619
		TBool foundAdapter = EFalse;
sl@0
   620
		for (TInt j = 0; j < foundDecoders.Count(); j++)
sl@0
   621
			{
sl@0
   622
			if (foundDecoders[j] == KUidMDFVideoDecoderHwDeviceAdapter)
sl@0
   623
				{
sl@0
   624
				foundAdapter = ETrue;
sl@0
   625
				break;
sl@0
   626
				}
sl@0
   627
			}
sl@0
   628
sl@0
   629
		// Make sure that all the UIDs of the test plugins are in the array..
sl@0
   630
		TInt numberToBeFound = expectedDecoders.Count();
sl@0
   631
		for (TInt i=0; i<expectedDecoders.Count(); i++)
sl@0
   632
			{
sl@0
   633
			TUid uidToFind = expectedDecoders[i];
sl@0
   634
			for (TInt j=0; j<foundDecoders.Count(); j++)
sl@0
   635
				{
sl@0
   636
				if (foundDecoders[j] == uidToFind)
sl@0
   637
					{
sl@0
   638
					numberToBeFound--;
sl@0
   639
					break;//j
sl@0
   640
					}
sl@0
   641
				}
sl@0
   642
			}
sl@0
   643
		if ((numberToBeFound == 0) && (!foundAdapter))
sl@0
   644
			{
sl@0
   645
			ret = EPass;
sl@0
   646
			}
sl@0
   647
		}
sl@0
   648
sl@0
   649
	CleanupStack::PopAndDestroy(2);
sl@0
   650
	
sl@0
   651
	return ret;
sl@0
   652
	}
sl@0
   653
sl@0
   654
sl@0
   655
sl@0
   656
sl@0
   657
//------------------------------------------------------------------
sl@0
   658
sl@0
   659
CTestDevVideoPlayListPostProc::CTestDevVideoPlayListPostProc(const TDesC& aTestName, TTestType aTestType)
sl@0
   660
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   661
	{
sl@0
   662
	}
sl@0
   663
sl@0
   664
CTestDevVideoPlayListPostProc* CTestDevVideoPlayListPostProc::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   665
	{
sl@0
   666
	CTestDevVideoPlayListPostProc* self = new(ELeave) CTestDevVideoPlayListPostProc(aTestName, aTestType);
sl@0
   667
	return self;
sl@0
   668
	}
sl@0
   669
sl@0
   670
TVerdict CTestDevVideoPlayListPostProc::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   671
	{
sl@0
   672
	TVerdict ret = EFail;
sl@0
   673
	
sl@0
   674
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  ListPostProc"));
sl@0
   675
		
sl@0
   676
	RArray<TUid> foundPostProx;
sl@0
   677
	CleanupClosePushL(foundPostProx);
sl@0
   678
	RArray<TUid> expectedPostProx;
sl@0
   679
	CleanupClosePushL(expectedPostProx);
sl@0
   680
sl@0
   681
	User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice1));
sl@0
   682
	User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice2));
sl@0
   683
	User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice3));
sl@0
   684
	User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice4));
sl@0
   685
	User::LeaveIfError(expectedPostProx.Append(KUidDevVideoTestPostProcHwDevice5));
sl@0
   686
sl@0
   687
	TRAPD(err, aDevVideoPlay.GetPostProcessorListL(foundPostProx));
sl@0
   688
sl@0
   689
	if (!err)
sl@0
   690
		{
sl@0
   691
		// Make sure that all the UIDs of the test plugins are in the array..
sl@0
   692
		TInt numberToBeFound = expectedPostProx.Count();
sl@0
   693
		for (TInt i=0; i<expectedPostProx.Count(); i++)
sl@0
   694
			{
sl@0
   695
			TUid uidToFind = expectedPostProx[i];
sl@0
   696
			for (TInt j=0; j<foundPostProx.Count(); j++)
sl@0
   697
				{
sl@0
   698
				if (foundPostProx[j] == uidToFind)
sl@0
   699
					{
sl@0
   700
					numberToBeFound--;
sl@0
   701
					break;//j
sl@0
   702
					}
sl@0
   703
				}
sl@0
   704
			}
sl@0
   705
		if (numberToBeFound == 0)
sl@0
   706
			ret = EPass;
sl@0
   707
		}
sl@0
   708
sl@0
   709
	CleanupStack::PopAndDestroy(2);
sl@0
   710
sl@0
   711
	return ret;
sl@0
   712
	}
sl@0
   713
sl@0
   714
sl@0
   715
sl@0
   716
sl@0
   717
//------------------------------------------------------------------
sl@0
   718
sl@0
   719
CTestDevVideoPlayGetDecoderInfo::CTestDevVideoPlayGetDecoderInfo(const TDesC& aTestName, TTestType aTestType)
sl@0
   720
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   721
	{
sl@0
   722
	}
sl@0
   723
sl@0
   724
CTestDevVideoPlayGetDecoderInfo* CTestDevVideoPlayGetDecoderInfo::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   725
	{
sl@0
   726
	CTestDevVideoPlayGetDecoderInfo* self = new(ELeave) CTestDevVideoPlayGetDecoderInfo(aTestName, aTestType);
sl@0
   727
	return self;
sl@0
   728
	}
sl@0
   729
sl@0
   730
TBool CTestDevVideoPlayGetDecoderInfo::ValidDecoderInfo(CVideoDecoderInfo* aInfo)
sl@0
   731
	{
sl@0
   732
	// do null pointer check
sl@0
   733
	if (!aInfo) 
sl@0
   734
		{
sl@0
   735
		ERR_PRINTF1(_L("Error - Decoder Info is NULL!"));
sl@0
   736
		return EFalse;
sl@0
   737
		}
sl@0
   738
	
sl@0
   739
	// check the decoder against test data
sl@0
   740
	// need to check every call so as to keep code coverage
sl@0
   741
	// and prevent a situation where if the first test fails
sl@0
   742
	// then subsequent tests will not be called
sl@0
   743
	TBool ret = ETrue;
sl@0
   744
sl@0
   745
	// UID check
sl@0
   746
	if (aInfo->Uid() != KUidDevVideoTestDecodeHwDevice)
sl@0
   747
		{
sl@0
   748
		ERR_PRINTF1(_L("Error - Decoder UID is incorrect!"));
sl@0
   749
		ret = EFalse;
sl@0
   750
		}
sl@0
   751
	// Manufacturer check
sl@0
   752
	if (!(aInfo->Manufacturer() == KTestDecoderInfoManufacturer))
sl@0
   753
		{
sl@0
   754
		ERR_PRINTF1(_L("Error - Manufacturer is incorrect!"));
sl@0
   755
		ret = EFalse;
sl@0
   756
		}
sl@0
   757
	// Identifier check
sl@0
   758
	if (!(aInfo->Identifier() == KTestDecoderInfoIdentifier))
sl@0
   759
		{
sl@0
   760
		ERR_PRINTF1(_L("Error - Identifier is incorrect!"));
sl@0
   761
		ret = EFalse;
sl@0
   762
		}
sl@0
   763
	// Version check
sl@0
   764
	TVersion decVer = aInfo->Version();
sl@0
   765
	if ( (decVer.iMajor != KTestDecoderInfoVersionMaj) ||
sl@0
   766
		 (decVer.iMinor != KTestDecoderInfoVersionMin) ||
sl@0
   767
		 (decVer.iBuild != KTestDecoderInfoVersionBuild) )
sl@0
   768
		{
sl@0
   769
		ERR_PRINTF1(_L("Error - Version is incorrect!"));
sl@0
   770
		ret = EFalse;
sl@0
   771
		}
sl@0
   772
	// Accelerated check
sl@0
   773
	if (!aInfo->Accelerated())
sl@0
   774
		{
sl@0
   775
		ERR_PRINTF1(_L("Error - Accelerated = EFalse!"));
sl@0
   776
		ret = EFalse;
sl@0
   777
		}
sl@0
   778
	// Direct display check
sl@0
   779
	if (!aInfo->SupportsDirectDisplay())
sl@0
   780
		{
sl@0
   781
		ERR_PRINTF1(_L("Error - Supports Direct Display = EFalse!"));
sl@0
   782
		ret = EFalse;
sl@0
   783
		}
sl@0
   784
sl@0
   785
	// Max picture size
sl@0
   786
	TSize maxSize = aInfo->MaxPictureSize();
sl@0
   787
	if (maxSize.iWidth != KTestDecoderInfoMaxSizeX || maxSize.iHeight != KTestDecoderInfoMaxSizeY)
sl@0
   788
		{
sl@0
   789
		ERR_PRINTF1(_L("Error - Max Picture Size is wrong!"));
sl@0
   790
		ret = EFalse;
sl@0
   791
		}
sl@0
   792
sl@0
   793
	// Max Bitrate
sl@0
   794
	if (aInfo->MaxBitrate() != KMaxTUint)
sl@0
   795
		{
sl@0
   796
		ERR_PRINTF1(_L("Error - Max Bitrate is wrong!"));
sl@0
   797
		ret = EFalse;
sl@0
   798
		}
sl@0
   799
	
sl@0
   800
	// Supports picture loss
sl@0
   801
	if (!aInfo->SupportsPictureLoss())
sl@0
   802
		{
sl@0
   803
		ERR_PRINTF1(_L("Error - Supports Picture Loss = EFalse!"));
sl@0
   804
		ret = EFalse;
sl@0
   805
		}
sl@0
   806
sl@0
   807
	// Supports slice loss
sl@0
   808
	if (aInfo->SupportsSliceLoss())
sl@0
   809
		{
sl@0
   810
		ERR_PRINTF1(_L("Error - Supports Slice Loss = ETrue!"));
sl@0
   811
		ret = EFalse;
sl@0
   812
		}
sl@0
   813
sl@0
   814
	// Coding standard info
sl@0
   815
	if (!(aInfo->CodingStandardSpecificInfo() == KTestDecoderInfoCSInfo))
sl@0
   816
		{
sl@0
   817
		ERR_PRINTF1(_L("Error - Coding standard specific info is incorrect!"));
sl@0
   818
		ret = EFalse;
sl@0
   819
		}
sl@0
   820
	// Implementation info
sl@0
   821
	if (!(aInfo->ImplementationSpecificInfo() == KTestDecoderInfoISInfo))
sl@0
   822
		{
sl@0
   823
		ERR_PRINTF1(_L("Error - Implementation specific info is incorrect!"));
sl@0
   824
		ret = EFalse;
sl@0
   825
		}
sl@0
   826
sl@0
   827
	if (!aInfo->SupportsContentProtected())//Check if flag is set indicating Content Protection is supported.
sl@0
   828
		{
sl@0
   829
		ERR_PRINTF1(_L("Error - Failed To get flag indicating support of Content Protection!"));
sl@0
   830
		ret = EFalse;
sl@0
   831
		}
sl@0
   832
sl@0
   833
	// get some test compressed video formats
sl@0
   834
	CCompressedVideoFormat* testFormat = NULL;
sl@0
   835
	TInt err = KErrNone;
sl@0
   836
sl@0
   837
	// get formats supported
sl@0
   838
	const RPointerArray<CCompressedVideoFormat>& vidFormats = aInfo->SupportedFormats();
sl@0
   839
sl@0
   840
	// get supported max picture rates
sl@0
   841
	TPictureRateAndSize testRate;
sl@0
   842
	const RArray<TPictureRateAndSize>& maxRates = aInfo->MaxPictureRates();
sl@0
   843
sl@0
   844
	// test formats supported
sl@0
   845
	for (TUint i = 0; i < KTestDecoderInfoCount; i++)
sl@0
   846
		{
sl@0
   847
		TPtrC8 mimeType = KTestDecoderInfoMimeArray[i];
sl@0
   848
		TRAP(err, testFormat = GetTestCVFormatL(mimeType));
sl@0
   849
		if (err != KErrNone)
sl@0
   850
			{
sl@0
   851
			ERR_PRINTF2(_L("Error - Failed to construct CCompressedVideoFormat: %d!"), i);
sl@0
   852
			ret = EFalse;
sl@0
   853
			if(testFormat != NULL)
sl@0
   854
				{
sl@0
   855
				delete testFormat;
sl@0
   856
				testFormat=NULL;
sl@0
   857
				}
sl@0
   858
			break;
sl@0
   859
			}
sl@0
   860
sl@0
   861
		if (!(*testFormat == *(vidFormats[i])) || !(aInfo->SupportsFormat(*testFormat)))
sl@0
   862
			{
sl@0
   863
			ERR_PRINTF2(_L("Error - Video Format %d is corrupt!"), i);
sl@0
   864
			ret = EFalse;
sl@0
   865
			}
sl@0
   866
sl@0
   867
		delete testFormat; 
sl@0
   868
		testFormat = NULL;
sl@0
   869
sl@0
   870
		// Test supported max picture rates
sl@0
   871
		GetTestEncoderInfoRate(i, testRate);
sl@0
   872
		if (!(testRate.iPictureSize == maxRates[i].iPictureSize) || 
sl@0
   873
			!(testRate.iPictureRate == maxRates[i].iPictureRate) )
sl@0
   874
			{
sl@0
   875
			ERR_PRINTF2(_L("Error - picture rate %d is corrupt!"), i);
sl@0
   876
			ret = EFalse;
sl@0
   877
			}
sl@0
   878
		}
sl@0
   879
	//Screen information check
sl@0
   880
#ifdef SYMBIAN_ENABLE_MMF_MULTISCREEN_SUPPORT
sl@0
   881
	RArray<TInt> supportedScreens;
sl@0
   882
	TRAP(err, aInfo->GetSupportedScreensL(supportedScreens));
sl@0
   883
	if(err != KErrNone)
sl@0
   884
		{
sl@0
   885
		ERR_PRINTF2(_L("GetSupportedScreensL leaves with %d"), err);
sl@0
   886
		ret = EFalse;
sl@0
   887
		}
sl@0
   888
	if(supportedScreens.Count() != KTestScreenCount)
sl@0
   889
		{
sl@0
   890
		ERR_PRINTF1(_L("Error - Unexpected screen count"));
sl@0
   891
		ret = EFalse;
sl@0
   892
		}
sl@0
   893
	err = supportedScreens.Find(KDecoderDefaultScreenNumber);
sl@0
   894
	if(err == KErrNotFound)
sl@0
   895
		{
sl@0
   896
		ERR_PRINTF1(_L("Error - No support for primary screen"));
sl@0
   897
		ret = EFalse;
sl@0
   898
		}
sl@0
   899
	err = supportedScreens.Find(KDecoderSecondaryScreenNumber);
sl@0
   900
	if(err == KErrNotFound)
sl@0
   901
		{
sl@0
   902
		ERR_PRINTF1(_L("Error - No support for secondary screen"));
sl@0
   903
		ret = EFalse;
sl@0
   904
		}
sl@0
   905
	supportedScreens.Close();
sl@0
   906
#endif
sl@0
   907
	// finally check a format which isn't supposed to be supported
sl@0
   908
	TRAP(err, testFormat = GetTestCVFormatL(_L8("Frederick Bloggs and his amazing coloured dog")));
sl@0
   909
	if (err != KErrNone)
sl@0
   910
		{
sl@0
   911
		ERR_PRINTF1(_L("Error - Failed to construct final CCompressedVideoFormat!"));
sl@0
   912
		ret = EFalse;
sl@0
   913
		}
sl@0
   914
	else 
sl@0
   915
		{
sl@0
   916
		if (aInfo->SupportsFormat(*testFormat))
sl@0
   917
			{
sl@0
   918
			ERR_PRINTF1(_L("Error - Failed negative SupportsFormat() check!"));
sl@0
   919
			ret = EFalse;
sl@0
   920
			}
sl@0
   921
		}
sl@0
   922
sl@0
   923
	if(testFormat != NULL)
sl@0
   924
		{
sl@0
   925
		delete testFormat;
sl@0
   926
		testFormat=NULL;
sl@0
   927
		}
sl@0
   928
	return ret;
sl@0
   929
	}
sl@0
   930
sl@0
   931
TVerdict CTestDevVideoPlayGetDecoderInfo::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
   932
	{
sl@0
   933
	TVerdict ret = EPass;
sl@0
   934
	TInt expErr = KErrNone;
sl@0
   935
	
sl@0
   936
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetDecoderInfo"));
sl@0
   937
sl@0
   938
	// expected results		
sl@0
   939
	if (iTestType != ETestValid)
sl@0
   940
		{
sl@0
   941
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
   942
		return EInconclusive;
sl@0
   943
		}
sl@0
   944
	
sl@0
   945
	TInt err = KErrNone;
sl@0
   946
	CVideoDecoderInfo *decInfo = NULL;
sl@0
   947
	TBool valid = EFalse;
sl@0
   948
	
sl@0
   949
	// get decoder information from test decoder plugin
sl@0
   950
	
sl@0
   951
	TRAP(err, 
sl@0
   952
		decInfo = aDevVideoPlay.VideoDecoderInfoLC(KUidDevVideoTestDecodeHwDevice); 
sl@0
   953
		valid = ValidDecoderInfo(decInfo);
sl@0
   954
		CleanupStack::PopAndDestroy(decInfo); );
sl@0
   955
	if (err != expErr)
sl@0
   956
		{
sl@0
   957
		ERR_PRINTF3(_L("VideoDecoderInfoLC() gave error %d (expected %d)"),err, expErr);
sl@0
   958
		ret = EFail;
sl@0
   959
		}
sl@0
   960
	// check the Video Decoder
sl@0
   961
	else if (!valid)
sl@0
   962
		{
sl@0
   963
		ERR_PRINTF1(_L("CVideoDecoderInfo class is corrupt!"));
sl@0
   964
		ret = EFail;
sl@0
   965
		}
sl@0
   966
	else
sl@0
   967
		{
sl@0
   968
		INFO_PRINTF1(_L("CVideoDecoderInfo passed check successfully"));
sl@0
   969
		INFO_PRINTF3(_L("VideoDecoderInfoLC(), %d = %d"), err, expErr);
sl@0
   970
		}
sl@0
   971
		
sl@0
   972
	return ret;
sl@0
   973
	}
sl@0
   974
sl@0
   975
sl@0
   976
sl@0
   977
sl@0
   978
//------------------------------------------------------------------
sl@0
   979
sl@0
   980
CTestDevVideoPlayGetPostProcInfo::CTestDevVideoPlayGetPostProcInfo(const TDesC& aTestName, TTestType aTestType)
sl@0
   981
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
   982
	{
sl@0
   983
	}
sl@0
   984
sl@0
   985
CTestDevVideoPlayGetPostProcInfo* CTestDevVideoPlayGetPostProcInfo::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
   986
	{
sl@0
   987
	CTestDevVideoPlayGetPostProcInfo* self = new(ELeave) CTestDevVideoPlayGetPostProcInfo(aTestName, aTestType);
sl@0
   988
	return self;
sl@0
   989
	}
sl@0
   990
sl@0
   991
TBool CTestDevVideoPlayGetPostProcInfo::ValidPostProcInfo(CPostProcessorInfo* aInfo)
sl@0
   992
	{
sl@0
   993
	// do null pointer check
sl@0
   994
	if (!aInfo) 
sl@0
   995
		{
sl@0
   996
		ERR_PRINTF1(_L("Error - Post Processor Info is NULL!"));
sl@0
   997
		return EFalse;
sl@0
   998
		}
sl@0
   999
	
sl@0
  1000
	// check the post processor against test data
sl@0
  1001
	// need to check every call so as to keep code coverage
sl@0
  1002
	// and prevent a situation where if the first test fails
sl@0
  1003
	// then subsequent tests will not be called
sl@0
  1004
	TBool ret = ETrue;
sl@0
  1005
sl@0
  1006
	// UID check
sl@0
  1007
	if (aInfo->Uid() != KUidDevVideoTestPostProcHwDevice)
sl@0
  1008
		{
sl@0
  1009
		ERR_PRINTF1(_L("Error - Post Processor UID is incorrect!"));
sl@0
  1010
		ret = EFalse;
sl@0
  1011
		}
sl@0
  1012
	// Manufacturer check
sl@0
  1013
	if (!(aInfo->Manufacturer() == KTestPostProcInfoManufacturer))
sl@0
  1014
		{
sl@0
  1015
		ERR_PRINTF1(_L("Error - Manufacturer is incorrect!"));
sl@0
  1016
		ret = EFalse;
sl@0
  1017
		}
sl@0
  1018
	// Identifier check
sl@0
  1019
	if (!(aInfo->Identifier() == KTestPostProcInfoIdentifier))
sl@0
  1020
		{
sl@0
  1021
		ERR_PRINTF1(_L("Error - Identifier is incorrect!"));
sl@0
  1022
		ret = EFalse;
sl@0
  1023
		}
sl@0
  1024
	// Version check
sl@0
  1025
	TVersion posVer = aInfo->Version();
sl@0
  1026
	if ( (posVer.iMajor != KTestPostProcInfoVersionMaj) ||
sl@0
  1027
		 (posVer.iMinor != KTestPostProcInfoVersionMin) ||
sl@0
  1028
		 (posVer.iBuild != KTestPostProcInfoVersionBuild) )
sl@0
  1029
		{
sl@0
  1030
		ERR_PRINTF1(_L("Error - Version is incorrect!"));
sl@0
  1031
		ret = EFalse;
sl@0
  1032
		}
sl@0
  1033
	// Accelerated check
sl@0
  1034
	if (!aInfo->Accelerated())
sl@0
  1035
		{
sl@0
  1036
		ERR_PRINTF1(_L("Error - Accelerated = EFalse!"));
sl@0
  1037
		ret = EFalse;
sl@0
  1038
		}
sl@0
  1039
	// Direct display check
sl@0
  1040
	if (!aInfo->SupportsDirectDisplay())
sl@0
  1041
		{
sl@0
  1042
		ERR_PRINTF1(_L("Error - Supports Direct Display = EFalse!"));
sl@0
  1043
		ret = EFalse;
sl@0
  1044
		}
sl@0
  1045
	// YUVToRGB Capabilities
sl@0
  1046
	if (!CompareYuvRgbCaps(aInfo->YuvToRgbCapabilities(), KTestPostProcInfoYuvToRgbCaps))
sl@0
  1047
		{
sl@0
  1048
		ERR_PRINTF1(_L("Error - YUV To RGB capabilities is incorrect!"));
sl@0
  1049
		ret = EFalse;
sl@0
  1050
		}
sl@0
  1051
sl@0
  1052
	// Supported rotations
sl@0
  1053
	if (aInfo->SupportedRotations() != KTestPostProcInfoRotations)
sl@0
  1054
		{
sl@0
  1055
		ERR_PRINTF1(_L("Error - Supported Rotations is incorrect!"));
sl@0
  1056
		ret = EFalse;
sl@0
  1057
		}
sl@0
  1058
sl@0
  1059
	// Supports arbitrary scaling check
sl@0
  1060
	if (!aInfo->AntiAliasedScaling())
sl@0
  1061
		{
sl@0
  1062
		ERR_PRINTF1(_L("Error - Anti-Aliased Scaling = EFalse!"));
sl@0
  1063
		ret = EFalse;
sl@0
  1064
		}
sl@0
  1065
	// Supports anti-aliased scaling check
sl@0
  1066
	if (!aInfo->SupportsArbitraryScaling())
sl@0
  1067
		{
sl@0
  1068
		ERR_PRINTF1(_L("Error - Supports Arbitrary Scaling = EFalse!"));
sl@0
  1069
		ret = EFalse;
sl@0
  1070
		}
sl@0
  1071
	// Implementation info
sl@0
  1072
	if (!(aInfo->ImplementationSpecificInfo() == KTestPostProcInfoISInfo))
sl@0
  1073
		{
sl@0
  1074
		ERR_PRINTF1(_L("Error - Implementation specific info is incorrect!"));
sl@0
  1075
		ret = EFalse;
sl@0
  1076
		}
sl@0
  1077
sl@0
  1078
	// get some test compressed video formats
sl@0
  1079
	TUncompressedVideoFormat testFormat;
sl@0
  1080
	TUint32 testComb = 0;
sl@0
  1081
	TScaleFactor testFactor = {0, 0};
sl@0
  1082
sl@0
  1083
	// get supported formats
sl@0
  1084
	const RArray<TUncompressedVideoFormat>& vidFormats = aInfo->SupportedFormats();
sl@0
  1085
	
sl@0
  1086
	// get supported combinations
sl@0
  1087
	const RArray<TUint32>& suppCombs = aInfo->SupportedCombinations();
sl@0
  1088
sl@0
  1089
	// get supported scale factors
sl@0
  1090
	const RArray<TScaleFactor>& scaleFactors = aInfo->SupportedScaleFactors();
sl@0
  1091
sl@0
  1092
	// test formats, combinations, and scale factors supported
sl@0
  1093
	for (TUint i = 0; i < KTestPostProcInfoCount; i++)
sl@0
  1094
		{
sl@0
  1095
		testFormat = KTestPostProcInfoFormatArray[i];
sl@0
  1096
		if (!(testFormat == (vidFormats[i])) || !(aInfo->SupportsFormat(testFormat)))
sl@0
  1097
			{
sl@0
  1098
			ERR_PRINTF2(_L("Error - Video Format %d is corrupt!"), i);
sl@0
  1099
			ret = EFalse;
sl@0
  1100
			}
sl@0
  1101
sl@0
  1102
		testComb = KTestPostProcInfoCombsArray[i];
sl@0
  1103
		if (!(testComb == (suppCombs[i])) || !(aInfo->SupportsCombination(testComb)))
sl@0
  1104
			{
sl@0
  1105
			ERR_PRINTF2(_L("Error - Combination %d is corrupt!"), i);
sl@0
  1106
			ret = EFalse;
sl@0
  1107
			}
sl@0
  1108
sl@0
  1109
		testFactor = KTestPostProcInfoScaleFactorsArray[i];
sl@0
  1110
		if (!CompareScaleFactors(testFactor, scaleFactors[i]))
sl@0
  1111
			{
sl@0
  1112
			ERR_PRINTF2(_L("Error - Scale factor %d is corrupt!"), i);
sl@0
  1113
			ret = EFalse;
sl@0
  1114
			}
sl@0
  1115
		}
sl@0
  1116
sl@0
  1117
	//Screen information check
sl@0
  1118
#ifdef SYMBIAN_ENABLE_MMF_MULTISCREEN_SUPPORT
sl@0
  1119
	RArray<TInt> supportedScreens;
sl@0
  1120
	TRAPD(err, aInfo->GetSupportedScreensL(supportedScreens));
sl@0
  1121
	if(err != KErrNone)
sl@0
  1122
		{
sl@0
  1123
		ERR_PRINTF2(_L("GetSupportedScreensL leaves with %d"), err);
sl@0
  1124
		ret = EFalse;
sl@0
  1125
		}
sl@0
  1126
	if(supportedScreens.Count() != KTestScreenCount)
sl@0
  1127
		{
sl@0
  1128
		ERR_PRINTF1(_L("Error - Unexpected screen count"));
sl@0
  1129
		ret = EFalse;
sl@0
  1130
		}
sl@0
  1131
	err = supportedScreens.Find(KPostProcDefaultScreenNumber);
sl@0
  1132
	if(err == KErrNotFound)
sl@0
  1133
		{
sl@0
  1134
		ERR_PRINTF1(_L("Error - No support for primary screen"));
sl@0
  1135
		ret = EFalse;
sl@0
  1136
		}
sl@0
  1137
	err = supportedScreens.Find(KPostProcSecondaryScreenNumber);
sl@0
  1138
	if(err == KErrNotFound)
sl@0
  1139
		{
sl@0
  1140
		ERR_PRINTF1(_L("Error - No support for secondary screen"));
sl@0
  1141
		ret = EFalse;
sl@0
  1142
		}
sl@0
  1143
	supportedScreens.Close();
sl@0
  1144
#endif
sl@0
  1145
	// check a format that isn't supposed to be supported
sl@0
  1146
	testFormat = KTestPostProcInfoNegativeFormat;
sl@0
  1147
	testFormat.iYuvFormat = KTestYuvFormat1;
sl@0
  1148
	if (aInfo->SupportsFormat(testFormat))
sl@0
  1149
		{
sl@0
  1150
		ERR_PRINTF1(_L("Error - Failed negative SupportsFormat() check!"));
sl@0
  1151
		ret = EFalse;
sl@0
  1152
		}
sl@0
  1153
	
sl@0
  1154
	// finally check a combination that isn't supposed to be supported
sl@0
  1155
	testComb = KTestPostProcInfoNegativeComb;
sl@0
  1156
	if (aInfo->SupportsCombination(testComb))
sl@0
  1157
		{
sl@0
  1158
		ERR_PRINTF1(_L("Error - Failed negative SupportsCombination() check!"));
sl@0
  1159
		ret = EFalse;
sl@0
  1160
		}
sl@0
  1161
sl@0
  1162
	if (!aInfo->SupportsContentProtected())//Check if flah is set indicating Content Protection is supported.
sl@0
  1163
		{
sl@0
  1164
		ERR_PRINTF1(_L("Error - Failed To get flag indicating support of Content Protection!"));
sl@0
  1165
		ret = EFalse;
sl@0
  1166
		}
sl@0
  1167
sl@0
  1168
	return ret;
sl@0
  1169
	}
sl@0
  1170
sl@0
  1171
TVerdict CTestDevVideoPlayGetPostProcInfo::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1172
	{
sl@0
  1173
	TVerdict ret = EPass;
sl@0
  1174
	TInt expErr = KErrNone;
sl@0
  1175
	
sl@0
  1176
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetPostProcInfo"));
sl@0
  1177
	
sl@0
  1178
	// expected results
sl@0
  1179
	if (iTestType != ETestValid)
sl@0
  1180
		{
sl@0
  1181
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1182
		return EInconclusive;
sl@0
  1183
		}
sl@0
  1184
	
sl@0
  1185
	TInt err = KErrNone;
sl@0
  1186
	CPostProcessorInfo *procInfo = NULL;
sl@0
  1187
	TBool valid = EFalse;
sl@0
  1188
	
sl@0
  1189
	// get decoder information from test decoder plugin
sl@0
  1190
	TRAP(err, 
sl@0
  1191
		procInfo = aDevVideoPlay.PostProcessorInfoLC(KUidDevVideoTestPostProcHwDevice);
sl@0
  1192
	        procInfo->SetSupportsContentProtected(ETrue);	
sl@0
  1193
		valid = ValidPostProcInfo(procInfo);
sl@0
  1194
		CleanupStack::PopAndDestroy(procInfo); );
sl@0
  1195
sl@0
  1196
	if (err != expErr)
sl@0
  1197
		{
sl@0
  1198
		ERR_PRINTF3(_L("PostProcessorInfoLC() gave error %d (expected %d)"),err, expErr);
sl@0
  1199
		ret = EFail;
sl@0
  1200
		}
sl@0
  1201
	// check the Video Post Processor
sl@0
  1202
	else if (!valid)
sl@0
  1203
		{
sl@0
  1204
		ERR_PRINTF1(_L("CPostProcessorInfo class is corrupt!"));
sl@0
  1205
		ret = EFail;
sl@0
  1206
		}
sl@0
  1207
	else
sl@0
  1208
		{
sl@0
  1209
		INFO_PRINTF1(_L("CPostProcessorInfo passed check successfully"));
sl@0
  1210
		INFO_PRINTF3(_L("PostProcessorInfoLC(), %d = %d"), err, expErr);
sl@0
  1211
		}
sl@0
  1212
sl@0
  1213
	return ret;
sl@0
  1214
	}
sl@0
  1215
sl@0
  1216
//------------------------------------------------------------------
sl@0
  1217
sl@0
  1218
CTestDevVideoPlaySelectDecoder::CTestDevVideoPlaySelectDecoder(const TDesC& aTestName, TTestType aTestType)
sl@0
  1219
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1220
	{
sl@0
  1221
	}
sl@0
  1222
sl@0
  1223
CTestDevVideoPlaySelectDecoder* CTestDevVideoPlaySelectDecoder::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1224
	{
sl@0
  1225
	CTestDevVideoPlaySelectDecoder* self = new(ELeave) CTestDevVideoPlaySelectDecoder(aTestName, aTestType);
sl@0
  1226
	return self;
sl@0
  1227
	}
sl@0
  1228
sl@0
  1229
TVerdict CTestDevVideoPlaySelectDecoder::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1230
	{
sl@0
  1231
	TVerdict ret = EPass;
sl@0
  1232
	TInt expErr = KErrNone;
sl@0
  1233
	
sl@0
  1234
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SelectDecoder"));
sl@0
  1235
	
sl@0
  1236
	// expected results
sl@0
  1237
	if (iTestType != ETestValid)
sl@0
  1238
		{
sl@0
  1239
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1240
		return EInconclusive;
sl@0
  1241
		}
sl@0
  1242
	
sl@0
  1243
	iError = KErrNone;
sl@0
  1244
sl@0
  1245
	// this will leave if an error occurs
sl@0
  1246
	TRAP( iError, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice) );
sl@0
  1247
sl@0
  1248
	if (iError != expErr)
sl@0
  1249
		{
sl@0
  1250
		ERR_PRINTF3(_L("SelectDecoderL() gave error %d (expected %d)"),iError, expErr);
sl@0
  1251
		ret = EFail;
sl@0
  1252
		}
sl@0
  1253
	else
sl@0
  1254
		INFO_PRINTF3(_L("SelectDecoderL(), %d = %d"), iError, expErr);
sl@0
  1255
	
sl@0
  1256
	return ret;
sl@0
  1257
	}
sl@0
  1258
sl@0
  1259
//------------------------------------------------------------------
sl@0
  1260
sl@0
  1261
CTestDevVideoPlaySelectPostProc::CTestDevVideoPlaySelectPostProc(const TDesC& aTestName, TTestType aTestType)
sl@0
  1262
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1263
	{
sl@0
  1264
	}
sl@0
  1265
sl@0
  1266
CTestDevVideoPlaySelectPostProc* CTestDevVideoPlaySelectPostProc::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1267
	{
sl@0
  1268
	CTestDevVideoPlaySelectPostProc* self = new(ELeave) CTestDevVideoPlaySelectPostProc(aTestName, aTestType);
sl@0
  1269
	return self;
sl@0
  1270
	}
sl@0
  1271
sl@0
  1272
TVerdict CTestDevVideoPlaySelectPostProc::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1273
	{
sl@0
  1274
	TVerdict ret = EPass;
sl@0
  1275
	TInt expErr = KErrNone;
sl@0
  1276
	
sl@0
  1277
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SelectPostProc"));
sl@0
  1278
	
sl@0
  1279
	// expected results
sl@0
  1280
	if (iTestType != ETestValid)
sl@0
  1281
		{
sl@0
  1282
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1283
		return EInconclusive;
sl@0
  1284
		}
sl@0
  1285
	
sl@0
  1286
	iError = KErrNone;
sl@0
  1287
	
sl@0
  1288
	// this will leave if an error occurs
sl@0
  1289
	TRAP( iError, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice) );
sl@0
  1290
sl@0
  1291
	if (iError != expErr)
sl@0
  1292
		{
sl@0
  1293
		ERR_PRINTF3(_L("SelectPostProcessorL() gave error %d (expected %d)"),iError, expErr);
sl@0
  1294
		ret = EFail;
sl@0
  1295
		}
sl@0
  1296
	else
sl@0
  1297
		INFO_PRINTF3(_L("SelectPostProcessorL(), %d = %d"), iError, expErr);
sl@0
  1298
	
sl@0
  1299
	return ret;
sl@0
  1300
	}
sl@0
  1301
sl@0
  1302
//------------------------------------------------------------------
sl@0
  1303
sl@0
  1304
CTestDevVideoPlayGetHeaderInfo::CTestDevVideoPlayGetHeaderInfo(const TDesC& aTestName, TTestType aTestType)
sl@0
  1305
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1306
	{
sl@0
  1307
	}
sl@0
  1308
sl@0
  1309
CTestDevVideoPlayGetHeaderInfo* CTestDevVideoPlayGetHeaderInfo::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1310
	{
sl@0
  1311
	CTestDevVideoPlayGetHeaderInfo* self = new(ELeave) CTestDevVideoPlayGetHeaderInfo(aTestName, aTestType);
sl@0
  1312
	return self;
sl@0
  1313
	}
sl@0
  1314
sl@0
  1315
TBool CTestDevVideoPlayGetHeaderInfo::ValidPictureHeader(const TVideoPictureHeader* aPictureHeader)
sl@0
  1316
	{
sl@0
  1317
	TBool ret = EFalse;
sl@0
  1318
sl@0
  1319
	if (!aPictureHeader)
sl@0
  1320
		{
sl@0
  1321
		ERR_PRINTF1(_L("Error - Picture Header is NULL!"));
sl@0
  1322
		return EFalse;
sl@0
  1323
		}
sl@0
  1324
sl@0
  1325
	TTimeIntervalMicroSeconds testTime(KTestInputBufferTimestamp);
sl@0
  1326
sl@0
  1327
	// check the picture header
sl@0
  1328
	if (aPictureHeader->iOptions != KTestPictureHeaderOptions)
sl@0
  1329
		{
sl@0
  1330
		ERR_PRINTF1(_L("Error - Options are incorrect!"));
sl@0
  1331
		}
sl@0
  1332
sl@0
  1333
	else if (!(aPictureHeader->iPresentationTimestamp == testTime))
sl@0
  1334
		{
sl@0
  1335
		ERR_PRINTF1(_L("Error - Timestamp is incorrect!"));
sl@0
  1336
		}
sl@0
  1337
	else if (!(*(aPictureHeader->iOptional) == KTestInputBufferData()))
sl@0
  1338
		{	
sl@0
  1339
		ERR_PRINTF1(_L("Error - Optional data is corrupt!"));
sl@0
  1340
		}
sl@0
  1341
	else 
sl@0
  1342
		{
sl@0
  1343
		INFO_PRINTF1(_L("Picture Header is valid"));
sl@0
  1344
		ret = ETrue;
sl@0
  1345
		}
sl@0
  1346
sl@0
  1347
	return ret;
sl@0
  1348
	}
sl@0
  1349
sl@0
  1350
TVerdict CTestDevVideoPlayGetHeaderInfo::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1351
	{
sl@0
  1352
	TVerdict ret = EPass;
sl@0
  1353
	TInt expErr = KErrNone;
sl@0
  1354
	
sl@0
  1355
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetHeaderInfo"));
sl@0
  1356
	
sl@0
  1357
	// expected results
sl@0
  1358
	if (iTestType != ETestValid)
sl@0
  1359
		{
sl@0
  1360
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1361
		return EInconclusive;
sl@0
  1362
		}
sl@0
  1363
	
sl@0
  1364
	TInt err = KErrNone;
sl@0
  1365
//	THwDeviceId hwDecoder = 0;
sl@0
  1366
sl@0
  1367
	// select decoder
sl@0
  1368
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1369
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1370
	if (err != KErrNone)
sl@0
  1371
		{
sl@0
  1372
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1373
		return EInconclusive;
sl@0
  1374
		}
sl@0
  1375
sl@0
  1376
	// construct a test video input buffer with a valid timestamp
sl@0
  1377
	TPtrC8 testInputBufferDataLitCPtr(KTestInputBufferData);
sl@0
  1378
	HBufC8* testInputBufferData = testInputBufferDataLitCPtr.AllocLC();
sl@0
  1379
sl@0
  1380
	TVideoInputBuffer testBuffer;
sl@0
  1381
	testBuffer.iOptions = KTestInputBufferOptions;
sl@0
  1382
	testBuffer.iPresentationTimestamp = KTestInputBufferTimestamp;
sl@0
  1383
	testBuffer.iData.Set(testInputBufferData->Des());
sl@0
  1384
sl@0
  1385
	TVideoPictureHeader* picHeader = NULL;
sl@0
  1386
	// get header information from test data unit
sl@0
  1387
	TRAP(err, picHeader = aDevVideoPlay.GetHeaderInformationL(KTestDataUnitType, KTestDataUnitEncap, &testBuffer) );
sl@0
  1388
sl@0
  1389
	if (err != expErr)
sl@0
  1390
		{
sl@0
  1391
		ERR_PRINTF3(_L("GetHeaderInformationL() gave error %d (expected %d)"),err, expErr);
sl@0
  1392
		ret = EFail;
sl@0
  1393
		}
sl@0
  1394
	else if (!ValidPictureHeader(picHeader))
sl@0
  1395
		{
sl@0
  1396
		ERR_PRINTF1(_L("Picture header corrupt!"));
sl@0
  1397
		ret = EFail;
sl@0
  1398
		}
sl@0
  1399
	else
sl@0
  1400
		{
sl@0
  1401
		INFO_PRINTF1(_L("Header information retrieved successfully"));
sl@0
  1402
		INFO_PRINTF3(_L("GetHeaderInformationL(), %d = %d"), err, expErr);	
sl@0
  1403
		}
sl@0
  1404
sl@0
  1405
	CleanupStack::PopAndDestroy(testInputBufferData);
sl@0
  1406
	
sl@0
  1407
	return ret;
sl@0
  1408
	}
sl@0
  1409
sl@0
  1410
//------------------------------------------------------------------
sl@0
  1411
sl@0
  1412
CTestDevVideoPlayReturnHeader::CTestDevVideoPlayReturnHeader(const TDesC& aTestName, TTestType aTestType)
sl@0
  1413
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1414
	{
sl@0
  1415
	}
sl@0
  1416
sl@0
  1417
CTestDevVideoPlayReturnHeader* CTestDevVideoPlayReturnHeader::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1418
	{
sl@0
  1419
	CTestDevVideoPlayReturnHeader* self = new(ELeave) CTestDevVideoPlayReturnHeader(aTestName, aTestType);
sl@0
  1420
	return self;
sl@0
  1421
	}
sl@0
  1422
sl@0
  1423
TVerdict CTestDevVideoPlayReturnHeader::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1424
	{
sl@0
  1425
	TVerdict ret = EPass;
sl@0
  1426
	
sl@0
  1427
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  ReturnHeader"));
sl@0
  1428
	
sl@0
  1429
	// expected results
sl@0
  1430
	if (iTestType != ETestValid)
sl@0
  1431
		{
sl@0
  1432
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1433
		return EInconclusive;
sl@0
  1434
		}
sl@0
  1435
	
sl@0
  1436
	TInt err = KErrNone;
sl@0
  1437
//	THwDeviceId hwDecoder = 0;
sl@0
  1438
sl@0
  1439
	// select decoder
sl@0
  1440
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1441
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1442
	if (err != KErrNone)
sl@0
  1443
		{
sl@0
  1444
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1445
		return EInconclusive;
sl@0
  1446
		}
sl@0
  1447
sl@0
  1448
	TVideoPictureHeader picHeader;
sl@0
  1449
	picHeader.iOptions = KTestPictureHeaderOptions;
sl@0
  1450
	TTimeIntervalMicroSeconds testTime(KTestPictureHeaderTimestamp);
sl@0
  1451
	picHeader.iPresentationTimestamp = testTime;
sl@0
  1452
sl@0
  1453
	// return picture header [can use a local TVideoPictureHeader because we
sl@0
  1454
	// are testing a fake plugin - normally this would be a header supplied by
sl@0
  1455
	// the video plugin].
sl@0
  1456
	aDevVideoPlay.ReturnHeader(&picHeader);
sl@0
  1457
	
sl@0
  1458
	// if plugin didn't PANIC then test has passed
sl@0
  1459
	INFO_PRINTF1(_L("Header information returned successfully"));
sl@0
  1460
			
sl@0
  1461
	return ret;
sl@0
  1462
	}
sl@0
  1463
sl@0
  1464
//------------------------------------------------------------------
sl@0
  1465
sl@0
  1466
CTestDevVideoPlayConfigureDecoder::CTestDevVideoPlayConfigureDecoder(const TDesC& aTestName, TTestType aTestType)
sl@0
  1467
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1468
	{
sl@0
  1469
	}
sl@0
  1470
sl@0
  1471
CTestDevVideoPlayConfigureDecoder* CTestDevVideoPlayConfigureDecoder::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1472
	{
sl@0
  1473
	CTestDevVideoPlayConfigureDecoder* self = new(ELeave) CTestDevVideoPlayConfigureDecoder(aTestName, aTestType);
sl@0
  1474
	return self;
sl@0
  1475
	}
sl@0
  1476
sl@0
  1477
TVerdict CTestDevVideoPlayConfigureDecoder::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1478
	{
sl@0
  1479
	TVerdict ret = EPass;
sl@0
  1480
	TInt expErr;
sl@0
  1481
sl@0
  1482
	expErr = KErrNone;
sl@0
  1483
	
sl@0
  1484
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  ConfigureDecoderL"));
sl@0
  1485
	
sl@0
  1486
	// expected results
sl@0
  1487
	if (iTestType != ETestValid)
sl@0
  1488
		{
sl@0
  1489
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1490
		return EInconclusive;
sl@0
  1491
		}
sl@0
  1492
	
sl@0
  1493
	TInt err = KErrNone;
sl@0
  1494
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1495
	if (err != KErrNone)
sl@0
  1496
		{
sl@0
  1497
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1498
		return EInconclusive;
sl@0
  1499
		}
sl@0
  1500
sl@0
  1501
	//construct a test picture header
sl@0
  1502
	TVideoPictureHeader pictureHeader;
sl@0
  1503
	pictureHeader.iOptions = KTestPictureHeaderOptions;
sl@0
  1504
	pictureHeader.iPresentationTimestamp = KTestInputBufferTimestamp;
sl@0
  1505
sl@0
  1506
	TPtrC8 testInputBufferDataLitCPtr(KTestInputBufferData);
sl@0
  1507
	pictureHeader.iOptional = &testInputBufferDataLitCPtr;
sl@0
  1508
sl@0
  1509
	// get header information from test data unit
sl@0
  1510
	TRAP(err, aDevVideoPlay.ConfigureDecoderL(pictureHeader));
sl@0
  1511
sl@0
  1512
	if (err != expErr)
sl@0
  1513
		{
sl@0
  1514
		ERR_PRINTF3(_L("ConfigureDecoderL() gave error %d (expected %d)"),err, expErr);
sl@0
  1515
		ret = EFail;
sl@0
  1516
		}
sl@0
  1517
	else
sl@0
  1518
		{
sl@0
  1519
		if (err == KErrNone)
sl@0
  1520
			{
sl@0
  1521
			INFO_PRINTF1(_L("Header information successfully configured in Decoder"));
sl@0
  1522
			}
sl@0
  1523
		INFO_PRINTF3(_L("ConfigureDecoderL(), error %d = expected %d"), err, expErr);	
sl@0
  1524
		}
sl@0
  1525
	
sl@0
  1526
	return ret;
sl@0
  1527
	}
sl@0
  1528
sl@0
  1529
//------------------------------------------------------------------
sl@0
  1530
sl@0
  1531
CTestDevVideoPlaySetInputFormatUC::CTestDevVideoPlaySetInputFormatUC(const TDesC& aTestName, TTestType aTestType)
sl@0
  1532
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1533
	{
sl@0
  1534
	}
sl@0
  1535
sl@0
  1536
CTestDevVideoPlaySetInputFormatUC* CTestDevVideoPlaySetInputFormatUC::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1537
	{
sl@0
  1538
	CTestDevVideoPlaySetInputFormatUC* self = new(ELeave) CTestDevVideoPlaySetInputFormatUC(aTestName, aTestType);
sl@0
  1539
	return self;
sl@0
  1540
	}
sl@0
  1541
sl@0
  1542
TVerdict CTestDevVideoPlaySetInputFormatUC::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1543
	{
sl@0
  1544
	TVerdict ret = EPass;
sl@0
  1545
	TInt expErr = KErrNone;
sl@0
  1546
	
sl@0
  1547
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetInputFormatUC"));
sl@0
  1548
	
sl@0
  1549
	// expected results
sl@0
  1550
	if (iTestType != ETestValid)
sl@0
  1551
		{
sl@0
  1552
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1553
		return EInconclusive;
sl@0
  1554
		}
sl@0
  1555
sl@0
  1556
	TInt err = KErrNone;
sl@0
  1557
sl@0
  1558
//	THwDeviceId hwDecoder = 0;
sl@0
  1559
	THwDeviceId hwPostProc = 0;
sl@0
  1560
sl@0
  1561
	// select decoder
sl@0
  1562
//	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1563
	TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));	// EABI warning removal
sl@0
  1564
	if (err != KErrNone)
sl@0
  1565
		{
sl@0
  1566
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1567
		return EInconclusive;
sl@0
  1568
		}
sl@0
  1569
sl@0
  1570
	// select post-processor
sl@0
  1571
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1572
	if (err != KErrNone)
sl@0
  1573
		{
sl@0
  1574
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1575
		return EInconclusive;
sl@0
  1576
		}
sl@0
  1577
sl@0
  1578
	// this will leave if an error occurs in either plugin
sl@0
  1579
	TRAP(err, aDevVideoPlay.SetInputFormatL(hwPostProc, KTestVidFormat2) );
sl@0
  1580
sl@0
  1581
	if ( err != expErr )
sl@0
  1582
		{
sl@0
  1583
		ERR_PRINTF3(_L("SetInputFormatL() on Post-Processor gave error %d (expected %d)"),err, expErr);
sl@0
  1584
		ret = EFail;
sl@0
  1585
		}
sl@0
  1586
	else
sl@0
  1587
		INFO_PRINTF3(_L("SetInputFormat(), %d = %d"), err, expErr);
sl@0
  1588
	
sl@0
  1589
	return ret;
sl@0
  1590
	}
sl@0
  1591
//------------------------------------------------------------------
sl@0
  1592
sl@0
  1593
CTestDevVideoPlaySetInputFormat::CTestDevVideoPlaySetInputFormat(const TDesC& aTestName, TTestType aTestType)
sl@0
  1594
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1595
	{
sl@0
  1596
	}
sl@0
  1597
sl@0
  1598
CTestDevVideoPlaySetInputFormat* CTestDevVideoPlaySetInputFormat::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1599
	{
sl@0
  1600
	CTestDevVideoPlaySetInputFormat* self = new(ELeave) CTestDevVideoPlaySetInputFormat(aTestName, aTestType);
sl@0
  1601
	return self;
sl@0
  1602
	}
sl@0
  1603
sl@0
  1604
TVerdict CTestDevVideoPlaySetInputFormat::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1605
	{
sl@0
  1606
	TVerdict ret = EPass;
sl@0
  1607
	TInt expErr = KErrNone;
sl@0
  1608
	
sl@0
  1609
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetInputFormat"));
sl@0
  1610
	
sl@0
  1611
	// expected results
sl@0
  1612
	if (iTestType != ETestValid)
sl@0
  1613
		{
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
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1625
	if (err != KErrNone)
sl@0
  1626
		{
sl@0
  1627
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1628
		return EInconclusive;
sl@0
  1629
		}
sl@0
  1630
sl@0
  1631
	// select post-processor
sl@0
  1632
//	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1633
	TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));	// EABI warning removal
sl@0
  1634
	if (err != KErrNone)
sl@0
  1635
		{
sl@0
  1636
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1637
		return EInconclusive;
sl@0
  1638
		}
sl@0
  1639
sl@0
  1640
	// get a temporary compressed video class
sl@0
  1641
	CCompressedVideoFormat *tempCFormat = NULL;
sl@0
  1642
	TRAP(err, tempCFormat = GetTestCVFormatL(KTestMimeType1));
sl@0
  1643
	if (err != KErrNone)
sl@0
  1644
		{
sl@0
  1645
		ERR_PRINTF1(_L("Error - couldn't initialize compressed video class"));
sl@0
  1646
		return EInconclusive;
sl@0
  1647
		}
sl@0
  1648
sl@0
  1649
	// this will leave if an error occurs
sl@0
  1650
	TRAP(err, aDevVideoPlay.SetInputFormatL(hwDecoder, *tempCFormat, KTestUnitType1, KTestEncapType1, ETrue) );
sl@0
  1651
sl@0
  1652
	// delete compressed video class
sl@0
  1653
	delete tempCFormat;	
sl@0
  1654
	tempCFormat = NULL;
sl@0
  1655
sl@0
  1656
	if ( err != expErr )
sl@0
  1657
		{
sl@0
  1658
		ERR_PRINTF3(_L("SetInputFormatL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
  1659
		ret = EFail;
sl@0
  1660
		}
sl@0
  1661
	else
sl@0
  1662
		INFO_PRINTF3(_L("SetInputFormat(), %d = %d"), err, expErr);
sl@0
  1663
	
sl@0
  1664
	return ret;
sl@0
  1665
	}
sl@0
  1666
//------------------------------------------------------------------
sl@0
  1667
sl@0
  1668
CTestDevVideoPlayGetOutputFormatList::CTestDevVideoPlayGetOutputFormatList(const TDesC& aTestName, TTestType aTestType)
sl@0
  1669
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1670
	{
sl@0
  1671
	}
sl@0
  1672
sl@0
  1673
CTestDevVideoPlayGetOutputFormatList* CTestDevVideoPlayGetOutputFormatList::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1674
	{
sl@0
  1675
	CTestDevVideoPlayGetOutputFormatList* self = new(ELeave) CTestDevVideoPlayGetOutputFormatList(aTestName, aTestType);
sl@0
  1676
	return self;
sl@0
  1677
	}
sl@0
  1678
sl@0
  1679
TVerdict CTestDevVideoPlayGetOutputFormatList::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1680
	{
sl@0
  1681
	TVerdict ret = EPass;
sl@0
  1682
	TInt expErr = KErrNone;
sl@0
  1683
	
sl@0
  1684
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetOutputFormatList"));
sl@0
  1685
	
sl@0
  1686
	// expected results
sl@0
  1687
	if (iTestType != ETestValid)
sl@0
  1688
		{
sl@0
  1689
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1690
		return EInconclusive;
sl@0
  1691
		}
sl@0
  1692
sl@0
  1693
	TInt err = KErrNone;
sl@0
  1694
	TInt err2 = KErrNone;
sl@0
  1695
sl@0
  1696
	THwDeviceId hwDecoder = 0;
sl@0
  1697
	THwDeviceId hwPostProc = 0;
sl@0
  1698
sl@0
  1699
	// select decoder
sl@0
  1700
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1701
	if (err != KErrNone)
sl@0
  1702
		{
sl@0
  1703
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1704
		return EInconclusive;
sl@0
  1705
		}
sl@0
  1706
sl@0
  1707
	// select post-processor
sl@0
  1708
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1709
	if (err != KErrNone)
sl@0
  1710
		{
sl@0
  1711
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1712
		return EInconclusive;
sl@0
  1713
		}
sl@0
  1714
sl@0
  1715
	RArray<TUncompressedVideoFormat> decodeList;
sl@0
  1716
	RArray<TUncompressedVideoFormat> postProcList;
sl@0
  1717
sl@0
  1718
	// Get output format list for decoder
sl@0
  1719
	TRAP(err, aDevVideoPlay.GetOutputFormatListL(hwDecoder, decodeList));
sl@0
  1720
		
sl@0
  1721
	// Get output format list for post-processor
sl@0
  1722
	TRAP(err2, aDevVideoPlay.GetOutputFormatListL(hwPostProc, postProcList));
sl@0
  1723
	
sl@0
  1724
	if ((err != expErr) || (err2 != expErr))
sl@0
  1725
		{
sl@0
  1726
		ERR_PRINTF3(_L("GetOutputFormatListL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
  1727
		ERR_PRINTF3(_L("GetOutputFormatListL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
  1728
		ret = EFail;
sl@0
  1729
		}
sl@0
  1730
	else
sl@0
  1731
		{
sl@0
  1732
		TBool decPass = EFalse;
sl@0
  1733
		TBool posPass = EFalse;
sl@0
  1734
sl@0
  1735
		// expecting KTestVidFormat1,2,3 - check
sl@0
  1736
		TInt count = decodeList.Count();
sl@0
  1737
		if (count == 3) 
sl@0
  1738
			{
sl@0
  1739
			if ((decodeList[0] == KTestVidFormat1) &&
sl@0
  1740
				(decodeList[1] == KTestVidFormat2) &&
sl@0
  1741
				(decodeList[2] == KTestVidFormat3) )
sl@0
  1742
				{
sl@0
  1743
				INFO_PRINTF1(_L("Decoder output list checks ok"));
sl@0
  1744
				decPass = ETrue;
sl@0
  1745
				}
sl@0
  1746
			}
sl@0
  1747
sl@0
  1748
		// expecting KTestVidFormat3,2,1 - check
sl@0
  1749
		count = postProcList.Count();
sl@0
  1750
		if (count == 3) 
sl@0
  1751
			{
sl@0
  1752
			if ((postProcList[0] == KTestVidFormat3) &&
sl@0
  1753
				(postProcList[1] == KTestVidFormat2) &&
sl@0
  1754
				(postProcList[2] == KTestVidFormat1) )
sl@0
  1755
				{
sl@0
  1756
				INFO_PRINTF1(_L("Post-Processor output list checks ok"));
sl@0
  1757
				posPass = ETrue;
sl@0
  1758
				}
sl@0
  1759
			}
sl@0
  1760
		
sl@0
  1761
		if (!decPass)
sl@0
  1762
			{
sl@0
  1763
			ERR_PRINTF1(_L("Decoder output list corrupt!"));
sl@0
  1764
			ret = EFail;
sl@0
  1765
			}
sl@0
  1766
		
sl@0
  1767
		if (!posPass)
sl@0
  1768
			{
sl@0
  1769
			ERR_PRINTF1(_L("Post-Processor output list corrupt!"));
sl@0
  1770
			ret = EFail;
sl@0
  1771
			}
sl@0
  1772
	
sl@0
  1773
		INFO_PRINTF4(_L("GetOutputFormatListL(), %d, %d = %d"), err, err2, expErr);
sl@0
  1774
		}	
sl@0
  1775
sl@0
  1776
	// close the arrays
sl@0
  1777
	decodeList.Reset();		
sl@0
  1778
	decodeList.Close();
sl@0
  1779
	
sl@0
  1780
	postProcList.Reset();	
sl@0
  1781
	postProcList.Close();
sl@0
  1782
	
sl@0
  1783
	return ret;
sl@0
  1784
	}
sl@0
  1785
//------------------------------------------------------------------
sl@0
  1786
sl@0
  1787
CTestDevVideoPlaySetOutputFormat::CTestDevVideoPlaySetOutputFormat(const TDesC& aTestName, TTestType aTestType)
sl@0
  1788
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1789
	{
sl@0
  1790
	}
sl@0
  1791
sl@0
  1792
CTestDevVideoPlaySetOutputFormat* CTestDevVideoPlaySetOutputFormat::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1793
	{
sl@0
  1794
	CTestDevVideoPlaySetOutputFormat* self = new(ELeave) CTestDevVideoPlaySetOutputFormat(aTestName, aTestType);
sl@0
  1795
	return self;
sl@0
  1796
	}
sl@0
  1797
sl@0
  1798
TVerdict CTestDevVideoPlaySetOutputFormat::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1799
	{
sl@0
  1800
	TVerdict ret = EPass;
sl@0
  1801
	TInt expErr = KErrNone;
sl@0
  1802
	
sl@0
  1803
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetOutputFormat"));
sl@0
  1804
	
sl@0
  1805
	// expected results
sl@0
  1806
	if (iTestType != ETestValid)
sl@0
  1807
		{
sl@0
  1808
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1809
		return EInconclusive;
sl@0
  1810
		}
sl@0
  1811
sl@0
  1812
	TInt err = KErrNone;
sl@0
  1813
	TInt err2 = KErrNone;
sl@0
  1814
sl@0
  1815
	THwDeviceId hwDecoder = 0;
sl@0
  1816
	THwDeviceId hwPostProc = 0;
sl@0
  1817
sl@0
  1818
	// select decoder
sl@0
  1819
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1820
	if (err != KErrNone)
sl@0
  1821
		{
sl@0
  1822
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1823
		return EInconclusive;
sl@0
  1824
		}
sl@0
  1825
sl@0
  1826
	// select post-processor
sl@0
  1827
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1828
	if (err != KErrNone)
sl@0
  1829
		{
sl@0
  1830
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1831
		return EInconclusive;
sl@0
  1832
		}
sl@0
  1833
sl@0
  1834
	// set output format on decoder
sl@0
  1835
	TRAP(err, aDevVideoPlay.SetOutputFormatL(hwDecoder, KTestVidFormat1) )
sl@0
  1836
	
sl@0
  1837
	// set output format on post-processor
sl@0
  1838
	TRAP(err2, aDevVideoPlay.SetOutputFormatL(hwPostProc, KTestVidFormat2) )
sl@0
  1839
sl@0
  1840
sl@0
  1841
	if ((err != expErr) || (err2 != expErr))
sl@0
  1842
		{
sl@0
  1843
		ERR_PRINTF3(_L("SetOutputFormatL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
  1844
		ERR_PRINTF3(_L("SetOutputFormatL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
  1845
		ret = EFail;
sl@0
  1846
		}
sl@0
  1847
	else
sl@0
  1848
		INFO_PRINTF4(_L("SetOutputFormat(), %d, %d= %d"), err, err2, expErr);
sl@0
  1849
	
sl@0
  1850
	return ret;
sl@0
  1851
	}
sl@0
  1852
//------------------------------------------------------------------
sl@0
  1853
sl@0
  1854
CTestDevVideoPlaySetPostProcTypes::CTestDevVideoPlaySetPostProcTypes(const TDesC& aTestName, TTestType aTestType)
sl@0
  1855
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1856
	{
sl@0
  1857
	}
sl@0
  1858
sl@0
  1859
CTestDevVideoPlaySetPostProcTypes* CTestDevVideoPlaySetPostProcTypes::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1860
	{
sl@0
  1861
	CTestDevVideoPlaySetPostProcTypes* self = new(ELeave) CTestDevVideoPlaySetPostProcTypes(aTestName, aTestType);
sl@0
  1862
	return self;
sl@0
  1863
	}
sl@0
  1864
sl@0
  1865
TVerdict CTestDevVideoPlaySetPostProcTypes::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  1866
	{
sl@0
  1867
	TVerdict ret = EPass;
sl@0
  1868
	TInt expErr = KErrNone;
sl@0
  1869
	
sl@0
  1870
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  SetPostProcTypes"));
sl@0
  1871
	
sl@0
  1872
	// expected results
sl@0
  1873
	if (iTestType != ETestValid)
sl@0
  1874
		{
sl@0
  1875
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  1876
		return EInconclusive;
sl@0
  1877
		}
sl@0
  1878
sl@0
  1879
	TInt err = KErrNone;
sl@0
  1880
	TInt err2 = KErrNone;
sl@0
  1881
sl@0
  1882
	THwDeviceId hwDecoder = 0;
sl@0
  1883
	THwDeviceId hwPostProc = 0;
sl@0
  1884
sl@0
  1885
	// select decoder
sl@0
  1886
	TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
sl@0
  1887
	if (err != KErrNone)
sl@0
  1888
		{
sl@0
  1889
		ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
sl@0
  1890
		return EInconclusive;
sl@0
  1891
		}
sl@0
  1892
sl@0
  1893
	// select post-processor
sl@0
  1894
	TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
sl@0
  1895
	if (err != KErrNone)
sl@0
  1896
		{
sl@0
  1897
		ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
sl@0
  1898
		return EInconclusive;
sl@0
  1899
		}
sl@0
  1900
sl@0
  1901
	// set post-process types on decoder
sl@0
  1902
	TRAP(err, aDevVideoPlay.SetPostProcessTypesL(hwDecoder, KTestProcessType1) )
sl@0
  1903
	
sl@0
  1904
	// set post-process types on post-processor
sl@0
  1905
	TRAP(err2, aDevVideoPlay.SetPostProcessTypesL(hwPostProc, KTestProcessType2) )
sl@0
  1906
sl@0
  1907
sl@0
  1908
	if ((err != expErr) || (err2 != expErr))
sl@0
  1909
		{
sl@0
  1910
		ERR_PRINTF3(_L("SetPostProcessTypesL() on Decoder gave error %d (expected %d)"),err, expErr);
sl@0
  1911
		ERR_PRINTF3(_L("SetPostProcessTypesL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
sl@0
  1912
		ret = EFail;
sl@0
  1913
		}
sl@0
  1914
	else
sl@0
  1915
		INFO_PRINTF4(_L("SetPostProcessTypes(), %d, %d= %d"), err, err2, expErr);
sl@0
  1916
	
sl@0
  1917
	return ret;
sl@0
  1918
	}
sl@0
  1919
//------------------------------------------------------------------
sl@0
  1920
sl@0
  1921
CTestDevVideoPlayGetDecoderPostProcInfo::CTestDevVideoPlayGetDecoderPostProcInfo(const TDesC& aTestName, TTestType aTestType)
sl@0
  1922
	:CTestDevVideoPlayStep(aTestName, aTestType)
sl@0
  1923
	{
sl@0
  1924
	}
sl@0
  1925
sl@0
  1926
CTestDevVideoPlayGetDecoderPostProcInfo* CTestDevVideoPlayGetDecoderPostProcInfo::NewL(const TDesC& aTestName, TTestType aTestType)
sl@0
  1927
	{
sl@0
  1928
	CTestDevVideoPlayGetDecoderPostProcInfo* self = new(ELeave) CTestDevVideoPlayGetDecoderPostProcInfo(aTestName, aTestType);
sl@0
  1929
	return self;
sl@0
  1930
	}
sl@0
  1931
sl@0
  1932
TBool CTestDevVideoPlayGetDecoderPostProcInfo::ValidPostProcInfo(CPostProcessorInfo* aInfo)
sl@0
  1933
	{
sl@0
  1934
	// do null pointer check
sl@0
  1935
	if (!aInfo) 
sl@0
  1936
		{
sl@0
  1937
		ERR_PRINTF1(_L("Error - Post Processor Info is NULL!"));
sl@0
  1938
		return EFalse;
sl@0
  1939
		}
sl@0
  1940
	
sl@0
  1941
	// check the post processor against test data
sl@0
  1942
	// need to check every call so as to keep code coverage
sl@0
  1943
	// and prevent a situation where if the first test fails
sl@0
  1944
	// then subsequent tests will not be called
sl@0
  1945
	TBool ret = ETrue;
sl@0
  1946
sl@0
  1947
	// UID check
sl@0
  1948
	if (aInfo->Uid() != KUidDevVideoTestDecodeHwDevice)
sl@0
  1949
		{
sl@0
  1950
		ERR_PRINTF1(_L("Error - Decoder UID is incorrect!"));
sl@0
  1951
		ret = EFalse;
sl@0
  1952
		}
sl@0
  1953
	// Manufacturer check
sl@0
  1954
	if (!(aInfo->Manufacturer() == KTestPostProcInfoManufacturer))
sl@0
  1955
		{
sl@0
  1956
		ERR_PRINTF1(_L("Error - Manufacturer is incorrect!"));
sl@0
  1957
		ret = EFalse;
sl@0
  1958
		}
sl@0
  1959
	// Identifier check
sl@0
  1960
	if (!(aInfo->Identifier() == KTestPostProcInfoIdentifier))
sl@0
  1961
		{
sl@0
  1962
		ERR_PRINTF1(_L("Error - Identifier is incorrect!"));
sl@0
  1963
		ret = EFalse;
sl@0
  1964
		}
sl@0
  1965
	// Version check
sl@0
  1966
	TVersion posVer = aInfo->Version();
sl@0
  1967
	if ( (posVer.iMajor != KTestPostProcInfoVersionMaj) ||
sl@0
  1968
		 (posVer.iMinor != KTestPostProcInfoVersionMin) ||
sl@0
  1969
		 (posVer.iBuild != KTestPostProcInfoVersionBuild) )
sl@0
  1970
		{
sl@0
  1971
		ERR_PRINTF1(_L("Error - Version is incorrect!"));
sl@0
  1972
		ret = EFalse;
sl@0
  1973
		}
sl@0
  1974
	// Accelerated check
sl@0
  1975
	if (!aInfo->Accelerated())
sl@0
  1976
		{
sl@0
  1977
		ERR_PRINTF1(_L("Error - Accelerated = EFalse!"));
sl@0
  1978
		ret = EFalse;
sl@0
  1979
		}
sl@0
  1980
	// Direct display check
sl@0
  1981
	if (!aInfo->SupportsDirectDisplay())
sl@0
  1982
		{
sl@0
  1983
		ERR_PRINTF1(_L("Error - Supports Direct Display = EFalse!"));
sl@0
  1984
		ret = EFalse;
sl@0
  1985
		}
sl@0
  1986
	// YUVToRGB Capabilities
sl@0
  1987
	if (!CompareYuvRgbCaps(aInfo->YuvToRgbCapabilities(), KTestPostProcInfoYuvToRgbCaps))
sl@0
  1988
		{
sl@0
  1989
		ERR_PRINTF1(_L("Error - YUV To RGB capabilities is incorrect!"));
sl@0
  1990
		ret = EFalse;
sl@0
  1991
		}
sl@0
  1992
	//Content Protection	
sl@0
  1993
	if (!aInfo->SupportsContentProtected())//Check if flag is set indicating Content Protection is supported.
sl@0
  1994
		{
sl@0
  1995
		ERR_PRINTF1(_L("Error - Failed To get flag indicating support of Content Protection!"));
sl@0
  1996
		ret = EFalse;
sl@0
  1997
		}
sl@0
  1998
sl@0
  1999
	// Supported rotations
sl@0
  2000
	if (aInfo->SupportedRotations() != KTestPostProcInfoRotations)
sl@0
  2001
		{
sl@0
  2002
		ERR_PRINTF1(_L("Error - Supported Rotations is incorrect!"));
sl@0
  2003
		ret = EFalse;
sl@0
  2004
		}
sl@0
  2005
sl@0
  2006
	// Supports arbitrary scaling check
sl@0
  2007
	if (!aInfo->AntiAliasedScaling())
sl@0
  2008
		{
sl@0
  2009
		ERR_PRINTF1(_L("Error - Anti-Aliased Scaling = EFalse!"));
sl@0
  2010
		ret = EFalse;
sl@0
  2011
		}
sl@0
  2012
	// Supports anti-aliased scaling check
sl@0
  2013
	if (!aInfo->SupportsArbitraryScaling())
sl@0
  2014
		{
sl@0
  2015
		ERR_PRINTF1(_L("Error - Supports Arbitrary Scaling = EFalse!"));
sl@0
  2016
		ret = EFalse;
sl@0
  2017
		}
sl@0
  2018
	// Implementation info
sl@0
  2019
	if (!(aInfo->ImplementationSpecificInfo() == KTestDecoderInfoISInfo))
sl@0
  2020
		{
sl@0
  2021
		ERR_PRINTF1(_L("Error - Implementation specific info is incorrect!"));
sl@0
  2022
		ret = EFalse;
sl@0
  2023
		}
sl@0
  2024
sl@0
  2025
	// get some test compressed video formats
sl@0
  2026
	TUncompressedVideoFormat testFormat;
sl@0
  2027
	TUint32 testComb = 0;
sl@0
  2028
	TScaleFactor testFactor = {0, 0};
sl@0
  2029
sl@0
  2030
	// get supported formats
sl@0
  2031
	const RArray<TUncompressedVideoFormat>& vidFormats = aInfo->SupportedFormats();
sl@0
  2032
	
sl@0
  2033
	// get supported combinations
sl@0
  2034
	const RArray<TUint32>& suppCombs = aInfo->SupportedCombinations();
sl@0
  2035
sl@0
  2036
	// get supported scale factors
sl@0
  2037
	const RArray<TScaleFactor>& scaleFactors = aInfo->SupportedScaleFactors();
sl@0
  2038
sl@0
  2039
	// test formats, combinations, and scale factors supported
sl@0
  2040
	for (TUint i = 0; i < KTestPostProcInfoCount; i++)
sl@0
  2041
		{
sl@0
  2042
		testFormat = KTestPostProcInfoFormatArray[i];
sl@0
  2043
		if (!(testFormat == (vidFormats[i])) || !(aInfo->SupportsFormat(testFormat)))
sl@0
  2044
			{
sl@0
  2045
			ERR_PRINTF2(_L("Error - Video Format %d is corrupt!"), i);
sl@0
  2046
			ret = EFalse;
sl@0
  2047
			}
sl@0
  2048
sl@0
  2049
		testComb = KTestPostProcInfoCombsArray[i];
sl@0
  2050
		if (!(testComb == (suppCombs[i])) || !(aInfo->SupportsCombination(testComb)))
sl@0
  2051
			{
sl@0
  2052
			ERR_PRINTF2(_L("Error - Combination %d is corrupt!"), i);
sl@0
  2053
			ret = EFalse;
sl@0
  2054
			}
sl@0
  2055
sl@0
  2056
		testFactor = KTestPostProcInfoScaleFactorsArray[i];
sl@0
  2057
		if (!CompareScaleFactors(testFactor, scaleFactors[i]))
sl@0
  2058
			{
sl@0
  2059
			ERR_PRINTF2(_L("Error - Scale factor %d is corrupt!"), i);
sl@0
  2060
			ret = EFalse;
sl@0
  2061
			}
sl@0
  2062
		}
sl@0
  2063
sl@0
  2064
	// check a format that isn't supposed to be supported
sl@0
  2065
	testFormat = KTestPostProcInfoNegativeFormat;
sl@0
  2066
	testFormat.iYuvFormat = KTestYuvFormat1;
sl@0
  2067
	if (aInfo->SupportsFormat(testFormat))
sl@0
  2068
		{
sl@0
  2069
		ERR_PRINTF1(_L("Error - Failed negative SupportsFormat() check!"));
sl@0
  2070
		ret = EFalse;
sl@0
  2071
		}
sl@0
  2072
	
sl@0
  2073
	// finally check a combination that isn't supposed to be supported
sl@0
  2074
	testComb = KTestPostProcInfoNegativeComb;
sl@0
  2075
	if (aInfo->SupportsCombination(testComb))
sl@0
  2076
		{
sl@0
  2077
		ERR_PRINTF1(_L("Error - Failed negative SupportsCombination() check!"));
sl@0
  2078
		ret = EFalse;
sl@0
  2079
		}
sl@0
  2080
sl@0
  2081
	if (!aInfo->SupportsContentProtected())
sl@0
  2082
		{
sl@0
  2083
		ERR_PRINTF1(_L("Error - Failed to Set Content Protected Support!"));
sl@0
  2084
		ret = EFalse;
sl@0
  2085
		}
sl@0
  2086
sl@0
  2087
	return ret;
sl@0
  2088
	}
sl@0
  2089
sl@0
  2090
TVerdict CTestDevVideoPlayGetDecoderPostProcInfo::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
sl@0
  2091
	{
sl@0
  2092
	TVerdict ret = EPass;
sl@0
  2093
	TInt expErr = KErrNone;
sl@0
  2094
	
sl@0
  2095
	INFO_PRINTF1(_L("CMMFDevVideoPlay:  GetPostProcInfo"));
sl@0
  2096
	
sl@0
  2097
	// expected results
sl@0
  2098
	if (iTestType != ETestValid)
sl@0
  2099
		{
sl@0
  2100
		ERR_PRINTF1(_L("Error - invalid test step type"));
sl@0
  2101
		return EInconclusive;
sl@0
  2102
		}
sl@0
  2103
	
sl@0
  2104
	TInt err = KErrNone;
sl@0
  2105
	CPostProcessorInfo *procInfo = NULL;
sl@0
  2106
	TBool valid = EFalse;
sl@0
  2107
	
sl@0
  2108
	// get decoder information from test decoder plugin
sl@0
  2109
	TRAP(err, 
sl@0
  2110
		procInfo = aDevVideoPlay.PostProcessorInfoLC(KUidDevVideoTestDecodeHwDevice); 
sl@0
  2111
		procInfo->SetSupportsContentProtected(ETrue);
sl@0
  2112
		valid = ValidPostProcInfo(procInfo);
sl@0
  2113
		CleanupStack::PopAndDestroy(procInfo); );
sl@0
  2114
sl@0
  2115
	if (err != expErr)
sl@0
  2116
		{
sl@0
  2117
		ERR_PRINTF3(_L("PostProcessorInfoLC() gave error %d (expected %d)"),err, expErr);
sl@0
  2118
		ret = EFail;
sl@0
  2119
		}
sl@0
  2120
	// check the Video Decoder
sl@0
  2121
	else if (!valid)
sl@0
  2122
		{
sl@0
  2123
		ERR_PRINTF1(_L("CPostProcessorInfo class is corrupt!"));
sl@0
  2124
		ret = EFail;
sl@0
  2125
		}
sl@0
  2126
	else
sl@0
  2127
		{
sl@0
  2128
		INFO_PRINTF1(_L("CPostProcessorInfo passed check successfully"));
sl@0
  2129
		INFO_PRINTF3(_L("PostProcessorInfoLC(), %d = %d"), err, expErr);
sl@0
  2130
		}
sl@0
  2131
sl@0
  2132
	return ret;
sl@0
  2133
	}