omxilvideocomps/omxilgraphicsink/tsrc/src/graphicsinkteststeps.cpp
author hgs
Fri, 08 Oct 2010 22:09:17 +0100
changeset 0 5d29cba61097
permissions -rw-r--r--
2010wk38_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     1
/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     3
* All rights reserved.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     8
*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    11
*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    12
* Contributors:
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    13
*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    14
* Description: 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    15
*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    16
*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    17
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    18
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    19
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    20
 * @file
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    21
 * @internalTechnology
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    22
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    23
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    24
#include "graphicsinkteststeps.h"
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    25
#include <openmax/il/shai/OMX_Symbian_ExtensionNames.h>
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    26
#include <openmax/il/shai/OMX_Symbian_ComponentExt.h>
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    27
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    28
COmxGsTest0001Step01::~COmxGsTest0001Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    29
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    30
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    31
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    32
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    33
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    34
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    35
COmxGsTest0001Step01::COmxGsTest0001Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    36
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    37
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    38
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    39
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    40
	SetTestStepName(KOmxGsTest0001Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    41
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    42
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    43
TVerdict COmxGsTest0001Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    44
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    45
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    46
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    47
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    48
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    49
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    50
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    51
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    52
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    53
	// Check GetComponentVersion
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    54
	const TInt maxComponentNameSize = 128;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    55
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    56
	char componentNameArray[maxComponentNameSize];
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    57
	OMX_VERSIONTYPE componentVersion;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    58
	OMX_VERSIONTYPE specVersion;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    59
	OMX_UUIDTYPE componentUUID;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    60
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    61
	// Obtain the component's version
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    62
	iOmxErrorType = iGraphicSinkCompHandle->GetComponentVersion(iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    63
			componentNameArray,&componentVersion,&specVersion,&componentUUID);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    64
	if (iOmxErrorType != OMX_ErrorNone)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    65
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    66
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    67
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    68
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    69
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    70
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    71
	// Translate component name
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    72
	TBuf8<maxComponentNameSize> componentNameBuf8;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    73
	componentNameBuf8 = const_cast<const TUint8*>(reinterpret_cast<TUint8*>(componentNameArray));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    74
	TBuf<maxComponentNameSize> componentNameBuf16;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    75
	// INFO_PRINTF2(_L("Component Name length: %d"), componentNameBuf8.Length());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    76
	componentNameBuf16.Copy(componentNameBuf8);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    77
	componentNameBuf16.PtrZ();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    78
	const TBuf<maxComponentNameSize> componentNameConst = _L("OMX.SYMBIAN.VIDEO.GRAPHICSINK");
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    79
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    80
	INFO_PRINTF2(_L("Component Name: %S"), &componentNameBuf16);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    81
	INFO_PRINTF2(_L("Component Version Major: %d"), componentVersion.s.nVersionMajor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    82
	INFO_PRINTF2(_L("Component Version Minor: %d"), componentVersion.s.nVersionMinor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    83
	INFO_PRINTF2(_L("Component Version Revision: %d"), componentVersion.s.nRevision);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    84
	INFO_PRINTF2(_L("Component Version Step: %d"), componentVersion.s.nStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    85
	INFO_PRINTF2(_L("OMX Version Major: %d"), specVersion.s.nVersionMajor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    86
	INFO_PRINTF2(_L("OMX Version Minor: %d"), specVersion.s.nVersionMinor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    87
	INFO_PRINTF2(_L("OMX Version Revision: %d"), specVersion.s.nRevision);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    88
	INFO_PRINTF2(_L("OMX Version Step: %d"), specVersion.s.nStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    89
	INFO_PRINTF2(_L("Component UUID: %X"), componentUUID);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    90
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    91
	// Quick check to confirm component name
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    92
	if (componentNameConst != componentNameBuf16)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    93
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    94
		ERR_PRINTF1(_L("Incorrect component name retuned"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    95
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    96
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    97
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    98
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
    99
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   100
	// Simple GetParam test to display data change when using GetParam
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   101
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortDefType;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   102
	// Confirm error when required paramaters not set
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   103
	omxParamPortDefType.nPortIndex = 5;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   104
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortDefType,OMX_ErrorBadPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   105
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   106
	// Set required paramaters and test GetParameter 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   107
	omxParamPortDefType.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   108
	omxParamPortDefType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   109
	omxParamPortDefType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   110
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortDefType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   111
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   112
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE nBufferCountActual: %X"), omxParamPortDefType.nBufferCountActual);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   113
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE nBufferCountMin: %X"), omxParamPortDefType.nBufferCountMin);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   114
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE nBufferSize: %X"), omxParamPortDefType.nBufferSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   115
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE eCompressionFormat: %X"), omxParamPortDefType.format.video.eCompressionFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   116
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE eColorFormat: %X"), omxParamPortDefType.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   117
	INFO_PRINTF2(_L("PORTDEFINITIONTYPE xFramerate: %X"), omxParamPortDefType.format.video.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   118
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   119
	omxParamPortDefType.format.video.eCompressionFormat = OMX_VIDEO_CodingAutoDetect;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   120
	omxParamPortDefType.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   121
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   122
	// Attempt to set bad paramaters
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   123
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortDefType, OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   124
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   125
	// Obtain the new port def params for OMX_VIDEO_PARAM_PORTFORMATTYPE
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   126
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamPortForType;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   127
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   128
	omxVideoParamPortForType.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   129
	omxVideoParamPortForType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   130
	omxVideoParamPortForType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   131
	omxVideoParamPortForType.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   132
	omxVideoParamPortForType.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   133
	omxVideoParamPortForType.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   134
	omxVideoParamPortForType.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   135
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamPortForType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   136
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   137
	INFO_PRINTF2(_L("PORTFORMATTYPE nIndex: %X"), omxVideoParamPortForType.nIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   138
	INFO_PRINTF2(_L("PORTFORMATTYPE nPortIndex: %X"), omxVideoParamPortForType.nPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   139
	INFO_PRINTF2(_L("PORTFORMATTYPE nSize: %X"), omxVideoParamPortForType.nSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   140
	INFO_PRINTF2(_L("PORTFORMATTYPE nVersion: %X"), omxVideoParamPortForType.nVersion);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   141
	INFO_PRINTF2(_L("PORTFORMATTYPE eCompressionFormat: %X"), omxVideoParamPortForType.eCompressionFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   142
	INFO_PRINTF2(_L("PORTFORMATTYPE eColorFormat: %X"), omxVideoParamPortForType.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   143
	INFO_PRINTF2(_L("PORTFORMATTYPE xFramerate: %X"), omxVideoParamPortForType.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   144
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   145
	omxParamPortDefType.format.video.eCompressionFormat = OMX_VIDEO_CodingAutoDetect;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   146
	omxParamPortDefType.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   147
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   148
	 // Attempt to set bad paramaters
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   149
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamPortForType,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   150
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   151
	// Obtain the new port def params for OMX_VIDEO_PARAM_PORTFORMATTYPE
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   152
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamPortForType2;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   153
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   154
	omxVideoParamPortForType2.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   155
	omxVideoParamPortForType2.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   156
	omxVideoParamPortForType2.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   157
	omxVideoParamPortForType2.nIndex = 1;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   158
	omxVideoParamPortForType2.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   159
	omxVideoParamPortForType2.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   160
	omxVideoParamPortForType2.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   161
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamPortForType2);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   162
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   163
	INFO_PRINTF2(_L("PORTFORMATTYPE nIndex: %X"), omxVideoParamPortForType2.nIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   164
	INFO_PRINTF2(_L("PORTFORMATTYPE nPortIndex: %X"), omxVideoParamPortForType2.nPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   165
	INFO_PRINTF2(_L("PORTFORMATTYPE nSize: %X"), omxVideoParamPortForType2.nSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   166
	INFO_PRINTF2(_L("PORTFORMATTYPE nVersion: %X"), omxVideoParamPortForType2.nVersion);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   167
	INFO_PRINTF2(_L("PORTFORMATTYPE eCompressionFormat: %X"), omxVideoParamPortForType2.eCompressionFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   168
	INFO_PRINTF2(_L("PORTFORMATTYPE eColorFormat: %X"), omxVideoParamPortForType2.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   169
	INFO_PRINTF2(_L("PORTFORMATTYPE xFramerate: %X"), omxVideoParamPortForType2.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   170
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   171
	omxVideoParamPortForType2.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   172
	omxVideoParamPortForType2.eColorFormat = OMX_COLOR_Format12bitRGB444;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   173
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   174
	// Attempt to set bad paramaters
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   175
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamPortForType2,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   176
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   177
	OMX_INDEXTYPE videosurfaceconfigindex = OMX_IndexMax;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   178
	const char tempconfig [] = "OMX.BRIAN.INDEX.PARAM.VIDEO.GFX.SURFACECONFIG";
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   179
	iError = iGraphicSinkCompHandle->GetExtensionIndex(iGraphicSinkCompHandle, const_cast<char*>(tempconfig), &videosurfaceconfigindex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   180
	if(OMX_ErrorUnsupportedIndex != iError)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   181
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   182
		INFO_PRINTF1(_L("OMX_GetExtensionIndex Failed"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   183
		SetTestStepError(PrintOmxError(iError));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   184
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   185
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   186
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   187
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   188
	SendCommand(iGraphicSinkCompHandle,OMX_CommandStateSet,OMX_StateExecuting,0,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   189
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   190
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   191
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   192
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   193
COmxGsTest0001Step00::~COmxGsTest0001Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   194
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   195
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   196
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   197
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   198
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   199
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   200
COmxGsTest0001Step00::COmxGsTest0001Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   201
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   202
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   203
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   204
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   205
	SetTestStepName(KOmxGsTest0001Step00);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   206
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   207
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   208
TVerdict COmxGsTest0001Step00::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   209
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   210
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   211
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   212
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   213
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   214
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   215
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   216
	TInt err;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   217
	TVerdict result = EFail;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   218
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   219
	TRAP(err, result = DoGSCompAllocTestL());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   220
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   221
	if ((err != KErrNoMemory ))
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   222
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   223
		INFO_PRINTF1(_L("Alloc testing completed successfully"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   224
		result = EPass;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   225
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   226
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   227
	SetTestStepError(err);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   228
	SetTestStepResult(result);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   229
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   230
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   231
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   232
COmxGsTest0001Step02::~COmxGsTest0001Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   233
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   234
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   235
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   236
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   237
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   238
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   239
COmxGsTest0001Step02::COmxGsTest0001Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   240
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   241
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   242
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   243
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   244
	SetTestStepName(KOmxGsTest0001Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   245
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   246
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   247
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   248
TVerdict COmxGsTest0001Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   249
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   250
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   251
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   252
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   253
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   254
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   255
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   256
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   257
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   258
	// Set Framerate and confirm OMX error
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   259
	// Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   260
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   261
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortOutput; 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   262
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   263
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamOutput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   264
	// framerate is always 0 for gfx component.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   265
	const OMX_U32 setParam = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   266
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   267
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   268
	* Set the Framerate with the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   269
	* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   270
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   271
	omxParamPortInput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   272
	omxParamPortInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   273
	omxParamPortInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   274
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   275
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   276
	// initial settings
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   277
	omxParamPortInput.format.video.nFrameWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   278
    omxParamPortInput.format.video.nFrameHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   279
    omxParamPortInput.format.video.nStride = 320*2;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   280
    omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   281
    omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   282
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   283
    // for test
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   284
    omxParamPortInput.format.video.xFramerate = 35;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   285
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   286
	// Test Framerate in the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   287
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   288
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   289
	omxParamPortOutput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   290
	omxParamPortOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   291
	omxParamPortOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   292
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   293
	CompareU32Param(setParam, omxParamPortOutput.format.video.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   294
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   295
	// Test Framerate in the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   296
	omxVideoParamOutput.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   297
	omxVideoParamOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   298
	omxVideoParamOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   299
	omxVideoParamOutput.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   300
	omxVideoParamOutput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   301
	omxVideoParamOutput.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   302
	omxVideoParamOutput.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   303
	// by using getparameter with OMX_VIDEO_PARAM_PORTFORMATTYPE, test client specifies all fields including framerate.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   304
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   305
	CompareU32Param(setParam, omxVideoParamOutput.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   306
	omxVideoParamOutput.xFramerate = 45;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   307
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   308
	omxVideoParamOutput.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   309
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   310
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   311
	* Set the Framerate with the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   312
	* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   313
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   314
	omxVideoParamInput.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   315
	omxVideoParamInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   316
	omxVideoParamInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   317
	omxVideoParamInput.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   318
	omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   319
	omxVideoParamInput.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   320
	omxVideoParamInput.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   321
	// by using getparameter with OMX_VIDEO_PARAM_PORTFORMATTYPE, test client specifies all fields including framerate.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   322
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   323
	omxVideoParamInput.xFramerate = 45;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   324
	// Test Framerate in the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   325
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   326
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   327
	CompareU32Param(setParam, omxVideoParamOutput.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   328
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   329
	// Test Framerate in the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   330
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   331
	CompareU32Param(setParam, omxParamPortOutput.format.video.xFramerate);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   332
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   333
	// Negative SetParamater test with OMX_SymbianIndexParamVideoGFXSurfaceConfig
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   334
	iError = OMX_SetParameter(iGraphicSinkCompHandle, iSurfaceConfigExt,&omxVideoParamInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   335
	// TBD is OMX_ErrorUnsupportedIndex really the correct error code?
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   336
	if (OMX_ErrorUnsupportedIndex != iError)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   337
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   338
		SetTestStepError(PrintOmxError(iError));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   339
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   340
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   341
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   342
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   343
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   344
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   345
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   346
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   347
COmxGsTest0001Step03::~COmxGsTest0001Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   348
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   349
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   350
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   351
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   352
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   353
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   354
COmxGsTest0001Step03::COmxGsTest0001Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   355
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   356
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   357
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   358
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   359
	SetTestStepName(KOmxGsTest0001Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   360
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   361
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   362
TVerdict COmxGsTest0001Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   363
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   364
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   365
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   366
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   367
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   368
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   369
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   370
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   371
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   372
	// Set Framesize and confirm
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   373
	// Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   374
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   375
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortOutput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   376
	OMX_U32 setParamHeight;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   377
	OMX_U32 setParamWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   378
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   379
	for (TInt i = 1; i <= 50; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   380
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   381
		/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   382
		* Set the Framsize with the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   383
		* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   384
		*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   385
		omxParamPortInput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   386
		omxParamPortInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   387
		omxParamPortInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   388
		GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   389
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   390
		omxParamPortInput.format.video.nFrameHeight = 10 * i;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   391
		omxParamPortInput.format.video.nFrameWidth = 10 * i;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   392
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   393
		omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   394
		TInt bytesPerPixel = COmxILMMBuffer::BytesPerPixel(omxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   395
		TInt stride = bytesPerPixel * omxParamPortInput.format.video.nFrameWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   396
		omxParamPortInput.format.video.nStride = stride;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   397
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   398
		setParamHeight = omxParamPortInput.format.video.nFrameHeight;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   399
		setParamWidth = omxParamPortInput.format.video.nFrameWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   400
		// Test Framsize in the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   401
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   402
		// INFO_PRINTF4(_L("i: %d, width: %d, height: %d"),i, omxParamPortInput.format.video.nFrameWidth, omxParamPortInput.format.video.nFrameHeight);	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   403
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   404
		SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   405
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   406
		omxParamPortOutput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   407
		omxParamPortOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   408
		omxParamPortOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   409
		GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   410
		CompareU32Param(setParamHeight, omxParamPortInput.format.video.nFrameHeight);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   411
		CompareU32Param(setParamWidth, omxParamPortInput.format.video.nFrameWidth);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   412
		CompareU32Param(setParamHeight, omxParamPortOutput.format.video.nFrameHeight);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   413
		CompareU32Param(setParamWidth, omxParamPortOutput.format.video.nFrameWidth);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   414
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   415
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   416
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   417
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   418
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   419
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   420
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   421
COmxGsTest0001Step04::~COmxGsTest0001Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   422
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   423
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   424
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   425
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   426
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   427
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   428
COmxGsTest0001Step04::COmxGsTest0001Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   429
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   430
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   431
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   432
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   433
	SetTestStepName(KOmxGsTest0001Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   434
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   435
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   436
TVerdict COmxGsTest0001Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   437
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   438
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   439
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   440
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   441
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   442
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   443
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   444
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   445
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   446
	// Set FrameFormat and confirm
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   447
	// Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   448
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   449
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortOutput; 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   450
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   451
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamOutput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   452
	OMX_COLOR_FORMATTYPE setColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   453
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   454
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   455
	* Set the Frameformat with the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   456
	* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   457
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   458
	omxParamPortInput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   459
	omxParamPortInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   460
	omxParamPortInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   461
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   462
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   463
	   
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   464
    // initial settings
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   465
    omxParamPortInput.format.video.nFrameWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   466
    omxParamPortInput.format.video.nFrameHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   467
    omxParamPortInput.format.video.nStride = 320*2;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   468
    omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   469
    omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   470
    
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   471
	// Store default value should be OMX_COLOR_FormatCbYCrY
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   472
	setColorFormat = omxParamPortInput.format.video.eColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   473
	// Test Framerate in the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   474
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   475
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   476
	omxParamPortOutput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   477
	omxParamPortOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   478
	omxParamPortOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   479
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   480
	CompareCFTParam(setColorFormat, omxParamPortInput.format.video.eColorFormat,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   481
	CompareCFTParam(setColorFormat, omxParamPortOutput.format.video.eColorFormat,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   482
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   483
	// Test Framerate in the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   484
	omxVideoParamOutput.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   485
	omxVideoParamOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   486
	omxVideoParamOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   487
	omxVideoParamOutput.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   488
	// The following 2 values should be over written by the correct ones for this index
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   489
	omxVideoParamOutput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   490
	omxVideoParamOutput.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   491
	omxVideoParamOutput.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   492
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   493
	CompareCFTParam(setColorFormat, omxVideoParamOutput.eColorFormat,OMX_IndexParamVideoPortFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   494
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   495
    // Negative GetParameter test for OMX_VIDEO_PARAM_PORTFORMATTYPE
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   496
    omxVideoParamOutput.nIndex = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   497
    GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNoMore);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   498
    omxVideoParamOutput.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   499
    
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   500
	// Because we only have one valid color format, set color format to unused before next test
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   501
	omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   502
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   503
	//should expect OMX_ErrorUnsupportedSetting when to try changing unsupported pixelformats.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   504
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   505
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   506
	CompareCFTParam(setColorFormat, omxParamPortOutput.format.video.eColorFormat,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   507
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   508
	CompareCFTParam(setColorFormat, omxVideoParamOutput.eColorFormat,OMX_IndexParamVideoPortFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   509
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   510
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   511
	* Set the Frameformat with the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   512
	* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   513
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   514
	// by using getparameter with OMX_VIDEO_PARAM_PORTFORMATTYPE, test client specifies all fields including framerate.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   515
	omxVideoParamInput.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   516
	omxVideoParamInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   517
	omxVideoParamInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   518
	omxVideoParamInput.nIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   519
	// The following 2 values should be over written by the correct ones for this index
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   520
	omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   521
	omxVideoParamInput.eColorFormat = OMX_COLOR_FormatCrYCbY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   522
	omxVideoParamInput.xFramerate = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   523
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   524
	setColorFormat = omxVideoParamInput.eColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   525
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   526
	// Test Framerate in the OMX_VIDEO_PARAM_PORTFORMATTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   527
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   528
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   529
	CompareCFTParam(setColorFormat, omxVideoParamInput.eColorFormat,OMX_IndexParamVideoPortFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   530
	CompareCFTParam(setColorFormat, omxVideoParamOutput.eColorFormat,OMX_IndexParamVideoPortFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   531
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   532
	// Test Framerate in the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   533
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   534
	CompareCFTParam(setColorFormat, omxParamPortOutput.format.video.eColorFormat,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   535
	// Because we only have one valid color format, set color format to unused before next test
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   536
	omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingMPEG4;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   537
	omxVideoParamInput.eColorFormat = OMX_COLOR_FormatUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   538
	// Should expect OMX_ErrorUnsupportedSetting when to try changing unsupported pixelformats.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   539
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   540
	// The failed set paramater should not change the colour value in the component
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   541
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   542
	CompareCFTParam(setColorFormat, omxVideoParamOutput.eColorFormat,OMX_IndexParamVideoPortFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   543
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   544
	CompareCFTParam(setColorFormat, omxParamPortOutput.format.video.eColorFormat,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   545
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   546
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   547
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   548
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   549
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   550
COmxGsTest0001Step05::~COmxGsTest0001Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   551
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   552
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   553
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   554
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   555
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   556
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   557
COmxGsTest0001Step05::COmxGsTest0001Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   558
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   559
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   560
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   561
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   562
	SetTestStepName(KOmxGsTest0001Step05);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   563
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   564
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   565
TVerdict COmxGsTest0001Step05::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   566
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   567
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   568
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   569
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   570
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   571
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   572
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   573
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   574
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   575
	// Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   576
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   577
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortOutput; 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   578
	OMX_U32 setParam;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   579
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   580
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   581
	* Set the Frameformat with the OMX_PARAM_PORTDEFINITIONTYPE struct
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   582
	* Then compares it against other structs to ensure Framerate is updated
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   583
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   584
	omxParamPortInput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   585
	omxParamPortInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   586
	omxParamPortInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   587
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   588
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   589
	omxParamPortOutput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   590
	omxParamPortOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   591
	omxParamPortOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   592
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   593
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   594
	// Confirm default values of buffer count
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   595
	if (omxParamPortInput.nBufferCountMin <= 0)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   596
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   597
		ERR_PRINTF2(_L("Default buffer count minimun is not set correctly: %d"),omxParamPortInput.nBufferCountMin);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   598
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   599
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   600
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   601
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   602
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   603
	if (omxParamPortInput.nBufferCountActual == 0)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   604
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   605
		ERR_PRINTF1(_L("Default Buffer count min is set to 0"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   606
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   607
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   608
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   609
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   610
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   611
	if (omxParamPortInput.nBufferCountActual < omxParamPortInput.nBufferCountMin)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   612
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   613
		ERR_PRINTF2(_L("Default buffer count minimun is not set correctly: %d"),omxParamPortInput.nBufferCountMin);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   614
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   615
		SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   616
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   617
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   618
    
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   619
    // Set nBufferCountActual to below nBufferCountMin
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   620
	omxParamPortInput.nBufferCountActual = omxParamPortInput.nBufferCountMin - 1;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   621
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorBadParameter);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   622
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   623
	for (TInt i = 0; i < 5; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   624
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   625
		// INFO_PRINTF2(_L("COmxGsTest0001Step05::doTestStepL() Increase nBufferCountActual by %d"),i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   626
		omxParamPortInput.nBufferCountActual = omxParamPortInput.nBufferCountMin + i;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   627
		setParam = omxParamPortInput.nBufferCountActual;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   628
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   629
		 // initial settings
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   630
        omxParamPortInput.format.video.nFrameWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   631
        omxParamPortInput.format.video.nFrameHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   632
        omxParamPortInput.format.video.nStride = 320*2;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   633
        omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   634
        omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   635
        
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   636
		SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   637
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   638
		GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   639
		CompareU32Param(setParam, omxParamPortInput.nBufferCountActual);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   640
		CompareU32Param(setParam, omxParamPortOutput.nBufferCountActual);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   641
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   642
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   643
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   644
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   645
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   646
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   647
COmxGsTest0001Step06::~COmxGsTest0001Step06()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   648
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   649
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   650
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   651
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   652
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   653
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   654
COmxGsTest0001Step06::COmxGsTest0001Step06()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   655
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   656
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   657
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   658
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   659
	SetTestStepName(KOmxGsTest0001Step06);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   660
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   661
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   662
TVerdict COmxGsTest0001Step06::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   663
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   664
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   665
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   666
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   667
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   668
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   669
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   670
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   671
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   672
	// Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   673
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   674
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortOutput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   675
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   676
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   677
	* OMX_PARAM_PORTDEFINITIONTYPE::nBufferAlignment
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   678
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   679
	omxParamPortInput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   680
	omxParamPortInput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   681
	omxParamPortInput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   682
	omxParamPortOutput.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   683
	omxParamPortOutput.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   684
	omxParamPortOutput.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   685
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   686
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   687
	// Set values using OMX_PARAM_PORTDEFINITIONTYPE and confirm stride
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   688
	// stride shouldn't be equal to zero. so i=1 .
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   689
	for (TInt i = 1; i < 50; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   690
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   691
        // initial settings
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   692
        omxParamPortInput.format.video.nFrameHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   693
        omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   694
        omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   695
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   696
        // test starts
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   697
		omxParamPortInput.format.video.nFrameWidth = 10 * i;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   698
		TInt bytesPerPixel = COmxILMMBuffer::BytesPerPixel(omxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   699
		TInt stride = bytesPerPixel * omxParamPortInput.format.video.nFrameWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   700
		// The code needs to calculate the stride
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   701
		omxParamPortInput.format.video.nStride = stride;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   702
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   703
		SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   704
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   705
		GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortOutput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   706
 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   707
		if (omxParamPortOutput.format.video.nStride < stride)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   708
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   709
			ERR_PRINTF2(_L("Stride value was not correct: %d"), omxParamPortOutput.format.video.nStride);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   710
			SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   711
			SetTestStepResult(EFail);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   712
			return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   713
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   714
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   715
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   716
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   717
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   718
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   719
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   720
COmxGsTest0001Step07::~COmxGsTest0001Step07()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   721
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   722
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   723
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   724
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   725
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   726
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   727
COmxGsTest0001Step07::COmxGsTest0001Step07()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   728
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   729
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   730
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   731
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   732
	SetTestStepName(KOmxGsTest0001Step07);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   733
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   734
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   735
TVerdict COmxGsTest0001Step07::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   736
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   737
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   738
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   739
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   740
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   741
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   742
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   743
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   744
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   745
    // Declare the structs for Parameter tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   746
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortTypeInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   747
	CreateOmxParamPortDefinitionType(&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   748
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortDefinition;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   749
	CreateOmxParamPortDefinitionType(&omxParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   750
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   751
	// The following tests attempt to set the parameter of the graphics sink component.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   752
	// In each case we call set, which is expected to pass through
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   753
	// the component and return OMX_ErrorNone.  After Get is called we perform a chack that the 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   754
	// structs is updated.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   755
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   756
	// aren't they all read-only fields?
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   757
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   758
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   759
	omxParamPortTypeInput.nBufferCountMin = omxParamPortTypeInput.nBufferCountMin - 1;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   760
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   761
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   762
	CompareU32Param(omxParamPortDefinition.nBufferCountMin, omxParamPortTypeInput.nBufferCountMin );
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   763
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   764
	// nBufferSize is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   765
	omxParamPortTypeInput.nBufferSize = omxParamPortDefinition.nBufferSize + omxParamPortDefinition.nBufferSize;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   766
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   767
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   768
	CompareU32Param(omxParamPortDefinition.nBufferSize,omxParamPortTypeInput.nBufferSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   769
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   770
	omxParamPortTypeInput.nBufferAlignment = 4;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   771
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   772
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   773
	CompareU32Param(omxParamPortDefinition.nBufferAlignment,omxParamPortTypeInput.nBufferAlignment);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   774
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   775
	// nSliceHeight is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   776
	omxParamPortTypeInput.format.video.nSliceHeight = 20;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   777
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   778
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   779
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortDefinition,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   780
	CompareU32Param(omxParamPortDefinition.format.video.nSliceHeight,omxParamPortTypeInput.format.video.nSliceHeight);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   781
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   782
	// bEnabled is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   783
	omxParamPortTypeInput.bEnabled = OMX_FALSE;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   784
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   785
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   786
	CompareBoolParam(omxParamPortTypeInput.bEnabled, omxParamPortDefinition.bEnabled,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   787
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   788
	// bPopulated is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   789
	omxParamPortTypeInput.bPopulated = OMX_TRUE;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   790
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   791
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   792
	CompareBoolParam(omxParamPortTypeInput.bPopulated, omxParamPortDefinition.bPopulated,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   793
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   794
	// bBuffersContiguous is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   795
	omxParamPortTypeInput.bBuffersContiguous = OMX_FALSE;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   796
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   797
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   798
	CompareBoolParam(omxParamPortTypeInput.bBuffersContiguous, omxParamPortDefinition.bBuffersContiguous,OMX_IndexParamPortDefinition);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   799
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   800
	// eDomain is read-only value
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   801
	omxParamPortTypeInput.eDomain = OMX_PortDomainOther;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   802
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   803
	GetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortTypeInput,OMX_ErrorNone);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   804
	CompareU32Param(omxParamPortTypeInput.eDomain, omxParamPortDefinition.eDomain);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   805
	*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   806
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   807
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   808
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   809
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   810
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   811
COmxGsTest0001Step08::~COmxGsTest0001Step08()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   812
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   813
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   814
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   815
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   816
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   817
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   818
COmxGsTest0001Step08::COmxGsTest0001Step08()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   819
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   820
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   821
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   822
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   823
	SetTestStepName(KOmxGsTest0001Step08);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   824
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   825
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   826
TVerdict COmxGsTest0001Step08::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   827
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   828
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   829
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   830
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   831
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   832
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   833
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   834
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   835
	OMX_PARAM_PORTDEFINITIONTYPE omxParamPortInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   836
	OMX_VIDEO_PARAM_PORTFORMATTYPE omxVideoParamInput;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   837
	CreateOmxParamPortDefinitionType(&omxParamPortInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   838
	CreateOmxVideoParamPortFormatType(&omxVideoParamInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   839
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   840
	OMX_COLOR_FORMATTYPE defaultColorFormat = omxParamPortInput.format.video.eColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   841
	if (omxVideoParamInput.eColorFormat != omxParamPortInput.format.video.eColorFormat)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   842
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   843
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   844
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   845
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   846
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   847
	// Traverse the array of colour format to confirm support.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   848
	// The enumeration OMX_COLOR_FORMATTYPE starts at 1 and currently finishes at 43
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   849
	for (TInt i = 1; i < 44; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   850
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   851
		//INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_COLOR_FORMATTYPE(%d)"),i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   852
		omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FORMATTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   853
		omxVideoParamInput.eColorFormat = OMX_COLOR_FORMATTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   854
		omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   855
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   856
        // initial settings
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   857
        omxParamPortInput.format.video.nFrameWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   858
        omxParamPortInput.format.video.nFrameHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   859
        omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   860
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   861
        
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   862
		TInt check = OMX_COLOR_FORMATTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   863
		if(check == OMX_COLOR_Format16bitRGB565 ||			
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   864
			check == OMX_COLOR_FormatYCrYCb ||
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   865
			check == OMX_COLOR_FormatCbYCrY ||
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   866
			check == OMX_COLOR_Format32bitARGB8888)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   867
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   868
			TInt bytesPerPixel = COmxILMMBuffer::BytesPerPixel(omxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   869
			TInt stride = bytesPerPixel * omxParamPortInput.format.video.nFrameWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   870
			omxParamPortInput.format.video.nStride = stride;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   871
			
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   872
			SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   873
			SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   874
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   875
		else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   876
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   877
			SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   878
			SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   879
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   880
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   881
		omxParamPortInput.format.video.eColorFormat = defaultColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   882
		omxVideoParamInput.eColorFormat = defaultColorFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   883
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   884
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   885
	// Set CompressionFormat and confirm
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   886
	OMX_VIDEO_CODINGTYPE defaultCompressionFormat = omxParamPortInput.format.video.eCompressionFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   887
	if (omxVideoParamInput.eCompressionFormat != omxParamPortInput.format.video.eCompressionFormat)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   888
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   889
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   890
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   891
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   892
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   893
	for (TInt i = 1; i < 9; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   894
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   895
		//INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_VIDEO_CODINGTYPE(%d)"),i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   896
		omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CODINGTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   897
		SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   898
		omxParamPortInput.format.video.eCompressionFormat = defaultCompressionFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   899
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   900
		omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CODINGTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   901
		SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   902
		omxVideoParamInput.eCompressionFormat = defaultCompressionFormat;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   903
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   904
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   905
	//INFO_PRINTF1(_L("COmxGsTest0001Step08::doTestStepL(): Set ColorFormat and CompressionFormat"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   906
	for (TInt i = 0; i < 47; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   907
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   908
		//INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_COLOR_FORMATTYPE(%d) using OMX_PARAM_PORTDEFINITIONTYPE"),i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   909
		omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FORMATTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   910
		for (TInt j = 0; j < 9; j++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   911
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   912
			//INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_VIDEO_CODINGTYPE(%d) using OMX_PARAM_PORTDEFINITIONTYPE"),j);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   913
			omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CODINGTYPE(j);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   914
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   915
			if ((i == OMX_COLOR_Format16bitRGB565 || i == OMX_COLOR_FormatYCrYCb || i == OMX_COLOR_FormatCbYCrY || i == OMX_COLOR_Format32bitARGB8888) && j == 0)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   916
				{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   917
				TInt bytesPerPixel = COmxILMMBuffer::BytesPerPixel(omxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   918
				TInt stride = bytesPerPixel * omxParamPortInput.format.video.nFrameWidth;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   919
				omxParamPortInput.format.video.nStride = stride;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   920
				SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   921
				}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   922
			else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   923
				{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   924
				if ((i == 0 && j != 0) || (i != 0 && j == 0)) // If OMX_COLOR_FORMATTYPE set to OMX_VIDEO_CodingUnused error is OMX_ErrorUnsupportedSetting
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   925
					{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   926
					SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   927
					}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   928
				else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   929
					{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   930
					SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   931
					}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   932
				}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   933
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   934
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   935
		INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_COLOR_FORMATTYPE(%d) using OMX_VIDEO_PARAM_PORTFORMATTYPE"),i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   936
		omxVideoParamInput.eColorFormat = OMX_COLOR_FORMATTYPE(i);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   937
		for (TInt j = 0; j < 9; j++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   938
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   939
            //INFO_PRINTF2(_L("COmxGsTest0001Step08::doTestStepL(): Set OMX_VIDEO_CODINGTYPE(%d) using OMX_VIDEO_PARAM_PORTFORMATTYPE"),j);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   940
			omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CODINGTYPE(j);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   941
			// OMX_COLOR_Format16bitRGB565,OMX_COLOR_FormatYCrYCb, OMX_COLOR_FormatCbYCrY
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   942
			if ((i == OMX_COLOR_Format16bitRGB565 || i == OMX_COLOR_FormatYCrYCb || i == OMX_COLOR_FormatCbYCrY || i == OMX_COLOR_Format32bitARGB8888) && j == 0)  
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   943
				{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   944
				SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   945
				}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   946
			else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   947
				{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   948
				if ((i == 0 && j != 0) || (i != 0 && j == 0)) // If OMX_COLOR_FORMATTYPE set to OMX_VIDEO_CodingUnused error is OMX_ErrorUnsupportedSetting
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   949
					{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   950
					SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   951
					}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   952
				else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   953
					{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   954
					SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   955
					}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   956
				}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   957
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   958
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   959
		// Set values back to default
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   960
		omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   961
		omxVideoParamInput.eColorFormat = OMX_COLOR_FormatCbYCrY;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   962
		omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   963
		omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   964
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   965
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   966
	// Set color format and compression format to Unused
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   967
	omxParamPortInput.format.video.eColorFormat = OMX_COLOR_FormatUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   968
	omxVideoParamInput.eColorFormat = OMX_COLOR_FormatUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   969
	omxParamPortInput.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   970
	omxVideoParamInput.eCompressionFormat = OMX_VIDEO_CodingUnused;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   971
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamPortDefinition,&omxParamPortInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   972
	SetParameter(iGraphicSinkCompHandle,OMX_IndexParamVideoPortFormat,&omxVideoParamInput,OMX_ErrorUnsupportedSetting);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   973
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   974
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   975
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   976
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   977
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   978
COmxGsTest0001Step09::~COmxGsTest0001Step09()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   979
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   980
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   981
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   982
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   983
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   984
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   985
COmxGsTest0001Step09::COmxGsTest0001Step09()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   986
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   987
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   988
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   989
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   990
	SetTestStepName(KOmxGsTest0001Step09);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   991
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   992
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   993
TVerdict COmxGsTest0001Step09::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   994
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   995
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   996
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   997
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   998
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
   999
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1000
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1001
	// COmxILMMBuffer::BytesPerPixel(OMX_COLOR_FORMATTYPE)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1002
	for (TInt i = 0; i < 47; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1003
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1004
		TInt bytesPerPixel = 15;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1005
		bytesPerPixel =  COmxILMMBuffer::BytesPerPixel(OMX_COLOR_FORMATTYPE(i));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1006
		if (bytesPerPixel == 15)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1007
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1008
			SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1009
			return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1010
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1011
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1012
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1013
	// COmxILMMBuffer::BytesPerPixel(TUidPixelFormat)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1014
	for (TInt i = 0; i < 50; i++)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1015
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1016
		TInt bytesPerPixel = 15;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1017
		bytesPerPixel =  COmxILMMBuffer::BytesPerPixel(TUidPixelFormat(i));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1018
		if (bytesPerPixel == 15)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1019
			{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1020
			SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1021
			return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1022
			}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1023
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1024
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1025
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1026
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1027
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1028
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1029
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1030
COmxGsTest0002Step01::~COmxGsTest0002Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1031
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1032
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1033
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1034
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1035
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1036
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1037
COmxGsTest0002Step01::COmxGsTest0002Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1038
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1039
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1040
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1041
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1042
	SetTestStepName(KOmxGsTest0002Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1043
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1044
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1045
TVerdict COmxGsTest0002Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1046
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1047
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1048
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1049
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1050
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1051
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1052
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1053
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1054
	CGraphicsSinkTestBase::DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1055
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1056
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1057
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1058
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1059
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1060
COmxGsTest0002Step02::~COmxGsTest0002Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1061
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1062
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1063
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1064
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1065
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1066
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1067
COmxGsTest0002Step02::COmxGsTest0002Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1068
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1069
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1070
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1071
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1072
	SetTestStepName(KOmxGsTest0002Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1073
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1074
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1075
TVerdict COmxGsTest0002Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1076
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1077
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1078
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1079
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1080
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1081
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1082
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1083
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1084
	CGraphicsSinkTestBase::DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1085
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1086
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1087
 	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1088
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1089
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1090
COmxGsTest0002Step03::~COmxGsTest0002Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1091
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1092
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1093
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1094
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1095
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1096
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1097
COmxGsTest0002Step03::COmxGsTest0002Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1098
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1099
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1100
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1101
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1102
	SetTestStepName(KOmxGsTest0002Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1103
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1104
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1105
TVerdict COmxGsTest0002Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1106
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1107
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1108
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1109
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1110
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1111
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1112
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1113
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1114
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1115
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1116
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1117
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1118
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1119
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1120
COmxGsTest0002Step04::~COmxGsTest0002Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1121
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1122
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1123
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1124
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1125
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1126
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1127
COmxGsTest0002Step04::COmxGsTest0002Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1128
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1129
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1130
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1131
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1132
	SetTestStepName(KOmxGsTest0002Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1133
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1134
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1135
TVerdict COmxGsTest0002Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1136
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1137
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1138
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1139
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1140
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1141
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1142
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1143
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1144
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1145
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1146
	// Needed by Allocate buffer
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1147
	TInt bytesPerPixel = COmxILMMBuffer::BytesPerPixel(iOmxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1148
	TInt bufferSize = bytesPerPixel * iOmxParamPortInput.format.video.nFrameWidth * iOmxParamPortInput.format.video.nFrameHeight;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1149
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1150
	AllocateBuffer(iGraphicSinkCompHandle,&iInputBufferHeader,0,NULL,bufferSize,&iInputBufferHeaders,1,OMX_ErrorIncorrectStateOperation);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1151
	iInputBufferHeaders.Reset();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1152
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1153
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1154
 	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1155
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1156
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1157
COmxGsTest0003Step01::~COmxGsTest0003Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1158
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1159
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1160
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1161
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1162
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1163
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1164
COmxGsTest0003Step01::COmxGsTest0003Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1165
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1166
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1167
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1168
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1169
	SetTestStepName(KOmxGsTest0003Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1170
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1171
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1172
TVerdict COmxGsTest0003Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1173
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1174
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1175
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1176
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1177
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1178
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1179
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1180
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1181
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1182
	AllocateCCameraBuf();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1183
	UseBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1184
	if( iError == OMX_ErrorNone ){
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1185
	    StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1186
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1187
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1188
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1189
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1190
COmxGsTest0003Step02::~COmxGsTest0003Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1191
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1192
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1193
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1194
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1195
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1196
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1197
COmxGsTest0003Step02::COmxGsTest0003Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1198
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1199
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1200
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1201
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1202
	SetTestStepName(KOmxGsTest0003Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1203
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1204
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1205
TVerdict COmxGsTest0003Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1206
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1207
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1208
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1209
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1210
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1211
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1212
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1213
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1214
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1215
	AllocateCCameraBuf();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1216
	UseBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1217
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1218
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1219
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1220
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1221
COmxGsTest0003Step03::~COmxGsTest0003Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1222
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1223
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1224
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1225
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1226
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1227
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1228
COmxGsTest0003Step03::COmxGsTest0003Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1229
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1230
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1231
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1232
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1233
	SetTestStepName(KOmxGsTest0003Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1234
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1235
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1236
TVerdict COmxGsTest0003Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1237
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1238
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1239
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1240
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1241
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1242
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1243
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1244
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1245
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1246
	AllocateCCameraBuf();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1247
	UseBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1248
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1249
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1250
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1251
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1252
COmxGsTest0003Step04::~COmxGsTest0003Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1253
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1254
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1255
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1256
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1257
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1258
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1259
COmxGsTest0003Step04::COmxGsTest0003Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1260
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1261
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1262
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1263
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1264
	SetTestStepName(KOmxGsTest0003Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1265
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1266
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1267
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1268
TVerdict COmxGsTest0003Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1269
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1270
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1271
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1272
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1273
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1274
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1275
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1276
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1277
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1278
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1279
	TInt bytesperpixel = COmxILMMBuffer::BytesPerPixel(iOmxParamPortInput.format.video.eColorFormat);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1280
	// Not a true declaration, just used to test UseBuffer
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1281
	iTestChunk.CreateLocal(1024,1024);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1282
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1283
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1284
	// Create local buffer then create iCamBuf from it. Used for coverage
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1285
	COmxILMMBuffer* cameraBuffer = NULL;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1286
	TRAPD(err, cameraBuffer = COmxILMMBuffer::NewL(iTestChunk));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1287
	if(err)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1288
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1289
		ERR_PRINTF1(_L("OOM ERROR"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1290
		SetTestStepError(err);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1291
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1292
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1293
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1294
	/*
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1295
    TRAP(err, iCamBuf = COmxILMMBuffer::CreateL(*cameraBuffer));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1296
    delete cameraBuffer;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1297
    if(err != KErrNone)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1298
        {
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1299
        ERR_PRINTF1(_L("Failed to produce COmxILMMBuffer using COmxILMMBuffer::CreateL()"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1300
        SetTestStepError(err);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1301
        return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1302
        }
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1303
    */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1304
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1305
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1306
    OMX_INDEXTYPE sharedChunkMetadataExtensionIndex;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1307
    // due to chunk extension support in gfx
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1308
    if (OMX_ErrorNone == OMX_GetExtensionIndex(
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1309
            iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1310
         OMX_SYMBIAN_INDEX_CONFIG_SHAREDCHUNKMETADATA_NAME,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1311
         &sharedChunkMetadataExtensionIndex))
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1312
        {
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1313
        // Communicate the shared chunk metadata to the tunnelled
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1314
        // component
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1315
        OMX_SYMBIAN_CONFIG_SHAREDCHUNKMETADATATYPE configSharedChunkMetadata;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1316
        configSharedChunkMetadata.nSize = sizeof(OMX_SYMBIAN_CONFIG_SHAREDCHUNKMETADATATYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1317
        configSharedChunkMetadata.nVersion = TOmxILSpecVersion();            
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1318
        configSharedChunkMetadata.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1319
        configSharedChunkMetadata.nHandleId = iTestChunk.Handle();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1320
        configSharedChunkMetadata.nOwnerThreadId = RThread().Id().Id();            
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1321
        
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1322
        (void) OMX_SetConfig(iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1323
                          sharedChunkMetadataExtensionIndex,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1324
                          &configSharedChunkMetadata);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1325
        }
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1326
    else
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1327
        {
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1328
        ERR_PRINTF1(_L("Failed to set shared chunk meta-data config."));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1329
        SetTestStepError(err);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1330
        return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1331
        }
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1332
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1333
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1334
	iPreviousState = OMX_StateLoaded;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1335
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1336
	// UseBuffer with illegal pointer to the memory buffer area to be used
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1337
	iOmxErrorType = iGraphicSinkCompHandle->UseBuffer(iGraphicSinkCompHandle,&iOutputBufferHeader,0,cameraBuffer,cameraBuffer->Chunk().Size(),0);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1338
	if (OMX_ErrorBadParameter != iOmxErrorType)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1339
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1340
		ERR_PRINTF1(_L("UseBuffer un-expectantly did not return an error"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1341
		SetTestStepError(PrintOmxError(iOmxErrorType));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1342
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1343
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1344
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1345
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1346
	// UseBuffer with illegal buffer size in bytes
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1347
	iOmxErrorType = iGraphicSinkCompHandle->UseBuffer(iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1348
			//&iOutputBufferHeader,0,iCamBuf,0,iCamBuf->Chunk().Base());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1349
	        &iOutputBufferHeader,0,NULL,0,iTestChunk.Base());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1350
	if (OMX_ErrorBadParameter != iOmxErrorType)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1351
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1352
		ERR_PRINTF1(_L("UseBuffer un-expectantly did not return an error"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1353
		SetTestStepError(PrintOmxError(iOmxErrorType));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1354
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1355
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1356
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1357
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1358
	// UseBuffer with illegal pointer to memory buffer and size
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1359
	iOmxErrorType = iGraphicSinkCompHandle->UseBuffer(iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1360
			//&iOutputBufferHeader,0,iCamBuf,0,0);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1361
	        &iOutputBufferHeader,0,NULL,0,NULL);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1362
	if (OMX_ErrorBadParameter != iOmxErrorType)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1363
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1364
		ERR_PRINTF1(_L("UseBuffer un-expectantly did not return an error"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1365
		SetTestStepError(PrintOmxError(iOmxErrorType));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1366
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1367
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1368
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1369
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1370
	// UseBuffer without calling SendCommand
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1371
	iOmxErrorType = iGraphicSinkCompHandle->UseBuffer(iGraphicSinkCompHandle,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1372
			//&iOutputBufferHeader,0,iCamBuf,iCamBuf->Chunk().Size(),iCamBuf->Chunk().Base());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1373
	        &iOutputBufferHeader,0,NULL,iTestChunk.Size(),iTestChunk.Base());
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1374
	if (OMX_ErrorIncorrectStateOperation != iOmxErrorType)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1375
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1376
		ERR_PRINTF1(_L("UseBuffer un-expectantly did not return an error"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1377
		SetTestStepError(PrintOmxError(iOmxErrorType));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1378
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1379
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1380
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1381
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1382
	// UseBuffer with correct parameters
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1383
	SendCommand(iGraphicSinkCompHandle,OMX_CommandStateSet,OMX_StateIdle,0);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1384
/*	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1385
	// change made due to OMXILBufferClass
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1386
	iCamBuf->OffsetInfoArray().Append(0);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1387
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1388
	iOmxErrorType = iGraphicSinkCompHandle->UseBuffer(iGraphicSinkCompHandle,&iInputBufferHeader,
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1389
			0,iCamBuf,iCamBuf->Chunk().Size(),iCamBuf->Chunk().Base() + iCamBuf->OffsetInfoArray()[0]);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1390
	// Confirm UseBuffer returns OMX_ErrorBadParameter
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1391
	if (OMX_ErrorBadParameter != iOmxErrorType)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1392
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1393
		ERR_PRINTF1(_L("UseBuffer returned incorrect error"));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1394
		SetTestStepError(PrintOmxError(iOmxErrorType));
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1395
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1396
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1397
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1398
	// Confirm state unaltered
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1399
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1400
*/
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1401
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1402
	delete cameraBuffer;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1403
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1404
	//iTestChunk.Close();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1405
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1406
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1407
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1408
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1409
COmxGsTest0004Step01::~COmxGsTest0004Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1410
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1411
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1412
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1413
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1414
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1415
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1416
COmxGsTest0004Step01::COmxGsTest0004Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1417
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1418
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1419
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1420
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1421
	SetTestStepName(KOmxGsTest0004Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1422
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1423
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1424
TVerdict COmxGsTest0004Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1425
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1426
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1427
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1428
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1429
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1430
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1431
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1432
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1433
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1434
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1435
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1436
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1437
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1438
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1439
COmxGsTest0004Step02::~COmxGsTest0004Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1440
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1441
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1442
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1443
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1444
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1445
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1446
COmxGsTest0004Step02::COmxGsTest0004Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1447
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1448
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1449
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1450
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1451
	SetTestStepName(KOmxGsTest0004Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1452
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1453
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1454
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1455
TVerdict COmxGsTest0004Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1456
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1457
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1458
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1459
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1460
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1461
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1462
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1463
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1464
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1465
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1466
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1467
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1468
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1469
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1470
COmxGsTest0004Step03::~COmxGsTest0004Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1471
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1472
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1473
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1474
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1475
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1476
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1477
COmxGsTest0004Step03::COmxGsTest0004Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1478
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1479
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1480
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1481
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1482
	SetTestStepName(KOmxGsTest0004Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1483
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1484
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1485
TVerdict COmxGsTest0004Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1486
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1487
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1488
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1489
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1490
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1491
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1492
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1493
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1494
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1495
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1496
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1497
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1498
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1499
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1500
COmxGsTest0004Step04::~COmxGsTest0004Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1501
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1502
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1503
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1504
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1505
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1506
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1507
COmxGsTest0004Step04::COmxGsTest0004Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1508
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1509
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1510
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1511
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1512
	SetTestStepName(KOmxGsTest0004Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1513
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1514
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1515
TVerdict COmxGsTest0004Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1516
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1517
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1518
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1519
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1520
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1521
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1522
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1523
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1524
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1525
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1526
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1527
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1528
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1529
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1530
COmxGsTest0004Step05::~COmxGsTest0004Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1531
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1532
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1533
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1534
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1535
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1536
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1537
COmxGsTest0004Step05::COmxGsTest0004Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1538
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1539
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1540
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1541
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1542
	SetTestStepName(KOmxGsTest0004Step05);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1543
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1544
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1545
TVerdict COmxGsTest0004Step05::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1546
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1547
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1548
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1549
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1550
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1551
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1552
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1553
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1554
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1555
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1556
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1557
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1558
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1559
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1560
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1561
COmxGsTest0004Step06::~COmxGsTest0004Step06()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1562
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1563
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1564
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1565
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1566
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1567
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1568
COmxGsTest0004Step06::COmxGsTest0004Step06()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1569
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1570
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1571
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1572
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1573
	SetTestStepName(KOmxGsTest0004Step06);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1574
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1575
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1576
TVerdict COmxGsTest0004Step06::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1577
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1578
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1579
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1580
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1581
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1582
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1583
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1584
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1585
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1586
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1587
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1588
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1589
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1590
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1591
COmxGsTest0005Step01::~COmxGsTest0005Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1592
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1593
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1594
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1595
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1596
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1597
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1598
COmxGsTest0005Step01::COmxGsTest0005Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1599
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1600
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1601
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1602
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1603
	SetTestStepName(KOmxGsTest0005Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1604
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1605
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1606
TVerdict COmxGsTest0005Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1607
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1608
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1609
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1610
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1611
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1612
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1613
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1614
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1615
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1616
	iDoEmptyBufferDoneLimit = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1617
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1618
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1619
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1620
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1621
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1622
COmxGsTest0005Step02::~COmxGsTest0005Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1623
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1624
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1625
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1626
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1627
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1628
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1629
COmxGsTest0005Step02::COmxGsTest0005Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1630
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1631
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1632
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1633
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1634
	SetTestStepName(KOmxGsTest0005Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1635
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1636
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1637
TVerdict COmxGsTest0005Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1638
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1639
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1640
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1641
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1642
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1643
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1644
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1645
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1646
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1647
	iDoEmptyBufferDoneLimit = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1648
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1649
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1650
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1651
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1652
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1653
COmxGsTest0005Step03::~COmxGsTest0005Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1654
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1655
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1656
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1657
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1658
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1659
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1660
COmxGsTest0005Step03::COmxGsTest0005Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1661
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1662
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1663
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1664
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1665
	SetTestStepName(KOmxGsTest0005Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1666
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1667
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1668
TVerdict COmxGsTest0005Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1669
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1670
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1671
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1672
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1673
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1674
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1675
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1676
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1677
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1678
	iDoEmptyBufferDoneLimit = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1679
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1680
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1681
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1682
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1683
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1684
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1685
COmxGsTest0005Step04::~COmxGsTest0005Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1686
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1687
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1688
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1689
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1690
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1691
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1692
COmxGsTest0005Step04::COmxGsTest0005Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1693
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1694
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1695
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1696
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1697
	SetTestStepName(KOmxGsTest0005Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1698
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1699
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1700
TVerdict COmxGsTest0005Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1701
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1702
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1703
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1704
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1705
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1706
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1707
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1708
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1709
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1710
	iDoEmptyBufferDoneLimit = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1711
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1712
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1713
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1714
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1715
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1716
COmxGsTest0005Step05::~COmxGsTest0005Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1717
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1718
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1719
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1720
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1721
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1722
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1723
COmxGsTest0005Step05::COmxGsTest0005Step05()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1724
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1725
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1726
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1727
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1728
	SetTestStepName(KOmxGsTest0005Step05);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1729
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1730
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1731
TVerdict COmxGsTest0005Step05::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1732
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1733
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1734
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1735
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1736
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1737
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1738
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1739
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1740
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1741
	iDoEmptyBufferDoneLimit = 10;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1742
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1743
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1744
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1745
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1746
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1747
COmxGsTest0006Step01::~COmxGsTest0006Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1748
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1749
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1750
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1751
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1752
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1753
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1754
COmxGsTest0006Step01::COmxGsTest0006Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1755
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1756
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1757
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1758
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1759
	SetTestStepName(KOmxGsTest0006Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1760
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1761
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1762
TVerdict COmxGsTest0006Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1763
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1764
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1765
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1766
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1767
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1768
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1769
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1770
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1771
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1772
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1773
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1774
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1775
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1776
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1777
COmxGsTest0006Step02::~COmxGsTest0006Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1778
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1779
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1780
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1781
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1782
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1783
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1784
COmxGsTest0006Step02::COmxGsTest0006Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1785
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1786
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1787
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1788
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1789
	SetTestStepName(KOmxGsTest0006Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1790
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1791
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1792
TVerdict COmxGsTest0006Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1793
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1794
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1795
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1796
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1797
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1798
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1799
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1800
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1801
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1802
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1803
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1804
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1805
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1806
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1807
COmxGsTest0007Step01::~COmxGsTest0007Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1808
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1809
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1810
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1811
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1812
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1813
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1814
COmxGsTest0007Step01::COmxGsTest0007Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1815
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1816
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1817
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1818
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1819
	SetTestStepName(KOmxGsTest0007Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1820
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1821
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1822
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1823
TVerdict COmxGsTest0007Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1824
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1825
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1826
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1827
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1828
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1829
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1830
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1831
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1832
	iDoEmptyBufferDoneLimit = 8;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1833
	iExecutingToIdle = EFalse;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1834
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1835
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1836
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1837
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1838
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1839
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1840
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1841
COmxGsTest0007Step02::~COmxGsTest0007Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1842
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1843
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1844
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1845
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1846
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1847
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1848
COmxGsTest0007Step02::COmxGsTest0007Step02()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1849
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1850
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1851
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1852
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1853
	SetTestStepName(KOmxGsTest0007Step02);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1854
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1855
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1856
TVerdict COmxGsTest0007Step02::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1857
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1858
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1859
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1860
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1861
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1862
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1863
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1864
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1865
	iDoEmptyBufferDoneLimit = 8;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1866
	iExecutingToIdle = EFalse;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1867
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1868
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1869
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1870
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1871
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1872
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1873
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1874
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1875
COmxGsTest0007Step03::~COmxGsTest0007Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1876
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1877
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1878
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1879
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1880
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1881
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1882
COmxGsTest0007Step03::COmxGsTest0007Step03()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1883
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1884
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1885
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1886
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1887
	SetTestStepName(KOmxGsTest0007Step03);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1888
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1889
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1890
TVerdict COmxGsTest0007Step03::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1891
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1892
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1893
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1894
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1895
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1896
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1897
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1898
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1899
	iDoEmptyBufferDoneLimit = 8;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1900
	iExecutingToIdle = EFalse;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1901
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1902
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1903
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1904
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1905
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1906
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1907
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1908
COmxGsTest0007Step04::~COmxGsTest0007Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1909
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1910
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1911
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1912
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1913
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1914
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1915
COmxGsTest0007Step04::COmxGsTest0007Step04()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1916
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1917
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1918
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1919
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1920
	SetTestStepName(KOmxGsTest0007Step04);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1921
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1922
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1923
TVerdict COmxGsTest0007Step04::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1924
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1925
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1926
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1927
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1928
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1929
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1930
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1931
	GetState(iGraphicSinkCompHandle,&iOmxStateType,OMX_StateLoaded);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1932
	iDoEmptyBufferDoneLimit = 8;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1933
	iExecutingToIdle = EFalse;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1934
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1935
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1936
	AllocateBufferTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1937
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1938
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1939
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1940
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1941
COmxGsTest0008Step01::~COmxGsTest0008Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1942
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1943
 * Destructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1944
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1945
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1946
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1947
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1948
COmxGsTest0008Step01::COmxGsTest0008Step01()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1949
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1950
 * Constructor
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1951
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1952
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1953
	SetTestStepName(KOmxGsTest0008Step01);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1954
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1955
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1956
TVerdict COmxGsTest0008Step01::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1957
/**
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1958
 * @return - TVerdict code
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1959
 * Override of base class pure virtual
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1960
 * Our implementation only gets called if the base class doTestStepPreambleL() did
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1961
 * not leave. That being the case, the current test result value will be EPass.
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1962
 */
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1963
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1964
	// Use set and get config for all different relevant dynamic configurations including negative tests
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1965
	OMX_FRAMESIZETYPE setFrameSize;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1966
	OMX_CONFIG_SCALEFACTORTYPE setScaleFactor;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1967
	OMX_CONFIG_RECTTYPE setRecType;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1968
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1969
	OMX_FRAMESIZETYPE getFrameSize;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1970
	OMX_CONFIG_SCALEFACTORTYPE getScaleFactor;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1971
	OMX_CONFIG_RECTTYPE getRecType;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1972
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1973
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1974
	//Testing OMX_IndexConfigCommonScale
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1975
	setScaleFactor.nSize = sizeof(OMX_CONFIG_SCALEFACTORTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1976
	setScaleFactor.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1977
	setScaleFactor.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1978
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1979
	setScaleFactor.xWidth = 0x10000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1980
	setScaleFactor.xHeight = 0x10000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1981
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1982
	getScaleFactor.nSize = sizeof(OMX_CONFIG_SCALEFACTORTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1983
	getScaleFactor.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1984
	getScaleFactor.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1985
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&getScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1986
	if(setScaleFactor.xWidth != getScaleFactor.xWidth || setScaleFactor.xHeight != getScaleFactor.xHeight)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1987
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1988
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonScale 1 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1989
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1990
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1991
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1992
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1993
	//Code coverage negative testing
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1994
	setScaleFactor.nPortIndex = 1;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1995
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor,OMX_ErrorBadPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1996
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor,OMX_ErrorBadPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1997
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1998
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  1999
	//Testing OMX_IndexConfigCommonScale
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2000
	setScaleFactor.nSize = sizeof(OMX_CONFIG_SCALEFACTORTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2001
	setScaleFactor.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2002
	setScaleFactor.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2003
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2004
	setScaleFactor.xWidth = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2005
	setScaleFactor.xHeight = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2006
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2007
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&setScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2008
	getScaleFactor.nSize = sizeof(OMX_CONFIG_SCALEFACTORTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2009
	getScaleFactor.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2010
	getScaleFactor.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2011
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonScale,&getScaleFactor);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2012
	if(setScaleFactor.xWidth != getScaleFactor.xWidth || setScaleFactor.xHeight != getScaleFactor.xHeight)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2013
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2014
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonScale 2 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2015
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2016
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2017
		}		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2018
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2019
	//Testing OMX_IndexConfigCommonOutputSize
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2020
	setFrameSize.nSize = sizeof(OMX_FRAMESIZETYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2021
	setFrameSize.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2022
	setFrameSize.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2023
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2024
	setFrameSize.nWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2025
	setFrameSize.nHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2026
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2027
	getFrameSize.nSize = sizeof(OMX_FRAMESIZETYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2028
	getFrameSize.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2029
	getFrameSize.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2030
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&getFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2031
	if(setFrameSize.nWidth != getFrameSize.nWidth || setFrameSize.nHeight != getFrameSize.nHeight)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2032
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2033
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonOutputSize 1 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2034
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2035
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2036
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2037
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2038
	//Code coverage negative testing
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2039
	setFrameSize.nPortIndex = 1;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2040
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize,OMX_ErrorBadPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2041
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize,OMX_ErrorBadPortIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2042
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2043
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2044
	//Testing OMX_IndexConfigCommonOutputSize
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2045
	setFrameSize.nSize = sizeof(OMX_FRAMESIZETYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2046
	setFrameSize.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2047
	setFrameSize.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2048
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2049
	setFrameSize.nWidth = 160;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2050
	setFrameSize.nHeight = 120;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2051
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&setFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2052
	getFrameSize.nSize = sizeof(OMX_FRAMESIZETYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2053
	getFrameSize.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2054
	getFrameSize.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2055
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputSize,&getFrameSize);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2056
	if(setFrameSize.nWidth != getFrameSize.nWidth || setFrameSize.nHeight != getFrameSize.nHeight)
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2057
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2058
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonOutputSize 2 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2059
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2060
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2061
		}	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2062
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2063
	//Testing OMX_IndexConfigCommonInputCrop
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2064
	setRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2065
	setRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2066
	setRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2067
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonInputCrop,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2068
	setRecType.nLeft = 0x10000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2069
	setRecType.nTop = 0x10000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2070
	setRecType.nWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2071
	setRecType.nHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2072
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonInputCrop,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2073
	getRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2074
	getRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2075
	getRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2076
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonInputCrop,&getRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2077
	if( setRecType.nLeft != getRecType.nLeft 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2078
		|| setRecType.nTop != getRecType.nTop 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2079
		|| setRecType.nWidth != getRecType.nWidth
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2080
		|| setRecType.nHeight != getRecType.nHeight )
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2081
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2082
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonInputCrop 1 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2083
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2084
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2085
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2086
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2087
	//Testing OMX_IndexConfigCommonOutputCrop
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2088
	setRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2089
	setRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2090
	setRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2091
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputCrop,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2092
	setRecType.nLeft = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2093
	setRecType.nTop = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2094
	setRecType.nWidth = 160;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2095
	setRecType.nHeight = 120;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2096
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputCrop,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2097
	getRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2098
	getRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2099
	getRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2100
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonOutputCrop,&getRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2101
	if( setRecType.nLeft != getRecType.nLeft 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2102
		|| setRecType.nTop != getRecType.nTop 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2103
		|| setRecType.nWidth != getRecType.nWidth
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2104
		|| setRecType.nHeight != getRecType.nHeight )
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2105
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2106
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonOutputCrop 1 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2107
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2108
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2109
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2110
		
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2111
	//Testing OMX_IndexConfigCommonExclusionRect
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2112
	setRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2113
	setRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2114
	setRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2115
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonExclusionRect,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2116
	setRecType.nLeft = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2117
	setRecType.nTop = 0x20000;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2118
	setRecType.nWidth = 320;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2119
	setRecType.nHeight = 240;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2120
	SetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonExclusionRect,&setRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2121
	getRecType.nSize = sizeof(OMX_CONFIG_RECTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2122
	getRecType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2123
	getRecType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2124
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonExclusionRect,&getRecType);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2125
	if( setRecType.nLeft != getRecType.nLeft 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2126
		|| setRecType.nTop != getRecType.nTop 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2127
		|| setRecType.nWidth != getRecType.nWidth
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2128
		|| setRecType.nHeight != getRecType.nHeight )
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2129
		{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2130
		ERR_PRINTF1(_L("COmxGsTest0008Step01::doTestStepL(): OMX_IndexConfigCommonExclusionRect 1 error"));	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2131
		SetTestStepError(KErrGeneral);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2132
		return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2133
		}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2134
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2135
	//Negative GetConfig test
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2136
	OMX_CONFIG_CONTRASTTYPE conContrastType;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2137
	conContrastType.nSize = sizeof(OMX_CONFIG_CONTRASTTYPE);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2138
	conContrastType.nVersion = TOmxILSpecVersion();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2139
	conContrastType.nPortIndex = 0;
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2140
	GetConfig(iGraphicSinkCompHandle,OMX_IndexConfigCommonContrast,&conContrastType,OMX_ErrorUnsupportedIndex);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2141
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2142
	SetTestStepResult(EPass);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2143
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2144
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2145
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2146
COmxGsTest0009Step00::~COmxGsTest0009Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2147
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2148
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2149
 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2150
COmxGsTest0009Step00::COmxGsTest0009Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2151
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2152
	SetTestStepName(KOmxGsTest0009Step00);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2153
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2154
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2155
TVerdict COmxGsTest0009Step00::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2156
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2157
	GetIntFromConfig(ConfigSection(),KMMTestCase,iTestCase);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2158
	GetIntFromConfig(ConfigSection(),KMMTestStep,iTestStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2159
	INFO_PRINTF3(_L("COmxGsTest000%dStep0%d::doTestStepL: State Loaded to Executing transition using AllocateBuffer"),iTestCase,iTestStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2160
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2161
	StartStateTransitionTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2162
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2163
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2164
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2165
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2166
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2167
COmxGsTest0010Step00::~COmxGsTest0010Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2168
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2169
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2170
 
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2171
COmxGsTest0010Step00::COmxGsTest0010Step00()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2172
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2173
	SetTestStepName(KOmxGsTest0010Step00);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2174
	}
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2175
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2176
TVerdict COmxGsTest0010Step00::doTestStepL()
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2177
	{
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2178
	GetIntFromConfig(ConfigSection(),KMMTestCase,iTestCase);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2179
	GetIntFromConfig(ConfigSection(),KMMTestStep,iTestStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2180
	GetIntFromConfig(ConfigSection(),_L("REmptyBufferLimit"),iDoEmptyBufferDoneLimit);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2181
	INFO_PRINTF3(_L("COmxGsTest000%dStep0%d::doTestStepL: Empty Buffer Done using AllocateBuffer"),iTestCase,iTestStep);
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2182
	DoROmxGsTestSetup();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2183
	StartBufferDoneTask();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2184
	
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2185
	StartTimer();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2186
	return TestStepResult();
5d29cba61097 2010wk38_02
hgs
parents:
diff changeset
  2187
	}