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