OSDN Git Service

Update documents for OMX test
authorGarret Pick <pickgr@pv.com>
Mon, 27 Jul 2009 19:29:27 +0000 (12:29 -0700)
committerGarret Pick <pickgr@pv.com>
Mon, 27 Jul 2009 19:29:27 +0000 (12:29 -0700)
68 files changed:
codecs_v2/omx/omx_testapp/doc/omx_decoder_test_app_guide.odt [deleted file]
codecs_v2/omx/omx_testapp/doc/openmax_testapp.doc [deleted file]
codecs_v2/omx/omx_testapp_enc/doc/omx_encoder_test_app_guide.odt [deleted file]
codecs_v2/omx/omx_testapp_enc/doc/openmax_enc_testapp.doc [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_basemultithreadedtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_bufferflagtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_buffertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_componentnametest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_flushtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_parametertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_portcommunicationtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_resourceexhaustiontest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_statetransitiontest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_clockcomponenttest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_incompletestoptest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_invalidinputoutputtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_minpayloadsizetest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_multithreadedtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portbuffersuppliertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portdisableenabletest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_seekingcomponenttest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_tunnelledunittest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_validinputoutputtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_waitforresourcestest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tests.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_trace.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_interfaces.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_linux.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_test.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_win32.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_datametabolismtest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiocapturertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiodecodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioencodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiomixertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiorenderertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryclocktest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryreadertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinarywritertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcameratest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.h [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonaudio.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonimage.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonother.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonvideo.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcomponentroletest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainerdemuxertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainermuxertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimagedecodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimageencodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdivrenderertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideodecodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoencodertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoschedulertest.c [deleted file]
codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/stdcomptest_architecture.doc [deleted file]
doc/omx_decoder_test_app_guide.pdf [new file with mode: 0644]
doc/omx_encoder_test_app_guide.pdf [new file with mode: 0644]

diff --git a/codecs_v2/omx/omx_testapp/doc/omx_decoder_test_app_guide.odt b/codecs_v2/omx/omx_testapp/doc/omx_decoder_test_app_guide.odt
deleted file mode 100644 (file)
index 5ee108c..0000000
Binary files a/codecs_v2/omx/omx_testapp/doc/omx_decoder_test_app_guide.odt and /dev/null differ
diff --git a/codecs_v2/omx/omx_testapp/doc/openmax_testapp.doc b/codecs_v2/omx/omx_testapp/doc/openmax_testapp.doc
deleted file mode 100644 (file)
index 06c5fec..0000000
Binary files a/codecs_v2/omx/omx_testapp/doc/openmax_testapp.doc and /dev/null differ
diff --git a/codecs_v2/omx/omx_testapp_enc/doc/omx_encoder_test_app_guide.odt b/codecs_v2/omx/omx_testapp_enc/doc/omx_encoder_test_app_guide.odt
deleted file mode 100644 (file)
index 197fefb..0000000
Binary files a/codecs_v2/omx/omx_testapp_enc/doc/omx_encoder_test_app_guide.odt and /dev/null differ
diff --git a/codecs_v2/omx/omx_testapp_enc/doc/openmax_enc_testapp.doc b/codecs_v2/omx/omx_testapp_enc/doc/openmax_enc_testapp.doc
deleted file mode 100644 (file)
index 34d300e..0000000
Binary files a/codecs_v2/omx/omx_testapp_enc/doc/openmax_enc_testapp.doc and /dev/null differ
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_basemultithreadedtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_basemultithreadedtest.c
deleted file mode 100644 (file)
index 53bfa19..0000000
+++ /dev/null
@@ -1,957 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_BaseMultiThreadedTest.c
- *  OpenMax IL conformance test - Base Multi Threaded Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-#define TEST_NAME_STRING "BaseMultiThreadedTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-    static char szDesc[256];
-#define NUM_DOMAINS 0x4
-#define OMX_NOPORT 0xfffffffe
-
-    /*
-     *     M A C R O S
-     */
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)      \
-    memset(&(_s_), 0x0, sizeof(_name_));       \
-    (_s_).nSize = sizeof(_name_);              \
-    (_s_).nVersion.s.nVersionMajor = 0x1;      \
-    (_s_).nVersion.s.nVersionMinor = 0x0;      \
-    (_s_).nVersion.s.nRevision = 0x0;          \
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_IF_ERROR(_eError)                \
-    if((eError = _eError) != OMX_ErrorNone){   \
-        goto OMX_CONF_TEST_BAIL;               \
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL( _desc, _eError)\
-{                                              \
-    eError = _eError;                          \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _desc);       \
-    goto OMX_CONF_TEST_BAIL;                   \
-}
-
-#define OMX_CONF_EVENT_HANDLER_ERROR(_nX, _nY, _nZ, _desc)     \
-{                                                              \
-    _nX = _nY + 1;                                             \
-    _nZ = OMX_CONF_BUFFERS_OF_TRAFFIC;                         \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", _desc);               \
-}
-
-#define LIST_CLEAR_ENTRY(_pL, _pB)     \
-    _pB = _pL->pBufHdr;                        \
-    _pL->pBufHdr = NULL;               \
-    _pL = _pL->pNextBuf;
-
-#define LIST_SET_ENTRY(_pL, _pB)\
-{                              \
-    BufferList *_pT = _pL;     \
-    while(_pT && _pT->pBufHdr){        \
-        _pT = _pT->pNextBuf;   \
-    }                          \
-    if(_pT && !_pT->pBufHdr)   \
-        _pT->pBufHdr = _pB;    \
-}
-
-#define WAIT_FOR_STATE_CHANGE(_hH, _eC, _eE, _pC, _bT)                 \
-{                                                                      \
-    OMX_STATETYPE _eS;                                                 \
-    OMX_U32 _nC = 0x0;                                                 \
-    OMX_CONF_BAIL_IF_ERROR(OMX_GetState(_pC->hWComp, &_eS));           \
-    while(_eS != _eC){                                                 \
-       OMX_OSAL_EventReset(_hH);                                       \
-       OMX_OSAL_EventWait(_hH, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &_bT);\
-       OMX_CONF_BAIL_IF_ERROR(OMX_GetState(_pC->hWComp, &_eS));        \
-       if(_nC++ > 5 &&_eS != _eC){                                     \
-           OMX_CONF_StateToString(_eC, szDesc);                        \
-           OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Transition to %s timed out", szDesc);\
-           OMX_CONF_SET_ERROR_BAIL("\n", OMX_ErrorUndefined);          \
-       }                                                               \
-    }                                                                  \
-}
-
-
-    /*
-     *     D E F I N I T I O N S
-     */
-    typedef struct _BufferList BufferList;
-
-    struct _BufferList
-    {
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-        OMX_BUFFERHEADERTYPE *pOrigBufHdr;
-        BufferList *pNextBuf;
-    };
-
-    typedef struct
-    {
-        OMX_U32 nInBuf;
-        OMX_U32 nOutBuf;
-        OMX_U32 nInBufBusy;
-        OMX_U32 nOutBufBusy;
-        OMX_U32 nBufDoneCalls;
-        OMX_BOOL bStop;
-        OMX_STATETYPE eState;
-        OMX_ERRORTYPE eThreadError;
-        OMX_HANDLETYPE hWComp;
-        OMX_HANDLETYPE hStateSetEvent;
-        OMX_HANDLETYPE hFillBufDoneEvent;
-        OMX_HANDLETYPE hEmptyBufDoneEvent;
-        OMX_HANDLETYPE hBufDoneCallsEvent;
-        OMX_HANDLETYPE hThreadEvent;
-        OMX_HANDLETYPE hInLock;
-        OMX_HANDLETYPE hOutLock;
-        BufferList *pInBufferList;
-        BufferList *pOutBufferList;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-    } BaseMultiThreadedTestCtxt;
-
-    typedef enum PortOpType
-    {
-        AllocBuf,
-        OpenFile,
-        CloseFile,
-    } PortOpType;
-
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-    OMX_ERRORTYPE OMX_CONF_ErrorToString(
-        OMX_IN OMX_ERRORTYPE eError,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-
-
-    /*
-     *     F U N C T I O N S
-     */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_EventHandler(OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_EVENTTYPE eEvent,
-            OMX_IN OMX_U32 nData1,
-            OMX_IN OMX_U32 nData2,
-            OMX_IN OMX_PTR pEventData)
-    {
-        BaseMultiThreadedTestCtxt* pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (BaseMultiThreadedTestCtxt*)pAppData;
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pCtxt->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtxt->hStateSetEvent);
-                    break;
-                default:
-                    break;
-            }
-        }
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_EmptyBufferDone(OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        BaseMultiThreadedTestCtxt* pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (BaseMultiThreadedTestCtxt*)pAppData;
-
-        OMX_OSAL_MutexLock(pCtxt->hInLock);
-        if (pBuffer->nInputPortIndex == OMX_NOPORT || pBuffer->nOutputPortIndex != OMX_NOPORT)
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned invalid input buffer\n");
-        }
-        else if (pCtxt->nInBufBusy)
-        {
-            pCtxt->nInBufBusy--;
-            pCtxt->nBufDoneCalls++;
-            LIST_SET_ENTRY(pCtxt->pInBufferList, pBuffer);
-            OMX_OSAL_EventSet(pCtxt->hEmptyBufDoneEvent);
-        }
-        else
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned more input buffers than expected\n");
-        }
-        OMX_OSAL_MutexUnlock(pCtxt->hInLock);
-
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_FillBufferDone(OMX_OUT OMX_HANDLETYPE hComponent,
-            OMX_OUT OMX_PTR pAppData,
-            OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        BaseMultiThreadedTestCtxt* pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (BaseMultiThreadedTestCtxt*)pAppData;
-
-        OMX_OSAL_MutexLock(pCtxt->hOutLock);
-        if (pBuffer->nInputPortIndex != OMX_NOPORT || pBuffer->nOutputPortIndex == OMX_NOPORT)
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nOutBufBusy, pCtxt->nOutBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned invalid output buffer\n");
-        }
-        else if (pCtxt->nOutBufBusy)
-        {
-            pCtxt->nOutBufBusy--;
-            pCtxt->nBufDoneCalls++;
-            LIST_SET_ENTRY(pCtxt->pOutBufferList, pBuffer);
-            OMX_OSAL_EventSet(pCtxt->hFillBufDoneEvent);
-        }
-        else
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nOutBufBusy, pCtxt->nOutBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned more output buffers than expected\n");
-        }
-        OMX_OSAL_MutexUnlock(pCtxt->hOutLock);
-
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_AllocateBuffers(BaseMultiThreadedTestCtxt *pCtxt,
-            OMX_PARAM_PORTDEFINITIONTYPE *pPortDef)
-    {
-        OMX_BUFFERHEADERTYPE *pBufferHdr = NULL;
-        BufferList *pBufferList;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers for port %d\n",
-                       pPortDef->nPortIndex);
-        for (i = 0x0; i < pPortDef->nBufferCountActual; i++)
-        {
-            pBufferList = (BufferList *)OMX_OSAL_Malloc(sizeof(BufferList));
-            if (!pBufferList)
-                OMX_CONF_SET_ERROR_BAIL("Malloc failed\n", OMX_ErrorInsufficientResources);
-
-            OMX_CONF_BAIL_IF_ERROR(OMX_AllocateBuffer(pCtxt->hWComp, &pBufferHdr,
-                                   pPortDef->nPortIndex,
-                                   0, pPortDef->nBufferSize));
-
-            pBufferList->pNextBuf = NULL;
-            pBufferList->pBufHdr = pBufferHdr;
-            pBufferList->pOrigBufHdr = pBufferHdr;
-
-            if (pPortDef->eDir == OMX_DirInput)
-            {
-                if (pBufferHdr->nAllocLen != pPortDef->nBufferSize || !pBufferHdr->pBuffer ||
-                        pBufferHdr->nInputPortIndex != pPortDef->nPortIndex)
-                    OMX_CONF_SET_ERROR_BAIL("Buffer header incorrect\n", OMX_ErrorUndefined);
-
-                pBufferHdr->nOutputPortIndex = OMX_NOPORT;
-                if (pCtxt->pInBufferList == NULL)
-                    pCtxt->pInBufferList = pBufferList;
-                else
-                {
-                    pTemp = pCtxt->pInBufferList;
-                    while (pTemp->pNextBuf)
-                        pTemp = pTemp->pNextBuf;
-                    pTemp->pNextBuf = pBufferList;
-                }
-                pCtxt->nInBuf++;
-            }
-            else
-            {
-                if (pBufferHdr->nAllocLen != pPortDef->nBufferSize || !pBufferHdr->pBuffer ||
-                        pBufferHdr->nOutputPortIndex != pPortDef->nPortIndex)
-                    OMX_CONF_SET_ERROR_BAIL("Buffer header incorrect\n", OMX_ErrorUndefined);
-
-                pBufferHdr->nInputPortIndex = OMX_NOPORT;
-                if (pCtxt->pOutBufferList  == NULL)
-                    pCtxt->pOutBufferList = pBufferList;
-                else
-                {
-                    pTemp = pCtxt->pOutBufferList;
-                    while (pTemp->pNextBuf)
-                        pTemp = pTemp->pNextBuf;
-                    pTemp->pNextBuf = pBufferList;
-                }
-                pCtxt->nOutBuf++;
-            }
-        }
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_DeInitBuffer(BaseMultiThreadedTestCtxt* pCtxt)
-    {
-        BufferList *pBufferListObject;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Free all buffers\n");
-        pTemp = pCtxt->pInBufferList;
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-
-            eError = OMX_FreeBuffer(pCtxt->hWComp, pTemp->pOrigBufHdr->nInputPortIndex,
-                                    pTemp->pOrigBufHdr);
-            if (eError == OMX_ErrorInvalidState)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-            pCtxt->nInBuf--;
-        }
-        pCtxt->pInBufferList = NULL;
-
-        pTemp = pCtxt->pOutBufferList;
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-
-            eError = OMX_FreeBuffer(pCtxt->hWComp, pTemp->pOrigBufHdr->nOutputPortIndex,
-                                    pTemp->pOrigBufHdr);
-            if (eError == OMX_ErrorInvalidState)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-            pCtxt->nOutBuf--;
-        }
-        pCtxt->pOutBufferList = NULL;
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_U32 BaseMultiThreadedTest_StartThread(OMX_PTR pParam)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        BaseMultiThreadedTestCtxt * pCtxt;
-        OMX_HANDLETYPE hTimeout;
-        OMX_BOOL bTimeout;
-        pCtxt = (BaseMultiThreadedTestCtxt *)pParam;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Created new thread for initialization\n");
-        OMX_OSAL_EventCreate(&hTimeout);
-        WAIT_FOR_STATE_CHANGE(hTimeout, OMX_StateLoaded, eError, pCtxt, bTimeout);
-
-        eError = OMX_SendCommand(pCtxt->hWComp, OMX_CommandStateSet, OMX_StateIdle, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_EventSet(pCtxt->hThreadEvent);
-        WAIT_FOR_STATE_CHANGE(hTimeout, OMX_StateIdle, eError, pCtxt, bTimeout);
-
-        eError = OMX_SendCommand(pCtxt->hWComp, OMX_CommandStateSet, OMX_StateExecuting, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-// Following line commented out to fix http://cvs.khronos.org/bugzilla/show_bug.cgi?id=226
-//    WAIT_FOR_STATE_CHANGE(hTimeout, OMX_StateExecuting, eError, pCtxt, bTimeout);
-
-OMX_CONF_TEST_BAIL:
-        OMX_OSAL_EventDestroy(hTimeout);
-        if (eError != OMX_ErrorNone)
-        {
-            pCtxt->eThreadError = eError;
-            OMX_CONF_ErrorToString(eError, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Start thread failed with %s\n", szDesc);
-        }
-        return 0;
-    }
-
-
-    /*****************************************************************************/
-    OMX_U32 BaseMultiThreadedTest_StopThread(OMX_PTR pParam)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        BaseMultiThreadedTestCtxt * pCtxt;
-        OMX_HANDLETYPE hTimeout;
-        OMX_BOOL bTimeout;
-        pCtxt = (BaseMultiThreadedTestCtxt *)pParam;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Created new thread for stopping\n");
-        OMX_OSAL_EventCreate(&hTimeout);
-        WAIT_FOR_STATE_CHANGE(hTimeout, OMX_StateExecuting, eError, pCtxt, bTimeout);
-
-        eError = OMX_SendCommand(pCtxt->hWComp, OMX_CommandStateSet, OMX_StateIdle, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        pCtxt->bStop = OMX_TRUE;
-        OMX_OSAL_EventSet(pCtxt->hThreadEvent);
-// Following line commented out to fix http://cvs.khronos.org/bugzilla/show_bug.cgi?id=226
-//   WAIT_FOR_STATE_CHANGE(hTimeout, OMX_StateIdle, eError, pCtxt, bTimeout);
-
-OMX_CONF_TEST_BAIL:
-        OMX_OSAL_EventDestroy(hTimeout);
-        if (eError != OMX_ErrorNone)
-        {
-            pCtxt->eThreadError = eError;
-            OMX_CONF_ErrorToString(eError, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Stop thread failed with %s\n", szDesc);
-        }
-        return 0;
-    }
-
-    /*****************************************************************************/
-    OMX_U32 BaseMultiThreadedTest_ReadOutBuffers(OMX_PTR pParam)
-    {
-        BufferList * pList;
-        OMX_BOOL bTimeout = OMX_FALSE;
-        OMX_BUFFERHEADERTYPE *pBufHeader = NULL;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        BaseMultiThreadedTestCtxt * pCtxt;
-        pCtxt = (BaseMultiThreadedTestCtxt *)pParam;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Created new thread for output processing\n");
-        do
-        {
-            OMX_OSAL_EventReset(pCtxt->hFillBufDoneEvent);
-            pList = pCtxt->pOutBufferList;
-            while (pList && pList->pBufHdr && pCtxt->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC)
-            {
-                OMX_OSAL_MutexLock(pCtxt->hOutLock);
-                pCtxt->nOutBufBusy++;
-                LIST_CLEAR_ENTRY(pList, pBufHeader);
-                OMX_OSAL_MutexUnlock(pCtxt->hOutLock);
-                OMX_CONF_BAIL_IF_ERROR(OMX_FillThisBuffer(pCtxt->hWComp, pBufHeader));
-            }
-            if (bTimeout == OMX_TRUE)
-                OMX_CONF_SET_ERROR_BAIL("No Out buffers being processed\n", OMX_ErrorTimeout);
-            OMX_OSAL_EventWait(pCtxt->hFillBufDoneEvent,
-                               OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        }
-        while (pCtxt->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC);
-
-OMX_CONF_TEST_BAIL:
-        if (eError != OMX_ErrorNone)
-        {
-            if (pCtxt->bStop && eError == OMX_ErrorIncorrectStateOperation)
-            {
-                /* Expected behavior; fix the list */
-                eError = OMX_ErrorNone;
-                OMX_OSAL_MutexLock(pCtxt->hOutLock);
-                pCtxt->nOutBufBusy--;
-                LIST_SET_ENTRY(pCtxt->pOutBufferList, pBufHeader);
-                OMX_OSAL_MutexUnlock(pCtxt->hOutLock);
-            }
-            OMX_CONF_ErrorToString(eError, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Output thread failed with %s\n", szDesc);
-            pCtxt->nBufDoneCalls = OMX_CONF_BUFFERS_OF_TRAFFIC;
-            pCtxt->eThreadError = eError;
-        }
-        return 0;
-    }
-
-    /*****************************************************************************/
-    OMX_U32 BaseMultiThreadedTest_WriteInBuffers(OMX_PTR pParam)
-    {
-        BufferList * pList;
-        OMX_BOOL bTimeout = OMX_FALSE;
-        OMX_BUFFERHEADERTYPE *pBufHeader = NULL;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        BaseMultiThreadedTestCtxt * pCtxt;
-        pCtxt = (BaseMultiThreadedTestCtxt *)pParam;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Created new thread for input processing\n");
-        do
-        {
-            OMX_OSAL_EventReset(pCtxt->hEmptyBufDoneEvent);
-            pList = pCtxt->pInBufferList;
-            while (pList && pList->pBufHdr && pCtxt->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC)
-            {
-                OMX_OSAL_MutexLock(pCtxt->hInLock);
-                pCtxt->nInBufBusy++;
-                LIST_CLEAR_ENTRY(pList, pBufHeader);
-                OMX_OSAL_MutexUnlock(pCtxt->hInLock);
-                pBufHeader->nFilledLen = OMX_OSAL_ReadFromInputFile(pBufHeader->pBuffer,
-                                         pBufHeader->nAllocLen, pBufHeader->nInputPortIndex);
-                if (pBufHeader->nFilledLen != pBufHeader->nAllocLen)
-                {
-                    pBufHeader->nFlags |= OMX_BUFFERFLAG_EOS;
-                    pCtxt->nBufDoneCalls = OMX_CONF_BUFFERS_OF_TRAFFIC;
-                }
-                OMX_CONF_BAIL_IF_ERROR(OMX_EmptyThisBuffer(pCtxt->hWComp, pBufHeader));
-            }
-            if (bTimeout == OMX_TRUE)
-                OMX_CONF_SET_ERROR_BAIL("No In buffers being processed\n", OMX_ErrorTimeout);
-            OMX_OSAL_EventWait(pCtxt->hEmptyBufDoneEvent,
-                               OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        }
-        while (pCtxt->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC);
-
-OMX_CONF_TEST_BAIL:
-        if (eError != OMX_ErrorNone)
-        {
-            if (pCtxt->bStop && eError == OMX_ErrorIncorrectStateOperation)
-            {
-                /* Expected behavior; fix the list */
-                eError = OMX_ErrorNone;
-
-                OMX_OSAL_MutexLock(pCtxt->hInLock);
-                pCtxt->nInBufBusy--;
-                LIST_SET_ENTRY(pCtxt->pInBufferList, pBufHeader);
-                OMX_OSAL_MutexUnlock(pCtxt->hInLock);
-            }
-            OMX_CONF_ErrorToString(eError, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Input thread failed with %s\n", szDesc);
-            pCtxt->nBufDoneCalls = OMX_CONF_BUFFERS_OF_TRAFFIC;
-            pCtxt->eThreadError = eError;
-        }
-        return 0;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_OperateOnPorts(BaseMultiThreadedTestCtxt* pCtxt, PortOpType eOp)
-    {
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 i, j;
-
-        for (j = 0; j < NUM_DOMAINS; j++)
-        {
-            for (i = pCtxt->sPortParam[j].nStartPortNumber;
-                    i < pCtxt->sPortParam[j].nStartPortNumber + pCtxt->sPortParam[j].nPorts; i++)
-            {
-
-                OMX_CONF_INIT_STRUCT(sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDef.nPortIndex = i;
-                OMX_CONF_BAIL_IF_ERROR(OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamPortDefinition ,
-                                                        (OMX_PTR)&sPortDef));
-                switch (eOp)
-                {
-                    case AllocBuf:
-                        if (0x0 == sPortDef.nBufferCountMin || sPortDef.nBufferCountMin > sPortDef.nBufferCountActual)
-                        {
-                            OMX_CONF_SET_ERROR_BAIL("PortDefinition nBufferCount incorrect\n", OMX_ErrorUndefined);
-                        }
-                        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_AllocateBuffers(pCtxt, &sPortDef));
-                        break;
-
-                    case OpenFile:
-                        /* set buffercount actual */
-                        if (0x0 == sPortDef.nBufferCountMin || sPortDef.nBufferCountMin > sPortDef.nBufferCountActual)
-                        {
-                            OMX_CONF_SET_ERROR_BAIL("PortDefinition nBufferCount incorrect\n", OMX_ErrorUndefined);
-                        }
-                        sPortDef.nBufferCountActual = sPortDef.nBufferCountMin + 1;
-                        OMX_CONF_BAIL_IF_ERROR(OMX_SetParameter(pCtxt->hWComp, OMX_IndexParamPortDefinition,
-                                                                (OMX_PTR)&sPortDef));
-                        /* open files for input ports */
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Opened input file for port %d\n", i);
-                            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_OpenInputFile(i));
-                        }
-                        break;
-
-                    case CloseFile:
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_CloseInputFile(i));
-                        }
-                        break;
-
-                    default:
-                        eError = OMX_ErrorBadParameter;
-                }
-            }
-        }
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_TransitionWait(OMX_STATETYPE eToState,
-            BaseMultiThreadedTestCtxt* pCtxt)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout = OMX_FALSE;
-
-        OMX_OSAL_EventReset(pCtxt->hStateSetEvent);
-        eError = OMX_SendCommand(pCtxt->hWComp, OMX_CommandStateSet, eToState, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        if (eToState == OMX_StateIdle && (pCtxt->eState == OMX_StateLoaded))
-        {
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_OperateOnPorts(pCtxt, AllocBuf));
-        }
-        else if (eToState == OMX_StateLoaded && pCtxt->eState == OMX_StateIdle)
-        {
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_DeInitBuffer(pCtxt));
-        }
-
-        OMX_OSAL_EventWait(pCtxt->hStateSetEvent,
-                           OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL("Transition timed out\n", OMX_ErrorUndefined);
-
-        if (pCtxt->eState != eToState)
-            OMX_CONF_SET_ERROR_BAIL("Incorrect transition\n", OMX_ErrorUndefined);
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BaseMultiThreadedTest_TransmitTest(BaseMultiThreadedTestCtxt* pCtxt,
-            OMX_BOOL bInit, OMX_BOOL bClose)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hInThread, hOutThread;
-        OMX_BOOL bTimeout;
-
-        hInThread = hOutThread = 0;
-
-        if (bInit)
-        {
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_OperateOnPorts(pCtxt, OpenFile));
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransitionWait(OMX_StateIdle, pCtxt));
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransitionWait(OMX_StateExecuting, pCtxt));
-        }
-
-        if (pCtxt->nOutBuf)
-            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadCreate(BaseMultiThreadedTest_ReadOutBuffers, (OMX_PTR)pCtxt, 0, &hOutThread));
-        if (pCtxt->nInBuf)
-            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadCreate(BaseMultiThreadedTest_WriteInBuffers, (OMX_PTR)pCtxt, 0, &hInThread));
-
-        if (bClose)
-        {
-            /* process buffers */
-            while (pCtxt->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC)
-            {
-                OMX_OSAL_EventReset(pCtxt->hBufDoneCallsEvent);
-                OMX_OSAL_EventWait(pCtxt->hBufDoneCallsEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-            }
-
-            if (pCtxt->nOutBuf)
-                OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadDestroy(hOutThread));
-            if (pCtxt->nInBuf)
-                OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadDestroy(hInThread));
-
-            if (pCtxt->eThreadError)
-            {
-                OMX_CONF_SET_ERROR_BAIL("Exiting due to prior errors\n", OMX_ErrorUndefined);
-            }
-
-            if (!pCtxt->bStop)
-                OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransitionWait(OMX_StateIdle, pCtxt));
-
-            /* wait for all buffers to be returned */
-            while (pCtxt->nInBufBusy)
-            {
-                OMX_OSAL_EventReset(pCtxt->hEmptyBufDoneEvent);
-                OMX_OSAL_EventWait(pCtxt->hEmptyBufDoneEvent,
-                                   OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL("All In buffers not returned\n", OMX_ErrorUndefined);
-                }
-            }
-            while (pCtxt->nOutBufBusy)
-            {
-                OMX_OSAL_EventReset(pCtxt->hFillBufDoneEvent);
-                OMX_OSAL_EventWait(pCtxt->hFillBufDoneEvent,
-                                   OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL("All Out buffers not returned\n", OMX_ErrorUndefined);
-                }
-            }
-
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransitionWait(OMX_StateLoaded, pCtxt));
-            OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_OperateOnPorts(pCtxt, CloseFile));
-        }
-        pCtxt->nBufDoneCalls = 0;
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_BaseMultiThreadedTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0;
-        OMX_CALLBACKTYPE sCallbacks;
-        BaseMultiThreadedTestCtxt sCtxt;
-        OMX_HANDLETYPE hWrappedComp = 0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        OMX_HANDLETYPE hStartThread, hStopThread;
-        OMX_BOOL bTimeout;
-        BaseMultiThreadedTestCtxt *pCtxt;
-        pCtxt = &sCtxt;
-        memset(pCtxt, 0x0, sizeof(BaseMultiThreadedTestCtxt));
-
-        sCallbacks.EventHandler    =  BaseMultiThreadedTest_EventHandler;
-        sCallbacks.EmptyBufferDone =  BaseMultiThreadedTest_EmptyBufferDone;
-        sCallbacks.FillBufferDone  =  BaseMultiThreadedTest_FillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&sCallbacks, (OMX_PTR)pCtxt, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtxt->hStateSetEvent);
-        OMX_OSAL_EventReset(pCtxt->hStateSetEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hFillBufDoneEvent);
-        OMX_OSAL_EventReset(pCtxt->hFillBufDoneEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hEmptyBufDoneEvent);
-        OMX_OSAL_EventReset(pCtxt->hEmptyBufDoneEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hThreadEvent);
-        OMX_OSAL_EventReset(pCtxt->hThreadEvent);
-        OMX_OSAL_MutexCreate(&pCtxt->hInLock);
-        OMX_OSAL_MutexCreate(&pCtxt->hOutLock);
-        OMX_OSAL_EventCreate(&pCtxt->hBufDoneCallsEvent);
-        OMX_OSAL_EventReset(pCtxt->hBufDoneCallsEvent);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData,
-                                             pWrappedCallbacks));
-        OMX_CONF_BAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName,
-                               &hWrappedComp));
-        pCtxt->hWComp = hWrappedComp;
-
-        /* Verify start in Loaded state */
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pCtxt->hWComp, &pCtxt->eState));
-        if (pCtxt->eState != OMX_StateLoaded)
-            OMX_CONF_SET_ERROR_BAIL("Component not in loaded state at init\n", OMX_ErrorUndefined);
-
-        /* detect all audio ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamAudioInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtxt->sPortParam[0].nPorts, pCtxt->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamVideoInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtxt->sPortParam[1].nPorts, pCtxt->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamImageInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtxt->sPortParam[2].nPorts, pCtxt->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamOtherInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtxt->sPortParam[3].nPorts, pCtxt->sPortParam[3].nStartPortNumber);
-
-        /* 3.7.1. Buffer processing in a separate thread */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Buffer processing in separate thread\n");
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransmitTest(pCtxt, OMX_TRUE, OMX_TRUE));
-
-        /* 3.7.2. Initialization from 2 threads */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Initialization from 2 threads\n");
-
-        /* open input file for each input port*/
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_OperateOnPorts(pCtxt, OpenFile));
-
-        /* create a separate initialization thread */
-        OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadCreate(BaseMultiThreadedTest_StartThread,
-                               (OMX_PTR)pCtxt, 0, &hStartThread));
-
-        /* wait for initialization thread to send idle command */
-        OMX_OSAL_EventWait(pCtxt->hThreadEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL("Wait for cmd idle timed out\n", OMX_ErrorUndefined);
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-        /* allocate buffers */
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_OperateOnPorts(pCtxt, AllocBuf));
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-        /* wait for initialization thread to put component in execute state */
-        WAIT_FOR_STATE_CHANGE(pCtxt->hThreadEvent, OMX_StateExecuting, eError, pCtxt, bTimeout);
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-        /* do normal buffer processing */
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransmitTest(pCtxt, OMX_FALSE, OMX_TRUE));
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadDestroy(hStartThread));
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-        /* 3.7.3. Start and Stop in differemt threads */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Start and stop in differemt threads\n");
-        OMX_OSAL_EventReset(pCtxt->hThreadEvent);
-
-        /* do normal buffer processing */
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransmitTest(pCtxt, OMX_TRUE, OMX_FALSE));
-
-        /* proces atleast half the buffers */
-        while (pCtxt->nBufDoneCalls < (OMX_CONF_BUFFERS_OF_TRAFFIC >> 1))
-        {
-            OMX_OSAL_EventReset(pCtxt->hBufDoneCallsEvent);
-            OMX_OSAL_EventWait(pCtxt->hBufDoneCallsEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        }
-
-        /* create a separate thread to send idle command */
-        OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadCreate(BaseMultiThreadedTest_StopThread,
-                               (OMX_PTR)pCtxt, 0, &hStopThread));
-
-        /* wait for stop thread to send idle command */
-        OMX_OSAL_EventWait(pCtxt->hThreadEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL("Wait for cmd idle timed out\n", OMX_ErrorUndefined);
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-        /* wrap up buffer processing */
-        WAIT_FOR_STATE_CHANGE(pCtxt->hThreadEvent, OMX_StateIdle, eError, pCtxt, bTimeout);
-        OMX_CONF_BAIL_IF_ERROR(BaseMultiThreadedTest_TransmitTest(pCtxt, OMX_FALSE, OMX_TRUE));
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_ThreadDestroy(hStopThread));
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eThreadError);
-
-OMX_CONF_TEST_BAIL:
-        /* cleanup: return function errors rather than closing errors if appropriate */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Cleanup\n");
-
-        if (OMX_ErrorNone == eError)
-        {
-            if (hWrappedComp)
-            {
-                eError = OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                eError = OMX_FreeHandle(hComp);
-            }
-            eError = OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-
-            eError = OMX_Deinit();
-        }
-        else
-        {
-            BaseMultiThreadedTest_TransitionWait(OMX_StateInvalid, pCtxt);
-            BaseMultiThreadedTest_DeInitBuffer(pCtxt);
-
-            if (hWrappedComp)
-            {
-                OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                OMX_FreeHandle(hComp);
-            }
-            OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-            OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtxt->hStateSetEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hFillBufDoneEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hEmptyBufDoneEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hThreadEvent);
-        OMX_OSAL_MutexDestroy(pCtxt->hInLock);
-        OMX_OSAL_MutexDestroy(pCtxt->hOutLock);
-        OMX_OSAL_EventDestroy(pCtxt->hBufDoneCallsEvent);
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_bufferflagtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_bufferflagtest.c
deleted file mode 100644 (file)
index 6555ae0..0000000
+++ /dev/null
@@ -1,1456 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_BufferFlagTest.c
- *  OpenMax IL conformance test - Buffer Flag Test
- */
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-
-#define TEST_NAME_STRING "BufferFlagTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-#define TEST_NUM_BUFFERS_TO_PROCESS 100
-
-#define NUM_DOMAINS 0x4
-
-    static char szDesc[256];
-    static char szState[256];
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL
-
-#define OMX_CONF_WAIT_STATE(_p_, _s_, _e_)\
-{\
-    OMX_BOOL _bTimeout_;\
-    OMX_OSAL_EventWait((_p_)->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &_bTimeout_);\
-    if (OMX_TRUE == _bTimeout_)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "State transition to %s never occured\n", szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-    _e_ = OMX_GetState((_p_)->hWrappedComp, &(_p_)->eState);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_s_ != (_p_)->eState)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_CONF_StateToString((_p_)->eState, szDesc);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "OMX_GetState reported %s, expecting %s\n",\
-                       szDesc, szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-}
-
-#define OMX_CONF_SET_STATE(_p_, _s_, _e_)\
-{\
-    OMX_CONF_StateToString(_s_, szState);\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to %s\n", szState);\
-    OMX_OSAL_EventReset((_p_)->hStateChangeEvent);\
-    _e_ = OMX_SendCommand((_p_)->hWrappedComp, OMX_CommandStateSet, _s_, 0x0);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-}
-
-#define OMX_CONF_SET_STATE_AND_WAIT(_p_, _s_, _e_)\
-    OMX_CONF_SET_STATE(_p_, _s_, _e_);\
-    OMX_CONF_WAIT_STATE(_p_, _s_, _e_)
-
-#define Q_ALLOC(_p_, _n_)\
-    _p_ = (QTYPE*)OMX_OSAL_Malloc(sizeof(QTYPE) + (sizeof(OMX_PTR) * (_n_ + 1)));\
-    if (0x0 != _p_)\
-    {\
-        _p_->nNumEntries = _n_;\
-        _p_->nEnd = 0;\
-        _p_->nStart = 0;\
-        _p_->nInQueue = 0;\
-    }
-
-#define Q_FREE(_p_)\
-    if (0x0 != _p_)\
-    {\
-        OMX_OSAL_Free(_p_);\
-    }\
-    _p_ = 0x0
-
-#define Q_ADD(_p_, _e_)\
-    _p_->aEntires[_p_->nStart++] = (OMX_PTR)_e_;\
-    if (_p_->nStart == _p_->nNumEntries) _p_->nStart = 0;\
-    _p_->nInQueue++
-
-#define Q_PEEK(_p_, _e_)\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd];\
-    }
-
-#define Q_REMOVE(_p_, _e_)\
-    _e_ = 0x0;\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd++];\
-        if (_p_->nEnd == _p_->nNumEntries) _p_->nEnd = 0;\
-        _p_->nInQueue--;\
-    }
-
-#define Q_INQUEUE(_p_) _p_->nInQueue
-
-
-    /*
-     *     D E F I N I T I O N S
-     */
-
-    typedef struct _TEST_CTXTYPE TEST_CTXTYPE;
-
-    typedef struct _QTYPE
-    {
-        OMX_U32 nNumEntries;
-        OMX_U32 nEnd;
-        OMX_U32 nStart;
-        OMX_U32 nInQueue;
-        OMX_PTR aEntires[1];
-
-    } QTYPE;
-
-    typedef struct _TEST_PORTTYPE
-    {
-        TEST_CTXTYPE *pCtx;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        QTYPE *pQ;
-        OMX_U32 nBuffersOutstanding;
-        OMX_BOOL bEOS;
-        OMX_BOOL bOpenFile;
-        OMX_BOOL bSendMark;
-        OMX_BOOL bPropogateMark;
-        OMX_BOOL bMarkReturned;
-        OMX_HANDLETYPE hMarkTargetComponent;
-        OMX_PTR pMarkData;
-
-    } TEST_PORTTYPE;
-
-    struct _TEST_CTXTYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_HANDLETYPE hCompOriginal;
-        OMX_U32 nNumPorts;
-        OMX_U32 nNumOutputPorts;
-        OMX_U32 nNumInputPorts;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-        OMX_BOOL bForceEOS;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hBufferCallbackEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hBufferMarkEvent;
-        OMX_HANDLETYPE hBufferFlagEvent;
-        OMX_U32 nPortEOSCount;
-        OMX_U32 nBufferFlagCount;
-        OMX_U32 nBuffersProcessed;
-        TEST_PORTTYPE *aPorts;
-    };
-
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE BufferFlagTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex);
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_EmptyBufferDone(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* EmptyBufferDone can only be called from an input port */
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    pBufHdr->hMarkTargetComponent = 0x0;
-                    pBufHdr->pMarkData = 0x0;
-                    pBufHdr->nFlags = 0x0; /* JVW-NVIDIA: Reset flags for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=221*/
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    pPort->nBuffersOutstanding--;
-                    pCtx->nBuffersProcessed++;
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_FillBufferDone(
-        OMX_OUT OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_PTR pAppData,
-        OMX_OUT OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* FillBufferDone can only be called from an output port */
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                if (OMX_BUFFERFLAG_EOS & pBufHdr->nFlags)
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "EOS received from port %i\n",
-                                   pPort->sPortDef.nPortIndex);
-                    pPort->bEOS = OMX_TRUE;
-                    pCtx->nPortEOSCount--;
-                    if (0x0 == pCtx->nPortEOSCount)
-                    {
-                        OMX_OSAL_EventSet(pCtx->hEOSEvent);
-                    }
-
-                }
-
-                if ((pBufHdr->hMarkTargetComponent == pCtx->hWrappedComp) &&
-                        (pBufHdr->pMarkData == pCtx))
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Buffer mark propogated on output port %i\n",
-                                   pPort->sPortDef.nPortIndex);
-                    pPort->bMarkReturned = OMX_TRUE;
-                }
-
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    /* write to file if enabled */
-                    if (OMX_TRUE == pPort->bOpenFile)
-                    {
-                        OMX_OSAL_WriteToOutputFile((pBufHdr->pBuffer + pBufHdr->nOffset),
-                                                   pBufHdr->nFilledLen, pPort->sPortDef.nPortIndex);
-                    }
-
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    pPort->nBuffersOutstanding--;
-                    pCtx->nBuffersProcessed++;
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_EventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-
-        if (0x0 == pAppData) return(OMX_ErrorNone);
-        pCtx = (TEST_CTXTYPE*)pAppData;
-
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pCtx->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtx->hStateChangeEvent);
-                    break;
-                default:
-                    break;
-            }
-        }
-        else if (OMX_EventMark == eEvent)
-        {
-            if (0x0 != pEventData)
-            {
-                pPort = (TEST_PORTTYPE*)pEventData;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Buffer mark from port %i returned\n",
-                               pPort->sPortDef.nPortIndex);
-                pPort->bMarkReturned = OMX_TRUE;
-            }
-
-        }
-        else if (OMX_EventBufferFlag == eEvent)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i reported buffer flag\n", nData1);
-            if (OMX_ErrorNone == BufferFlagTest_FindPortFromIndex(pCtx, &pPort, nData1))
-            {
-                if (nData2 & OMX_BUFFERFLAG_EOS)
-                {
-                    if ((OMX_DirInput != pPort->sPortDef.eDir) || (0x0 == pCtx->nNumOutputPorts))
-                    {
-                        pCtx->nBufferFlagCount--;
-                        if (0x0 == pCtx->nBufferFlagCount)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All OMX_EventBufferFlag completed\n");
-                            OMX_OSAL_EventSet(pCtx->hBufferFlagEvent);
-                        }
-
-                    }
-
-                }
-                else
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,
-                                   "OMX_EventBufferFlag event without EOS flag set\n");
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorUndefined;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        *ppPort = 0x0;
-        pPort = pCtx->aPorts;
-
-        if (0x0 != pPort)
-        {
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                if (pPort->sPortDef.nPortIndex == nPortIndex)
-                {
-                    *ppPort = pPort;
-                    eError = OMX_ErrorNone;
-                    break;
-                }
-
-                pPort++;
-            }
-
-        }
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_FindBogusPortIndex(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 *pPortIndex)
-    {
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nBogusPort = 0x0;
-
-        if ((0x0 == pCtx->nNumPorts) || (0x0 == pCtx->aPorts))
-        {
-            return(OMX_ErrorUndefined);
-        }
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            /* loop through all the port index's to find the maximum port
-               index value, and use that +1 as a invalid port index */
-            if (nBogusPort < pPort->sPortDef.nPortIndex)
-            {
-                nBogusPort = pPort->sPortDef.nPortIndex;
-            }
-
-            pPort++;
-        }
-        nBogusPort++;
-        *pPortIndex = nBogusPort;
-
-        return(OMX_ErrorNone);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_SendNBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers,
-        OMX_BOOL bReadFromInputFile)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                if (OMX_TRUE == pCtx->bForceEOS)
-                {
-                    /* when forcing end of stream, set the flag only once */
-                    Q_REMOVE(pPort->pQ, pBufHdr);
-                    pBufHdr->nFilledLen = 0x0;
-                    if (OMX_TRUE != pPort->bEOS)
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "EOS on port %i\n",
-                                       pPort->sPortDef.nPortIndex);
-                        pBufHdr->nFlags |= OMX_BUFFERFLAG_EOS;
-                        pPort->bEOS = OMX_TRUE;
-                    }
-
-                }
-                else
-                {
-                    if (OMX_TRUE == pPort->bEOS)
-                    {
-                        /* no more buffers to process, so fail */
-                        OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                                "End of stream on port, no more data to send\n");
-
-                    }
-
-                    Q_REMOVE(pPort->pQ, pBufHdr);
-                    if (OMX_TRUE == bReadFromInputFile)
-                    {
-                        // todo - determine correct size for sending buffers
-                        pBufHdr->nFilledLen = OMX_OSAL_ReadFromInputFile(pBufHdr->pBuffer,
-                                              pBufHdr->nAllocLen,
-                                              pBufHdr->nInputPortIndex);
-                        if (pBufHdr->nFilledLen != pBufHdr->nAllocLen)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "EOS on port %i\n",
-                                           pPort->sPortDef.nPortIndex);
-                            pBufHdr->nFlags |= OMX_BUFFERFLAG_EOS;
-                            pPort->bEOS = OMX_TRUE;
-                        }
-
-                    }
-
-                }
-
-                if (OMX_TRUE == pPort->bSendMark)
-                {
-                    /* send only a single buffer mark down to the component using
-                       it's port structure pointer as the data */
-                    pBufHdr->hMarkTargetComponent = pCtx->hCompOriginal;
-                    pBufHdr->pMarkData = pPort;
-                    pPort->bSendMark = OMX_FALSE;
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "BufferMark on port %i\n",
-                                   pPort->sPortDef.nPortIndex);
-
-                }
-                else if (OMX_TRUE == pPort->bPropogateMark)
-                {
-                    /* send only a single buffer mark down to the component using
-                       it's port structure pointer as the data */
-                    pBufHdr->hMarkTargetComponent = pCtx->hWrappedComp;
-                    pBufHdr->pMarkData = pCtx;
-                    pPort->bPropogateMark = OMX_FALSE;
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "BufferMark propogated on port %i\n",
-                                   pPort->sPortDef.nPortIndex);
-                }
-
-                eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                pPort->nBuffersOutstanding++;
-                nNumBuffers--;
-            }
-
-        }
-        else
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                Q_REMOVE(pPort->pQ, pBufHdr);
-
-                /* mark buffer header as empty on OMX_FillThisBuffer calls */
-                pBufHdr->nFlags = 0x0;
-                pBufHdr->nFilledLen = 0x0;
-                pBufHdr->hMarkTargetComponent = 0x0;
-                pBufHdr->pMarkData = 0x0;
-                eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                pPort->nBuffersOutstanding++;
-                nNumBuffers--;
-            }
-
-        }
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_ProcessNBuffers(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nBufToProcess)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_BOOL bTimeout;
-        OMX_U32 i;
-        OMX_U32 nToSend;
-        OMX_U32 nSent;
-
-        /* reset buffers to process counter */
-        pCtx->nBuffersProcessed = 0x0;
-
-        while (nBufToProcess > pCtx->nBuffersProcessed)
-        {
-            nSent = 0x0;
-            pPort = pCtx->aPorts;
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                nToSend = Q_INQUEUE(pPort->pQ);
-                eError = BufferFlagTest_SendNBuffers(pCtx, pPort, nToSend, OMX_TRUE);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                nSent += nToSend;
-                pPort++;
-            }
-
-            if (0x0 == nSent)
-            {
-                /* no buffers were sent, so the component hasn't returned any
-                   buffers, so wait until the component does return a buffer */
-                OMX_OSAL_EventWait(pCtx->hBufferCallbackEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-                OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "Component unresponsive to processing buffers\n");
-                }
-
-                // todo - add means to test to timeout on failure
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_PortAllocateNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-
-        while (0x0 != nNumBuffers)
-        {
-            eError = OMX_AllocateBuffer(pCtx->hWrappedComp, &pBufHdr,
-                                        pPort->sPortDef.nPortIndex,
-                                        pPort, pPort->sPortDef.nBufferSize);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            Q_ADD(pPort->pQ, pBufHdr);
-            if (pBufHdr->pAppPrivate != (OMX_PTR)pPort)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                        "OMX_AllocateBuffer did not populate pAppPrivate\n");
-            }
-
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_PortFreeNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-
-        while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-        {
-            Q_REMOVE(pPort->pQ, pBufHdr);
-            eError = OMX_FreeBuffer(pCtx->hWrappedComp, pPort->sPortDef.nPortIndex, pBufHdr);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_ResetPortStream(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        pCtx->bForceEOS = OMX_FALSE;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            pPort->bEOS = OMX_FALSE;
-
-            if (OMX_TRUE == pPort->bOpenFile)
-            {
-                /* only close and reopen files for input ports */
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-                    eError = OMX_OSAL_CloseInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-
-                    pPort->bOpenFile = OMX_FALSE;
-                    eError = OMX_OSAL_OpenInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_TRUE;
-                }
-
-            }
-
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_AllocatePortStructures(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 nSize;
-        OMX_U32 i, j;
-        OMX_U32 nPortIndex;
-
-        /* allocate port structures */
-        nSize = (sizeof(TEST_PORTTYPE) * pCtx->nNumPorts);
-        pCtx->aPorts = (TEST_PORTTYPE*)OMX_OSAL_Malloc(nSize);
-        if (0x0 == pCtx->aPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "OMX_OSAL_Malloc failed\n");
-        }
-
-        memset(pCtx->aPorts, 0x0, nSize);
-        pPort = pCtx->aPorts;
-        /* initialize port structures */
-        for (i = 0; i < NUM_DOMAINS; i++)
-        {
-            for (j = 0x0; j < pCtx->sPortParam[i].nPorts; j++)
-            {
-                pPort->pCtx = pCtx;
-                pPort->bEOS = OMX_FALSE;
-                pPort->bOpenFile = OMX_FALSE;
-                pPort->bSendMark = OMX_FALSE;
-                pPort->bMarkReturned = OMX_FALSE;
-                nPortIndex = pCtx->sPortParam[i].nStartPortNumber + j;
-                OMX_CONF_INIT_STRUCT(pPort->sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                pPort->sPortDef.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & pPort->sPortDef);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-                    /* count number of input ports */
-                    pCtx->nNumInputPorts++;
-
-                    eError = OMX_OSAL_OpenInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_TRUE;
-
-                }
-                else
-                {
-                    /* count number of output ports */
-                    pCtx->nNumOutputPorts++;
-
-                    if (OMX_ErrorNone == OMX_OSAL_OpenOutputFile(pPort->sPortDef.nPortIndex))
-                    {
-                        /* test does not fail when output file does not open */
-                        pPort->bOpenFile = OMX_TRUE;
-                    }
-
-                }
-
-                if (0x0 == pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCount incorrect\n");
-                }
-
-                if (pPort->sPortDef.nBufferCountMin > pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCountActual incorrect\n");
-                }
-
-                /* allocate LIFO with that or the actual required buffers */
-                Q_ALLOC(pPort->pQ, (pPort->sPortDef.nBufferCountActual));
-                if (0x0 == pPort->pQ)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "memory allocation failure\n");
-                }
-
-                pPort++;
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_FreePortStructures(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        if (0x0 != pCtx->aPorts)
-        {
-            pPort = pCtx->aPorts;
-
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                /* free all allocated buffers */
-                if (0x0 != pPort->pQ)
-                {
-                    if (OMX_ErrorNone == eError)
-                    {
-                        /* record the return code, but don't exit on failure as the
-                           test has memory it must free */
-                        eError = BufferFlagTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-
-                    }
-                    else
-                    {
-                        /* preserve the first failure from freeing buffers */
-                        BufferFlagTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-                    }
-
-                    /* free LIFO */
-                    Q_FREE(pPort->pQ);
-                    pPort->pQ = 0x0;
-
-                }
-
-                if (OMX_TRUE == pPort->bOpenFile)
-                {
-                    if (OMX_DirInput == pPort->sPortDef.eDir)
-                    {
-                        eError = OMX_OSAL_CloseInputFile(pPort->sPortDef.nPortIndex);
-
-                    }
-                    else
-                    {
-                        eError = OMX_OSAL_CloseOutputFile(pPort->sPortDef.nPortIndex);
-                    }
-                    pPort->bOpenFile = OMX_FALSE;
-                }
-
-                pPort++;
-            }
-
-            OMX_OSAL_Free(pCtx->aPorts);
-            pCtx->aPorts = 0x0;
-        }
-
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_AllocateAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nCount;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocating %i buffers on port %i\n",
-                           pPort->sPortDef.nBufferCountActual, pPort->sPortDef.nPortIndex);
-            /* allocate all buffers on each port */
-            nCount = pPort->sPortDef.nBufferCountActual;
-            nCount -= Q_INQUEUE(pPort->pQ);
-            eError = BufferFlagTest_PortAllocateNumBuffers(pCtx, pPort, nCount);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferFlagTest_FreeAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Freeing all buffers on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            eError = BufferFlagTest_PortFreeNumBuffers(pCtx, pPort,
-                     Q_INQUEUE(pPort->pQ));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_BufferFlagTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_CALLBACKTYPE oCallbacks;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        TEST_CTXTYPE ctx;
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-        OMX_BOOL bTimeout;
-        OMX_U32 nPortIndex;
-        OMX_U32 i;
-        OMX_MARKTYPE sMark;
-
-        oCallbacks.EventHandler    =  BufferFlagTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  BufferFlagTest_EmptyBufferDone;
-        oCallbacks.FillBufferDone  =  BufferFlagTest_FillBufferDone;
-
-        pCtx = &ctx;
-        pCtx->nNumPorts = 0x0;
-        pCtx->nNumOutputPorts = 0x0;
-        pCtx->nNumInputPorts = 0x0;
-        pCtx->bForceEOS = OMX_FALSE;
-        pCtx->aPorts = 0x0;
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtx->hStateChangeEvent);
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventCreate(&pCtx->hBufferCallbackEvent);
-        OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-        OMX_OSAL_EventCreate(&pCtx->hEOSEvent);
-        OMX_OSAL_EventReset(pCtx->hEOSEvent);
-        OMX_OSAL_EventCreate(&pCtx->hBufferMarkEvent);
-        OMX_OSAL_EventReset(pCtx->hBufferMarkEvent);
-        OMX_OSAL_EventCreate(&pCtx->hBufferFlagEvent);
-        OMX_OSAL_EventReset(pCtx->hBufferFlagEvent);
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        pCtx->hWrappedComp = hWrappedComp;
-        pCtx->hCompOriginal = hComp;
-
-        /* inspect component's ports */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamAudioInit, (OMX_PTR) & pCtx->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtx->sPortParam[0].nPorts, pCtx->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamVideoInit, (OMX_PTR) & pCtx->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtx->sPortParam[1].nPorts, pCtx->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamImageInit, (OMX_PTR) & pCtx->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtx->sPortParam[2].nPorts, pCtx->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamOtherInit, (OMX_PTR) & pCtx->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtx->sPortParam[3].nPorts, pCtx->sPortParam[3].nStartPortNumber);
-
-        /* record total number of ports and allocate port structures */
-        pCtx->nNumPorts = pCtx->sPortParam[0].nPorts +
-                          pCtx->sPortParam[1].nPorts +
-                          pCtx->sPortParam[2].nPorts +
-                          pCtx->sPortParam[3].nPorts;
-
-        if (0x0 == pCtx->nNumPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Component has no ports\n");
-        }
-
-        /* allocate port structures */
-        eError = BufferFlagTest_AllocatePortStructures(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component from loaded->idle */
-        OMX_CONF_SET_STATE(pCtx, OMX_StateIdle, eError);
-
-        /* allocate buffers on all ports */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on all ports\n");
-        eError = BufferFlagTest_AllocateAllBuffers(pCtx);
-        OMX_CONF_WAIT_STATE(pCtx, OMX_StateIdle, eError);
-
-        if (0x0 == pCtx->nNumInputPorts)
-        {
-            /* without input ports on the component, the test cannot
-               force a EOS ... hence pass this test for components
-               without an input port */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "BufferFlag portion of test, component has no input ports\n");
-            goto OMX_CONF_TEST_SKIP_BUFFERFLAGTEST;
-        }
-
-        /* transition component to executing */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-        /* process some buffers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* send EOS on each input port, and wait for EOS on each output port */
-        pCtx->bForceEOS = OMX_TRUE;
-        pCtx->nPortEOSCount = pCtx->nNumOutputPorts;
-        if (0x0 == pCtx->nNumOutputPorts)
-        {
-            /* component has no output ports, so the component will report
-               the same number of buffer events as input ports */
-            pCtx->nBufferFlagCount = pCtx->nNumInputPorts;
-
-        }
-        else
-        {
-            /* each EOS on a buffer sent from an output port MUST trigger
-               the buffer flag event */
-            pCtx->nBufferFlagCount = pCtx->nNumOutputPorts;
-        }
-
-        OMX_OSAL_EventReset(pCtx->hBufferFlagEvent);
-        OMX_OSAL_EventReset(pCtx->hEOSEvent);
-
-        /* send EOS to each input port */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                BufferFlagTest_SendNBuffers(pCtx, pPort, 0x1, OMX_FALSE);
-            }
-            pPort++;
-        }
-
-        /* process enough buffers on the output port for EOS to be propogated */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        if (0x0 != pCtx->nNumOutputPorts)
-        {
-            /* only wait for EOS to show up in buffers from output ports
-               if there are output ports */
-            OMX_OSAL_EventWait(pCtx->hEOSEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Not all ports propogated EOS\n");
-            }
-
-        }
-
-        OMX_OSAL_EventWait(pCtx->hBufferFlagEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Not all ports reported EOS\n");
-        }
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* reset input file stream */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resetting input data stream to start of file\n");
-        eError = BufferFlagTest_ResetPortStream(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* test propogation of buffer marks from input port through an output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing component reports OMX_EventMark\n");
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            pPort->bMarkReturned = OMX_FALSE;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                pPort->bPropogateMark = OMX_TRUE;
-            }
-            pPort++;
-        }
-
-        /* transition component to executing process buffers */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* check that each buffer mark on each input port was returned by the
-           component */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Validating buffer mark propogated through output port %i\n",
-                               nPortIndex);
-                if (OMX_TRUE != pPort->bMarkReturned)
-                {
-                    /* buffer mark not returned from input port */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer mark wasn't propogated\n");
-                }
-
-            }
-            pPort++;
-        }
-
-        /* reset input file stream */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resetting input data stream to start of file\n");
-        eError = BufferFlagTest_ResetPortStream(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* testing component can set a mark into a buffer and propogate it out
-           of an output port */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-        /* test sending bad port index to buffer mark */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing OMX_CommandMarkBuffer with bogus port index\n");
-        eError = BufferFlagTest_FindBogusPortIndex(pCtx, &nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sMark.hMarkTargetComponent = pCtx->hWrappedComp;
-        sMark.pMarkData = pCtx;
-        eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandMarkBuffer, nPortIndex, &sMark);
-        if (OMX_ErrorBadPortIndex != eError)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                    "Component did not detect bogus port index\n");
-        }
-        eError = OMX_ErrorNone;
-
-        /* send individual buffer mark to each port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing component with OMX_CommandMarkBuffer\n");
-        sMark.hMarkTargetComponent = pCtx->hWrappedComp;
-        sMark.pMarkData = pCtx;
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            pPort->bMarkReturned = OMX_FALSE;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "OMX_CommandMarkBuffer on port %i\n",
-                               nPortIndex);
-                eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandMarkBuffer, nPortIndex, &sMark);
-                if (OMX_ErrorNone != eError)
-                {
-                    /* transition to IDLE, and bail */
-                    OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eCleanupError);
-
-                }
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-            }
-            pPort++;
-        }
-
-        /* process buffers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* check that each buffer mark on each input port was returned by the
-           component */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Validating buffer mark propogated through output port %i\n",
-                               nPortIndex);
-                if (OMX_TRUE != pPort->bMarkReturned)
-                {
-                    /* buffer mark not returned from input port */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer mark wasn't propogated\n");
-                }
-
-            }
-            pPort++;
-        }
-
-
-        /* reset input file stream */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resetting input data stream to start of file\n");
-        eError = BufferFlagTest_ResetPortStream(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing OMX_CommandMarkBuffer does not overwrite already marked buffers\n");
-
-        sMark.hMarkTargetComponent = pCtx->hWrappedComp;
-        sMark.pMarkData = pCtx;
-
-        /* send individual buffer mark to each port */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            pPort->bMarkReturned = OMX_FALSE;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                pPort->bPropogateMark = OMX_TRUE;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "OMX_CommandMarkBuffer on port %i\n",
-                               nPortIndex);
-                eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandMarkBuffer, nPortIndex, &sMark);
-                if (OMX_ErrorNone != eError)
-                {
-                    /* transition to IDLE, and bail */
-                    OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eCleanupError);
-
-                }
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            pPort++;
-        }
-
-        /* test component does not overwrite buffer marks */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* check that each buffer mark on each input port was returned by the
-           component */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Validating buffer mark propogated through output port %i\n",
-                               nPortIndex);
-                if (OMX_TRUE != pPort->bMarkReturned)
-                {
-                    /* buffer mark not returned from input port */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer mark wasn't propogated\n");
-                }
-
-            }
-            pPort++;
-        }
-
-
-        /* this label is used only for components that have no output ports */
-OMX_CONF_TEST_SKIP_BUFFERFLAGTEST:
-
-        /* reset input file stream */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resetting input data stream to start of file\n");
-        eError = BufferFlagTest_ResetPortStream(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing component reports OMX_EventMark\n");
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            pPort->bMarkReturned = OMX_FALSE;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                pPort->bSendMark = OMX_TRUE;
-            }
-            pPort++;
-        }
-
-        /* transition component to executing process buffers */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = BufferFlagTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* check that each buffer mark on each input port was returned by the
-           component */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Validating buffer mark on port %i returned via EventHandler\n",
-                               nPortIndex);
-                if (OMX_TRUE != pPort->bMarkReturned)
-                {
-                    /* buffer mark not returned from input port */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer mark never returned\n");
-                }
-
-            }
-            pPort++;
-        }
-
-        /* transition to loaded */
-        OMX_CONF_SET_STATE(pCtx, OMX_StateLoaded, eError);
-
-        /* free all buffers */
-        eError = BufferFlagTest_FreeAllBuffers(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_CONF_WAIT_STATE(pCtx, OMX_StateLoaded, eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        eCleanupError = BufferFlagTest_FreePortStructures(pCtx);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventDestroy(pCtx->hBufferCallbackEvent);
-        OMX_OSAL_EventDestroy(pCtx->hEOSEvent);
-        OMX_OSAL_EventDestroy(pCtx->hBufferMarkEvent);
-        OMX_OSAL_EventDestroy(pCtx->hBufferFlagEvent);
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return(eError);
-    }
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_buffertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_buffertest.c
deleted file mode 100644 (file)
index 9e95605..0000000
+++ /dev/null
@@ -1,973 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_BufferTest.c
- *  OpenMax IL conformance test - Buffer Test
- */
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-
-
-
-#define TEST_NAME_STRING "BufferTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-
-#define NUM_DOMAINS 0x4
-
-    static char szDesc[256];
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL
-
-#define OMX_CONF_ASSERT(_e_, _a_, _r_) \
-    if (!(_a_))\
-    {\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", (_r_));\
-        (_e_) = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define LIFO_ALLOC(_p_, _n_)\
-    _p_ = (LIFOTYPE*)OMX_OSAL_Malloc(sizeof(LIFOTYPE) + (sizeof(OMX_PTR) * (_n_ + 1)));\
-    if (0x0 != _p_)\
-    {\
-        _p_->nNumEntries = _n_;\
-        _p_->nEnd = 0;\
-    }
-
-#define LIFO_FREE(_p_)\
-    OMX_OSAL_Free(_p_);\
-    _p_ = 0x0
-
-#define LIFO_ADD(_p_, _e_)\
-    _p_->aEntires[_p_->nEnd] = (OMX_PTR)_e_;\
-    _p_->nEnd++
-
-#define LIFO_REMOVE(_p_, _e_)\
-    _e_ = 0x0;\
-    if (0x0 != _p_->nEnd)\
-    {\
-        _p_->nEnd--;\
-        _e_ = _p_->aEntires[_p_->nEnd];\
-    }
-
-#define LIFO_INQUEUE(_p_) _p_->nEnd
-
-
-
-    /*
-     *     D E F I N I T I O N S
-     */
-
-
-    typedef struct _LIFOTYPE
-    {
-        OMX_U32 nNumEntries;
-        OMX_U32 nEnd;
-        OMX_PTR aEntires[1];
-
-    } LIFOTYPE;
-
-    typedef struct _TEST_PORTTYPE
-    {
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        LIFOTYPE *pLifo;
-
-    } TEST_PORTTYPE;
-
-    typedef struct _TEST_CTXTYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_U32 nNumPorts;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hPortDisableEvent;
-        OMX_HANDLETYPE hPortEnableEvent;
-        OMX_HANDLETYPE hPortErrorEvent;
-        OMX_U32 nNumPortsStopped;
-        OMX_BOOL bStopAllPorts;
-        OMX_U32 nNumPortsRestarted;
-        OMX_BOOL bRestartAllPorts;
-        OMX_U32 nRestartPort;
-        OMX_U32 nStopPort;
-        TEST_PORTTYPE *aPorts;
-
-    } TEST_CTXTYPE;
-
-
-
-    /*
-     *     F U N C T I O N S
-     */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_EventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TEST_CTXTYPE *pCtx;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (0x0 == pAppData) return(OMX_ErrorNone);
-        pCtx = (TEST_CTXTYPE*)pAppData;
-
-        if (OMX_EventCmdComplete == eEvent)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pCtx->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtx->hStateChangeEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i completed disable\n", nData2);
-                    if (OMX_TRUE == pCtx->bStopAllPorts)
-                    {
-                        pCtx->nNumPortsStopped++;
-                        if (pCtx->nNumPortsStopped == pCtx->nNumPorts)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed disable\n");
-                            OMX_OSAL_EventSet(pCtx->hPortDisableEvent);
-                        }
-
-                    }
-                    else if (pCtx->nStopPort == nData2)
-                    {
-                        OMX_OSAL_EventSet(pCtx->hPortDisableEvent);
-                    }
-                    break;
-                case OMX_CommandPortEnable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i completed enable\n", nData2);
-                    if (OMX_TRUE == pCtx->bRestartAllPorts)
-                    {
-                        pCtx->nNumPortsRestarted++;
-                        if (pCtx->nNumPortsRestarted == pCtx->nNumPorts)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed enable\n");
-                            OMX_OSAL_EventSet(pCtx->hPortEnableEvent);
-                        }
-                    }
-                    else if (pCtx->nRestartPort == nData2)
-                    {
-                        OMX_OSAL_EventSet(pCtx->hPortEnableEvent);
-                    }
-                    break;
-                case OMX_EventBufferFlag:
-                    break;
-                default:
-                    break;
-            }
-
-        }
-        else if (OMX_EventError == eEvent)
-        {
-            OMX_CONF_ErrorToString((OMX_ERRORTYPE)nData1, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component reported error %s (0x%x)\n",
-                           szDesc, nData2);
-            if (OMX_ErrorPortUnpopulated == nData1)
-            {
-                OMX_OSAL_EventSet(pCtx->hPortErrorEvent);
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_PortAllocateNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-
-        while (0x0 != nNumBuffers)
-        {
-            eError = OMX_AllocateBuffer(pCtx->hWrappedComp, &pBufHdr,
-                                        pPort->sPortDef.nPortIndex,
-                                        0x0, pPort->sPortDef.nBufferSize);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            LIFO_ADD(pPort->pLifo, pBufHdr);
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_PortFreeNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-
-        while ((0x0 != LIFO_INQUEUE(pPort->pLifo)) && (0x0 != nNumBuffers))
-        {
-            LIFO_REMOVE(pPort->pLifo, pBufHdr);
-            eError = OMX_FreeBuffer(pCtx->hWrappedComp, pPort->sPortDef.nPortIndex, pBufHdr);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_AllocatePortStructures(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 nSize;
-        OMX_U32 i, j;
-        OMX_U32 nPortIndex;
-
-        /* allocate port structures */
-        nSize = (sizeof(TEST_PORTTYPE) * pCtx->nNumPorts);
-        pCtx->aPorts = (TEST_PORTTYPE*)OMX_OSAL_Malloc(nSize);
-        if (0x0 == pCtx->aPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "OMX_OSAL_Malloc failed\n");
-        }
-
-        memset(pCtx->aPorts, 0x0, nSize);
-
-        pPort = pCtx->aPorts;
-        /* initialize port structures */
-        for (i = 0; i < NUM_DOMAINS; i++)
-        {
-            for (j = 0x0; j < pCtx->sPortParam[i].nPorts; j++)
-            {
-                nPortIndex = pCtx->sPortParam[i].nStartPortNumber + j;
-                OMX_CONF_INIT_STRUCT(pPort->sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                pPort->sPortDef.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & pPort->sPortDef);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                if (0x0 == pPort->sPortDef.nBufferCountMin)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCountMin incorrect\n");
-                }
-
-                if (pPort->sPortDef.nBufferCountMin > pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCountActual incorrect\n");
-                }
-
-                /* set the actual buffer count to min + 1 */
-                pPort->sPortDef.nBufferCountActual = pPort->sPortDef.nBufferCountMin + 1;
-
-                /* set actual buffer count on the port */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & pPort->sPortDef);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* allocate LIFO with one more entry that the required minimum
-                   as the test will allocate 1 more than needed to exercise
-                   allocating buffers during the IDLE state */
-                LIFO_ALLOC(pPort->pLifo, (pPort->sPortDef.nBufferCountActual));
-                if (0x0 == pPort->pLifo)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "memory allocation failure\n");
-                }
-
-                pPort++;
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_FreePortStructures(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        if (0x0 != pCtx->aPorts)
-        {
-            pPort = pCtx->aPorts;
-
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                /* free all allocated buffers */
-                if (OMX_ErrorNone == eError)
-                {
-                    /* record the return code, but don't exit on failure as the
-                       test has memory it must free */
-                    eError = BufferTest_PortFreeNumBuffers(pCtx, pPort, LIFO_INQUEUE(pPort->pLifo));
-
-                }
-                else
-                {
-                    /* preserve the first failure from freeing buffers */
-                    BufferTest_PortFreeNumBuffers(pCtx, pPort, LIFO_INQUEUE(pPort->pLifo));
-                }
-
-                /* free LIFO */
-                LIFO_FREE(pPort->pLifo);
-                pPort->pLifo = 0x0;
-                pPort++;
-            }
-
-            OMX_OSAL_Free(pCtx->aPorts);
-            pCtx->aPorts = 0x0;
-        }
-
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_AllocateAllButOne(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocating all buffers but one on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            /* allocate all but one buffer on each port */
-            eError = BufferTest_PortAllocateNumBuffers(pCtx, pPort,
-                     (pPort->sPortDef.nBufferCountMin - 1));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_AllocateAllPlusOne(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nCount;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocating all buffers plus one on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            /* allocate all buffers on each port, but plus buffer */
-            nCount = pPort->sPortDef.nBufferCountActual;
-            nCount -= LIFO_INQUEUE(pPort->pLifo);
-            eError = BufferTest_PortAllocateNumBuffers(pCtx, pPort, nCount);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_FreeAll(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Freeing all buffers on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            /* free all buffers on each port, but one buffer */
-            eError = BufferTest_PortFreeNumBuffers(pCtx, pPort,
-                                                   LIFO_INQUEUE(pPort->pLifo));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE BufferTest_FreeAllButOne(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Freeing all buffers but one on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            /* free all buffers on each port, but one buffer */
-            eError = BufferTest_PortFreeNumBuffers(pCtx, pPort,
-                                                   (LIFO_INQUEUE(pPort->pLifo) - 1));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_BufferTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-        TEST_CTXTYPE *pCtx;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_CALLBACKTYPE oCallbacks;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        OMX_BOOL bTimeout;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nPortIndex;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        oCallbacks.EventHandler    =  BufferTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  =  StubbedFillBufferDone;
-
-        pCtx = &ctx;
-        pCtx->hStateChangeEvent = 0x0;
-        pCtx->hPortDisableEvent = 0x0;
-        pCtx->hPortEnableEvent = 0x0;
-        pCtx->hPortErrorEvent = 0x0;
-        pCtx->aPorts = 0x0;
-        pCtx->bRestartAllPorts = OMX_FALSE;
-        pCtx->bStopAllPorts = OMX_FALSE;
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtx->hStateChangeEvent);
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortDisableEvent);
-        OMX_OSAL_EventReset(pCtx->hPortDisableEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortEnableEvent);
-        OMX_OSAL_EventReset(pCtx->hPortEnableEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortErrorEvent);
-        OMX_OSAL_EventReset(pCtx->hPortErrorEvent);
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        pCtx->hWrappedComp = hWrappedComp;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected all port on component %s\n", cComponentName);
-        /* inspect component's ports */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamAudioInit, (OMX_PTR) & pCtx->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtx->sPortParam[0].nPorts, pCtx->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamVideoInit, (OMX_PTR) & pCtx->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtx->sPortParam[1].nPorts, pCtx->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamImageInit, (OMX_PTR) & pCtx->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtx->sPortParam[2].nPorts, pCtx->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamOtherInit, (OMX_PTR) & pCtx->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtx->sPortParam[3].nPorts, pCtx->sPortParam[3].nStartPortNumber);
-
-        /* record total number of ports and allocate port structures */
-        pCtx->nNumPorts = pCtx->sPortParam[0].nPorts +
-                          pCtx->sPortParam[1].nPorts +
-                          pCtx->sPortParam[2].nPorts +
-                          pCtx->sPortParam[3].nPorts;
-
-        if (0x0 == pCtx->nNumPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Component has no ports\n");
-        }
-
-        /* allocate port structures */
-        eError = BufferTest_AllocatePortStructures(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle, verifying that the component does not
-           go to IDLE within a certain timeout */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to OMX_StateIdle\n");
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* allocate some buffers on the ports, vertifying the component does
-           not transition to idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate some buffers on all ports\n");
-        eError = BufferTest_AllocateAllButOne(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Unexpected state transition to OMX_StateIdle\n");
-        }
-
-        /* allocate all buffers on the ports, vertifying the component does
-           transition to idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate remaining buffers on all ports\n");
-        eError = BufferTest_AllocateAllPlusOne(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "State transition to OMX_StateIdle never occured\n");
-        }
-
-        /* transition the component to from idle to loaded, verifying the component
-           does not transition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to OMX_StateLoaded\n");
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* free some buffers */
-        eError = BufferTest_FreeAllButOne(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Unexpected state transition to OMX_StateLoaded\n");
-        }
-
-        /* free all buffers and confirm component transitions to loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Free buffers on all ports\n");
-        eError = BufferTest_FreeAll(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Expected state transition to OMX_StateLoaded\n");
-        }
-
-        /* stop all ports */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command all ports to disabled\n");
-        pCtx->bStopAllPorts = OMX_TRUE;
-        pCtx->nNumPortsStopped = 0x0;
-        OMX_OSAL_EventReset(pCtx->hPortDisableEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortDisable, OMX_ALL, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hPortDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "All ports not disabled\n");
-        }
-        pCtx->bStopAllPorts = OMX_FALSE;
-
-        /* set the component to idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to OMX_StateIdle\n");
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Expected state transition to OMX_StateIdle\n");
-        }
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            /* verify port enable and populated status */
-            nPortIndex =  pPort->sPortDef.nPortIndex;
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            /* enable port, and verify it does not restart */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command port %i to enabled\n", nPortIndex);
-            OMX_OSAL_EventReset(pCtx->hPortEnableEvent);
-            pCtx->nRestartPort = nPortIndex;
-            eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortEnable, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-            if (OMX_FALSE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port enabled unexpectedly\n");
-            }
-
-            /* verify port enabled, but not populated */
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            /* allocate buffers on the port, and verify it restarts */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on port %i\n", nPortIndex);
-            eError = BufferTest_PortAllocateNumBuffers(pCtx, pPort, (pPort->sPortDef.nBufferCountActual));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port never enabled\n");
-            }
-
-            /* verify port enabled and populated */
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            /* stop port, verifying it does not stop */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command port %i to disabled\n", nPortIndex);
-            OMX_OSAL_EventReset(pCtx->hPortDisableEvent);
-            pCtx->nStopPort = nPortIndex;
-            eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortDisable, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-            if (OMX_FALSE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port disabled unexpectedly\n");
-            }
-
-            /* free buffers on the port, verifying it stops */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Free buffers on port %i\n", nPortIndex);
-            eError = BufferTest_PortFreeNumBuffers(pCtx, pPort, LIFO_INQUEUE(pPort->pLifo));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port never disabled\n");
-            }
-
-            /* verify port not enabled, not populated */
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            /* enable the port and allocate buffers */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command port %i to enabled\n", nPortIndex);
-            OMX_OSAL_EventReset(pCtx->hPortEnableEvent);
-            eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortEnable, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on port %i\n", nPortIndex);
-            eError = BufferTest_PortAllocateNumBuffers(pCtx, pPort, (pPort->sPortDef.nBufferCountActual));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port never enabled\n");
-            }
-
-            /* test the port errors when buffers are freed */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Free buffers on port %i\n", nPortIndex);
-            OMX_OSAL_EventReset(pCtx->hPortErrorEvent);
-            eError = BufferTest_PortFreeNumBuffers(pCtx, pPort, LIFO_INQUEUE(pPort->pLifo));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* waiting for component to report error due to lost buffers */
-            OMX_OSAL_EventWait(pCtx->hPortErrorEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                        "Component did not report OMX_ErrorPortUnpopulated\n");
-            }
-
-            /* verify port enabled, but not populated */
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            /* stop the port */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command port %i to disabled\n", nPortIndex);
-            OMX_OSAL_EventReset(pCtx->hPortDisableEvent);
-            pCtx->nStopPort = nPortIndex;
-            eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortDisable, nPortIndex, 0x0);
-            OMX_OSAL_EventWait(pCtx->hPortDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port never disabled\n");
-            }
-
-            /* verify port not enabled, but not populated */
-            OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-            sPortDefinition.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDefinition);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bEnabled),
-                            "Incorrect value in PortDefinition bEnabled field\n");
-            OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                            "Incorrect value in PortDefinition bPopulated field\n");
-
-            pPort++;
-        }
-
-        /* transition component from idle to loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to OMX_StateLoaded\n");
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Expected state transition to OMX_StateLoaded\n");
-        }
-
-        /* restart all ports */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command all ports to enable\n");
-        pCtx->bRestartAllPorts = OMX_TRUE;
-        pCtx->nNumPortsRestarted = 0x0;
-        OMX_OSAL_EventReset(pCtx->hPortEnableEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandPortEnable, OMX_ALL, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(pCtx->hPortEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "All ports not enabled\n");
-        }
-        pCtx->bRestartAllPorts = OMX_FALSE;
-
-
-OMX_CONF_TEST_BAIL:
-
-        eCleanupError = BufferTest_FreePortStructures(pCtx);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortDisableEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortEnableEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortErrorEvent);
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return(eError);
-    }
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_componentnametest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_componentnametest.c
deleted file mode 100644 (file)
index 1b8f265..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_ComponentNameTest.c
- *  OpenMax IL conformance test - Component Name Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-#define TEST_NAME_STRING "ComponentNameTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-
-    static char szDesc[256];
-
-    OMX_ERRORTYPE ComponentNameTest_EventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-        UNUSED_PARAMETER(eEvent);
-        UNUSED_PARAMETER(nData1);
-        UNUSED_PARAMETER(nData2);
-        UNUSED_PARAMETER(pEventData);
-
-        return OMX_ErrorNotImplemented;
-    }
-
-    OMX_ERRORTYPE ComponentNameTest_EmptyBufferDone(
-        OMX_OUT OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_PTR pAppData,
-        OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-        UNUSED_PARAMETER(pBuffer);
-
-        return OMX_ErrorNotImplemented;
-    }
-
-    OMX_ERRORTYPE ComponentNameTest_FillBufferDone(
-        OMX_OUT OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_PTR pAppData,
-        OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-        UNUSED_PARAMETER(pBuffer);
-
-        return OMX_ErrorNotImplemented;
-    }
-
-
-    OMX_ERRORTYPE OMX_CONF_ComponentNameTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE  eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0;
-        OMX_U32 i = 0;
-        OMX_BOOL bNameValid = OMX_FALSE;
-        OMX_BOOL bFound = OMX_FALSE;
-        OMX_S8 cCompEnumName[TEST_COMPONENT_NAME_SIZE];
-        OMX_CALLBACKTYPE sCallbacks;
-
-        sCallbacks.EventHandler    = ComponentNameTest_EventHandler;
-        sCallbacks.EmptyBufferDone = ComponentNameTest_EmptyBufferDone;
-        sCallbacks.FillBufferDone  = ComponentNameTest_FillBufferDone;
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        if (eError != OMX_ErrorNone)
-        {
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-        while (OMX_ErrorNone == eError)
-        {
-            /* loop through all enumerated components to determine if the component name
-               specificed for the test is enumerated by the OMX core */
-            eError = OMX_ComponentNameEnum((OMX_STRING) cCompEnumName, TEST_COMPONENT_NAME_SIZE, i);
-            if (OMX_ErrorNone == eError)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "OMX_ComponenNameEnum enumerated %s at index %i\n",
-                               cCompEnumName, i);
-
-                if (!strcmp((OMX_STRING) cCompEnumName, cComponentName))
-                {
-                    /* component name enumerated by OMX_CORE */
-                    bFound = OMX_TRUE;
-
-                    eError = OMX_GetHandle(&hComp, (OMX_STRING) cCompEnumName, 0x0, &sCallbacks);
-                    if (eError == OMX_ErrorNone)
-                    {
-                        /* validate the first 4 characters of the name match
-                           the OMX standard */
-                        if (!strncmp("OMX.", cComponentName, 4))
-                        {
-                            bNameValid = OMX_TRUE;
-                        }
-
-                        eError = OMX_FreeHandle(hComp);
-
-                    }
-                    else
-                    {
-                        OMX_CONF_ErrorToString(eError, szDesc);
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s error=0x%X (%s) from OMX_GetHandle\n",
-                                       cCompEnumName, eError, szDesc);
-
-                    }
-
-                }
-
-            }
-            else if (OMX_ErrorNoMore != eError)
-            {
-                /* OMX_CORE reported unexpected error other than no more components */
-                OMX_CONF_ErrorToString(eError, szDesc);
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "unexepected error=0x%X (%s) from OMX_ComponenNameEnum\n",
-                               eError, szDesc);
-            }
-            i++;
-
-        }
-
-        if (OMX_ErrorNoMore == eError)
-        {
-            /* not an error, so clear the error code */
-            eError = OMX_ErrorNone;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        if (OMX_ErrorNone == eError)
-        {
-            eError = OMX_Deinit();
-
-        }
-        else
-        {
-            OMX_Deinit();
-        }
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_flushtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_flushtest.c
deleted file mode 100644 (file)
index e14190e..0000000
+++ /dev/null
@@ -1,1389 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_FlushTest.c
- *  OpenMax IL conformance test - Flush Test
- */
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-
-#define TEST_NAME_STRING "FlushTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-#define TEST_NUM_BUFFERS_TO_PROCESS 100
-
-#define NUM_DOMAINS 0x4
-
-    static char szDesc[256];
-    static char szState[256];
-
-
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL
-
-#define OMX_CONF_WAIT_STATE(_p_, _s_, _e_)\
-{\
-    OMX_BOOL _bTimeout_;\
-    OMX_OSAL_EventWait((_p_)->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &_bTimeout_);\
-    if (OMX_TRUE == _bTimeout_)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "State transition to %s never occured\n", szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-    _e_ = OMX_GetState((_p_)->hWrappedComp, &(_p_)->eState);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_s_ != (_p_)->eState)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_CONF_StateToString((_p_)->eState, szDesc);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "OMX_GetState reported %s, expecting %s\n",\
-                       szDesc, szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-}
-
-#define OMX_CONF_SET_STATE(_p_, _s_, _e_)\
-{\
-    OMX_CONF_StateToString(_s_, szState);\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to %s\n", szState);\
-    OMX_OSAL_EventReset((_p_)->hStateChangeEvent);\
-    _e_ = OMX_SendCommand((_p_)->hWrappedComp, OMX_CommandStateSet, _s_, 0x0);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-}
-
-#define OMX_CONF_SET_STATE_AND_WAIT(_p_, _s_, _e_)\
-    OMX_CONF_SET_STATE(_p_, _s_, _e_);\
-    OMX_CONF_WAIT_STATE(_p_, _s_, _e_)
-
-#define Q_ALLOC(_p_, _n_)\
-    _p_ = (QTYPE*)OMX_OSAL_Malloc(sizeof(QTYPE) + (sizeof(OMX_PTR) * (_n_ + 1)));\
-    if (0x0 != _p_)\
-    {\
-        _p_->nNumEntries = _n_;\
-        _p_->nEnd = 0;\
-        _p_->nStart = 0;\
-        _p_->nInQueue = 0;\
-    }
-
-#define Q_FREE(_p_)\
-    if (0x0 != _p_)\
-    {\
-        OMX_OSAL_Free(_p_);\
-    }\
-    _p_ = 0x0
-
-#define Q_ADD(_p_, _e_)\
-    _p_->aEntires[_p_->nStart++] = (OMX_PTR)_e_;\
-    if (_p_->nStart == _p_->nNumEntries) _p_->nStart = 0;\
-    _p_->nInQueue++
-
-#define Q_PEEK(_p_, _e_)\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd];\
-    }
-
-#define Q_REMOVE(_p_, _e_)\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd++];\
-        if (_p_->nEnd == _p_->nNumEntries) _p_->nEnd = 0;\
-        _p_->nInQueue--;\
-    }
-
-#define Q_INQUEUE(_p_) _p_->nInQueue
-
-    /*
-     *     D E F I N I T I O N S
-     */
-
-    typedef struct _TEST_CTXTYPE TEST_CTXTYPE;
-
-    typedef struct _QTYPE
-    {
-        OMX_U32 nNumEntries;
-        OMX_U32 nEnd;
-        OMX_U32 nStart;
-        OMX_U32 nInQueue;
-        OMX_PTR aEntires[1];
-
-    } QTYPE;
-
-    typedef struct _TEST_PORTTYPE
-    {
-        TEST_CTXTYPE *pCtx;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        QTYPE *pQ;
-        OMX_U32 nBuffersOutstanding;
-        OMX_BOOL bEOS;
-        OMX_BOOL bOpenFile;
-        OMX_U32 nNumSaveBufferOrder;
-        OMX_PTR *aSaveBufferOrder;
-
-    } TEST_PORTTYPE;
-
-    struct _TEST_CTXTYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_U32 nNumPorts;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hPortStopEvent;
-        OMX_HANDLETYPE hPortRestartEvent;
-        OMX_HANDLETYPE hPortFlushEvent;
-        OMX_HANDLETYPE hBufferCallbackEvent;
-        OMX_U32 nBuffersProcessed;
-        OMX_U32 nNumPortsStopped;
-        OMX_BOOL bStopAllPorts;
-        OMX_U32 nStopPort;
-        OMX_U32 nNumPortsRestarted;
-        OMX_BOOL bRestartAllPorts;
-        OMX_U32 nRestartPort;
-        OMX_U32 nNumPortsFlushed;
-        OMX_BOOL bFlushAllPorts;
-        OMX_U32 nFlushPort;
-        TEST_PORTTYPE *aPorts;
-
-    };
-
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE FlushTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex);
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_EmptyBufferDone(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* EmptyBufferDone can only be called from an input port */
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    pPort->nBuffersOutstanding--;
-                    pCtx->nBuffersProcessed++;
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_FillBufferDone(
-        OMX_OUT OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_PTR pAppData,
-        OMX_OUT OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* FillBufferDone can only be called from an output port */
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    /* write to file if enabled */
-                    if (OMX_TRUE == pPort->bOpenFile)
-                    {
-                        OMX_OSAL_WriteToOutputFile((pBufHdr->pBuffer + pBufHdr->nOffset),
-                                                   pBufHdr->nFilledLen, pPort->sPortDef.nPortIndex);
-                    }
-
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    pPort->nBuffersOutstanding--;
-                    pCtx->nBuffersProcessed++;
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_EventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (0x0 == pAppData) return(OMX_ErrorNone);
-        pCtx = (TEST_CTXTYPE*)pAppData;
-
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pCtx->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtx->hStateChangeEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i completed stopping\n", nData2);
-                    if (OMX_TRUE == pCtx->bStopAllPorts)
-                    {
-                        pCtx->nNumPortsStopped++;
-                        if (pCtx->nNumPortsStopped == pCtx->nNumPorts)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed stopping\n");
-                            OMX_OSAL_EventSet(pCtx->hPortStopEvent);
-                        }
-
-                    }
-                    else if (pCtx->nStopPort == nData2)
-                    {
-                        OMX_OSAL_EventSet(pCtx->hPortStopEvent);
-                    }
-                    break;
-                case OMX_CommandPortEnable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port completed %i restart\n", nData2);
-                    if (OMX_TRUE == pCtx->bRestartAllPorts)
-                    {
-                        pCtx->nNumPortsRestarted++;
-                        if (pCtx->nNumPortsRestarted == pCtx->nNumPorts)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed restart\n");
-                            OMX_OSAL_EventSet(pCtx->hPortRestartEvent);
-                        }
-
-                    }
-                    else if (pCtx->nRestartPort == nData2)
-                    {
-                        OMX_OSAL_EventSet(pCtx->hPortRestartEvent);
-                    }
-                    break;
-                case OMX_CommandFlush:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i reported flush complete\n", nData2);
-                    if (OMX_TRUE == pCtx->bFlushAllPorts)
-                    {
-                        /* only record the por flush command if all buffers from the port were
-                           received as part of the flush */
-                        if (OMX_ErrorNone == FlushTest_FindPortFromIndex(pCtx, &pPort, nData2))
-                        {
-                            if (Q_INQUEUE(pPort->pQ) == pPort->sPortDef.nBufferCountActual)
-                            {
-                                pCtx->nNumPortsFlushed++;
-                                if (pCtx->nNumPortsFlushed == pCtx->nNumPorts)
-                                {
-                                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed flush\n");
-                                    OMX_OSAL_EventSet(pCtx->hPortFlushEvent);
-                                }
-
-                            }
-                            else
-                            {
-                                OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,
-                                               "Port reported flush complete without flushing all buffers\n");
-                            }
-
-                        }
-
-                    }
-                    else if (pCtx->nFlushPort == nData2)
-                    {
-                        if (OMX_ErrorNone == FlushTest_FindPortFromIndex(pCtx, &pPort, nData2))
-                        {
-                            if (Q_INQUEUE(pPort->pQ) == pPort->sPortDef.nBufferCountActual)
-                            {
-                                OMX_OSAL_EventSet(pCtx->hPortFlushEvent);
-
-                            }
-                            else
-                            {
-                                OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,
-                                               "Port reported flush complete without flushing all buffers\n");
-                            }
-
-                        }
-
-                    }
-                    break;
-                case OMX_EventBufferFlag:
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorUndefined;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        *ppPort = 0x0;
-        pPort = pCtx->aPorts;
-
-        if (0x0 != pPort)
-        {
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                if (pPort->sPortDef.nPortIndex == nPortIndex)
-                {
-                    *ppPort = pPort;
-                    eError = OMX_ErrorNone;
-                    break;
-                }
-
-                pPort++;
-            }
-
-        }
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_FindBogusPortIndex(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 *pPortIndex)
-    {
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nBogusPort = 0x0;
-
-        if ((0x0 == pCtx->nNumPorts) || (0x0 == pCtx->aPorts))
-        {
-            return(OMX_ErrorUndefined);
-        }
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            /* loop through all the port index's to find the maximum port
-               index value, and use that +1 as a invalid port index */
-            if (nBogusPort < pPort->sPortDef.nPortIndex)
-            {
-                nBogusPort = pPort->sPortDef.nPortIndex;
-            }
-
-            pPort++;
-        }
-        nBogusPort++;
-        *pPortIndex = nBogusPort;
-
-        return(OMX_ErrorNone);
-    }
-
-    /* JVW-NVIDIA: Reset port stream for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=223 */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_ResetPortStream(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            pPort->bEOS = OMX_FALSE;
-
-            if (OMX_TRUE == pPort->bOpenFile)
-            {
-                /* only close and reopen files for input ports */
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-                    eError = OMX_OSAL_CloseInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-
-                    pPort->bOpenFile = OMX_FALSE;
-                    eError = OMX_OSAL_OpenInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_TRUE;
-                }
-
-            }
-
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_SaveBufferOrder(
-        TEST_PORTTYPE *pPort)
-    {
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-        OMX_BUFFERHEADERTYPE **pBufOrder;
-        OMX_U32 i;
-
-        if ((0x0 != pPort) && (0x0 != pPort->aSaveBufferOrder))
-        {
-            pPort->nNumSaveBufferOrder = Q_INQUEUE(pPort->pQ);
-            pBufOrder = (OMX_BUFFERHEADERTYPE**)pPort->aSaveBufferOrder;
-            for (i = 0; i < pPort->nNumSaveBufferOrder; i++)
-            {
-                Q_REMOVE(pPort->pQ, pBufHdr);
-                *pBufOrder = pBufHdr;
-                pBufOrder++;
-                Q_ADD(pPort->pQ, pBufHdr);
-            }
-
-        }
-
-        return(OMX_ErrorNone);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_CheckBufferOrder(
-        TEST_PORTTYPE *pPort)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-        OMX_BUFFERHEADERTYPE **pBufOrder;
-        OMX_U32 i;
-
-        if ((0x0 != pPort) && (0x0 != pPort->aSaveBufferOrder))
-        {
-            pBufOrder = (OMX_BUFFERHEADERTYPE**)pPort->aSaveBufferOrder;
-            for (i = 0; i < pPort->nNumSaveBufferOrder; i++)
-            {
-                Q_REMOVE(pPort->pQ, pBufHdr);
-                if (*pBufOrder != pBufHdr)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "buffers returned out of order\n");
-                }
-                pBufOrder++;
-                Q_ADD(pPort->pQ, pBufHdr);
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /* JVW-NVIDIA: Use real buffer not local copy to fix http://cvs.khronos.org/bugzilla/show_bug.cgi?id=222 */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_SendBogusBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-        OMX_U32 nBogusPortIndex;
-        OMX_U32 nVersion;
-        OMX_U32 nPortIndex;
-
-        /* construct bogus buffer header */
-        Q_PEEK(pPort->pQ, pBufHdr);
-
-        /* check bogus size in buffer header structure */
-        pBufHdr->nSize -= 4;
-
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-
-        }
-        else
-        {
-            eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-
-        }
-
-        if (OMX_ErrorNone == eError) eError = OMX_ErrorUndefined;
-        if (OMX_ErrorBadParameter == eError) eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        pBufHdr->nSize += 4;
-
-        /* check bogus version in buffer header structure */
-        nVersion = pBufHdr->nVersion.nVersion;
-        pBufHdr->nVersion.nVersion = 0x01020304;
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-
-        }
-        else
-        {
-            eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-
-        }
-
-        if (OMX_ErrorNone == eError) eError = OMX_ErrorUndefined;
-        if (OMX_ErrorVersionMismatch == eError) eError = OMX_ErrorNone;
-        pBufHdr->nVersion.nVersion = nVersion;
-
-        /* check bogus port in buffer header structure */
-        eError = FlushTest_FindBogusPortIndex(pCtx, &nBogusPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            nPortIndex = pBufHdr->nInputPortIndex;
-            pBufHdr->nInputPortIndex = nBogusPortIndex;
-            eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-            pBufHdr->nInputPortIndex = nPortIndex;
-        }
-        else
-        {
-            nPortIndex = pBufHdr->nOutputPortIndex;
-            pBufHdr->nOutputPortIndex = nBogusPortIndex;
-            eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-            pBufHdr->nOutputPortIndex = nPortIndex;
-        }
-
-        if (OMX_ErrorNone == eError) eError = OMX_ErrorUndefined;
-        if (OMX_ErrorBadPortIndex == eError) eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_SendNBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers,
-        OMX_BOOL bReadFromInputFile)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                if (OMX_TRUE == pPort->bEOS)
-                {
-                    /* no more buffers to process, so fail */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "End of stream on port, no more data to send\n");
-
-                }
-
-                Q_REMOVE(pPort->pQ, pBufHdr);
-                if (OMX_TRUE == bReadFromInputFile)
-                {
-                    // todo - determine correct size for sending buffers
-                    pBufHdr->nFilledLen = OMX_OSAL_ReadFromInputFile(pBufHdr->pBuffer,
-                                          pBufHdr->nAllocLen,
-                                          pBufHdr->nInputPortIndex);
-                    if (pBufHdr->nFilledLen != pBufHdr->nAllocLen)
-                    {
-                        pBufHdr->nFlags |= OMX_BUFFERFLAG_EOS;
-                        pPort->bEOS = OMX_TRUE;
-                        /* JVW-NVIDIA: Reset port stream for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=223 */
-                        if (pBufHdr->nFlags)
-                        {
-                            eError = FlushTest_ResetPortStream(pCtx);
-                            OMX_CONF_BAIL_ON_ERROR(eError);
-                        }
-
-                    }
-
-                }
-                eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                pPort->nBuffersOutstanding++;
-                nNumBuffers--;
-            }
-
-        }
-        else
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                Q_REMOVE(pPort->pQ, pBufHdr);
-
-                /* mark buffer header as empty on OMX_FillThisBuffer calls */
-                pBufHdr->nFlags = 0x0;
-                pBufHdr->nFilledLen = 0x0;
-                pBufHdr->hMarkTargetComponent = 0x0;
-                pBufHdr->pMarkData = 0x0;
-                eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                pPort->nBuffersOutstanding++;
-                nNumBuffers--;
-            }
-
-        }
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_ProcessNBuffers(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nBufToProcess)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_BOOL bTimeout;
-        OMX_U32 i;
-        OMX_U32 nToSend;
-        OMX_U32 nSent;
-
-        /* reset buffers to process counter */
-        pCtx->nBuffersProcessed = 0x0;
-
-        while (nBufToProcess > pCtx->nBuffersProcessed)
-        {
-            nSent = 0x0;
-            pPort = pCtx->aPorts;
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                nToSend = Q_INQUEUE(pPort->pQ);
-                eError = FlushTest_SendNBuffers(pCtx, pPort, nToSend, OMX_TRUE);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                nSent += nToSend;
-
-                pPort++;
-            }
-
-            if (0x0 == nSent)
-            {
-                /* no buffers were sent, so the component hasn't returned any
-                   buffers, so wait until the component does return a buffer */
-                OMX_OSAL_EventWait(pCtx->hBufferCallbackEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-                OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "Component unresponsive to processing buffers\n");
-                }
-
-                // todo - add means to test to timeout on failure
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_PortAllocateNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        while (0x0 != nNumBuffers)
-        {
-            eError = OMX_AllocateBuffer(pCtx->hWrappedComp, &pBufHdr,
-                                        pPort->sPortDef.nPortIndex,
-                                        pPort, pPort->sPortDef.nBufferSize);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            Q_ADD(pPort->pQ, pBufHdr);
-            if (pBufHdr->pAppPrivate != (OMX_PTR)pPort)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                        "OMX_AllocateBuffer did not populate pAppPrivate\n");
-            }
-
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_PortFreeNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-        {
-            Q_REMOVE(pPort->pQ, pBufHdr);
-            eError = OMX_FreeBuffer(pCtx->hWrappedComp, pPort->sPortDef.nPortIndex, pBufHdr);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_AllocatePortStructures(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 nSize;
-        OMX_U32 i, j;
-        OMX_U32 nPortIndex;
-
-        /* allocate port structures */
-        nSize = (sizeof(TEST_PORTTYPE) * pCtx->nNumPorts);
-        pCtx->aPorts = (TEST_PORTTYPE*)OMX_OSAL_Malloc(nSize);
-        if (0x0 == pCtx->aPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "OMX_OSAL_Malloc failed\n");
-        }
-
-        memset(pCtx->aPorts, 0x0, nSize);
-        pPort = pCtx->aPorts;
-        /* initialize port structures */
-        for (i = 0; i < NUM_DOMAINS; i++)
-        {
-            for (j = 0x0; j < pCtx->sPortParam[i].nPorts; j++)
-            {
-                pPort->pCtx = pCtx;
-                pPort->bEOS = OMX_FALSE;
-                pPort->bOpenFile = OMX_FALSE;
-                nPortIndex = pCtx->sPortParam[i].nStartPortNumber + j;
-                OMX_CONF_INIT_STRUCT(pPort->sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                pPort->sPortDef.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & pPort->sPortDef);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-                    eError = OMX_OSAL_OpenInputFile(pPort->sPortDef.nPortIndex);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_TRUE;
-
-                }
-                else
-                {
-                    if (OMX_ErrorNone == OMX_OSAL_OpenOutputFile(pPort->sPortDef.nPortIndex))
-                    {
-                        /* test does not fail when output file does not open */
-                        pPort->bOpenFile = OMX_TRUE;
-                    }
-
-                }
-
-                if (0x0 == pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCount incorrect\n");
-                }
-
-                if (pPort->sPortDef.nBufferCountMin > pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCountActual incorrect\n");
-                }
-
-                /* allocate LIFO with that or the actual required buffers */
-                Q_ALLOC(pPort->pQ, (pPort->sPortDef.nBufferCountActual));
-                if (0x0 == pPort->pQ)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "memory allocation failure\n");
-                }
-
-
-                pPort->aSaveBufferOrder = OMX_OSAL_Malloc(sizeof(OMX_PTR) * (pPort->sPortDef.nBufferCountActual));
-                if (0x0 == pPort->aSaveBufferOrder)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "memory allocation failure\n");
-                }
-
-                pPort++;
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_FreePortStructures(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        if (0x0 != pCtx->aPorts)
-        {
-            pPort = pCtx->aPorts;
-
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                /* free all allocated buffers */
-                if (0x0 != pPort->pQ)
-                {
-                    if (OMX_ErrorNone == eError)
-                    {
-                        /* record the return code, but don't exit on failure as the
-                           test has memory it must free */
-                        eError = FlushTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-
-                    }
-                    else
-                    {
-                        /* preserve the first failure from freeing buffers */
-                        FlushTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-                    }
-
-                    /* free LIFO */
-                    Q_FREE(pPort->pQ);
-                    pPort->pQ = 0x0;
-
-                }
-
-                if (0x0 != pPort->aSaveBufferOrder)
-                {
-                    OMX_OSAL_Free(pPort->aSaveBufferOrder);
-                }
-                pPort->aSaveBufferOrder = 0x0;
-
-                if (OMX_TRUE == pPort->bOpenFile)
-                {
-                    if (OMX_DirInput == pPort->sPortDef.eDir)
-                    {
-                        eError = OMX_OSAL_CloseInputFile(pPort->sPortDef.nPortIndex);
-
-                    }
-                    else
-                    {
-                        eError = OMX_OSAL_CloseOutputFile(pPort->sPortDef.nPortIndex);
-                    }
-                    pPort->bOpenFile = OMX_FALSE;
-                }
-
-                pPort++;
-            }
-
-            OMX_OSAL_Free(pCtx->aPorts);
-            pCtx->aPorts = 0x0;
-        }
-
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_AllocateAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nCount;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocating %i buffers on port %i\n",
-                           pPort->sPortDef.nBufferCountActual, pPort->sPortDef.nPortIndex);
-            /* allocate all buffers on each port */
-            nCount = pPort->sPortDef.nBufferCountActual;
-            nCount -= Q_INQUEUE(pPort->pQ);
-            eError = FlushTest_PortAllocateNumBuffers(pCtx, pPort, nCount);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE FlushTest_FreeAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Freeing all buffers on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            eError = FlushTest_PortFreeNumBuffers(pCtx, pPort,
-                                                  Q_INQUEUE(pPort->pQ));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_FlushTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_CALLBACKTYPE oCallbacks;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        TEST_CTXTYPE ctx;
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-        OMX_BOOL bTimeout;
-        OMX_U32 nPortIndex;
-        OMX_U32 i;
-
-        oCallbacks.EventHandler    =  FlushTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  FlushTest_EmptyBufferDone;
-        oCallbacks.FillBufferDone  =  FlushTest_FillBufferDone;
-
-        pCtx = &ctx;
-        memset(pCtx, 0x0, sizeof(TEST_CTXTYPE));
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtx->hStateChangeEvent);
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortStopEvent);
-        OMX_OSAL_EventReset(pCtx->hPortStopEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortRestartEvent);
-        OMX_OSAL_EventReset(pCtx->hPortRestartEvent);
-        OMX_OSAL_EventCreate(&pCtx->hPortFlushEvent);
-        OMX_OSAL_EventReset(pCtx->hPortFlushEvent);
-        OMX_OSAL_EventCreate(&pCtx->hBufferCallbackEvent);
-        OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        pCtx->hWrappedComp = hWrappedComp;
-
-        /* inspect component's ports */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamAudioInit, (OMX_PTR) & pCtx->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtx->sPortParam[0].nPorts, pCtx->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamVideoInit, (OMX_PTR) & pCtx->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtx->sPortParam[1].nPorts, pCtx->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamImageInit, (OMX_PTR) & pCtx->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtx->sPortParam[2].nPorts, pCtx->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamOtherInit, (OMX_PTR) & pCtx->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtx->sPortParam[3].nPorts, pCtx->sPortParam[3].nStartPortNumber);
-
-        /* record total number of ports and allocate port structures */
-        pCtx->nNumPorts = pCtx->sPortParam[0].nPorts +
-                          pCtx->sPortParam[1].nPorts +
-                          pCtx->sPortParam[2].nPorts +
-                          pCtx->sPortParam[3].nPorts;
-
-        if (0x0 == pCtx->nNumPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Component has no ports\n");
-        }
-
-        /* allocate port structures */
-        eError = FlushTest_AllocatePortStructures(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component from loaded->idle */
-        OMX_CONF_SET_STATE(pCtx, OMX_StateIdle, eError);
-
-        /* allocate buffers on all ports */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on all ports\n");
-        eError = FlushTest_AllocateAllBuffers(pCtx);
-        OMX_CONF_WAIT_STATE(pCtx, OMX_StateIdle, eError);
-
-        /* transition component to executing */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-        /* bogus buffer header processing */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Sendng bogus buffers to port %i\n", nPortIndex);
-            eError = FlushTest_SendBogusBuffers(pCtx, pPort);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-        /* process some buffers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = FlushTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* pause component */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StatePause, eError);
-
-        /* feed in more buffers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing additional buffers while paused\n");
-
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            /* feed in more buffers to fill the receive queues on each port of the
-               component */
-            eError = FlushTest_SendNBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ), OMX_TRUE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-        /* flush buffers from all ports */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Commanding all ports to flush\n");
-        pCtx->nNumPortsFlushed = 0x0;
-        pCtx->bFlushAllPorts = OMX_TRUE;
-        OMX_OSAL_EventReset(pCtx->hPortFlushEvent);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandFlush, OMX_ALL, 0x0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* confirm all buffers returned on each flushed port */
-        OMX_OSAL_EventWait(pCtx->hPortFlushEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Not all ports report flush completed\n");
-        }
-
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            /* record buffer order */
-            eError = FlushTest_SaveBufferOrder(pPort);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* feed in more buffers one at a time */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Sending %i buffers into port %i\n",
-                           pPort->sPortDef.nBufferCountActual, nPortIndex);
-            eError = FlushTest_SendNBuffers(pCtx, pPort, pPort->sPortDef.nBufferCountActual, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* confirm none of the buffers were returned to the IL Client */
-            if (0x0 != Q_INQUEUE(pPort->pQ))
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port returned buffers unexpectedly\n");
-            }
-
-            /* flush each port one at a time */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Commanding port %i to flush\n", nPortIndex);
-            pCtx->bFlushAllPorts = OMX_FALSE;
-            pCtx->nFlushPort = nPortIndex;
-            OMX_OSAL_EventReset(pCtx->hPortFlushEvent);
-            eError = OMX_SendCommand(hWrappedComp, OMX_CommandFlush, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_EventWait(pCtx->hPortFlushEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port did report flush completed\n");
-            }
-
-            /* check buffer order */
-            eError = FlushTest_CheckBufferOrder(pPort);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            pPort++;
-        }
-
-        /* test invalid port number */
-        eError = FlushTest_FindBogusPortIndex(pCtx, &nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Commanding bogus port %i to flush\n", nPortIndex);
-        eError = OMX_SendCommand(hWrappedComp, OMX_CommandFlush, nPortIndex, 0x0);
-        if (OMX_ErrorBadPortIndex != eError)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                    "Failure to detect bogus port index and return OMX_ErrorBadPortIndex\n");
-        }
-
-        /* feed back in buffers that were flushed, but contained data to be processed */
-        pPort = pCtx->aPorts;
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            nPortIndex = pPort->sPortDef.nPortIndex;
-            /* feed in more buffers to fill the receive queues on each port of the
-               component */
-            eError = FlushTest_SendNBuffers(pCtx, pPort, pPort->sPortDef.nBufferCountActual, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-        /* transition back to executing to continue processing more buffers */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-        /* processing more buffers to validate component can continue from a pause
-           back to executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing %i additional buffers\n", TEST_NUM_BUFFERS_TO_PROCESS);
-        eError = FlushTest_ProcessNBuffers(pCtx, TEST_NUM_BUFFERS_TO_PROCESS);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* transition component to idle */
-        OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-        /* transition to loaded */
-        OMX_CONF_SET_STATE(pCtx, OMX_StateLoaded, eError);
-
-        /* free all buffers */
-        eError = FlushTest_FreeAllBuffers(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_CONF_WAIT_STATE(pCtx, OMX_StateLoaded, eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        eCleanupError = FlushTest_FreePortStructures(pCtx);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortStopEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortRestartEvent);
-        OMX_OSAL_EventDestroy(pCtx->hPortFlushEvent);
-        OMX_OSAL_EventDestroy(pCtx->hBufferCallbackEvent);
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return(eError);
-    }
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_parametertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_parametertest.c
deleted file mode 100644 (file)
index 772ff8e..0000000
+++ /dev/null
@@ -1,1563 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_ParameterTest.c
- *  OpenMax IL conformance test - Parameter Port Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-#define TEST_NAME_STRING "ParameterTest"
-#define NUM_DOMAINS 0x4
-#define TEST_LOOP_BOUND 0x1000
-#define TEST_BAD_VERSION 0x02010301
-
-#define TEST_GROUPID 0xF00DBEEF
-#define TEST_GROUPPRIORITY 0xDEADC0DE
-
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL
-
-#define OMX_CONF_ASSERT(_e_, _a_, _r_) \
-    if (!(_a_))\
-    {\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", (_r_));\
-        (_e_) = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_PARAM_REQUIREDGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_)
-
-#define OMX_CONF_PARAM_OPTIONALGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)
-
-#define OMX_CONF_CONFIG_REQUIREDGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_)
-
-#define OMX_CONF_CONFIG_OPTIONALGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)
-
-
-
-    /************************* T Y P E   D E F I N I T I O N S *******************/
-
-    typedef struct _TEST_CTXTYPE
-    {
-        OMX_HANDLETYPE hComp;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_STATETYPE eState;
-        OMX_U32 nNumPorts;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hPortStopEvent;
-        OMX_HANDLETYPE hPortReStartEvent;
-        OMX_U32 nReStartPort;
-        OMX_U32 nStopPort;
-
-    } TEST_CTXTYPE;
-
-
-    /**************************** G L O B A L S **********************************/
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_eventhandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TEST_CTXTYPE *pCtx;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (NULL == pAppData) return OMX_ErrorNone;
-
-        pCtx = (TEST_CTXTYPE*)pAppData;
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    pCtx->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtx->hStateChangeEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    if (pCtx->nStopPort == nData2) OMX_OSAL_EventSet(pCtx->hPortStopEvent);
-                    break;
-                case OMX_CommandPortEnable:
-                    if (pCtx->nReStartPort == nData2) OMX_OSAL_EventSet(pCtx->hPortReStartEvent);
-                    break;
-                case OMX_EventBufferFlag:
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_FindBogusPortIndex(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 *pPortIndex)
-    {
-        // todo - implement this in a better way
-        UNUSED_PARAMETER(pCtx);
-        *pPortIndex = 0xDEADBEEF;
-
-        return(OMX_ErrorNone);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_bogusparameter(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nIndex,
-        OMX_PTR pData)
-    {
-        OMX_ERRORTYPE eError;
-
-        /* test valid get for this index */
-        eError = OMX_GetParameter(pCtx->hWrappedComp, nIndex, pData);
-        if (eError != OMX_ErrorUnsupportedIndex)
-        {
-            OMX_CONF_ASSERT(eError, (OMX_ErrorNone == eError),
-                            "Expecting index to be supported by OMX_GetParameter\n");
-
-            /* test bogus NULL parameter for this index */
-            eError = OMX_GetParameter(pCtx->hWrappedComp, nIndex, 0x0);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-            eError = OMX_SetParameter(pCtx->hWrappedComp, nIndex, 0x0);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-
-            /* restore error no none */
-            eError = OMX_ErrorNone;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_bogusportparameter(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nIndex,
-        OMX_PTR pData)
-    {
-        OMX_ERRORTYPE eError;
-        OMX_PARAM_PORTDEFINITIONTYPE *pPortDef;
-        OMX_U32 nPortIndex;
-
-        /* test valid get for this index */
-        eError = OMX_GetParameter(pCtx->hWrappedComp, nIndex, pData);
-        if (eError != OMX_ErrorUnsupportedIndex)
-        {
-            OMX_CONF_ASSERT(eError, (OMX_ErrorNone == eError),
-                            "Expecting index to be supported by OMX_GetParameter\n");
-
-            /* test bogus common parameter fields */
-            eError = paramtest_bogusparameter(pCtx, nIndex, pData);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* test bogus port index */
-            pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE*)pData;
-            nPortIndex = pPortDef->nPortIndex;
-            eError = paramtest_FindBogusPortIndex(pCtx, &pPortDef->nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_GetParameter(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadPortIndex == eError),
-                            "Expecting return value OMX_ErrorBadPortIndex\n");
-
-            eError = OMX_SetParameter(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadPortIndex == eError),
-                            "Expecting return value OMX_ErrorBadPortIndex\n");
-
-            /* restore correct value */
-            pPortDef->nPortIndex = nPortIndex;
-
-            /* restore error no none */
-            eError = OMX_ErrorNone;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_bogusportconfig(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nIndex,
-        OMX_PTR pData)
-    {
-        OMX_ERRORTYPE eError;
-        OMX_PARAM_PORTDEFINITIONTYPE *pPortDef;
-        OMX_U32 nVersion;
-        OMX_U32 nPortIndex;
-
-        /* test valid get for this index */
-        eError = OMX_GetConfig(pCtx->hWrappedComp, nIndex, pData);
-        if (eError != OMX_ErrorUnsupportedIndex)
-        {
-            OMX_CONF_ASSERT(eError, (OMX_ErrorNone == eError),
-                            "Expecting index to be supported by OMX_GetParameter\n");
-
-            /* test bogus NULL parameter for this index */
-            eError = OMX_GetConfig(pCtx->hWrappedComp, nIndex, 0x0);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-            eError = OMX_SetConfig(pCtx->hWrappedComp, nIndex, 0x0);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-
-            /* test bad structure size for this index */
-            pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE*)pData;
-            pPortDef->nSize -= 4;
-
-            eError = OMX_GetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-
-            eError = OMX_SetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadParameter == eError),
-                            "Expecting return value OMX_ErrorBadParameter\n");
-
-            pPortDef->nSize += 4;
-
-            /* test bad structure version for this index */
-            nVersion = pPortDef->nVersion.nVersion;
-
-            eError = OMX_GetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorVersionMismatch == eError),
-                            "Expecting return value OMX_ErrorVersionMismatch\n");
-
-            eError = OMX_SetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorVersionMismatch == eError),
-                            "Expecting return value OMX_ErrorVersionMismatch\n");
-
-            pPortDef->nVersion.nVersion = nVersion;
-
-            /* test bogus port index */
-            nPortIndex = pPortDef->nPortIndex;
-            eError = paramtest_FindBogusPortIndex(pCtx, &pPortDef->nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_GetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadPortIndex == eError),
-                            "Expecting return value OMX_ErrorBadPortIndex\n");
-
-            eError = OMX_SetConfig(pCtx->hWrappedComp, nIndex, pData);
-            OMX_CONF_ASSERT(eError, (OMX_ErrorBadPortIndex == eError),
-                            "Expecting return value OMX_ErrorBadPortIndex\n");
-
-            /* restore correct value */
-            pPortDef->nPortIndex = nPortIndex;
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_buffersupplier(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError;
-        OMX_PARAM_BUFFERSUPPLIERTYPE sBufferSupplier;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-
-        OMX_CONF_INIT_STRUCT(sBufferSupplier, OMX_PARAM_BUFFERSUPPLIERTYPE);
-        sBufferSupplier.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                  (OMX_PTR) & sBufferSupplier);
-
-        if (OMX_ErrorUnsupportedIndex == eError)
-        {
-            /* component does not support the buffer supplier index,
-               which implies that it is a non-interop component ... as
-               such, validate it fails OMX_SetupTunnel, otherwise fail */
-            OMX_CONF_INIT_STRUCT(sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR) & sPortDef);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            if (OMX_DirInput == sPortDef.eDir)
-            {
-                eError = OMX_SetupTunnel(0x0, 0x0, pCtx->hWrappedComp, nPortIndex);
-
-            }
-            else
-            {
-                eError = OMX_SetupTunnel(pCtx->hWrappedComp, nPortIndex, 0x0, 0x0);
-            }
-
-            OMX_CONF_ASSERT(eError, (OMX_ErrorNotImplemented == eError),
-                            "Interop component does not support OMX_IndexParamCompBufferSupplier\n");
-
-        }
-        else
-        {
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-            sBufferSupplier.eBufferSupplier = OMX_BufferSupplyInput;
-            eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                      (OMX_PTR) & sBufferSupplier);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            sBufferSupplier.eBufferSupplier = OMX_BufferSupplyOutput;
-            eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                      (OMX_PTR) & sBufferSupplier);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* bogus parameter test */
-            eError = paramtest_bogusportparameter(pCtx, OMX_IndexParamCompBufferSupplier,
-                                                  (OMX_PTR) & sBufferSupplier);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_commandport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_BOOL bReStart)
-    {
-        /* test function is used to command a port to stop, or restart */
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout = OMX_FALSE;
-
-        if (OMX_TRUE == bReStart)
-        {
-            /* reset markers to track if the event was completed */
-            OMX_OSAL_EventReset(pCtx->hPortReStartEvent);
-            pCtx->nReStartPort = nPortIndex;
-            eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandPortEnable, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* wait until command is complete, timeout if it takes too long */
-            OMX_OSAL_EventWait(pCtx->hPortReStartEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            eError = ((OMX_TRUE == bTimeout) ? OMX_ErrorUndefined : OMX_ErrorNone);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-        }
-        else
-        {
-            /* reset markers to track if the event was completed */
-            OMX_OSAL_EventReset(pCtx->hPortStopEvent);
-            pCtx->nStopPort = nPortIndex;
-            eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandPortDisable, nPortIndex, 0x0);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* wait until command is complete, timeout if it takes too long */
-            OMX_OSAL_EventWait(pCtx->hPortStopEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            eError = ((OMX_TRUE == bTimeout) ? OMX_ErrorUndefined : OMX_ErrorNone);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_portenable(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        /* test function is used to command a port to stop, and validate if the
-           port definition correctly reports the port as not enabled */
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        eError = paramtest_commandport(pCtx, nPortIndex, OMX_FALSE);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* query port definition */
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                  (OMX_PTR) & sPortDefinition);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bEnabled),
-                        "Incorrect value in PortDefinition bEnabled field\n");
-        OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                        "Incorrect value in PortDefinition bPopulated field\n");
-
-        eError = paramtest_commandport(pCtx, nPortIndex, OMX_TRUE);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                  (OMX_PTR) & sPortDefinition);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                        "Incorrect value in PortDefinition bEnabled field\n");
-        OMX_CONF_ASSERT(eError, (OMX_FALSE == sPortDefinition.bPopulated),
-                        "Incorrect value in PortDefinition bPopulated field\n");
-
-        /* test bogus port definition structure as part of port enable test,
-           to single source checking of a port related structure */
-        eError = paramtest_bogusportparameter(pCtx, OMX_IndexParamPortDefinition,
-                                              (OMX_PTR) & sPortDefinition);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_audioport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_AUDIO_PARAM_PCMMODETYPE sFormatPCM;
-        OMX_AUDIO_PARAM_ADPCMTYPE sFormatADPCM;
-        OMX_AUDIO_PARAM_AMRTYPE sFormatAMR;
-        OMX_AUDIO_PARAM_GSMFRTYPE sFormatGSMFR;
-        OMX_AUDIO_PARAM_GSMEFRTYPE sFormatGSMEFR;
-        OMX_AUDIO_PARAM_GSMHRTYPE sFormatGSMHR;
-        OMX_AUDIO_PARAM_MP3TYPE sFormatMP3;
-        OMX_AUDIO_PARAM_AACPROFILETYPE sFormatAAC;
-        OMX_AUDIO_PARAM_WMATYPE sFormatWMA;
-        OMX_AUDIO_PARAM_MIDITYPE sFormatMIDI;
-        OMX_AUDIO_PARAM_SBCTYPE sFormatSBC;
-        OMX_AUDIO_PARAM_G729TYPE sFormatG729;
-        OMX_AUDIO_PARAM_G726TYPE sFormatG726;
-        OMX_AUDIO_PARAM_G723TYPE sFormatG723;
-        OMX_AUDIO_PARAM_RATYPE sFormatRA;
-        OMX_AUDIO_PARAM_PDCFRTYPE sFormatPDCFR;
-        OMX_AUDIO_PARAM_PDCEFRTYPE sFormatPDCEFR;
-        OMX_AUDIO_PARAM_PDCHRTYPE sFormatPDCHR;
-        OMX_AUDIO_PARAM_SMVTYPE sFormatSMV;
-        OMX_AUDIO_PARAM_EVRCTYPE sFormatEVRC;
-        OMX_AUDIO_PARAM_QCELP13TYPE sFormatQCELP13;
-        OMX_AUDIO_PARAM_QCELP8TYPE sFormatQCELP8;
-        OMX_AUDIO_PARAM_TDMAFRTYPE sFormatTDMAFR;
-        OMX_AUDIO_PARAM_TDMAEFRTYPE sFormatTDMAEFR;
-        OMX_AUDIO_PARAM_VORBISTYPE sFormatVORBIS;
-
-        OMX_U32 i = 0x0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting audio port %i\n",
-                       nPortIndex);
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE);
-        sPortFormat.nPortIndex = nPortIndex;
-        while ((OMX_ErrorNoMore != eError) && (i < TEST_LOOP_BOUND))
-        {
-            sPortFormat.nIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPortFormat,
-                                      (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore != eError)
-            {
-                /* don't count the error indicating no more data to enumerate
-                   as an actual failure */
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* no failure so test this port for it's default parameters */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPortFormat, (OMX_PTR) & sPortFormat);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* query port definition type for this format */
-                OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDefinition.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* port must default to enabled */
-                OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                                "Port must default to enabled\n");
-
-                /* port must report the domain consistently domain */
-                OMX_CONF_ASSERT(eError, (OMX_PortDomainAudio == sPortDefinition.eDomain),
-                                "Port must report format consistently as Audio\n");
-
-                /* validate eFormat matchs the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eEncoding == sPortDefinition.format.audio.eEncoding),
-                                "Port format mismatch\n");
-
-                /* apply port definition defaults back into the component */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                          (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* if port format is compresssed data, validate format specific
-                   parameter structure */
-                if (OMX_AUDIO_CodingUnused != sPortFormat.eEncoding)
-                {
-                    switch (sPortFormat.eEncoding)
-                    {
-                        case OMX_AUDIO_CodingAutoDetect:
-                            /* auto detection cannot be tested for parameter
-                               configuration */
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingAutoDetect\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_AUDIO_CodingPCM:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingPCM\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-                            sFormatPCM.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioPcm, (OMX_PTR)&sFormatPCM, eError);
-                            break;
-                        case OMX_AUDIO_CodingADPCM:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingADPCM\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatADPCM, OMX_AUDIO_PARAM_ADPCMTYPE);
-                            sFormatADPCM.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioAdpcm, (OMX_PTR)&sFormatADPCM, eError);
-                            break;
-                        case OMX_AUDIO_CodingAMR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingAMR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatAMR, OMX_AUDIO_PARAM_AMRTYPE);
-                            sFormatAMR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioAmr, (OMX_PTR)&sFormatAMR, eError);
-                            break;
-                        case OMX_AUDIO_CodingGSMFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingGSMFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatGSMFR, OMX_AUDIO_PARAM_GSMFRTYPE);
-                            sFormatGSMFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioGsm_FR, (OMX_PTR)&sFormatGSMFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingGSMEFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingGSMEFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatGSMEFR, OMX_AUDIO_PARAM_GSMEFRTYPE);
-                            sFormatGSMEFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioGsm_EFR, (OMX_PTR)&sFormatGSMEFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingGSMHR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingGSHR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatGSMFR, OMX_AUDIO_PARAM_GSMHRTYPE);
-                            sFormatGSMHR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioGsm_HR, (OMX_PTR)&sFormatGSMHR, eError);
-                            break;
-                        case OMX_AUDIO_CodingPDCFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingPDCFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatPDCFR, OMX_AUDIO_PARAM_PDCFRTYPE);
-                            sFormatPDCFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioPdc_FR, (OMX_PTR)&sFormatPDCFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingPDCEFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingPDCEFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatPDCEFR, OMX_AUDIO_PARAM_PDCEFRTYPE);
-                            sFormatPDCEFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioPdc_EFR, (OMX_PTR)&sFormatPDCEFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingPDCHR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingPDCHR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatPDCHR, OMX_AUDIO_PARAM_PDCHRTYPE);
-                            sFormatPDCHR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioPdc_HR, (OMX_PTR)&sFormatPDCHR, eError);
-                            break;
-                        case OMX_AUDIO_CodingTDMAFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingTDMAFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatTDMAFR, OMX_AUDIO_PARAM_TDMAFRTYPE);
-                            sFormatTDMAFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioTdma_FR, (OMX_PTR)&sFormatTDMAFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingTDMAEFR:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingTDMAEFR\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatTDMAEFR, OMX_AUDIO_PARAM_TDMAEFRTYPE);
-                            sFormatTDMAEFR.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioTdma_EFR, (OMX_PTR)&sFormatTDMAEFR, eError);
-                            break;
-                        case OMX_AUDIO_CodingQCELP8:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingQCELP8\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatQCELP8, OMX_AUDIO_PARAM_QCELP8TYPE);
-                            sFormatQCELP8.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioQcelp8, (OMX_PTR)&sFormatQCELP8, eError);
-                            break;
-                        case OMX_AUDIO_CodingQCELP13:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingQCELP13\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatQCELP13, OMX_AUDIO_PARAM_QCELP13TYPE);
-                            sFormatQCELP13.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioQcelp13, (OMX_PTR)&sFormatQCELP13, eError);
-                            break;
-                        case OMX_AUDIO_CodingEVRC:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingEVRC\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatEVRC, OMX_AUDIO_PARAM_EVRCTYPE);
-                            sFormatEVRC.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioEvrc, (OMX_PTR)&sFormatEVRC, eError);
-                            break;
-                        case OMX_AUDIO_CodingSMV:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingSMV\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatSMV, OMX_AUDIO_PARAM_SMVTYPE);
-                            sFormatSMV.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioSmv, (OMX_PTR)&sFormatSMV, eError);
-                            break;
-                        case OMX_AUDIO_CodingG711:
-                            // todo - how does this correlate to PCM?
-                            break;
-                        case OMX_AUDIO_CodingG723:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingG723\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatG723, OMX_AUDIO_PARAM_G723TYPE);
-                            sFormatG723.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioG723, (OMX_PTR)&sFormatG723, eError);
-                            break;
-                        case OMX_AUDIO_CodingG726:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingG726\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatG726, OMX_AUDIO_PARAM_G726TYPE);
-                            sFormatG726.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioG726, (OMX_PTR)&sFormatG726, eError);
-                            break;
-                        case OMX_AUDIO_CodingG729:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingG729\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatG729, OMX_AUDIO_PARAM_G729TYPE);
-                            sFormatG729.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioG729, (OMX_PTR)&sFormatG729, eError);
-                            break;
-                        case OMX_AUDIO_CodingAAC:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingAAC\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatAAC, OMX_AUDIO_PARAM_AACPROFILETYPE);
-                            sFormatAAC.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioAac, (OMX_PTR)&sFormatAAC, eError);
-                            break;
-                        case OMX_AUDIO_CodingMP3:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingMP3\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatMP3, OMX_AUDIO_PARAM_MP3TYPE);
-                            sFormatMP3.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioMp3, (OMX_PTR)&sFormatMP3, eError);
-                            break;
-                        case OMX_AUDIO_CodingSBC:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingSBC\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatSBC, OMX_AUDIO_PARAM_SBCTYPE);
-                            sFormatSBC.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioSbc, (OMX_PTR)&sFormatSBC, eError);
-                            break;
-                        case OMX_AUDIO_CodingVORBIS:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingVORBIS\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatVORBIS, OMX_AUDIO_PARAM_VORBISTYPE);
-                            sFormatVORBIS.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioVorbis, (OMX_PTR)&sFormatVORBIS, eError);
-                            break;
-                        case OMX_AUDIO_CodingWMA:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingWMA\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatWMA, OMX_AUDIO_PARAM_WMATYPE);
-                            sFormatWMA.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioWma, (OMX_PTR)&sFormatWMA, eError);
-                            break;
-                        case OMX_AUDIO_CodingRA:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingRA\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatRA, OMX_AUDIO_PARAM_RATYPE);
-                            sFormatRA.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioRa, (OMX_PTR)&sFormatRA, eError);
-                            break;
-                        case OMX_AUDIO_CodingMIDI:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_AUDIO_CodingMIDI\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatMIDI, OMX_AUDIO_PARAM_MIDITYPE);
-                            sFormatMIDI.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamAudioMidi, (OMX_PTR)&sFormatMIDI, eError);
-                            break;
-                        default:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i has invalid eEncoding=0x%X\n",
-                                           nPortIndex, sPortFormat.eEncoding);
-                            eError = OMX_ErrorUndefined;
-                            goto OMX_CONF_TEST_BAIL;
-
-                    }
-
-                }
-
-            }
-
-            i++;
-        }
-
-        /* mask the error indicating no more into a no error */
-        if (OMX_ErrorNoMore == eError) eError = OMX_ErrorNone;
-
-        if (i == 0x0)
-        {
-            /* the port did not enumerate a single format */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i does not support any color or compression formats\n",
-                           nPortIndex);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_videoport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_AVCTYPE sFormatAVC;
-        OMX_VIDEO_PARAM_MPEG4TYPE sFormatMpeg4;
-        OMX_VIDEO_PARAM_MPEG2TYPE sFormatMpeg2;
-        OMX_VIDEO_PARAM_WMVTYPE sFormatWMV;
-        OMX_VIDEO_PARAM_RVTYPE sFormatRV;
-        OMX_VIDEO_PARAM_H263TYPE sFormatH263;
-        OMX_U32 i = 0x0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting video port %i\n",
-                       nPortIndex);
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        sPortFormat.nPortIndex = nPortIndex;
-        while ((OMX_ErrorNoMore != eError) && (i < TEST_LOOP_BOUND))
-        {
-            sPortFormat.nIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoPortFormat, (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore != eError)
-            {
-                /* don't count the error indicating no more data to enumerate
-                   as an actual failure */
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* no failure so test this port for it's default parameters */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoPortFormat, (OMX_PTR) & sPortFormat);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* query port definition type for this format */
-                OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDefinition.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* port must default to enabled */
-                OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                                "Port must default to enabled\n");
-
-                /* port must report the domain consistently domain */
-                OMX_CONF_ASSERT(eError, (OMX_PortDomainVideo == sPortDefinition.eDomain),
-                                "Port must report domain consistently as Video\n");
-
-                /* validate eFormat matches the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eCompressionFormat == sPortDefinition.format.video.eCompressionFormat),
-                                "Port format mismatch\n");
-
-                /* validate eFormat matches the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eColorFormat == sPortDefinition.format.video.eColorFormat),
-                                "Port format mismatch\n");
-
-                /* apply port definition defaults back into the component */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* if port format is compresssed data, validate format specific
-                   parameter structure */
-                if (OMX_VIDEO_CodingUnused != sPortFormat.eCompressionFormat)
-                {
-                    switch (sPortFormat.eCompressionFormat)
-                    {
-                        case OMX_VIDEO_CodingAutoDetect:
-                            /* auto detection cannot be tested for parameter
-                               configuration */
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingAutoDetect\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_VIDEO_CodingMPEG2:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingMPEG2\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatMpeg2, OMX_VIDEO_PARAM_MPEG2TYPE);
-                            sFormatMpeg2.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoMpeg2, (OMX_PTR)&sFormatMpeg2, eError);
-                            break;
-                        case OMX_VIDEO_CodingH263:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingH263\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatH263, OMX_VIDEO_PARAM_H263TYPE);
-                            sFormatH263.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoH263, (OMX_PTR)&sFormatH263, eError);
-                            break;
-                        case OMX_VIDEO_CodingMPEG4:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingMPEG4\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatMpeg4, OMX_VIDEO_PARAM_MPEG4TYPE);
-                            sFormatMpeg4.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoMpeg4, (OMX_PTR)&sFormatMpeg4, eError);
-                            break;
-                        case OMX_VIDEO_CodingWMV:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingWMV\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatWMV, OMX_VIDEO_PARAM_WMVTYPE);
-                            sFormatWMV.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoWmv, (OMX_PTR)&sFormatWMV, eError);
-                            break;
-                        case OMX_VIDEO_CodingRV:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingRV\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatRV, OMX_VIDEO_PARAM_RVTYPE);
-                            sFormatRV.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoRv, (OMX_PTR)&sFormatRV, eError);
-                            break;
-                        case OMX_VIDEO_CodingAVC:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_VIDEO_CodingAVC\n",
-                                           nPortIndex);
-                            OMX_CONF_INIT_STRUCT(sFormatAVC, OMX_VIDEO_PARAM_AVCTYPE);
-                            sFormatAVC.nPortIndex = nPortIndex;
-                            OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamVideoAvc, (OMX_PTR)&sFormatAVC, eError);
-                            break;
-                        case OMX_VIDEO_CodingMJPEG:
-                            /* no parameter structure exists for motion Jpeg */
-                            break;
-                        default:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i has invalid eCompressionFormat=0x%X\n",
-                                           nPortIndex, sPortFormat.eCompressionFormat);
-                            eError = OMX_ErrorUndefined;
-                            goto OMX_CONF_TEST_BAIL;
-
-                    }
-
-                }
-                /* if port has supported color format, verify color format*/
-                if (OMX_COLOR_FormatUnused != sPortFormat.eColorFormat)
-                {
-                    if ((sPortFormat.eColorFormat >= OMX_COLOR_FormatMonochrome) ||
-                            (sPortFormat.eColorFormat <= OMX_COLOR_Format24BitABGR6666))
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting valid color format \n",
-                                       nPortIndex);
-                    }
-                    else
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i has invalid eColorFormat=0x%X\n",
-                                       nPortIndex, sPortFormat.eColorFormat,
-                                       sPortDefinition.format.video.eColorFormat);
-                        eError = OMX_ErrorUndefined;
-                        goto OMX_CONF_TEST_BAIL;
-                    }
-                }
-
-            }
-
-            i++;
-        }
-
-        /* mask the error indicating no more into a no error */
-        if (OMX_ErrorNoMore == eError) eError = OMX_ErrorNone;
-
-        if (i == 0x0)
-        {
-            /* the port did not enumerate a single format */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i does not support any color or compression formats\n",
-                           nPortIndex);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_imageport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_IMAGE_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_U32 i = 0x0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting image port %i\n",
-                       nPortIndex);
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_IMAGE_PARAM_PORTFORMATTYPE);
-        sPortFormat.nPortIndex = nPortIndex;
-        while ((OMX_ErrorNoMore != eError) && (i < TEST_LOOP_BOUND))
-        {
-            sPortFormat.nIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamImagePortFormat, (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore != eError)
-            {
-                /* don't count the error indicating no more data to enumerate
-                   as an actual failure */
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* no failure so test this port for it's default parameters */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamImagePortFormat, (OMX_PTR) & sPortFormat);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* query port definition type for this format */
-                OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDefinition.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* port must default to enabled */
-                OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                                "Port must default to enabled\n");
-
-                /* port must report the domain consistently domain */
-                OMX_CONF_ASSERT(eError, (OMX_PortDomainImage == sPortDefinition.eDomain),
-                                "Port must report domain consistently as Image\n");
-
-                /* validate eFormat matches the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eCompressionFormat == sPortDefinition.format.image.eCompressionFormat),
-                                "Port format mismatch\n");
-
-                /* validate eFormat matches the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eColorFormat == sPortDefinition.format.image.eColorFormat),
-                                "Port format mismatch\n");
-
-                /* apply port definition defaults back into the component */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* if port format is compresssed data, validate format specific
-                   parameter structure */
-                if (OMX_IMAGE_CodingUnused != sPortFormat.eCompressionFormat)
-                {
-                    switch (sPortFormat.eCompressionFormat)
-                    {
-                        case OMX_IMAGE_CodingAutoDetect:
-                            /* auto detection cannot be tested for parameter
-                               configuration */
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingAutoDetect\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingJPEG:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingJPEG\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingJPEG2K:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingJPEG2K\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingEXIF:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingEXIF\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingTIFF:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingTIFF\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingGIF:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingGIF\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingPNG:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingPNG\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingLZW:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingLZW\n",
-                                           nPortIndex);
-                            break;
-                        case OMX_IMAGE_CodingBMP:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting format OMX_IMAGE_CodingBMP\n",
-                                           nPortIndex);
-                            break;
-                        default:
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i has invalid eCompressionFormat=0x%X\n",
-                                           nPortIndex, sPortFormat.eCompressionFormat);
-                            eError = OMX_ErrorUndefined;
-                            goto OMX_CONF_TEST_BAIL;
-
-                    }
-
-                }
-
-                /* if port has supported color format, verify color format*/
-                if (OMX_COLOR_FormatUnused != sPortFormat.eColorFormat)
-                {
-                    if ((sPortFormat.eColorFormat >= OMX_COLOR_FormatMonochrome) ||
-                            (sPortFormat.eColorFormat <= OMX_COLOR_Format24BitABGR6666))
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i inspecting valid color format \n",
-                                       nPortIndex);
-                    }
-                    else
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i has invalid eColorFormat=0x%X\n",
-                                       nPortIndex, sPortFormat.eColorFormat,
-                                       sPortDefinition.format.video.eColorFormat);
-                        eError = OMX_ErrorUndefined;
-                        goto OMX_CONF_TEST_BAIL;
-                    }
-                }
-
-            }
-
-            i++;
-        }
-
-        /* mask the error indicating no more into a no error */
-        if (OMX_ErrorNoMore == eError) eError = OMX_ErrorNone;
-
-        if (i == 0x0)
-        {
-            /* the port did not enumerate a single format */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i does not support any color or compression formats\n",
-                           nPortIndex);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE paramtest_otherport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_OTHER_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_U32 i = 0x0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting other port %i\n",
-                       nPortIndex);
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_OTHER_PARAM_PORTFORMATTYPE);
-        sPortFormat.nPortIndex = nPortIndex;
-        while ((OMX_ErrorNoMore != eError) && (i < TEST_LOOP_BOUND))
-        {
-            sPortFormat.nIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamOtherPortFormat, (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore != eError)
-            {
-                /* don't count the error indicating no more data to enumerate
-                   as an actual failure */
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* no failure so test this port for it's default parameters */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamOtherPortFormat, (OMX_PTR) & sPortFormat);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* query port definition type for this format */
-                OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDefinition.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* port must default to enabled */
-                OMX_CONF_ASSERT(eError, (OMX_TRUE == sPortDefinition.bEnabled),
-                                "Port must default to enabled\n");
-
-                /* port must report the domain consistently domain */
-                OMX_CONF_ASSERT(eError, (OMX_PortDomainOther == sPortDefinition.eDomain),
-                                "Port must report format as Other\n");
-
-                /* validate eFormat matchs the format selected when setting the port format */
-                OMX_CONF_ASSERT(eError, (sPortFormat.eFormat == sPortDefinition.format.other.eFormat),
-                                "Port format mismatch\n");
-
-                /* apply port definition defaults back into the component */
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                /* validate format specific parameter structure */
-                switch (sPortFormat.eFormat)
-                {
-                    case OMX_OTHER_FormatTime:
-                        // todo - add config calls required for this port format
-                        break;
-                    case OMX_OTHER_FormatPower:
-                        break;
-                    case OMX_OTHER_FormatStats:
-                        break;
-                    default:
-                        // todo - why is vendor specific formats in this enum ... should they not be done
-                        //        in the same way as image, video and audio vendor specific formats?
-                        if (OMX_OTHER_FormatVendorReserved > sPortFormat.eFormat)
-                        {
-                            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                                    "Invalid other format\n");
-
-                        }
-                        else
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i has vendor defined eFormat=0x%X\n",
-                                           nPortIndex, sPortFormat.eFormat);
-                        }
-                        break;
-
-                }
-
-            }
-
-            i++;
-        }
-
-        /* mask the error indicating no more into a no error */
-        if (OMX_ErrorNoMore == eError) eError = OMX_ErrorNone;
-
-        if (i == 0x0)
-        {
-            /* the port did not enumerate a single format */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Port %i does not support any color or compression formats\n",
-                           nPortIndex);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_ParameterTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE sCallbacks;
-        TEST_CTXTYPE ctx;
-        TEST_CTXTYPE *pCtx;
-        OMX_BOOL bTimeout;
-        OMX_PRIORITYMGMTTYPE sPriorityMgmt;
-        OMX_U32 nPortIndex;
-        OMX_U32 i, j;
-        OMX_STRING cDomainName[NUM_DOMAINS] = {"audio", "video", "image", "other"};
-
-        pCtx = &ctx;
-        memset(pCtx, 0x0, sizeof(TEST_CTXTYPE));
-
-        /* create callback tracer */
-        sCallbacks.EventHandler    = paramtest_eventhandler;
-        sCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        sCallbacks.FillBufferDone  = StubbedFillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&sCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&ctx.hStateChangeEvent);
-        OMX_OSAL_EventReset(ctx.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&ctx.hPortStopEvent);
-        OMX_OSAL_EventReset(ctx.hPortStopEvent);
-        OMX_OSAL_EventCreate(&ctx.hPortReStartEvent);
-        OMX_OSAL_EventReset(ctx.hPortReStartEvent);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        if (eError != OMX_ErrorNone)
-        {
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-        /* Acquire handle */
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        pCtx->hWrappedComp = hWrappedComp;
-
-        /* Verify start in Loaded state */
-        eError = OMX_GetState(pCtx->hWrappedComp, &pCtx->eState);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_CONF_ASSERT(eError, (OMX_StateLoaded == pCtx->eState),
-                        "Component state is not OMX_StateLoaded\n");
-
-        /* validate priority management structure */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting OMX_IndexParamPriorityMgmt\n");
-        OMX_CONF_INIT_STRUCT(sPriorityMgmt, OMX_PRIORITYMGMTTYPE);
-        eError = paramtest_bogusparameter(pCtx, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        sPriorityMgmt.nGroupPriority = TEST_GROUPPRIORITY;
-        sPriorityMgmt.nGroupID = TEST_GROUPID;
-        eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if ((TEST_GROUPPRIORITY != sPriorityMgmt.nGroupPriority) ||
-                (TEST_GROUPID != sPriorityMgmt.nGroupID))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Unexpected priority management values!\n");
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-        /* inspect component's ports */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamAudioInit, (OMX_PTR) & pCtx->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtx->sPortParam[0].nPorts, pCtx->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamVideoInit, (OMX_PTR) & pCtx->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtx->sPortParam[1].nPorts, pCtx->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamImageInit, (OMX_PTR) & pCtx->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtx->sPortParam[2].nPorts, pCtx->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamOtherInit, (OMX_PTR) & pCtx->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtx->sPortParam[3].nPorts, pCtx->sPortParam[3].nStartPortNumber);
-
-        /* record total number of ports and allocate port structures */
-        pCtx->nNumPorts = pCtx->sPortParam[0].nPorts +
-                          pCtx->sPortParam[1].nPorts +
-                          pCtx->sPortParam[2].nPorts +
-                          pCtx->sPortParam[3].nPorts;
-
-        OMX_CONF_ASSERT(eError, (0x0 != pCtx->nNumPorts),
-                        "Component has reported no ports\n");
-
-        /* loop through all domains checking that no 2 port index's overlap */
-        for (i = 0x0; i < NUM_DOMAINS; i++)
-        {
-            if (0x0 != pCtx->sPortParam[i].nPorts)
-            {
-                /* flag that a port was found */
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "%s domain reported %i ports starting at %i\n",
-                               cDomainName[i], pCtx->sPortParam[i].nPorts,
-                               pCtx->sPortParam[i].nStartPortNumber);
-
-                for (j = 0x0; j < NUM_DOMAINS; j++)
-                {
-                    /* don't check for an overlapping port domains against
-                       the same domain */
-                    if ((i != j) && (0x0 != pCtx->sPortParam[j].nPorts))
-                    {
-                        if ((pCtx->sPortParam[i].nStartPortNumber >=
-                                pCtx->sPortParam[j].nStartPortNumber) &&
-                                (pCtx->sPortParam[i].nStartPortNumber <
-                                 pCtx->sPortParam[j].nStartPortNumber + pCtx->sPortParam[j].nPorts))
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s port numbers overlap with %s port numbers\n",
-                                           cDomainName[i], cDomainName[j]);
-                            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                                    "Component does not have unique port numbers\n");
-                            goto OMX_CONF_TEST_BAIL;
-
-                        }
-
-                    }
-
-                }
-
-            }
-
-        }
-
-        /* process port definitions and parameters on all audio ports */
-        for (i = 0x0; i < pCtx->sPortParam[0].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[0].nStartPortNumber + i;
-            eError = paramtest_buffersupplier(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_audioport(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_portenable(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all video ports */
-        for (i = 0x0; i < pCtx->sPortParam[1].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[1].nStartPortNumber + i;
-            eError = paramtest_buffersupplier(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_videoport(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_portenable(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all image ports */
-        for (i = 0x0; i < pCtx->sPortParam[2].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[2].nStartPortNumber + i;
-            eError = paramtest_buffersupplier(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_imageport(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = paramtest_portenable(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all other ports */
-        for (i = 0x0; i < pCtx->sPortParam[3].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[3].nStartPortNumber + i;
-            eError = paramtest_buffersupplier(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_otherport(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = paramtest_portenable(&ctx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* command all port to stop, so the test can easily transition the
-           component to idle */
-        for (i = 0x0; i < pCtx->sPortParam[0].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[0].nStartPortNumber + i;
-            paramtest_commandport(&ctx, nPortIndex, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all video ports */
-        for (i = 0x0; i < pCtx->sPortParam[1].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[1].nStartPortNumber + i;
-            paramtest_commandport(&ctx, nPortIndex, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all image ports */
-        for (i = 0x0; i < pCtx->sPortParam[2].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[2].nStartPortNumber + i;
-            paramtest_commandport(&ctx, nPortIndex, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* process port definitions and parameters on all other ports */
-        for (i = 0x0; i < pCtx->sPortParam[3].nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParam[3].nStartPortNumber + i;
-            paramtest_commandport(&ctx, nPortIndex, OMX_FALSE);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* transition the component to idle */
-        OMX_OSAL_EventReset(ctx.hStateChangeEvent);
-        eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(ctx.hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        eError = ((OMX_TRUE == bTimeout) ? OMX_ErrorUndefined : OMX_ErrorNone);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* test OMX_SetParameter calls which should not be accepted with
-           the component in the IDLE state */
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        sPriorityMgmt.nGroupPriority = TEST_GROUPPRIORITY;
-        sPriorityMgmt.nGroupID = TEST_GROUPID;
-        eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamPriorityMgmt, (OMX_PTR) & sPriorityMgmt);
-        OMX_CONF_ASSERT(eError, (OMX_ErrorIncorrectStateOperation == eError),
-                        "Bad return from OMX_SetParameter while OMX_StateIdle\n");
-        /* expected error code, so mark the failure as success */
-        eError = OMX_ErrorNone;
-
-        /* transition the component to loaded */
-        OMX_OSAL_EventReset(ctx.hStateChangeEvent);
-
-        eError = OMX_SendCommand(pCtx->hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0);
-
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_EventWait(ctx.hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        eError = ((OMX_TRUE == bTimeout) ? OMX_ErrorUndefined : OMX_ErrorNone);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-
-OMX_CONF_TEST_BAIL:
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(ctx.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(ctx.hPortStopEvent);
-        OMX_OSAL_EventDestroy(ctx.hPortReStartEvent);
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return (eError);
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_portcommunicationtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_portcommunicationtest.c
deleted file mode 100644 (file)
index 946ed72..0000000
+++ /dev/null
@@ -1,1012 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_PortCommunicationTest.c
- *  OpenMax IL conformance test - Port Communication Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-#define TEST_NAME_STRING "PortCommunicationTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-    char szDesc[256];
-#define NUM_DOMAINS 0x4
-#define OMX_NOPORT 0xfffffffe
-
-
-    /*
-     *     M A C R O S
-     */
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)      \
-    memset(&(_s_), 0x0, sizeof(_name_));       \
-    (_s_).nSize = sizeof(_name_);              \
-    (_s_).nVersion.s.nVersionMajor = 0x1;      \
-    (_s_).nVersion.s.nVersionMinor = 0x0;      \
-    (_s_).nVersion.s.nRevision = 0x0;          \
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_IF_ERROR(_eError)                \
-    if((eError = _eError) != OMX_ErrorNone){   \
-        goto OMX_CONF_TEST_BAIL;               \
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL( _desc, _eError)\
-{                                              \
-    eError = _eError;                          \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _desc);       \
-    goto OMX_CONF_TEST_BAIL;                   \
-}
-
-#define LIST_CLEAR_ENTRY(_pL, _pB)\
-    _pB = _pL->pBufHdr;                \
-    _pL->pBufHdr = NULL;       \
-    _pL = _pL->pNextBuf;
-
-#define LIST_SET_ENTRY(_pL, _pB)       \
-{                              \
-    BufferList *_pT = _pL;     \
-    while(_pT && _pT->pBufHdr){        \
-        _pT = _pT->pNextBuf;   \
-    }                          \
-    if(_pT)                    \
-        _pT->pBufHdr = _pB;    \
-}
-
-#define OMX_CONF_EVENT_HANDLER_ERROR(_nX, _nY, _nZ, _desc)     \
-{                                                              \
-    _nX = _nY + 1;                                             \
-    _nZ = OMX_CONF_BUFFERS_OF_TRAFFIC;                         \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", _desc);               \
-}
-
-
-    /*
-     *     D E F I N I T I O N S
-     */
-    typedef struct _BufferList BufferList;
-
-    struct _BufferList
-    {
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-        OMX_BUFFERHEADERTYPE *pOrigBufHdr;
-        BufferList *pNextBuf;
-    };
-
-    typedef struct
-    {
-        OMX_U32 nBufFactor;
-        OMX_BOOL bClientAllocBuf;
-        OMX_HANDLETYPE hWComp;
-        OMX_HANDLETYPE hStateSetEvent;
-        OMX_HANDLETYPE hPortDisableEvent;
-        OMX_HANDLETYPE hPortEnableEvent;
-        OMX_HANDLETYPE hBufDoneEvent;
-        OMX_HANDLETYPE hEmptyBufDoneEvent;
-        BufferList *pInBufferList;
-        BufferList *pOutBufferList;
-        OMX_U32 nBufDoneCalls;
-        OMX_U32 nPorts;
-        OMX_U32 nPortsStopped;
-        OMX_U32 nPortsRestarted;
-        OMX_U32 nInBuf;
-        OMX_U32 nOutBuf;
-        OMX_U32 nInBufBusy;
-        OMX_U32 nOutBufBusy;
-        OMX_STATETYPE eState;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-    } PortCommTestCtxt;
-
-    typedef enum PortOpType
-    {
-        AllocBuf,
-        NonTunnelTest,
-        OpenFile,
-        CloseFile,
-        EmptyFill,
-    } PortOpType;
-
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_ErrorToString(
-        OMX_IN OMX_ERRORTYPE eError,
-        OMX_OUT OMX_STRING sName);
-
-
-    /*
-     *     F U N C T I O N S
-     */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_EventHandler(OMX_IN OMX_HANDLETYPE hComponent,
-                                            OMX_IN OMX_PTR pAppData,
-                                            OMX_IN OMX_EVENTTYPE eEvent,
-                                            OMX_IN OMX_U32 nData1,
-                                            OMX_IN OMX_U32 nData2,
-                                            OMX_IN OMX_PTR pEventData)
-    {
-        PortCommTestCtxt* pContext;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pContext = (PortCommTestCtxt*)pAppData;
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pContext->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pContext->hStateSetEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    pContext->nPortsStopped++;
-                    if (pContext->nPortsStopped == pContext->nPorts)
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports completed stopping\n");
-                        OMX_OSAL_EventSet(pContext->hPortDisableEvent);
-                    }
-                    break;
-                case OMX_CommandPortEnable:
-                    pContext->nPortsRestarted++;
-                    if (pContext->nPortsRestarted == pContext->nPorts)
-                    {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "All ports restarted\n");
-                        OMX_OSAL_EventSet(pContext->hPortEnableEvent);
-                    }
-                    break;
-                case OMX_EventBufferFlag:
-                    break;
-                default:
-                    break;
-            }
-        }
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_EmptyBufferDone(OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        PortCommTestCtxt* pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (PortCommTestCtxt*)pAppData;
-
-        if (pBuffer->nInputPortIndex == OMX_NOPORT || pBuffer->nOutputPortIndex != OMX_NOPORT)
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned invalid input buffer\n");
-        }
-        else if (pCtxt->nInBufBusy)
-        {
-            pCtxt->nInBufBusy--;
-            pCtxt->nBufDoneCalls++;
-            LIST_SET_ENTRY(pCtxt->pInBufferList, pBuffer);
-            OMX_OSAL_EventSet(pCtxt->hEmptyBufDoneEvent);
-            OMX_OSAL_EventSet(pCtxt->hBufDoneEvent);
-        }
-        else
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned more input buffers than expected\n");
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_FillBufferDone(OMX_OUT OMX_HANDLETYPE hComponent,
-            OMX_OUT OMX_PTR pAppData,
-            OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-    {
-        PortCommTestCtxt* pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (PortCommTestCtxt*)pAppData;
-
-        if (pBuffer->nInputPortIndex != OMX_NOPORT || pBuffer->nOutputPortIndex == OMX_NOPORT)
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned invalid output buffer\n");
-        }
-        else if (pCtxt->nOutBufBusy)
-        {
-            pCtxt->nOutBufBusy--;
-            pCtxt->nBufDoneCalls++;
-            LIST_SET_ENTRY(pCtxt->pOutBufferList, pBuffer);
-            OMX_OSAL_EventSet(pCtxt->hBufDoneEvent);
-        }
-        else
-        {
-            OMX_CONF_EVENT_HANDLER_ERROR(pCtxt->nInBufBusy, pCtxt->nInBuf, pCtxt->nBufDoneCalls,
-                                         "Component returned more output buffers than expected\n");
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_AllocateBuffers(PortCommTestCtxt *pContext,
-            OMX_PARAM_PORTDEFINITIONTYPE *pPortDef)
-    {
-        OMX_BUFFERHEADERTYPE *pBufferHdr = NULL;
-        OMX_U8 *pBuffer = NULL;
-        BufferList *pBufferList;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers for port %d\n", pPortDef->nPortIndex);
-        for (i = 0x0; i < pPortDef->nBufferCountActual; i++)
-        {
-            pBufferList = (BufferList *)OMX_OSAL_Malloc(sizeof(BufferList));
-            if (!pBufferList)
-                OMX_CONF_SET_ERROR_BAIL("malloc failed\n", OMX_ErrorInsufficientResources);
-
-            if (pContext->bClientAllocBuf)
-            {
-                pBuffer = (OMX_U8*)OMX_OSAL_Malloc(pPortDef->nBufferSize);
-                if (!pBuffer)
-                    OMX_CONF_SET_ERROR_BAIL("malloc failed\n", OMX_ErrorInsufficientResources);
-                OMX_CONF_BAIL_IF_ERROR(OMX_UseBuffer(pContext->hWComp, &pBufferHdr, pPortDef->nPortIndex,
-                                                     0, pPortDef->nBufferSize, pBuffer));
-            }
-            else
-            {
-                OMX_CONF_BAIL_IF_ERROR(OMX_AllocateBuffer(pContext->hWComp, &pBufferHdr, pPortDef->nPortIndex,
-                                       0, pPortDef->nBufferSize));
-            }
-            pBufferList->pNextBuf = NULL;
-            pBufferList->pBufHdr = pBufferHdr;
-            pBufferList->pOrigBufHdr = pBufferHdr;
-
-            if (pPortDef->eDir == OMX_DirInput)
-            {
-                /* check if buffer header is as expected */
-                if (pBufferHdr->nAllocLen != pPortDef->nBufferSize || !pBufferHdr->pBuffer ||
-                        pBufferHdr->nInputPortIndex != pPortDef->nPortIndex)
-                    OMX_CONF_SET_ERROR_BAIL("Buffer header incorrect\n", OMX_ErrorUndefined);
-
-                pBufferHdr->nOutputPortIndex = OMX_NOPORT;
-
-                /* put it in internal list */
-                if (pContext->pInBufferList == NULL)
-                    pContext->pInBufferList = pBufferList;
-                else
-                {
-                    pTemp = pContext->pInBufferList;
-                    while (pTemp->pNextBuf)
-                        pTemp = pTemp->pNextBuf;
-                    pTemp->pNextBuf = pBufferList;
-                }
-                pContext->nInBuf++;
-            }
-            else
-            {
-                /* check if buffer header is as expected */
-                if (pBufferHdr->nAllocLen != pPortDef->nBufferSize || !pBufferHdr->pBuffer ||
-                        pBufferHdr->nOutputPortIndex != pPortDef->nPortIndex)
-                    OMX_CONF_SET_ERROR_BAIL("Buffer header incorrect\n", OMX_ErrorUndefined);
-
-                pBufferHdr->nInputPortIndex = OMX_NOPORT;
-
-                /* put it in internal list */
-                if (pContext->pOutBufferList  == NULL)
-                    pContext->pOutBufferList = pBufferList;
-                else
-                {
-                    pTemp = pContext->pOutBufferList;
-                    while (pTemp->pNextBuf)
-                        pTemp = pTemp->pNextBuf;
-                    pTemp->pNextBuf = pBufferList;
-                }
-                pContext->nOutBuf++;
-            }
-        }
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_DeInitBuffer(PortCommTestCtxt* pContext)
-    {
-        OMX_U8 *pBuffer;
-        BufferList *pBufferListObject;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Free all buffers\n");
-        pTemp = pContext->pInBufferList;
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-            pBuffer = (OMX_U8 *)pTemp->pOrigBufHdr->pBuffer;
-            if (pContext->bClientAllocBuf)
-            {
-                OMX_OSAL_Free(pBuffer);
-                pTemp->pOrigBufHdr->pBuffer = NULL;
-            }
-            eError = OMX_FreeBuffer(pContext->hWComp, pTemp->pOrigBufHdr->nInputPortIndex, pTemp->pOrigBufHdr);
-            if (eError == OMX_ErrorInvalidState)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-            pContext->nInBuf--;
-        }
-        pContext->pInBufferList = NULL;
-
-        pTemp = pContext->pOutBufferList;
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-            pBuffer = (OMX_U8 *)pTemp->pOrigBufHdr->pBuffer;
-            if (pContext->bClientAllocBuf)
-            {
-                OMX_OSAL_Free(pBuffer);
-                pTemp->pOrigBufHdr->pBuffer = NULL;
-            }
-            eError = OMX_FreeBuffer(pContext->hWComp, pTemp->pOrigBufHdr->nOutputPortIndex, pTemp->pOrigBufHdr);
-            if (eError == OMX_ErrorInvalidState)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-            pContext->nOutBuf--;
-        }
-        pContext->pOutBufferList = NULL;
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_ReadOutBuffers(PortCommTestCtxt* pContext)
-    {
-        BufferList * pList;
-        OMX_BUFFERHEADERTYPE *pBufHeader;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        pList = pContext->pOutBufferList;
-        while (pList && pList->pBufHdr)
-        {
-            pContext->nOutBufBusy++;
-            LIST_CLEAR_ENTRY(pList, pBufHeader);
-            OMX_CONF_BAIL_IF_ERROR(OMX_FillThisBuffer(pContext->hWComp, pBufHeader));
-            if (pBufHeader->nFlags == OMX_BUFFERFLAG_EOS)
-                pContext->nBufDoneCalls = OMX_CONF_BUFFERS_OF_TRAFFIC;
-        }
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_WriteInBuffers(PortCommTestCtxt* pContext)
-    {
-        BufferList * pList;
-        OMX_BUFFERHEADERTYPE *pBufHeader;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPayload;
-
-        pList = pContext->pInBufferList;
-        while (pList && pList->pBufHdr)
-        {
-            pContext->nInBufBusy++;
-            LIST_CLEAR_ENTRY(pList, pBufHeader);
-            nPayload = (pContext->nBufFactor) ? pBufHeader->nAllocLen / pContext->nBufFactor : 1;
-            pBufHeader->nFilledLen = OMX_OSAL_ReadFromInputFile(pBufHeader->pBuffer, nPayload,
-                                     pBufHeader->nInputPortIndex);
-            if (pBufHeader->nFilledLen != nPayload)
-            {
-                pBufHeader->nFlags |= OMX_BUFFERFLAG_EOS;
-            }
-            OMX_CONF_BAIL_IF_ERROR(OMX_EmptyThisBuffer(pContext->hWComp, pBufHeader));
-        }
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_OperateOnPorts(PortCommTestCtxt* pContext, PortOpType eOp)
-    {
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 i, j;
-        OMX_BUFFERHEADERTYPE sBufHdr;
-
-        for (j = 0; j < NUM_DOMAINS; j++)
-        {
-            for (i = pContext->sPortParam[j].nStartPortNumber;
-                    i < pContext->sPortParam[j].nStartPortNumber + pContext->sPortParam[j].nPorts; i++)
-            {
-
-                OMX_CONF_INIT_STRUCT(sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDef.nPortIndex = i;
-                OMX_CONF_BAIL_IF_ERROR(OMX_GetParameter(pContext->hWComp, OMX_IndexParamPortDefinition ,
-                                                        (OMX_PTR)&sPortDef));
-                switch (eOp)
-                {
-                    case AllocBuf:
-                        if (0x0 == sPortDef.nBufferCountMin || sPortDef.nBufferCountMin > sPortDef.nBufferCountActual)
-                        {
-                            OMX_CONF_SET_ERROR_BAIL("PortDefinition nBufferCount incorrect\n", OMX_ErrorUndefined);
-                        }
-                        OMX_CONF_BAIL_IF_ERROR(PortCommTest_AllocateBuffers(pContext, &sPortDef));
-                        break;
-
-                    case NonTunnelTest:
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            eError = OMX_SetupTunnel(NULL, 0, pContext->hWComp, sPortDef.nPortIndex);
-                            OMX_CONF_ErrorToString(eError, szDesc);
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setup tunnel reported error code %s\n", szDesc);
-                        }
-                        else
-                        {
-                            eError = OMX_SetupTunnel(pContext->hWComp, sPortDef.nPortIndex, NULL, 0);
-                            OMX_CONF_ErrorToString(eError, szDesc);
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setup tunnel reported error code %s\n", szDesc);
-                        }
-                        eError = OMX_ErrorNone;
-                        break;
-
-                    case OpenFile:
-                        /* set buffercount actual */
-                        if (0x0 == sPortDef.nBufferCountMin || sPortDef.nBufferCountMin > sPortDef.nBufferCountActual)
-                        {
-                            OMX_CONF_SET_ERROR_BAIL("PortDefinition nBufferCount incorrect\n", OMX_ErrorUndefined);
-                        }
-                        sPortDef.nBufferCountActual = sPortDef.nBufferCountMin + 1;
-                        OMX_CONF_BAIL_IF_ERROR(OMX_SetParameter(pContext->hWComp, OMX_IndexParamPortDefinition,
-                                                                (OMX_PTR)&sPortDef));
-                        /* open files for input ports */
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Opened input file for port %d\n", i);
-                            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_OpenInputFile(i));
-                        }
-                        break;
-
-                    case CloseFile:
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            OMX_CONF_BAIL_IF_ERROR(OMX_OSAL_CloseInputFile(i));
-                        }
-                        break;
-
-                    case EmptyFill:
-                        OMX_CONF_INIT_STRUCT(sBufHdr, OMX_BUFFERHEADERTYPE);
-                        if (sPortDef.eDir == OMX_DirInput)
-                        {
-                            sBufHdr.nInputPortIndex = i;
-                            eError = OMX_EmptyThisBuffer(pContext->hWComp, &sBufHdr);
-                        }
-                        else
-                        {
-                            sBufHdr.nOutputPortIndex = i;
-                            eError = OMX_FillThisBuffer(pContext->hWComp, &sBufHdr);
-                        }
-                        if (eError != OMX_ErrorIncorrectStateOperation)
-                            OMX_CONF_SET_ERROR_BAIL("Buffer handling while stopped\n", OMX_ErrorUndefined);
-                        eError = OMX_ErrorNone;
-                        break;
-
-                    default:
-                        eError = OMX_ErrorBadParameter;
-                }
-            }
-        }
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_TransitionWait(OMX_STATETYPE eToState,
-            PortCommTestCtxt* pContext)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout = OMX_FALSE;
-
-        OMX_OSAL_EventReset(pContext->hStateSetEvent);
-        eError = OMX_SendCommand(pContext->hWComp, OMX_CommandStateSet, eToState, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        if (eToState == OMX_StateIdle && (pContext->eState == OMX_StateLoaded))
-        {
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, AllocBuf));
-        }
-        else if (eToState == OMX_StateLoaded && pContext->eState == OMX_StateIdle)
-        {
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_DeInitBuffer(pContext));
-        }
-
-        OMX_OSAL_EventWait(pContext->hStateSetEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL("Transition timed out\n", OMX_ErrorUndefined);
-
-        if (pContext->eState != eToState)
-            OMX_CONF_SET_ERROR_BAIL("Incorrect transition\n", OMX_ErrorUndefined);
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_TransmitTest(PortCommTestCtxt* pContext,
-                                            OMX_BOOL bInit, OMX_BOOL bClose)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout;
-
-        if (bInit)
-        {
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, OpenFile));
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateIdle, pContext));
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateExecuting, pContext));
-        }
-        /* process buffers */
-        while (pContext->nBufDoneCalls < OMX_CONF_BUFFERS_OF_TRAFFIC)
-        {
-            if (pContext->nOutBuf)
-                OMX_CONF_BAIL_IF_ERROR(PortCommTest_ReadOutBuffers(pContext));
-            if (pContext->nInBuf)
-                OMX_CONF_BAIL_IF_ERROR(PortCommTest_WriteInBuffers(pContext));
-
-            /* if no empty input or output buffer, wait for bufferdone call */
-            if (pContext->nOutBuf == pContext->nOutBufBusy && pContext->nInBuf == pContext->nInBufBusy)
-            {
-                OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-                OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL("Component is not processing any buffers\n", OMX_ErrorUndefined);
-                }
-            }
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processed %d buffers\n", pContext->nBufDoneCalls);
-        if (bClose)
-        {
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, CloseFile));
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateIdle, pContext));
-            while (pContext->nOutBufBusy || pContext->nInBufBusy)
-            {
-                OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-                OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL("All buffers not returned\n", OMX_ErrorUndefined);
-                }
-            }
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateLoaded, pContext));
-        }
-        pContext->nBufDoneCalls = 0;
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_RepackTest(PortCommTestCtxt* pContext)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout;
-
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, OpenFile));
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateIdle, pContext));
-
-        if (pContext->nInBuf == 0)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Source component, Repack Test not applicable\n");
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, CloseFile));
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateLoaded, pContext));
-            goto OMX_CONF_TEST_BAIL;
-        }
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateExecuting, pContext));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Sending single byte payloads\n");
-        pContext->nBufFactor = 0;
-        OMX_OSAL_EventReset(pContext->hEmptyBufDoneEvent);
-
-        if (pContext->nOutBuf)
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_ReadOutBuffers(pContext));
-        if (pContext->nInBuf)
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_WriteInBuffers(pContext));
-
-        OMX_OSAL_EventWait(pContext->hEmptyBufDoneEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        if (pContext->nOutBuf && OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("Component is not repacking\n", OMX_ErrorUndefined);
-        }
-        if (pContext->nInBuf && !pContext->pInBufferList->pBufHdr)
-        {
-            OMX_CONF_SET_ERROR_BAIL("first buffer has to be returned\n", OMX_ErrorUndefined);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Sending full payloads\n");
-        pContext->nBufFactor = 1;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pContext, OMX_FALSE, OMX_TRUE));
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_StopRestartTest(PortCommTestCtxt* pContext)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout;
-
-        /* process max frames */
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pContext, OMX_TRUE, OMX_FALSE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Stopping all ports\n");
-        OMX_OSAL_EventReset(pContext->hPortDisableEvent);
-        OMX_CONF_BAIL_IF_ERROR(OMX_SendCommand(pContext->hWComp, OMX_CommandPortDisable, OMX_ALL, 0x0));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Wait for all buffers to be returned\n");
-        while (pContext->nOutBufBusy || pContext->nInBufBusy)
-        {
-            OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-            OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-            if (OMX_TRUE == bTimeout)
-            {
-                OMX_CONF_SET_ERROR_BAIL("All buffers not returned\n", OMX_ErrorUndefined);
-            }
-        }
-        /* check if command completed before de-allocation*/
-        OMX_OSAL_EventWait(pContext->hPortDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("Ports stopped unexpectedly\n", OMX_ErrorUndefined);
-        }
-        OMX_OSAL_EventReset(pContext->hPortDisableEvent);
-
-        /* free all buffers */
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_DeInitBuffer(pContext));
-
-        /* wait for cmd complete */
-        OMX_OSAL_EventWait(pContext->hPortDisableEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("All ports not stopped\n", OMX_ErrorUndefined);
-        }
-
-        /* ensure no more buffer done callbacks are made */
-        OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-        OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("callbacks made after cmdcomplete\n", OMX_ErrorUndefined);
-        }
-        pContext->nBufDoneCalls = 0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Attempting to process buffers while stopped\n");
-        OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, EmptyFill));
-        OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("callbacks made while ports disabled\n", OMX_ErrorUndefined);
-        }
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processed %d buffers\n", pContext->nBufDoneCalls);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Restarting all ports\n");
-        OMX_OSAL_EventReset(pContext->hPortEnableEvent);
-
-        /* send restart command */
-        OMX_CONF_BAIL_IF_ERROR(OMX_SendCommand(pContext->hWComp, OMX_CommandPortEnable, OMX_ALL, 0x0));
-
-        /* check if command completed before allocation*/
-        OMX_OSAL_EventWait(pContext->hPortEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("Ports restarted unexpectedly\n", OMX_ErrorUndefined);
-        }
-        OMX_OSAL_EventReset(pContext->hPortEnableEvent);
-
-        /* allocate buffers */
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pContext, AllocBuf));
-
-        /* wait for command complete */
-        OMX_OSAL_EventWait(pContext->hPortEnableEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimeout);
-        if (OMX_TRUE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("All ports not restarted\n", OMX_ErrorUndefined);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Process buffers after restarting\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pContext, OMX_FALSE, OMX_TRUE));
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE PortCommTest_PauseResume(PortCommTestCtxt* pContext)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout;
-
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pContext, OMX_TRUE, OMX_FALSE));
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Pause the component\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StatePause, pContext));
-        OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-        OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("bufferdone callbacks made after pause cmdcomplete\n", OMX_ErrorUndefined);
-        }
-        pContext->nBufDoneCalls = 0;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Attempting to process buffers while paused\n");
-        OMX_OSAL_EventReset(pContext->hBufDoneEvent);
-
-        if (pContext->nOutBuf)
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_ReadOutBuffers(pContext));
-        if (pContext->nInBuf)
-            OMX_CONF_BAIL_IF_ERROR(PortCommTest_WriteInBuffers(pContext));
-
-        OMX_OSAL_EventWait(pContext->hBufDoneEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-        if (OMX_FALSE == bTimeout)
-        {
-            OMX_CONF_SET_ERROR_BAIL("bufferdone callbacks made during paused state\n", OMX_ErrorUndefined);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processed %d buffers\n", pContext->nBufDoneCalls);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Return to executing\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransitionWait(OMX_StateExecuting, pContext));
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Process buffers after resuming\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pContext, OMX_FALSE, OMX_TRUE));
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_PortCommunicationTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0;
-        OMX_CALLBACKTYPE sCallbacks;
-        PortCommTestCtxt sContext;
-        OMX_HANDLETYPE hWrappedComp = 0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        PortCommTestCtxt *pCtxt;
-        pCtxt = &sContext;
-        memset(pCtxt, 0x0, sizeof(PortCommTestCtxt));
-
-        sCallbacks.EventHandler    =  PortCommTest_EventHandler;
-        sCallbacks.EmptyBufferDone =  PortCommTest_EmptyBufferDone;
-        sCallbacks.FillBufferDone  =  PortCommTest_FillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&sCallbacks, (OMX_PTR)pCtxt, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtxt->hStateSetEvent);
-        OMX_OSAL_EventReset(pCtxt->hStateSetEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hPortDisableEvent);
-        OMX_OSAL_EventReset(pCtxt->hPortDisableEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hPortEnableEvent);
-        OMX_OSAL_EventReset(pCtxt->hPortEnableEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hBufDoneEvent);
-        OMX_OSAL_EventReset(pCtxt->hBufDoneEvent);
-        OMX_OSAL_EventCreate(&pCtxt->hEmptyBufDoneEvent);
-        OMX_OSAL_EventReset(pCtxt->hEmptyBufDoneEvent);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData,
-                                             pWrappedCallbacks));
-        OMX_CONF_BAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName,
-                               &hWrappedComp));
-        pCtxt->hWComp = hWrappedComp;
-
-        /* Verify start in Loaded state */
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pCtxt->hWComp, &pCtxt->eState));
-        if (pCtxt->eState != OMX_StateLoaded)
-            OMX_CONF_SET_ERROR_BAIL("Component not in loaded state at init\n", OMX_ErrorUndefined);
-
-        /* detect all audio ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamAudioInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtxt->sPortParam[0].nPorts, pCtxt->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamVideoInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtxt->sPortParam[1].nPorts, pCtxt->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamImageInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtxt->sPortParam[2].nPorts, pCtxt->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp, OMX_IndexParamOtherInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtxt->sPortParam[3].nPorts, pCtxt->sPortParam[3].nStartPortNumber);
-
-        pCtxt->nPorts = pCtxt->sPortParam[0].nPorts + pCtxt->sPortParam[1].nPorts +
-                        pCtxt->sPortParam[2].nPorts + pCtxt->sPortParam[3].nPorts;
-
-        /* 3.4.1. Non-Tunneling Setup Test */
-        /* TODO: reference core does not take null as port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Non-Tunneling Setup Test\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_OperateOnPorts(pCtxt, NonTunnelTest));
-
-        /* 3.4.2. Transmit Buffers Between Input and Output Ports and Application */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transmit Test - Client allocates - Full payload\n");
-        pCtxt->nBufFactor = 1;
-        pCtxt->bClientAllocBuf = OMX_TRUE;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pCtxt, OMX_TRUE, OMX_TRUE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transmit Test - Client allocates - Half payload\n");
-        pCtxt->nBufFactor = 2;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pCtxt, OMX_TRUE, OMX_TRUE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transmit Test - Client allocates - Quarter payload\n");
-        pCtxt->nBufFactor = 4;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pCtxt, OMX_TRUE, OMX_TRUE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transmit Test - Component allocates - Full payload\n");
-        pCtxt->bClientAllocBuf = OMX_FALSE;
-        pCtxt->nBufFactor = 1;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_TransmitTest(pCtxt, OMX_TRUE, OMX_TRUE));
-
-        /* 3.4.3. Port Repack Test */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Repack Test\n");
-        pCtxt->bClientAllocBuf = OMX_TRUE;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_RepackTest(pCtxt));
-
-        /* 3.4.4. Port Stop and Restart Test */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port Stop and Restart Test\n");
-        pCtxt->nBufFactor = 1;
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_StopRestartTest(pCtxt));
-
-        /* 3.4.5. Component Pause and Resume Test*/
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component Pause and Resume Test\n");
-        OMX_CONF_BAIL_IF_ERROR(PortCommTest_PauseResume(pCtxt));
-
-OMX_CONF_TEST_BAIL:
-        /* cleanup: return function errors rather than closing errors if appropriate */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Cleanup\n");
-
-        if (OMX_ErrorNone == eError)
-        {
-            if (hWrappedComp)
-            {
-                eError = OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                eError = OMX_FreeHandle(hComp);
-            }
-            eError = OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-
-            eError = OMX_Deinit();
-        }
-        else
-        {
-            PortCommTest_TransitionWait(OMX_StateInvalid, pCtxt);
-            PortCommTest_DeInitBuffer(pCtxt);
-
-            if (hWrappedComp)
-            {
-                OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                OMX_FreeHandle(hComp);
-            }
-            OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-            OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtxt->hStateSetEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hPortDisableEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hPortEnableEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hBufDoneEvent);
-        OMX_OSAL_EventDestroy(pCtxt->hEmptyBufDoneEvent);
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_resourceexhaustiontest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_resourceexhaustiontest.c
deleted file mode 100644 (file)
index 234a37e..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_ResourceExhaustionTest.c
- *  OpenMax IL conformance test - Resource Exhaustion Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_ErrorToString(
-        OMX_IN OMX_ERRORTYPE eError,
-        OMX_OUT OMX_STRING sName);
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-#define TEST_NAME_STRING "ResourceExhaustionTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-    static char szDesc[256];
-#define NUM_DOMAINS 0x4
-#define OMX_NOPORT 0xfffffffe
-#define MAX_INSTANCE 300
-#define MAX_ITERATIONS 100
-
-    /*
-     *     D E F I N I T I O N S
-     */
-    typedef struct _BufferList BufferList;
-
-    struct _BufferList
-    {
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-        BufferList *pNextBuf;
-    };
-
-    typedef struct
-    {
-        OMX_U32 nInst;
-        OMX_ERRORTYPE eLastError;
-        BufferList *pBufferList[MAX_INSTANCE];
-        OMX_HANDLETYPE hComp[MAX_INSTANCE];
-        OMX_HANDLETYPE hWComp[MAX_INSTANCE];
-        OMX_HANDLETYPE hStateSetEvent;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-    } ResourceExhaustionTestContext;
-
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)      \
-    memset(&(_s_), 0x0, sizeof(_name_));       \
-    (_s_).nSize = sizeof(_name_);              \
-    (_s_).nVersion.s.nVersionMajor = 0x1;      \
-    (_s_).nVersion.s.nVersionMinor = 0x0;      \
-    (_s_).nVersion.s.nRevision = 0x0;          \
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_IF_ERROR(_eE)            \
-    if((eError = _eE) != OMX_ErrorNone){       \
-        goto OMX_CONF_TEST_BAIL;               \
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_sDesc, _eError)\
-{                                              \
-    eError = _eError;                          \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, _sDesc);\
-    goto OMX_CONF_TEST_BAIL;                   \
-}
-
-
-    /*
-     *     F U N C T I O N S
-     */
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_EventHandler(OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_EVENTTYPE eEvent,
-            OMX_IN OMX_U32 nData1,
-            OMX_IN OMX_U32 nData2,
-            OMX_IN OMX_PTR pEventData)
-    {
-        ResourceExhaustionTestContext *pCtxt;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pCtxt = (ResourceExhaustionTestContext *)pAppData;
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Instance %d transitioned to %s\n",
-                                   pCtxt->nInst, szDesc);
-                    OMX_OSAL_EventSet(pCtxt->hStateSetEvent);
-                    break;
-                default:
-                    break;
-            }
-        }
-        else if (eEvent == OMX_EventError)
-        {
-            pCtxt->eLastError = (OMX_ERRORTYPE)(nData1);
-            OMX_CONF_ErrorToString(pCtxt->eLastError, szDesc);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Instance %d sent error %0#x %s\n",
-                           pCtxt->nInst, nData1, szDesc);
-            OMX_OSAL_EventSet(pCtxt->hStateSetEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_DeInitBuffer(ResourceExhaustionTestContext *pCtxt)
-    {
-        BufferList *pBufferListObject;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        pTemp = pCtxt->pBufferList[pCtxt->nInst];
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-            if (pTemp->pBufHdr->nInputPortIndex != OMX_NOPORT)
-                eError = OMX_FreeBuffer(pCtxt->hWComp[pCtxt->nInst],
-                                        pTemp->pBufHdr->nInputPortIndex, pTemp->pBufHdr);
-            else
-                eError = OMX_FreeBuffer(pCtxt->hWComp[pCtxt->nInst],
-                                        pTemp->pBufHdr->nOutputPortIndex, pTemp->pBufHdr);
-
-            if (eError == OMX_ErrorInvalidState || eError == OMX_ErrorIncorrectStateOperation)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-        }
-        pCtxt->pBufferList[pCtxt->nInst] = NULL;
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_LOAD(ResourceExhaustionTestContext *pCtxt,
-            OMX_STRING cComponentName,
-            OMX_PTR pWAppData,
-            OMX_PTR pWCallbacks)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_STATETYPE eState;
-        eError = OMX_GetHandle(&pCtxt->hComp[pCtxt->nInst], cComponentName, pWAppData, pWCallbacks);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(pCtxt->hComp[pCtxt->nInst], cComponentName,
-                                                &pCtxt->hWComp[pCtxt->nInst]);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        eError = OMX_GetState(pCtxt->hWComp[pCtxt->nInst], &eState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        if (eState != OMX_StateLoaded)
-            OMX_CONF_SET_ERROR_BAIL("Not in loaded state\n", OMX_ErrorUndefined);
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_UNLOAD(ResourceExhaustionTestContext *pCtxt)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        if (pCtxt->hComp[pCtxt->nInst])
-        {
-            eError = OMX_FreeHandle(pCtxt->hComp[pCtxt->nInst]);
-            OMX_CONF_BAIL_IF_ERROR(eError);
-        }
-        if (pCtxt->hWComp[pCtxt->nInst])
-        {
-            eError = OMX_CONF_ComponentTracerDestroy(pCtxt->hWComp[pCtxt->nInst]);
-            OMX_CONF_BAIL_IF_ERROR(eError);
-        }
-        pCtxt->hComp[pCtxt->nInst] = NULL;
-        pCtxt->hWComp[pCtxt->nInst] = NULL;
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_AllocateAllBuffers(ResourceExhaustionTestContext *pCtxt)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        OMX_U32 i, j, k;
-        OMX_BUFFERHEADERTYPE *pBufferHdr = NULL;
-        BufferList *pBufferListObj;
-        BufferList *pTemp;
-
-        /* for all ports */
-        for (j = 0; j < NUM_DOMAINS; j++)
-        {
-            for (i = pCtxt->sPortParam[j].nStartPortNumber;
-                    i < pCtxt->sPortParam[j].nStartPortNumber +
-                    pCtxt->sPortParam[j].nPorts; i++)
-            {
-
-                OMX_CONF_INIT_STRUCT(sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDef.nPortIndex = i;
-                OMX_CONF_BAIL_IF_ERROR(OMX_GetParameter(pCtxt->hWComp[pCtxt->nInst],
-                                                        OMX_IndexParamPortDefinition,
-                                                        (OMX_PTR)&sPortDef));
-                if (sPortDef.nBufferCountActual == 0x0 ||
-                        sPortDef.nBufferCountActual < sPortDef.nBufferCountMin)
-                    OMX_CONF_SET_ERROR_BAIL("Incorrect nBufferCountActual\n", OMX_ErrorUndefined);
-
-                for (k = 0x0; k < sPortDef.nBufferCountActual; k++)
-                {
-                    pBufferListObj = (BufferList *)OMX_OSAL_Malloc(sizeof(BufferList));
-                    if (!pBufferListObj)
-                    {
-                        OMX_CONF_SET_ERROR_BAIL("Malloc internal list failed\n", OMX_ErrorInsufficientResources);
-                    }
-                    OMX_CONF_BAIL_IF_ERROR(OMX_AllocateBuffer(pCtxt->hWComp[pCtxt->nInst], &pBufferHdr,
-                                           sPortDef.nPortIndex, 0, sPortDef.nBufferSize));
-                    pBufferListObj->pNextBuf = NULL;
-                    pBufferListObj->pBufHdr = pBufferHdr;
-
-                    if (sPortDef.eDir == OMX_DirInput)
-                        pBufferListObj->pBufHdr->nOutputPortIndex = OMX_NOPORT;
-                    else
-                        pBufferListObj->pBufHdr->nInputPortIndex = OMX_NOPORT;
-
-                    if (pCtxt->pBufferList[pCtxt->nInst] == NULL)
-                        pCtxt->pBufferList[pCtxt->nInst] = pBufferListObj;
-                    else
-                    {
-                        pTemp = pCtxt->pBufferList[pCtxt->nInst];
-                        while (pTemp->pNextBuf)
-                        {
-                            pTemp = pTemp->pNextBuf;
-                        }
-                        pTemp->pNextBuf = pBufferListObj;
-                    }
-                }
-            }
-        }
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE ResourceExhaustionTest_TransitionWait(ResourceExhaustionTestContext* pCtxt,
-            OMX_STATETYPE eToState)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout = OMX_FALSE;
-        OMX_STATETYPE eState;
-
-        OMX_OSAL_EventReset(pCtxt->hStateSetEvent);
-        pCtxt->eLastError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pCtxt->hWComp[pCtxt->nInst], &eState));
-
-        eError = OMX_SendCommand(pCtxt->hWComp[pCtxt->nInst], OMX_CommandStateSet, eToState, 0);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        if (eToState == OMX_StateIdle && (eState == OMX_StateLoaded))
-        {
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_AllocateAllBuffers(pCtxt));
-        }
-        else if (eToState == OMX_StateLoaded && eState == OMX_StateIdle)
-        {
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_DeInitBuffer(pCtxt));
-        }
-
-        OMX_OSAL_EventWait(pCtxt->hStateSetEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        OMX_CONF_BAIL_IF_ERROR(pCtxt->eLastError);
-
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL("Timeout on state transition\n", OMX_ErrorUndefined);
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pCtxt->hWComp[pCtxt->nInst], &eState));
-        if (eState != eToState)
-            OMX_CONF_SET_ERROR_BAIL("Incorrect transition\n", OMX_ErrorUndefined);
-
-OMX_CONF_TEST_BAIL:
-        if (OMX_ErrorNone != eError && eToState == OMX_StateIdle && (eState == OMX_StateLoaded))
-        {
-
-            /* Add some delay before cleaning up */
-            OMX_OSAL_EventWait(pCtxt->hStateSetEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimeout);
-
-            /* Disable all ports to free buffers*/
-            OMX_SendCommand(pCtxt->hWComp[pCtxt->nInst], OMX_CommandPortDisable, OMX_ALL, 0x0);
-
-            /* Cleanup last instance */
-            ResourceExhaustionTest_DeInitBuffer(pCtxt);
-        }
-        return eError;
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_ResourceExhaustionTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        ResourceExhaustionTestContext oAppData;
-        OMX_CALLBACKTYPE *pWrapCallbacks;
-        OMX_PTR pWrapAppData;
-        ResourceExhaustionTestContext *pCtxt;
-        OMX_U32 i;
-
-        pCtxt = &oAppData;
-        memset(pCtxt, 0x0, sizeof(ResourceExhaustionTestContext));
-
-        oCallbacks.EventHandler    =  ResourceExhaustionTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  =  StubbedFillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pCtxt, cComponentName,
-                                               &pWrapCallbacks, &pWrapAppData);
-
-        OMX_OSAL_EventCreate(&pCtxt->hStateSetEvent);
-        OMX_OSAL_EventReset(pCtxt->hStateSetEvent);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        eError = ResourceExhaustionTest_LOAD(pCtxt, cComponentName, pWrapAppData, pWrapCallbacks);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* detect all audio ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp[pCtxt->nInst], OMX_IndexParamAudioInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtxt->sPortParam[0].nPorts, pCtxt->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp[pCtxt->nInst], OMX_IndexParamVideoInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtxt->sPortParam[1].nPorts, pCtxt->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp[pCtxt->nInst], OMX_IndexParamImageInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtxt->sPortParam[2].nPorts, pCtxt->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtxt->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtxt->hWComp[pCtxt->nInst], OMX_IndexParamOtherInit,
-                                  (OMX_PTR) & pCtxt->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtxt->sPortParam[3].nPorts, pCtxt->sPortParam[3].nStartPortNumber);
-
-        OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateIdle));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Repeatedly load and idle component\n");
-        /* JVW-NVIDIA: set bound to MAX_INSTANCE-1 http://cvs.khronos.org/bugzilla/show_bug.cgi?id=219 */
-        while (pCtxt->nInst++ < MAX_INSTANCE - 1)
-        {
-            eError = ResourceExhaustionTest_LOAD(pCtxt, cComponentName, pWrapAppData, pWrapCallbacks);
-            if (eError != OMX_ErrorNone)
-                break;
-
-            eError = ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateIdle);
-            if (eError != OMX_ErrorNone)
-                break;
-        }
-        if (eError == OMX_ErrorInsufficientResources)
-            eError = OMX_ErrorNone;
-
-        if (pCtxt->nInst == MAX_INSTANCE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resources not exhausted - increase max instance\n");
-            eError = OMX_ErrorUndefined;
-        }
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Resources exhausted by instance %d\n", pCtxt->nInst);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Alternatively de-allocate/allocate last 2 instances\n");
-
-        for (i = 0x0; i < MAX_ITERATIONS; i++)
-        {
-            /* Unload last successfully idled instance */
-            pCtxt->nInst--;
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateLoaded));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_UNLOAD(pCtxt));
-
-            /* Load last failing instance */
-            pCtxt->nInst++;
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_UNLOAD(pCtxt));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_LOAD(pCtxt, cComponentName, pWrapAppData, pWrapCallbacks));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateIdle));
-
-            /* Unload last successfully idled instance */
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateLoaded));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_UNLOAD(pCtxt));
-
-            /* Load last failing instance */
-            pCtxt->nInst--;
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_LOAD(pCtxt, cComponentName, pWrapAppData, pWrapCallbacks));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateIdle));
-
-            pCtxt->nInst++;
-        }
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "De-allocate all instances\n");
-        while (pCtxt->nInst--)
-        {
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateLoaded));
-            OMX_CONF_BAIL_IF_ERROR(ResourceExhaustionTest_UNLOAD(pCtxt));
-        }
-
-OMX_CONF_TEST_BAIL:
-        /* cleanup: return function errors rather than closing errors if appropriate */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Cleanup\n");
-        if (OMX_ErrorNone == eError)
-        {
-            eError = OMX_CONF_CallbackTracerDestroy(pWrapCallbacks, pWrapAppData);
-            eError = OMX_Deinit();
-        }
-        else
-        {
-            do
-            {
-                if (pCtxt->hWComp[pCtxt->nInst])
-                {
-                    ResourceExhaustionTest_TransitionWait(pCtxt, OMX_StateInvalid);
-                    ResourceExhaustionTest_DeInitBuffer(pCtxt);
-                    ResourceExhaustionTest_UNLOAD(pCtxt);
-                }
-            }
-            while (pCtxt->nInst--);
-
-            OMX_CONF_CallbackTracerDestroy(pWrapCallbacks, pWrapAppData);
-            OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtxt->hStateSetEvent);
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_statetransitiontest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/baseprofiletests/omx_conf_statetransitiontest.c
deleted file mode 100644 (file)
index d433b95..0000000
+++ /dev/null
@@ -1,807 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StateTransitionTest.c
- *  OpenMax IL conformance test - State Transition Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_ErrorToString(
-        OMX_IN OMX_ERRORTYPE eError,
-        OMX_OUT OMX_STRING sName);
-
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-#define TEST_NAME_STRING "StateTransitionTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-    static char szDesc[256];
-#define NUM_DOMAINS 0x4
-#define OMX_NOPORT 0xFFFFFFFE
-
-    /*
-     *     D E F I N I T I O N S
-     */
-    typedef struct _BufferList BufferList;
-
-    struct _BufferList
-    {
-        OMX_BUFFERHEADERTYPE *pBufHdr;
-        OMX_BOOL bInUse;
-        BufferList *pNextBuf;
-    };
-
-    typedef struct
-    {
-        OMX_HANDLETYPE hWComp;
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateSetEvent;
-        OMX_HANDLETYPE hErrorEvent;
-        BufferList *pBufferList;
-        OMX_ERRORTYPE eLastError;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-    } StateTransitionTestContext;
-
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)      \
-    memset(&(_s_), 0x0, sizeof(_name_));       \
-    (_s_).nSize = sizeof(_name_);              \
-    (_s_).nVersion.s.nVersionMajor = 0x1;      \
-    (_s_).nVersion.s.nVersionMinor = 0x0;      \
-    (_s_).nVersion.s.nRevision = 0x0;          \
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_CHECK_STATETYPE(_eS_, _eC_)           \
-    if(_eS_ != _eC_){                                  \
-       OMX_CONF_ErrorToString(_eC_, szDesc);           \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "invalid state transition: expected %s\n", szDesc);\
-       OMX_CONF_ErrorToString(_eS_, szDesc);           \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "actual %s\n", szDesc);\
-        eError = OMX_ErrorUndefined;                   \
-    }
-
-#define OMX_CONF_CHECK_ERRORTYPE(_eE_, _eC_)           \
-    if(_eE_ != _eC_){                                  \
-       OMX_CONF_ErrorToString(_eC_, szDesc);           \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "incorrect error code: expected %s\n", szDesc);\
-       OMX_CONF_ErrorToString(_eE_, szDesc);           \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "actual %s\n", szDesc);\
-        eError = OMX_ErrorUndefined;                   \
-    }
-
-#define OMX_CONF_BAIL_IF_ERROR(_eError)                \
-    if(OMX_ErrorNone != (eError = _eError)){   \
-        goto OMX_CONF_TEST_BAIL;               \
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_eCode, _desc) \
-{                                              \
-    eError = _eCode;                           \
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _desc);\
-    goto OMX_CONF_TEST_BAIL;                   \
-}
-
-
-    /*
-     *     F U N C T I O N S
-     */
-    OMX_ERRORTYPE StateTransitionTest_EventHandler(OMX_IN OMX_HANDLETYPE hComponent,
-            OMX_IN OMX_PTR pAppData,
-            OMX_IN OMX_EVENTTYPE eEvent,
-            OMX_IN OMX_U32 nData1,
-            OMX_IN OMX_U32 nData2,
-            OMX_IN OMX_PTR pEventData)
-    {
-        StateTransitionTestContext *pContext;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (pAppData == NULL)
-            return OMX_ErrorNone;
-        pContext = (StateTransitionTestContext *)pAppData;
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    pContext->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pContext->hStateSetEvent);
-                    break;
-                default:
-                    break;
-            }
-        }
-        else if (eEvent == OMX_EventError)
-        {
-            pContext->eLastError = (OMX_ERRORTYPE)(nData1);
-            OMX_OSAL_EventSet(pContext->hErrorEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-#define OMX_CONF_UNLOAD(_pC, _hC, _hWC, _eE){                                  \
-    _eE = OMX_CONF_DeInitBuffer(_pC);                                          \
-    OMX_CONF_BAIL_IF_ERROR(_eE);                                               \
-    if(_hC){                                                                   \
-       _eE = OMX_FreeHandle(_hC);                                              \
-       OMX_CONF_BAIL_IF_ERROR(_eE);                                            \
-    }                                                                          \
-    if(_hWC){                                                                  \
-       _eE = OMX_CONF_ComponentTracerDestroy(_hWC);                            \
-       OMX_CONF_BAIL_IF_ERROR(_eE);                                            \
-    }                                                                          \
-    _hWC = 0;                                                                  \
-    _hC = 0;                                                                   \
-}
-
-#define OMX_CONF_LOAD(_eS, _eE, _pC, _hC, _hWC, _cC, _pWD, _pWC)\
-{                                                              \
-    _eE = OMX_GetHandle(&_hC, _cC, _pWD, _pWC);                        \
-    OMX_CONF_BAIL_IF_ERROR(_eE);                               \
-    _eE = OMX_CONF_ComponentTracerCreate(_hC, _cC, &_hWC);     \
-    OMX_CONF_BAIL_IF_ERROR(_eE);                               \
-    _pC->hWComp = _hWC;                                                \
-    /* Verify start in Loaded state */                         \
-    _eE = OMX_GetState(_hWC, &_eS);                            \
-    OMX_CONF_BAIL_IF_ERROR(_eE);                               \
-    if(_eS != OMX_StateLoaded)                                 \
-        OMX_CONF_SET_ERROR_BAIL(OMX_ErrorUndefined, "not in loaded state\n");\
-}
-
-    static OMX_ERRORTYPE OMX_CONF_DeInitBuffer(StateTransitionTestContext *pContext)
-    {
-        OMX_U8 *pBuffer;
-        BufferList *pBufferListObject;
-        BufferList *pTemp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        pTemp = pContext->pBufferList;
-        while (pTemp)
-        {
-            pBufferListObject = (BufferList *)pTemp;
-            pBuffer = (OMX_U8 *)pTemp->pBufHdr->pBuffer;
-            if (pBuffer)
-                OMX_OSAL_Free(pBuffer);
-            pTemp->pBufHdr->pBuffer = NULL;
-            if (pTemp->pBufHdr->nInputPortIndex != OMX_NOPORT)
-                eError = OMX_FreeBuffer(pContext->hWComp, pTemp->pBufHdr->nInputPortIndex, pTemp->pBufHdr);
-            else
-                eError = OMX_FreeBuffer(pContext->hWComp, pTemp->pBufHdr->nOutputPortIndex, pTemp->pBufHdr);
-            if (eError == OMX_ErrorInvalidState || eError == OMX_ErrorIncorrectStateOperation)
-                eError = OMX_ErrorNone;
-            OMX_CONF_BAIL_IF_ERROR(eError);
-
-            pTemp = pTemp->pNextBuf;
-            if (pBufferListObject)
-                OMX_OSAL_Free(pBufferListObject);
-        }
-        pContext->pBufferList = NULL;
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    OMX_ERRORTYPE OMX_CONF_AllocateAllBuffers(StateTransitionTestContext *pContext)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        OMX_U32 i, j, k;
-        OMX_BUFFERHEADERTYPE *pBufferHdr = NULL;
-        OMX_U8 *pBuffer = NULL;
-        BufferList *pBufferListObj;
-        BufferList *pTemp;
-
-        /* for all ports */
-        for (j = 0; j < NUM_DOMAINS; j++)
-        {
-            for (i = pContext->sPortParam[j].nStartPortNumber;
-                    i < pContext->sPortParam[j].nStartPortNumber +
-                    pContext->sPortParam[j].nPorts; i++)
-            {
-
-                OMX_CONF_INIT_STRUCT(sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                sPortDef.nPortIndex = i;
-                OMX_CONF_BAIL_IF_ERROR(OMX_GetParameter(pContext->hWComp,
-                                                        OMX_IndexParamPortDefinition,
-                                                        (OMX_PTR)&sPortDef));
-                if (sPortDef.nBufferCountActual == 0x0)
-                    OMX_CONF_SET_ERROR_BAIL(OMX_ErrorUndefined, "incorrect buffer count\n");
-
-                for (k = 0x0; k < sPortDef.nBufferCountActual; k++)
-                {
-                    pBufferListObj = (BufferList *)OMX_OSAL_Malloc(sizeof(BufferList));
-                    if (!pBufferListObj)
-                    {
-                        OMX_CONF_SET_ERROR_BAIL(OMX_ErrorInsufficientResources, "malloc failed\n");
-                    }
-                    pBuffer = (OMX_U8*)OMX_OSAL_Malloc(sPortDef.nBufferSize);
-                    if (!pBuffer)
-                    {
-                        OMX_CONF_SET_ERROR_BAIL(OMX_ErrorInsufficientResources, "malloc failed\n");
-                    }
-                    OMX_CONF_BAIL_IF_ERROR(OMX_UseBuffer(pContext->hWComp, &pBufferHdr, sPortDef.nPortIndex,
-                                                         0, sPortDef.nBufferSize, pBuffer));
-                    pBufferListObj->pNextBuf = NULL;
-                    pBufferListObj->pBufHdr = pBufferHdr;
-                    pBufferListObj->bInUse = OMX_FALSE;
-
-                    if (sPortDef.eDir == OMX_DirInput)
-                        pBufferListObj->pBufHdr->nOutputPortIndex = OMX_NOPORT;
-                    else
-                        pBufferListObj->pBufHdr->nInputPortIndex = OMX_NOPORT;
-
-                    if (pContext->pBufferList == NULL)
-                        pContext->pBufferList = pBufferListObj;
-                    else
-                    {
-                        pTemp = pContext->pBufferList;
-                        while (pTemp->pNextBuf)
-                        {
-                            pTemp = pTemp->pNextBuf;
-                        }
-                        pTemp->pNextBuf = pBufferListObj;
-                    }
-                }
-            }
-        }
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*  This function sends the stateset command and it checks whether
-        the component processed the command correctly
-
-        @param hComp
-       handle of the component being accessed
-        @param eToState
-       transition to this state
-        @param eCheckState
-       component should be in this state after processing command
-        @param eCheckError
-       component should return this error code (if there is an error)
-        @param pContext
-       data maintained by application (recording command completions etc.)
-    */
-    OMX_ERRORTYPE OMX_CONF_TransitionWaitCheck(StateTransitionTestContext* pContext,
-            OMX_STATETYPE eToState,
-            OMX_STATETYPE eCheckState,
-            OMX_ERRORTYPE eCheckError)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BOOL bTimeout = OMX_FALSE;
-        OMX_STATETYPE eState;
-
-        pContext->eLastError = OMX_ErrorNone;
-        OMX_OSAL_EventReset(pContext->hStateSetEvent);
-        OMX_OSAL_EventReset(pContext->hErrorEvent);
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pContext->hWComp, &eState));
-
-        eError = OMX_SendCommand(pContext->hWComp, OMX_CommandStateSet, eToState, 0);
-        if (eState == OMX_StateInvalid)
-        {
-            if (eError != OMX_ErrorInvalidState)
-            {
-                OMX_CONF_SET_ERROR_BAIL(OMX_ErrorUndefined, "should return OMX_ErrorInvalidState in invalid state\n");
-            }
-            else
-            {
-                eError = OMX_ErrorNone;
-                goto OMX_CONF_TEST_BAIL;
-            }
-        }
-        else
-        {
-            OMX_CONF_BAIL_IF_ERROR(eError);
-        }
-        if (eToState == OMX_StateIdle && (eState == OMX_StateLoaded))
-        {
-            OMX_CONF_BAIL_IF_ERROR(OMX_CONF_AllocateAllBuffers(pContext));
-        }
-        else if (eToState == OMX_StateLoaded && eState == OMX_StateIdle)
-        {
-            OMX_CONF_BAIL_IF_ERROR(OMX_CONF_DeInitBuffer(pContext));
-        }
-        if (eCheckError == OMX_ErrorNone)
-            OMX_OSAL_EventWait(pContext->hStateSetEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        else
-            OMX_OSAL_EventWait(pContext->hErrorEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-
-        if (bTimeout == OMX_TRUE)
-            OMX_CONF_SET_ERROR_BAIL(OMX_ErrorUndefined, "transition timed out\n");
-
-        OMX_CONF_BAIL_IF_ERROR(OMX_GetState(pContext->hWComp, &eState));
-        OMX_CONF_CHECK_STATETYPE(eState, eCheckState);
-        OMX_CONF_CHECK_ERRORTYPE(pContext->eLastError, eCheckError);
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    OMX_ERRORTYPE OMX_CONF_StateTransitionTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0;
-        OMX_CALLBACKTYPE oCallbacks;
-        StateTransitionTestContext oAppData;
-        OMX_HANDLETYPE hWrappedComp = 0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        StateTransitionTestContext *pContext;
-        OMX_STATETYPE eState;
-        pContext = &oAppData;
-        memset(pContext, 0x0, sizeof(StateTransitionTestContext));
-
-        oCallbacks.EventHandler    =  StateTransitionTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  =  StubbedFillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pContext, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        OMX_OSAL_EventCreate(&pContext->hStateSetEvent);
-        OMX_OSAL_EventReset(pContext->hStateSetEvent);
-        OMX_OSAL_EventCreate(&pContext->hErrorEvent);
-        OMX_OSAL_EventReset(pContext->hErrorEvent);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "unloaded -> loaded\n");
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-
-        /* detect all audio ports on the component */
-        OMX_CONF_INIT_STRUCT(pContext->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pContext->hWComp, OMX_IndexParamAudioInit, (OMX_PTR) & pContext->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pContext->sPortParam[0].nPorts, pContext->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pContext->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pContext->hWComp, OMX_IndexParamVideoInit, (OMX_PTR) & pContext->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pContext->sPortParam[1].nPorts, pContext->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pContext->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pContext->hWComp, OMX_IndexParamImageInit, (OMX_PTR) & pContext->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pContext->sPortParam[2].nPorts, pContext->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pContext->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pContext->hWComp, OMX_IndexParamOtherInit, (OMX_PTR) & pContext->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)
-            eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pContext->sPortParam[3].nPorts, pContext->sPortParam[3].nStartPortNumber);
-
-        /* Tests are numbered based on Section 3.10 in conformance test document */
-        /* read as <row,column> */
-        /* TODO: minimize number of "setting up" transitions */
-
-        /* <1,2> unload -> loaded */
-
-        /* <2,1> loaded -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-        /* <2,2> loaded -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> loaded\n");
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StateLoaded, OMX_ErrorSameState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <2,3> loaded -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateWaitForResources, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,2> waitforresources -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> loaded\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StateLoaded, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <2,4> loaded -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> idle\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,2> idle -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> loaded\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StateLoaded, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <2,5> loaded -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateLoaded, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <2,6> loaded -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StateLoaded, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <2,7> loaded -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "loaded -> invalid\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* set to waitforresources */
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateWaitForResources, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,2> waitforresources -> loaded; with <2,3> */
-
-        /* <3,3> waitforresources -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateWaitForResources, OMX_ErrorSameState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,5> waitforresources -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateWaitForResources, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,6> waitforresources -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StateWaitForResources, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,4> waitforresources -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> idle - not tested\n");
-        /* eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                         OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError); */
-
-        /* <3,7> waitforresources -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> invalid\n");
-        /* idle -> loaded */
-        /* eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                         OMX_StateLoaded, OMX_ErrorNone);
-                                         OMX_CONF_BAIL_IF_ERROR(eError); */
-        /* loaded -> waitforresources */
-        /*eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                       OMX_StateWaitForResources, OMX_ErrorNone);
-                       OMX_CONF_BAIL_IF_ERROR(eError);*/
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <3,1> waitforresources (invalid) -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "waitforresources -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-        /* set to idle */
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,2> idle -> loaded; with <2,4> */
-
-        /* <4,3> idle -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateIdle, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,4> idle -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> idle\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorSameState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,5> idle -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateExecuting, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,4> executing -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> idle\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,6> idle -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StatePause, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,4> pause -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> idle\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,7> idle -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> invalid\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <4,1> idle (invalid) -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "idle -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-        /* set to executing */
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateExecuting, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,2> executing -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> loaded\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StateExecuting, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,3> executing -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateExecuting, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,5> executing -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateExecuting, OMX_ErrorSameState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,4> executing -> idle; with <4,5> */
-
-        /* <5,6> executing -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StatePause, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,5> pause -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateExecuting, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,7> executing -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> invalid\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <5,1> executing (invalid) -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "executing -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-        /* set to pause */
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateIdle, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StatePause, OMX_ErrorNone);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,2> pause -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> loaded\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StatePause, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,3> pause -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StatePause, OMX_ErrorIncorrectStateTransition);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,4> pause -> idle; with <4,6> */
-
-        /* <6,5> pause -> executing; with <5,6> */
-
-        /* <6,6> pause -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StatePause, OMX_ErrorSameState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,7> pause -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> invalid\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <6,1> pause (invalid) -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "pause -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-        /* set to invalid */
-        OMX_CONF_LOAD(eState, eError, pContext, hComp, hWrappedComp,
-                      cComponentName, pWrappedAppData, pWrappedCallbacks);
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,2> invalid -> loaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> loaded\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateLoaded,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,3> invalid -> waitforresources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> waitforresources\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateWaitForResources,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,4> invalid -> idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> idle\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateIdle,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,5> invalid -> executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> executing\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateExecuting,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,6> invalid -> pause */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> pause\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StatePause,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,7> invalid -> invalid */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> invalid\n");
-        eError = OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                              OMX_StateInvalid, OMX_ErrorInvalidState);
-        OMX_CONF_BAIL_IF_ERROR(eError);
-
-        /* <7,1> invalid -> unloaded */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "invalid -> unloaded\n");
-        OMX_CONF_UNLOAD(pContext, hComp, hWrappedComp, eError);
-
-OMX_CONF_TEST_BAIL:
-        /* cleanup: return function errors rather than closing errors if appropriate */
-
-        if (OMX_ErrorNone == eError)
-        {
-
-            if (hWrappedComp)
-            {
-                eError = OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                eError = OMX_FreeHandle(hComp);
-            }
-            eError = OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-            eError = OMX_Deinit();
-        }
-        else
-        {
-            /* set to invalid and cleanup */
-            OMX_CONF_TransitionWaitCheck(pContext, OMX_StateInvalid,
-                                         OMX_StateInvalid, OMX_ErrorInvalidState);
-            OMX_CONF_DeInitBuffer(pContext);
-
-            if (hWrappedComp)
-            {
-                OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-            }
-            if (hComp)
-            {
-                OMX_FreeHandle(hComp);
-            }
-            OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-            OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pContext->hStateSetEvent);
-        OMX_OSAL_EventDestroy(pContext->hErrorEvent);
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_clockcomponenttest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_clockcomponenttest.c
deleted file mode 100644 (file)
index 45e817b..0000000
+++ /dev/null
@@ -1,735 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_ClockComponentTest.c
- *  OpenMax IL conformance test validating clock component functionality.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Callback data */
-    typedef struct CCTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hCUT;
-    } CCTDATATYPE;
-
-    /* Test proper support for Clock Component configs */
-    OMX_ERRORTYPE CCTGTestConfigs(OMX_HANDLETYPE hComp)
-    {
-        OMX_TIME_CONFIG_SCALETYPE           oScale;
-        OMX_TIME_CONFIG_CLOCKSTATETYPE      oClockState;
-        OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE  oActiveClock;
-        OMX_TIME_CONFIG_TIMESTAMPTYPE       oTimeStamp;
-        OMX_ERRORTYPE eError;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Test Clock Component Configs.\n");
-
-        INIT_CONFIG(oScale);
-        INIT_CONFIG(oClockState);
-        INIT_CONFIG(oActiveClock);
-        INIT_CONFIG(oTimeStamp);
-        oTimeStamp.nPortIndex = 0;
-
-        /* OMX_IndexConfigTimeScale */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeScale\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        oScale.xScale = 0x00010000; /*1x*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-
-        /* OMX_IndexConfigTimeClockState */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeClockState\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        oClockState.nOffset = oClockState.nStartTime = oClockState.nWaitMask = 0;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-
-        /* OMX_IndexConfigTimeActiveRefClock */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeActiveRefClock\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeActiveRefClock, (OMX_PTR)&oActiveClock));
-        oActiveClock.eClock = OMX_TIME_RefClockNone;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeActiveRefClock, (OMX_PTR)&oActiveClock));
-
-        /* OMX_IndexConfigTimeCurrentMediaTime */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeCurrentMediaTime\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeCurrentMediaTime, (OMX_PTR)&oTimeStamp));
-        oTimeStamp.nTimestamp = 0;
-        if (OMX_ErrorNone == OMX_SetConfig(hComp, OMX_IndexConfigTimeCurrentMediaTime, (OMX_PTR)&oTimeStamp))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "--ERROR:  OMX_SetConfig on read-only OMX_IndexConfigTimeCurrentMediaTime should fail.\n");
-            return OMX_ErrorBadParameter;
-        }
-
-        /* OMX_IndexConfigTimeCurrentWallTime */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeCurrentWallTime\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeCurrentWallTime, (OMX_PTR)&oTimeStamp));
-        oTimeStamp.nTimestamp = 0;
-        if (OMX_ErrorNone == OMX_SetConfig(hComp, OMX_IndexConfigTimeCurrentWallTime, (OMX_PTR)&oTimeStamp))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "--ERROR:  OMX_SetConfig on read-only OMX_IndexConfigTimeCurrentWallTime should fail.\n");
-            return OMX_ErrorBadParameter;
-        }
-
-        /* OMX_IndexConfigTimeClientStartTime */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeActiveRefClock\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeActiveRefClock, (OMX_PTR)&oTimeStamp));
-        oTimeStamp.nTimestamp = 0;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClientStartTime, (OMX_PTR)&oTimeStamp));
-
-        /* OMX_IndexConfigTimeCurrentAudioReference */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeCurrentAudioReference\n");
-        if (OMX_ErrorNone == OMX_GetConfig(hComp, OMX_IndexConfigTimeCurrentAudioReference, (OMX_PTR)&oTimeStamp))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "--ERROR:  OMX_GetConfig on write-only OMX_IndexConfigTimeCurrentAudioReference should fail.\n");
-            return OMX_ErrorBadParameter;
-        }
-        oTimeStamp.nTimestamp = 0;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeCurrentAudioReference, (OMX_PTR)&oTimeStamp));
-
-        /* OMX_IndexConfigTimeCurrentVideoReference */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm support for OMX_IndexConfigTimeCurrentVideoReference\n");
-        if (OMX_ErrorNone == OMX_GetConfig(hComp, OMX_IndexConfigTimeCurrentVideoReference, (OMX_PTR)&oTimeStamp))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "--ERROR:  OMX_GetConfig on write-only OMX_IndexConfigTimeCurrentVideoReference should fail.\n");
-            return OMX_ErrorBadParameter;
-        }
-        oTimeStamp.nTimestamp = 0;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeCurrentVideoReference, (OMX_PTR)&oTimeStamp));
-
-        return OMX_ErrorNone;
-
-OMX_CONF_TEST_FAIL:
-        if (eError != OMX_ErrorNone)
-            return eError;
-        else
-            return OMX_ErrorUndefined;
-    }
-
-    OMX_TIME_MEDIATIMETYPE g_Update;       /* the last media time update received */
-    OMX_TIME_MEDIATIMETYPE g_StateChange;      /* the last media time update received that was a state change */
-    OMX_HANDLETYPE g_WaitEvent;                        /* the event we use to wait on a media time update */
-    OMX_HANDLETYPE g_WaitMutex;                        /* the mutex for access to the media time update */
-
-    /* Callback called when the Tunnel Test Component recieves a OnEmptythisBuffer call */
-    OMX_ERRORTYPE CCTOnEmptyThisBuffer(OMX_BUFFERHEADERTYPE *pHdr)
-    {
-        OMX_OSAL_MutexLock(g_WaitMutex);
-        g_Update = *((OMX_TIME_MEDIATIMETYPE *)pHdr->pBuffer);
-        if (g_Update.eUpdateType == OMX_TIME_UpdateClockStateChanged)
-        {
-            g_StateChange = g_Update;
-        }
-
-        OMX_OSAL_EventSet(g_WaitEvent);
-        OMX_OSAL_MutexUnlock(g_WaitMutex);
-
-        return OMX_ErrorNone;
-    }
-    /* Wait for the Component Under Test to send a media time update, timing out after the given duration */
-    OMX_BOOL CCTWaitForMediaTimeUpdate(OMX_U32 timeoutMsec)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        /* wait */
-        OMX_OSAL_EventWait(g_WaitEvent, timeoutMsec, &bTimedOut);
-        OMX_OSAL_MutexLock(g_WaitMutex);
-        OMX_OSAL_EventReset(g_WaitEvent);
-        OMX_OSAL_MutexUnlock(g_WaitMutex);
-
-        return bTimedOut ? OMX_FALSE : OMX_TRUE;
-    }
-
-
-    void CCTClearMediaTimeUpdate()
-    {
-        OMX_OSAL_MutexLock(g_WaitMutex);
-        g_Update.eUpdateType = OMX_TIME_UpdateMax;
-        OMX_OSAL_EventReset(g_WaitEvent);
-        OMX_OSAL_MutexUnlock(g_WaitMutex);
-    }
-
-    void CCTClearStateChangeUpdate()
-    {
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-
-        OMX_OSAL_MutexLock(g_WaitMutex);
-        g_Update.eUpdateType = OMX_TIME_UpdateMax;
-        g_StateChange.eUpdateType = OMX_TIME_UpdateMax;
-        OMX_OSAL_EventReset(g_WaitEvent);
-        OMX_OSAL_MutexUnlock(g_WaitMutex);
-    }
-
-
-    /* Wait for a clock state change notification (via a media time update) and confirm it is the one we expect */
-    OMX_BOOL CCTConfirmClockStateChange(OMX_HANDLETYPE hComp, OMX_TIME_CLOCKSTATE eState)
-    {
-        OMX_TIME_CONFIG_CLOCKSTATETYPE oClockState;
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS))
-        {
-            if ((g_StateChange.eUpdateType != OMX_TIME_UpdateClockStateChanged) ||
-                    (eState != g_StateChange.eState))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in clock state change update, type %d, state %d\n",
-                               g_StateChange.eUpdateType, g_StateChange.eState);
-                return OMX_FALSE;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing clock state change update\n");
-            return OMX_FALSE;
-        }
-
-        if (OMX_ErrorNone != OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  OMX_GetConfig failed.\n");
-            return OMX_FALSE;
-        }
-        if (eState != oClockState.eState)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  OMX_GetConfig returned wrong state.\n");
-            return OMX_FALSE;
-        }
-        return OMX_TRUE;
-    }
-
-#define CCT_STARTTIME   ((OMX_TICKS)100*OMX_TICKS_PER_SECOND)
-#define CCT_PASTTIME    ((OMX_TICKS)99*OMX_TICKS_PER_SECOND)
-#define CCT_FUTURETIME  ((OMX_TICKS)101*OMX_TICKS_PER_SECOND)
-#define CCT_WAITTIME    2000
-
-    /* Test Clock Component's rate control functionality */
-    OMX_ERRORTYPE CCTRateControl(OMX_HANDLETYPE hComp)
-    {
-        OMX_TIME_CONFIG_CLOCKSTATETYPE oClockState;
-        OMX_TIME_CONFIG_SCALETYPE oScale;
-        OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE oRequest;
-        OMX_ERRORTYPE eError;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Test Rate Control.\n");
-
-        /* setup config structures */
-        oClockState.nSize = sizeof(oClockState);
-        oClockState.nVersion = g_OMX_CONF_Version;
-        oClockState.nWaitMask = 0;
-        oClockState.nOffset = 0;
-        oScale.nSize = sizeof(oScale);
-        oScale.nVersion = g_OMX_CONF_Version;
-        oRequest.nSize = sizeof(oRequest);
-        oRequest.nVersion = g_OMX_CONF_Version;
-
-        /* Scale change */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm scale change.\n");
-        oScale.xScale = 0x00020000; /*2x*/
-        CCTClearMediaTimeUpdate();
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS))
-        {
-            if ((g_Update.eUpdateType != OMX_TIME_UpdateScaleChanged) ||
-                    (0x00020000 != g_Update.xScale))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in scale change update.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing scale change update.\n");
-            return OMX_ErrorTimeout;
-        }
-        if (OMX_ErrorNone != OMX_GetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  OMX_GetConfig failed.\n");
-            return OMX_ErrorUndefined;
-        }
-        if (0x00020000 != oScale.xScale)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  OMX_GetConfig returned wrong scale.\n");
-            return OMX_ErrorUndefined;
-        }
-
-        /* use same start time througout */
-        oClockState.nStartTime = CCT_STARTTIME;
-
-        /* Future request when playing forward */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm future request when playing forward is fulfilled.\n");
-        oScale.xScale = 0x00010000; /*1x*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oRequest.nMediaTimestamp = CCT_FUTURETIME;
-        oRequest.nOffset = 0;
-        oRequest.nPortIndex = 0;
-        CCTClearMediaTimeUpdate();
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType != OMX_TIME_UpdateRequestFulfillment) ||
-                    (CCT_FUTURETIME != oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in request fulfillment.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing request fulfillment\n");
-            return OMX_ErrorUndefined;
-        }
-
-        /* Request when stopped */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm request when stopped not fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType == OMX_TIME_UpdateRequestFulfillment) &&
-                    (CCT_FUTURETIME == oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Fulfilled request when stopped.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-
-        /* Request when waiting */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm request when waiting not fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateWaitingForStartTime;
-        oClockState.nWaitMask = 1;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType == OMX_TIME_UpdateRequestFulfillment) &&
-                    (CCT_FUTURETIME == oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Fulfilled request when waiting.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-
-        /* Request when paused */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm request when paused not fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oScale.xScale = 0; /*paused*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType == OMX_TIME_UpdateRequestFulfillment) &&
-                    (CCT_FUTURETIME == oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Fulfilled request when paused.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-
-        /* Future request when playing backward */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm future request when playing backward is fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oScale.xScale = 0xffff0000; /*-1x*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oRequest.nMediaTimestamp = CCT_FUTURETIME;
-        oRequest.nOffset = 0;
-        oRequest.nPortIndex = 0;
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType != OMX_TIME_UpdateRequestFulfillment) ||
-                    (CCT_FUTURETIME != oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in request fulfillment.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing request fulfillment\n");
-            return OMX_ErrorUndefined;
-        }
-
-        /* Past request when playing backward */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm past request when playing backward is fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oScale.xScale = 0xffff0000; /*-1x*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oRequest.nMediaTimestamp = CCT_PASTTIME;
-        oRequest.nOffset = 0;
-        oRequest.nPortIndex = 0;
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType != OMX_TIME_UpdateRequestFulfillment) ||
-                    (CCT_PASTTIME != oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in request fulfillment.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing request fulfillment\n");
-            return OMX_ErrorUndefined;
-        }
-
-        /* Past request when playing forward */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm past request when playing forward is fulfilled.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oScale.xScale = 0x00010000; /*1x*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeScale, (OMX_PTR)&oScale));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oRequest.nMediaTimestamp = CCT_PASTTIME;
-        oRequest.nOffset = 0;
-        oRequest.nPortIndex = 0;
-        CCTWaitForMediaTimeUpdate(OMX_CONF_TIMEOUT_EXPECTING_SUCCESS); /* flush any old event */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeMediaTimeRequest, (OMX_PTR)&oRequest));
-        if (OMX_TRUE == CCTWaitForMediaTimeUpdate(CCT_WAITTIME))
-        {
-            if ((g_Update.eUpdateType != OMX_TIME_UpdateRequestFulfillment) ||
-                    (CCT_PASTTIME != oRequest.nMediaTimestamp))
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Bad parameters in request fulfillment.\n");
-                return OMX_ErrorUndefined;
-            }
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR:  Missing request fulfillment\n");
-            return OMX_ErrorUndefined;
-        }
-
-        return OMX_ErrorNone;
-
-OMX_CONF_TEST_FAIL:
-        if (eError != OMX_ErrorNone)
-            return eError;
-        else
-            return OMX_ErrorUndefined;
-    }
-
-    /* Test Clock Component's clock state functionality */
-    OMX_ERRORTYPE CCTClockStateTransitions(OMX_HANDLETYPE hComp)
-    {
-        OMX_TIME_CONFIG_CLOCKSTATETYPE oClockState;
-        OMX_TIME_CONFIG_TIMESTAMPTYPE nTimestamp;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Test Clock State Transitions.\n");
-
-        oClockState.nSize = sizeof(oClockState);
-        oClockState.nVersion = g_OMX_CONF_Version;
-        oClockState.nWaitMask = 0;
-        oClockState.nOffset = 0;
-
-        /* Check that we're stopped */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm initial state.\n");
-        OMX_CONF_FAIL_IF_NEQ(OMX_TIME_ClockStateStopped, oClockState.eState);
-
-        /* Stopped->Running */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm stopped->running transition.\n");
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        CCTClearStateChangeUpdate();
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF(!CCTConfirmClockStateChange(hComp, OMX_TIME_ClockStateRunning));
-
-        /* Running->Waiting MUST FAIL */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm running->waiting transition fails.\n");
-        oClockState.eState = OMX_TIME_ClockStateWaitingForStartTime;
-        eError = OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR) & oClockState);
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF_NEQ(oClockState.eState, OMX_TIME_ClockStateRunning);
-
-        /* Running->Stopped */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm running->stopped transition.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        CCTClearStateChangeUpdate();
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF(!CCTConfirmClockStateChange(hComp, OMX_TIME_ClockStateStopped));
-
-        /* Stopped->Waiting...Running (before start time is sent) */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm stopped->waiting...running transitions.\n");
-        oClockState.eState = OMX_TIME_ClockStateWaitingForStartTime;
-        oClockState.nWaitMask = 0x1;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF_NEQ(OMX_TIME_ClockStateWaitingForStartTime, oClockState.eState);
-
-        /* Stopped->Waiting...Running (after start time is sent) */
-        nTimestamp.nPortIndex = 0;
-        nTimestamp.nTimestamp = OMX_TICKS_PER_SECOND * 5;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClientStartTime, (OMX_PTR)&nTimestamp));
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF_NEQ(OMX_TIME_ClockStateRunning, oClockState.eState);
-
-        /* Waiting->Running */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm waiting->running transition.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateWaitingForStartTime;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateRunning;
-        CCTClearStateChangeUpdate();
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF(!CCTConfirmClockStateChange(hComp, OMX_TIME_ClockStateRunning));
-
-        /* Waiting->Stopped */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Confirm waiting->stopped transition.\n");
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateWaitingForStartTime;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        oClockState.eState = OMX_TIME_ClockStateStopped;
-
-        CCTClearStateChangeUpdate();
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeClockState, (OMX_PTR)&oClockState));
-        OMX_CONF_FAIL_IF(!CCTConfirmClockStateChange(hComp, OMX_TIME_ClockStateStopped));
-
-        return OMX_ErrorNone;
-
-OMX_CONF_TEST_FAIL:
-        if (eError != OMX_ErrorNone)
-            return eError;
-        else
-            return OMX_ErrorUndefined;
-    }
-
-    /* Clock Component Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE CCTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        CCTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE WaitForState(CCTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Main entrypoint into the Clock Component Test */
-    OMX_ERRORTYPE OMX_CONF_ClockComponentTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_CALLBACKTYPE oCallbacks;
-        CCTDATATYPE oAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-
-        /* setup synchronization objects */
-        OMX_OSAL_EventCreate(&g_WaitEvent);
-        OMX_OSAL_EventReset(g_WaitEvent);
-        OMX_OSAL_MutexCreate(&g_WaitMutex);
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = CCTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        /* Acquire component under test handle */
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        eError = OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        /* Set the OnEmptyThisBuffer callback */
-        OMX_CONF_SetTTCOnEmptyThisBuffer(hTTComp, CCTOnEmptyThisBuffer);
-
-        /* Connect to each TTC port to each CUT port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* transition CUT to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition CUT to executing */
-        WaitForState(&oAppData, OMX_StateIdle);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-        WaitForState(&oAppData, OMX_StateExecuting);
-
-        /* transition TTC to executing  */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-
-        /* query some configs */
-        OMX_CONF_FAIL_IF_ERROR(CCTGTestConfigs(hWrappedComp));
-
-        /* test some clock state changes */
-        OMX_CONF_FAIL_IF_ERROR(CCTClockStateTransitions(hWrappedComp));
-
-        /* test some clock state changes */
-        OMX_CONF_FAIL_IF_ERROR(CCTRateControl(hWrappedComp));
-
-OMX_CONF_TEST_FAIL:
-
-        /* transition CUT to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            WaitForState(&oAppData, OMX_StateIdle);
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-            WaitForState(&oAppData, OMX_StateLoaded);
-        }
-
-        /* transition TTC to Loaded state */
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* destroy state change event */
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-        }
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        /* clean up synchronization objects */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-
-        OMX_OSAL_EventDestroy(g_WaitEvent);
-        OMX_OSAL_MutexDestroy(g_WaitMutex);
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_incompletestoptest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_incompletestoptest.c
deleted file mode 100644 (file)
index 91224cf..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_IncompleteStopTest.c
- *  OpenMax IL conformance test validating the proper behavior of a component when a stop is issued without the
- *  tunneled component returning all the buffers.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Callback data */
-    typedef struct ISTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hCUT;
-    } ISTDATATYPE;
-
-    /* Incomplete Stop Component's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE ISTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        ISTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-
-        if (eEvent == OMX_EventBufferFlag)
-        {
-            OMX_OSAL_EventSet(pContext->hEOSEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE ISTWaitForState(ISTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return bTimedOut ? OMX_ErrorTimeout : OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Main entrypoint into the Incomplete Stop Test */
-    OMX_ERRORTYPE OMX_CONF_IncompleteStopTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        ISTDATATYPE oAppData;
-        OMX_BOOL bTimedOut;
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEOSEvent);
-        OMX_OSAL_EventReset(oAppData.hEOSEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = ISTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all component ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_FALSE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning to executing.\n");
-
-        /* transition CUT to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition CUT to executing */
-        OMX_CONF_FAIL_IF_ERROR(ISTWaitForState(&oAppData, OMX_StateIdle));
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-        OMX_CONF_FAIL_IF_ERROR(ISTWaitForState(&oAppData, OMX_StateExecuting));
-
-        /* transition TTC to executing  */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_WaitForBufferTraffic(hTTComp));
-
-        /* tell TTC to hold buffers */
-        TTCHoldBuffers(hTTComp);
-
-        /* transition CUT to back to idle */
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* wait for change to idle - this must time out */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Holding outstanding buffers, waiting for transition to idle.\n");
-        OMX_OSAL_EventWait(oAppData.hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimedOut);
-        if (!bTimedOut)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-ERROR: Transitioned to idle.\n");
-            eError = OMX_ErrorUndefined;
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-OK: Didn't transitioned to idle.\n");
-        }
-
-        /* tell TTC to release buffers */
-        TTCReleaseBuffers(hTTComp);
-
-        /* wait for change to idle - this must succeed */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Released outstanding buffers, waiting for transition to idle.\n");
-        OMX_OSAL_EventWait(oAppData.hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || oAppData.eState != OMX_StateIdle)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-ERROR: Didn't transition to idle.\n");
-            eError = OMX_ErrorUndefined;
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-OK: Transitioned to idle.\n");
-        }
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* transition TTC to Loaded state */
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(ISTWaitForState(&oAppData, OMX_StateLoaded));
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEOSEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_invalidinputoutputtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_invalidinputoutputtest.c
deleted file mode 100644 (file)
index a4d0ccd..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_InvalidInputOutputTest.c
- *  OpenMax IL conformance test validating correct component behavior when connecting to input or
- *  output ports that behave incorrectly.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <string.h>
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Callback data */
-    typedef struct IIOTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hCUT;
-    } IIOTDATATYPE;
-
-    /* Invalid Input Output Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE IIOTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        IIOTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE IIOTWaitForState(IIOTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_FAILURE, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return OMX_ErrorUndefined;
-        }
-        OMX_OSAL_EventReset(pAppData->hStateChangeEvent);
-        return OMX_ErrorNone;
-    }
-
-    /* perform tests on all ports of a particular domain */
-    static OMX_ERRORTYPE DoTestAllPortsForDomain(OMX_INDEXTYPE nIndex, OMX_HANDLETYPE hWrappedComp,
-            OMX_HANDLETYPE hWrappedTTComp, OMX_DIRTYPE eDir, OMX_U8 bShouldError, OMX_STRING sTestType)
-    {
-        OMX_PORT_PARAM_TYPE oParam;
-        OMX_U32 i;
-        OMX_U32 iCUTPort;
-        OMX_ERRORTYPE eError;
-
-        INIT_PARAM(oParam);
-
-        /* query the component's other ports */
-        if (OMX_ErrorNone != (eError = OMX_GetParameter(hWrappedComp, nIndex, &oParam))) return eError;
-
-        /* for each discovered port */
-        for (i = 0;i < oParam.nPorts;i++)
-        {
-            OMX_PARAM_PORTDEFINITIONTYPE oCUTPort;
-            INIT_PARAM(oCUTPort);
-
-            iCUTPort = oParam.nStartPortNumber + i;
-
-            oCUTPort.nPortIndex = iCUTPort;
-            eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamPortDefinition, &oCUTPort);
-            if (eError != OMX_ErrorNone)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Failed for Port %d\n",
-                               sTestType, iCUTPort);
-                return eError;
-            }
-            else if (eDir == oCUTPort.eDir)
-            {
-                eError = TTCConnectPort(hWrappedTTComp, hWrappedComp, iCUTPort);
-                if (bShouldError && eError != OMX_ErrorNone)
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Passed for Port %d\n",
-                                   sTestType, iCUTPort);
-                    eError = OMX_ErrorNone;
-                }
-                else if (bShouldError)
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Failed for Port %d\n",
-                                   sTestType, iCUTPort);
-                    return OMX_ErrorUndefined;
-                }
-                else if (eError != OMX_ErrorNone)
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Failed for Port %d\n",
-                                   sTestType, iCUTPort);
-                    return eError;
-                }
-            }
-            else if (!bShouldError)
-            {
-                /* if we don't expect an error, try to connect the port, but ignore any result so that transitions to idle work normally */
-                TTCConnectPort(hWrappedTTComp, hWrappedComp, iCUTPort);
-            }
-
-        }
-        return eError;
-    }
-
-    /* perform tests on all ports */
-    static OMX_ERRORTYPE DoTestAllPorts(OMX_HANDLETYPE hWrappedComp, OMX_HANDLETYPE hWrappedTTComp,
-                                        OMX_DIRTYPE eDir, OMX_U8 bShouldError, OMX_STRING sTestType)
-    {
-        OMX_ERRORTYPE eError;
-
-        eError = OMX_ErrorNone;
-
-        /* test audio ports */
-        if (OMX_ErrorNone != (eError =
-                                  DoTestAllPortsForDomain(OMX_IndexParamAudioInit, hWrappedComp, hWrappedTTComp,
-                                                          eDir, bShouldError, sTestType))) return eError;
-
-        /* test video ports */
-        if (OMX_ErrorNone != (eError =
-                                  DoTestAllPortsForDomain(OMX_IndexParamVideoInit, hWrappedComp, hWrappedTTComp,
-                                                          eDir, bShouldError, sTestType))) return eError;
-
-        /* test image ports */
-        if (OMX_ErrorNone != (eError =
-                                  DoTestAllPortsForDomain(OMX_IndexParamImageInit, hWrappedComp, hWrappedTTComp,
-                                                          eDir, bShouldError, sTestType))) return eError;
-
-        /* test other ports */
-        if (OMX_ErrorNone != (eError =
-                                  DoTestAllPortsForDomain(OMX_IndexParamOtherInit, hWrappedComp, hWrappedTTComp,
-                                                          eDir, bShouldError, sTestType))) return eError;
-
-
-        return eError;
-    }
-
-    /* perform all input port tests */
-    static OMX_ERRORTYPE TestAllInputPorts(OMX_HANDLETYPE hWrappedComp, OMX_HANDLETYPE hWrappedTTComp, OMX_PTR pAppData)
-    {
-        OMX_ERRORTYPE eError;
-        OMX_COMPONENTTYPE *pComp;
-
-        pComp = (OMX_COMPONENTTYPE *)hWrappedComp;
-
-        // invalid port type
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Input - Testing invalid port types\n");
-        TTCCreateInvalidPortTypes(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirInput, 1, "'Input - Invalid port type'"))) return eError;
-        TTCCreateInvalidPortTypes(hWrappedTTComp, 0);
-
-        // doesn't support IndexParamCompbufferSupplier
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Input - Testing when IndexParamCompBufferSupplier is broken\n");
-        TTCDontSupportIndexParamCompBufferSupplier(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirInput, 1, "'Input - IndexParamCompBufferSupplier broken'"))) return eError;
-        TTCDontSupportIndexParamCompBufferSupplier(hWrappedTTComp, 0);
-
-        // don't support UseBuffer
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Input - Testing when UseBuffer doesn't work\n");
-        TTCDontSupportUseBuffer(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirInput, 0, "'Input - UseBuffer unsupported'"))) return eError;
-
-        OMX_OSAL_EventReset(((IIOTDATATYPE *)pAppData)->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp,
-                                       OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        if (OMX_ErrorNone == (eError = IIOTWaitForState(pAppData, OMX_StateIdle)))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Failed\n",
-                           "'Input - UseBuffer unsupported'");
-            eError = OMX_ErrorPortsNotCompatible;
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Passed\n",
-                           "'Input - UseBuffer unsupported'");
-            eError = OMX_ErrorNone;
-        }
-
-        OMX_OSAL_EventReset(((IIOTDATATYPE *)pAppData)->hStateChangeEvent);
-        TTCDontSupportUseBuffer(hWrappedTTComp, 0);
-
-        return eError;
-    }
-
-    /* perform all output port tests */
-    static OMX_ERRORTYPE TestAllOutputPorts(OMX_HANDLETYPE hWrappedComp, OMX_HANDLETYPE hWrappedTTComp, OMX_PTR pAppData)
-    {
-        OMX_ERRORTYPE eError;
-
-        // invalid port type
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Output - Testing invalid port types\n");
-        TTCCreateInvalidPortTypes(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirOutput, 1, "'Output - Invalid port type'"))) return eError;
-        TTCCreateInvalidPortTypes(hWrappedTTComp, 0);
-
-        // input port supplier preference opposite of CUT output port supplier preference
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Output - Testing input port supplier preference opposite of CUT output port supplier preference\n");
-        TTCInvertBufferSupplier(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirOutput, 0, "'Output - Input port supplier preference opposite of CUT output port supplier preference'"))) return eError;
-        TTCInvertBufferSupplier(hWrappedTTComp, 0);
-
-        // don't support UseBuffer
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Output - Testing when UseBuffer doesn't work\n");
-        TTCDontSupportUseBuffer(hWrappedTTComp, 1);
-        if (OMX_ErrorNone != (eError = DoTestAllPorts(hWrappedComp,
-                                       hWrappedTTComp, OMX_DirOutput, 0, "'Output - UseBuffer unsupported'"))) return eError;
-
-        OMX_OSAL_EventReset(((IIOTDATATYPE *)pAppData)->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp,
-                                       OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        if (OMX_ErrorNone == IIOTWaitForState(pAppData, OMX_StateIdle))
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Failed\n",
-                           "'Output - UseBuffer unsupported'");
-            eError = OMX_ErrorPortsNotCompatible;
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--Invalid IO Tunnel test %s Passed\n",
-                           "'Output - UseBuffer unsupported'");
-            eError = OMX_ErrorNone;
-        }
-
-        OMX_OSAL_EventReset(((IIOTDATATYPE *)pAppData)->hStateChangeEvent);
-        TTCDontSupportUseBuffer(hWrappedTTComp, 0);
-
-        return eError;
-    }
-
-    /* Main entrypoint into the Invalid Input Output Test */
-    OMX_ERRORTYPE OMX_CONF_InvalidInputOutputTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hTTComp, hWrappedComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        IIOTDATATYPE oAppData;
-        memset(&oAppData, 0, sizeof oAppData);
-
-        oAppData.hStateChangeEvent = 0;
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = IIOTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Invalid Input Tunneling Setup Tests\n");
-        OMX_CONF_FAIL_IF_ERROR(TestAllInputPorts(hWrappedComp, hWrappedTTComp, &oAppData));
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Invalid Output Tunneling Setup Tests\n");
-        OMX_CONF_FAIL_IF_ERROR(TestAllOutputPorts(hWrappedComp, hWrappedTTComp, &oAppData));
-
-        OMX_CONF_TEST_FAIL
-:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-        }
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        if (oAppData.hStateChangeEvent)
-        {
-            OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        }
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_minpayloadsizetest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_minpayloadsizetest.c
deleted file mode 100644 (file)
index 7e9a25a..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_MinPayloadSizeTest.c
- *  OpenMax IL conformance test validating that all output ports of a component abide by minimum payload size
- *  rules (where applicable).
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Call back data */
-    typedef struct MPSTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hCUT;
-    } MPSTDATATYPE;
-
-    /* Min Payload Size Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE MPSTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        MPSTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-
-        if (eEvent == OMX_EventError && nData1 == OMX_ErrorInvalidState)
-        {
-            pContext->eState = OMX_StateInvalid;
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-
-        if (eEvent == OMX_EventBufferFlag)
-        {
-            OMX_OSAL_EventSet(pContext->hEOSEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE MPSTWaitForState(MPSTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            if (bTimedOut)
-                return OMX_ErrorTimeout;
-            else
-                return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    OMX_U32 g_EmptyThisBufferCalls;    /* counter of # of EmptyThisBufferCalls made to TTC */
-    OMX_BOOL g_bInvalidSize;           /* set when an output send the TTC a payload of an invalid size */
-
-    /* Callback for when the TTC detects an invalid payload size */
-    OMX_ERRORTYPE MPSTOnInvalidPayloadSize(OMX_U32 nOutPort, OMX_U32 nMin, OMX_U32 nActual)
-    {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Insufficiently sized payload received from port %i.\n", nOutPort);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Expected at least 0x%08x bytes. Received 0x%08x bytes.\n", nMin, nActual);
-        g_bInvalidSize = OMX_TRUE;
-
-        return OMX_ErrorNone;
-    }
-
-    /* Main entrypoint into the Min Payload Size Test */
-    OMX_ERRORTYPE OMX_CONF_MinPayloadSizeTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        MPSTDATATYPE oAppData;
-        OMX_U32 i;
-
-        /* create state change event */
-        for (i = 0;i < sizeof(oAppData);i++)((OMX_U8*)&oAppData)[i] = 0;
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEOSEvent);
-        OMX_OSAL_EventReset(oAppData.hEOSEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = MPSTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        g_bInvalidSize = OMX_FALSE;
-        OMX_CONF_SetTTCOnInvalidPayloadSize(hTTComp, MPSTOnInvalidPayloadSize);
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all CUT ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_FALSE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning both TTC and CUT to executing.\n");
-
-        /* transition CUT to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetState(hWrappedComp, &oAppData.eState));
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition CUT to executing */
-        OMX_CONF_FAIL_IF_ERROR(MPSTWaitForState(&oAppData, OMX_StateIdle));
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-        OMX_CONF_FAIL_IF_ERROR(MPSTWaitForState(&oAppData, OMX_StateExecuting));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "TTC automatically outputs minimally sized buffer payloads.\n");
-
-        /* transition TTC to executing  */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-
-        /* wait for at least 100 calls to EmptyThisBuffer or FillThisBuffer*/
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_WaitForBufferTraffic(hTTComp));
-
-        if (g_bInvalidSize)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-ERROR: Detected an incorrectly sized buffer payload.\n");
-            eError = OMX_ErrorUndefined;
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-OK: All buffer payloads correctly sized.\n");
-        }
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT and TTC to Loaded state */
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        if (hWrappedComp)
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            OMX_CONF_REMEMBER_ERROR(TTCReleaseBuffers(hTTComp));  /* release any buffers that ttc may be holding to allow CUT to go idle */
-        }
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(MPSTWaitForState(&oAppData, OMX_StateIdle));
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-        if (hWrappedTTComp)
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(MPSTWaitForState(&oAppData, OMX_StateLoaded));
-            if (OMX_GetState(hWrappedComp, &oAppData.eState) != OMX_ErrorNone || oAppData.eState != OMX_StateLoaded)
-            {
-                OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-                OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateInvalid, 0));
-                OMX_CONF_REMEMBER_ERROR(MPSTWaitForState(&oAppData, OMX_StateInvalid));
-            }
-        }
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEOSEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_multithreadedtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_multithreadedtest.c
deleted file mode 100644 (file)
index b5eab33..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_MultiThreadedTest.c
- *  OpenMax IL conformance test validating the interoperability of components created from different
- *  threads.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Callback data */
-    typedef struct MTTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hCUT;
-    } MTTDATATYPE;
-
-    /* Multi-Threaded Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE MTTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        MTTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE MTTWaitForState(MTTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* globals to facilitate component creation in a separate thread */
-    OMX_IN OMX_STRING g_cComponentName;
-    OMX_CALLBACKTYPE *g_pWrappedCallbacks;
-    OMX_PTR g_pWrappedAppData;
-    OMX_HANDLETYPE g_hComp, g_hWrappedComp, g_hTTComp, g_hWrappedTTComp;
-    OMX_HANDLETYPE g_CUTEvent, g_TTCEvent;
-    OMX_ERRORTYPE g_eCUTError;
-    OMX_ERRORTYPE g_eTTCError;
-
-    /* create the component under test (used as a thread function) */
-    OMX_U32 CreateCUT(OMX_PTR pParam)
-    {
-        UNUSED_PARAMETER(pParam);
-
-        /* Acquire component under test handle */
-        g_eCUTError = OMX_GetHandle(&g_hComp, g_cComponentName, g_pWrappedAppData, g_pWrappedCallbacks);
-        if (g_eCUTError == OMX_ErrorNone)
-        {
-            g_eCUTError = OMX_CONF_ComponentTracerCreate(g_hComp, g_cComponentName, &g_hWrappedComp);
-        }
-        OMX_OSAL_EventSet(g_CUTEvent);
-        return 0;
-    }
-
-    /* create the tunnel test component (used as a thread function) */
-    OMX_U32 CreateTTC(OMX_PTR pParam)
-    {
-        UNUSED_PARAMETER(pParam);
-
-        /* Acquire tunnel test component handle */
-        g_eTTCError = OMX_CONF_GetTunnelTestComponentHandle(&g_hTTComp, g_pWrappedAppData, g_pWrappedCallbacks);
-        if (g_eTTCError == OMX_ErrorNone)
-        {
-            g_eTTCError = OMX_CONF_ComponentTracerCreate(g_hTTComp, "OMX.CONF.tunnel.test", &g_hWrappedTTComp);
-        }
-        OMX_OSAL_EventSet(g_TTCEvent);
-        return 0;
-    }
-
-    /* Main entrypoint into the Multi-Threaded Test */
-    OMX_ERRORTYPE OMX_CONF_MultiThreadedTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        MTTDATATYPE oAppData;
-        OMX_HANDLETYPE hCUTThread, hTTCThread;
-        OMX_BOOL bTimedOut;
-
-        g_cComponentName = cComponentName;
-
-        /* setup synchronization objects */
-        OMX_OSAL_EventCreate(&g_CUTEvent);
-        OMX_OSAL_EventReset(g_CUTEvent);
-        OMX_OSAL_EventCreate(&g_TTCEvent);
-        OMX_OSAL_EventReset(g_TTCEvent);
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-
-        /* init component handles */
-        g_hComp = g_hWrappedComp = g_hTTComp = g_hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = MTTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &g_pWrappedCallbacks, &g_pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        /* create two threads that will create the CUT and TTC respectively */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                       "Creating two threads that will create the component under test \n and tunnel test component respectively.\n");
-        g_cComponentName = cComponentName;
-        g_pWrappedCallbacks = g_pWrappedCallbacks;
-        g_pWrappedAppData = g_pWrappedAppData;
-        OMX_OSAL_ThreadCreate(CreateCUT, 0, 0, &hCUTThread);
-        OMX_OSAL_ThreadCreate(CreateTTC, 0, 0, &hTTCThread);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Waiting for threads to instantiate components.\n");
-        bTimedOut = OMX_FALSE;
-        OMX_OSAL_EventWait(g_TTCEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "Timeout waiting %i ms for thread creating TTC to finish.  Proceeding with test.\n",
-                           OMX_CONF_TIMEOUT_EXPECTING_SUCCESS);
-        }
-        OMX_OSAL_EventWait(g_CUTEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "Timeout waiting %i ms for thread creating TTC to finish.  Proceeding with test.\n",
-                           OMX_CONF_TIMEOUT_EXPECTING_SUCCESS);
-        }
-        oAppData.hCUT = g_hComp;
-
-        OMX_OSAL_ThreadDestroy(hCUTThread);
-        OMX_OSAL_ThreadDestroy(hTTCThread);
-
-        OMX_CONF_FAIL_IF_ERROR(g_eCUTError);
-        OMX_CONF_FAIL_IF_ERROR(g_eTTCError);
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports and transitioning to idle.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(g_hWrappedTTComp, g_hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all CUT ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(g_hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(g_hWrappedTTComp, OMX_FALSE));
-
-        /* transition CUT to idle */
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(g_hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(g_hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* wait for transitions to complete */
-        OMX_CONF_FAIL_IF_ERROR(MTTWaitForState(&oAppData, OMX_StateIdle));
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT to Loaded state */
-        if (g_hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(g_hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* transition TTC to Loaded state */
-        if (g_hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(g_hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        if (g_hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(MTTWaitForState(&oAppData, OMX_StateLoaded));
-        }
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(g_pWrappedCallbacks, g_pWrappedAppData));
-
-        if (g_hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(g_hWrappedComp));
-        }
-
-        /* clean up synchronization objects */
-        OMX_OSAL_EventDestroy(g_CUTEvent);
-        OMX_OSAL_EventDestroy(g_TTCEvent);
-
-        if (g_hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(g_hComp));
-        }
-
-        if (g_hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(g_hTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portbuffersuppliertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portbuffersuppliertest.c
deleted file mode 100644 (file)
index d0237a9..0000000
+++ /dev/null
@@ -1,459 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_PortBufferSupplierTest.c
- *  OpenMax IL conformance test validating buffer supplying behavior on input ports
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-typedef struct TestContext
-{
-    OMX_U32 nPorts;
-
-    OMX_HANDLETYPE hComp;
-    OMX_HANDLETYPE hTTComp;
-    OMX_STATETYPE eStateComp;
-    OMX_STATETYPE eStateTTComp;
-    OMX_HANDLETYPE hStateChangeEvent;
-    OMX_HANDLETYPE hMutex;
-
-    OMX_HANDLETYPE hOrigComp;
-    OMX_HANDLETYPE hOrigTTComp;
-
-    OMX_HANDLETYPE hCUT;
-} TestContext;
-
-#define MAX_PORTS 128
-#define HASH_PORT(_x_) ((_x_) % MAX_PORTS)
-
-OMX_U32 g_nBuffersTotal;
-OMX_U32 g_nBuffers[MAX_PORTS];
-OMX_U32 g_nUseBufferCallsTotal;
-OMX_U32 g_nUseBufferCalls[MAX_PORTS];
-OMX_U32 g_nFreeBufferCallsTotal;
-OMX_U32 g_nFreeBufferCalls[MAX_PORTS];
-OMX_U32 g_nPortIndex[MAX_PORTS];
-OMX_COMPONENTTYPE g_oOrigTTC;
-
-
-static OMX_ERRORTYPE
-Test_UseBuffer(
-    OMX_IN OMX_HANDLETYPE hComponent,
-    OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
-    OMX_IN OMX_U32 nPortIndex,
-    OMX_IN OMX_PTR pAppPrivate,
-    OMX_IN OMX_U32 nSizeBytes,
-    OMX_IN OMX_U8* pBuffer)
-{
-    OMX_ERRORTYPE eError = g_oOrigTTC.UseBuffer(hComponent, ppBufferHdr, nPortIndex, pAppPrivate, nSizeBytes, pBuffer);
-    if (eError == OMX_ErrorNone || eError == OMX_ErrorNotImplemented)
-    {
-        ++g_nUseBufferCallsTotal;
-        ++g_nUseBufferCalls[HASH_PORT(nPortIndex)];
-    }
-
-    return eError;
-}
-
-static OMX_ERRORTYPE
-Test_FreeBuffer(
-    OMX_IN OMX_HANDLETYPE hComponent,
-    OMX_IN OMX_U32 nPortIndex,
-    OMX_INOUT OMX_BUFFERHEADERTYPE* pBufferHdr)
-{
-    OMX_ERRORTYPE eError = g_oOrigTTC.FreeBuffer(hComponent, nPortIndex, pBufferHdr);
-    if (eError == OMX_ErrorNone || eError == OMX_ErrorNotImplemented)
-    {
-        ++g_nFreeBufferCallsTotal;
-        ++g_nFreeBufferCalls[HASH_PORT(nPortIndex)];
-    }
-    return eError;
-}
-
-static OMX_ERRORTYPE Test_EventHandler(
-    OMX_IN OMX_HANDLETYPE hComponent,
-    OMX_IN OMX_PTR pAppData,
-    OMX_IN OMX_EVENTTYPE eEvent,
-    OMX_IN OMX_U32 nData1,
-    OMX_IN OMX_U32 nData2,
-    OMX_IN OMX_PTR pEventData)
-{
-    TestContext* pContext = pAppData;
-
-    UNUSED_PARAMETER(nData2);
-    UNUSED_PARAMETER(pEventData);
-
-    if (hComponent != pContext->hCUT)
-    {
-        return OMX_ErrorNone;
-    }
-
-    if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-    {
-        OMX_GetState(pContext->hComp, &pContext->eStateComp);
-        OMX_GetState(pContext->hTTComp, &pContext->eStateTTComp);
-        OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-    }
-    return OMX_ErrorNone;
-}
-
-static OMX_ERRORTYPE Test_ChangeState(TestContext* pContext, OMX_STATETYPE eState)
-{
-    OMX_ERRORTYPE  eError = OMX_ErrorNone;
-    OMX_BOOL bDone, bTimedOut;
-
-    OMX_OSAL_MutexLock(pContext->hMutex);
-    OMX_GetState(pContext->hComp, &pContext->eStateComp);
-    OMX_GetState(pContext->hTTComp, &pContext->eStateTTComp);
-    OMX_OSAL_MutexUnlock(pContext->hMutex);
-
-    if (eState != pContext->eStateComp)
-    {
-        eError = OMX_SendCommand(pContext->hComp, OMX_CommandStateSet, eState, NULL);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-    }
-
-    if (eState != pContext->eStateTTComp)
-    {
-        eError = OMX_SendCommand(pContext->hTTComp, OMX_CommandStateSet, eState, NULL);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-    }
-
-    OMX_OSAL_EventReset(pContext->hStateChangeEvent);
-    OMX_OSAL_MutexLock(pContext->hMutex);
-    OMX_GetState(pContext->hComp, &pContext->eStateComp);
-    OMX_GetState(pContext->hTTComp, &pContext->eStateTTComp);
-    OMX_OSAL_MutexUnlock(pContext->hMutex);
-
-    bDone = OMX_FALSE;
-    bTimedOut = OMX_FALSE;
-    do
-    {
-        OMX_OSAL_MutexLock(pContext->hMutex);
-        bDone = (pContext->eStateComp == eState && pContext->eStateTTComp == eState);
-        OMX_OSAL_MutexUnlock(pContext->hMutex);
-        if (!bDone)
-        {
-            OMX_OSAL_EventWait(pContext->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-            OMX_OSAL_EventReset(pContext->hStateChangeEvent);
-        }
-    }
-    while (!bDone && !bTimedOut);
-    if (bTimedOut)
-    {
-        OMX_GetState(pContext->hComp, &pContext->eStateComp);
-        OMX_GetState(pContext->hTTComp, &pContext->eStateTTComp);
-        bDone = (pContext->eStateComp == eState && pContext->eStateTTComp == eState);
-    }
-    if (bDone)
-        return OMX_ErrorNone;
-    else
-        return OMX_ErrorTimeout;
-
-OMX_CONF_TEST_FAIL:
-    return eError;
-}
-
-static OMX_ERRORTYPE Test_SetupOnePort(TestContext *pContext, OMX_HANDLETYPE hComp, int nPort, OMX_HANDLETYPE hTTComp,
-                                       OMX_BUFFERSUPPLIERTYPE eSupplier)
-{
-    OMX_ERRORTYPE  eError = OMX_ErrorNone;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oSupplier;
-    OMX_DIRTYPE eDir;
-    OMX_BOOL bTTCompIsSupplier;
-    OMX_PARAM_PORTDEFINITIONTYPE oPort;
-    int nBuffers = 0;
-    int nPortHash = HASH_PORT(pContext->nPorts);
-
-    INIT_PARAM(oPort);
-    oPort.nPortIndex = nPort;
-    eError = OMX_GetParameter(hComp, OMX_IndexParamPortDefinition, &oPort);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    eDir = oPort.eDir;
-    nBuffers = oPort.nBufferCountMin;
-
-    TTCInvertBufferSupplier(&g_oOrigTTC, 0);
-    eError = TTCConnectPort(&g_oOrigTTC, hComp, nPort);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    INIT_PARAM(oSupplier);
-    oSupplier.eBufferSupplier = eSupplier;
-
-    if (eDir == OMX_DirOutput)
-    {
-        /* set up tunnel with CUT output to TTC input */
-        eError = OMX_SetupTunnel(hComp, nPort, hTTComp, pContext->nPorts);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        oSupplier.nPortIndex = pContext->nPorts;
-        eError = OMX_SetParameter(hTTComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        bTTCompIsSupplier = (eSupplier == OMX_BufferSupplyInput);
-    }
-    else
-    {
-        /* set up tunnel with TTC output to CUT input */
-        eError = OMX_SetupTunnel(hTTComp, pContext->nPorts, hComp, nPort);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        oSupplier.nPortIndex = nPort;
-        eError = OMX_SetParameter(hComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        bTTCompIsSupplier = (eSupplier == OMX_BufferSupplyOutput);
-    }
-
-    if (bTTCompIsSupplier)
-    {
-        g_nBuffers[nPortHash] = 0;
-    }
-    else
-    {
-        g_nBuffers[nPortHash] += nBuffers;
-        g_nBuffersTotal += nBuffers;
-    }
-    g_nUseBufferCalls[nPortHash] = 0;
-    g_nFreeBufferCalls[nPortHash] = 0;
-    g_nPortIndex[nPortHash] = nPort;
-OMX_CONF_TEST_FAIL:
-    return eError;
-}
-static OMX_ERRORTYPE Test_SetupPortsForDomain(
-    TestContext *pContext,
-    const char * pszDomain,
-    OMX_INDEXTYPE nInitIndex,
-    OMX_BUFFERSUPPLIERTYPE eSupplier,
-    OMX_INOUT OMX_U32 *pnPorts
-)
-{
-    OMX_ERRORTYPE  eError = OMX_ErrorNone;
-    OMX_PORT_PARAM_TYPE oInit;
-    int i;
-    int nEndPortNumber;
-
-    INIT_PARAM(oInit);
-    eError = OMX_GetParameter(pContext->hComp, nInitIndex, &oInit);
-    if (eError == OMX_ErrorNotImplemented)
-        return OMX_ErrorNone;
-
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    nEndPortNumber = oInit.nStartPortNumber + oInit.nPorts;
-    for (i = oInit.nStartPortNumber; i < nEndPortNumber; i++)
-    {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing %s port %d\n", pszDomain, i);
-
-        eError = Test_SetupOnePort(pContext, pContext->hComp, i, pContext->hTTComp, eSupplier);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        (*pnPorts)++;
-    }
-
-OMX_CONF_TEST_FAIL:
-    return eError;
-}
-
-
-static OMX_ERRORTYPE Test_TestAllPorts(TestContext *pContext, OMX_BUFFERSUPPLIERTYPE eSupplier)
-{
-    OMX_ERRORTYPE eError;
-    int nPortHash;
-    OMX_HANDLETYPE hTTComp = pContext->hTTComp;
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting ports\n");
-    pContext->nPorts = 0;
-    g_nBuffersTotal = 0;
-    g_nUseBufferCallsTotal = 0;
-    g_nFreeBufferCallsTotal = 0;
-    for (nPortHash = 0; nPortHash < MAX_PORTS; nPortHash++)
-        g_nBuffers[nPortHash] = 0;
-
-    eError = Test_SetupPortsForDomain(pContext, "audio", OMX_IndexParamAudioInit, eSupplier, &pContext->nPorts);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-    eError = Test_SetupPortsForDomain(pContext, "video", OMX_IndexParamVideoInit, eSupplier, &pContext->nPorts);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-    eError = Test_SetupPortsForDomain(pContext, "image", OMX_IndexParamImageInit, eSupplier, &pContext->nPorts);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-    eError = Test_SetupPortsForDomain(pContext, "other", OMX_IndexParamOtherInit, eSupplier, &pContext->nPorts);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    OMX_CONF_FAIL_IF(pContext->nPorts <= 0);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Changing state to idle (%d ports found)\n", pContext->nPorts);
-    eError = Test_ChangeState(pContext, OMX_StateIdle);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Checking number of UseBuffer calls\n");
-    for (nPortHash = 0; nPortHash < MAX_PORTS; nPortHash++)
-    {
-        OMX_CONF_FAIL_IF_NEQ(g_nUseBufferCalls[nPortHash], g_nBuffers[nPortHash]);
-    }
-    OMX_CONF_FAIL_IF_NEQ(g_nUseBufferCallsTotal, g_nBuffersTotal);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Changing state to loaded\n");
-    eError = Test_ChangeState(pContext, OMX_StateLoaded);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Checking number of FreeBuffer calls\n");
-    for (nPortHash = 0; nPortHash < MAX_PORTS; nPortHash++)
-    {
-        OMX_CONF_FAIL_IF_NEQ(g_nFreeBufferCalls[nPortHash], g_nBuffers[nPortHash]);
-    }
-    OMX_CONF_FAIL_IF_NEQ(g_nFreeBufferCallsTotal, g_nBuffersTotal);
-    eError = OMX_ErrorNone;
-
-OMX_CONF_TEST_FAIL:
-    Test_ChangeState(pContext, OMX_StateLoaded);
-    TTCDisconnectAllPorts(hTTComp);
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_PortBufferSupplierTest(OMX_IN OMX_STRING cComponentName)
-{
-    OMX_ERRORTYPE eError = OMX_ErrorNone;
-    OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-    OMX_HANDLETYPE hComp = 0, hWrappedComp = 0, hTTComp = 0, hWrappedTTComp = 0;
-    OMX_CALLBACKTYPE oCallbacks;
-
-    TestContext oAppData;
-    OMX_CALLBACKTYPE *pWrappedCallbacks;
-    OMX_PTR pWrappedAppData;
-    TestContext* pContext = &oAppData;
-
-    /* create state change event */
-    OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-    OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-    OMX_OSAL_MutexCreate(&oAppData.hMutex);
-
-    oCallbacks.EventHandler    = Test_EventHandler;
-    oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-    oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-    eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                           &pWrappedCallbacks, &pWrappedAppData);
-
-    /* Initialize OpenMax */
-    eError = OMX_Init();
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-    /* Acquire component under test handle */
-    eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-    eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-    oAppData.hCUT = hComp;
-
-    /* Acquire tunnel test component handle */
-    eError = OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    /* remember entry points for original tunnel test component and replace ones we want to monitor */
-    memcpy(&g_oOrigTTC, hTTComp, sizeof(OMX_COMPONENTTYPE));
-    ((OMX_COMPONENTTYPE *)hTTComp)->UseBuffer = Test_UseBuffer;
-    ((OMX_COMPONENTTYPE *)hTTComp)->FreeBuffer = Test_FreeBuffer;
-
-    /* now wrap the result */
-    eError = OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    pContext->hOrigComp = hComp;
-    pContext->hOrigTTComp = hTTComp;
-    pContext->hComp = hWrappedComp;
-    pContext->hTTComp = hWrappedTTComp;
-
-    OMX_GetState(hComp, &pContext->eStateComp);
-    OMX_GetState(hTTComp, &pContext->eStateTTComp);
-
-    eError = Test_TestAllPorts(pContext, OMX_BufferSupplyInput);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-    eError = Test_TestAllPorts(pContext, OMX_BufferSupplyOutput);
-    OMX_CONF_FAIL_IF_ERROR(eError);
-
-OMX_CONF_TEST_FAIL:
-    /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-    if (hWrappedComp)
-    {
-        eCleanupError = OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        if (eError == OMX_ErrorNone) eError = eCleanupError;
-    }
-
-    if (hComp)
-    {
-        eCleanupError = OMX_FreeHandle(hComp);
-        if (eError == OMX_ErrorNone) eError = eCleanupError;
-    }
-
-    if (hWrappedTTComp)
-    {
-        eCleanupError = OMX_CONF_ComponentTracerDestroy(hWrappedTTComp);
-        if (eError == OMX_ErrorNone) eError = eCleanupError;
-    }
-
-    if (hTTComp)
-    {
-        eCleanupError = OMX_CONF_FreeTunnelTestComponentHandle(hTTComp);
-        if (eError == OMX_ErrorNone) eError = eCleanupError;
-    }
-
-    eCleanupError = OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData);
-    if (eError == OMX_ErrorNone) eError = eCleanupError;
-
-    /* destroy state change event */
-    OMX_OSAL_MutexDestroy(oAppData.hMutex);
-    OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-
-
-    eCleanupError = OMX_Deinit();
-    if (eError == OMX_ErrorNone) eError = eCleanupError;
-
-    return eError;
-
-}
-
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portdisableenabletest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_portdisableenabletest.c
deleted file mode 100644 (file)
index 96f00b4..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_PortDisableEnableTest.c
- *  OpenMax IL conformance test validating a component's port disable and enable functionality.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* callback data */
-    typedef struct PDETDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hDisableEvent;
-        OMX_HANDLETYPE hEnableEvent;
-        OMX_HANDLETYPE hCUT;
-        OMX_U32 nEnabledPort;
-        OMX_U32 nDisabledPort;
-    } PDETDATATYPE;
-
-    /* Port Disable Enable Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE PDETEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        PDETDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    pContext->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    if (pContext->nDisabledPort == nData2) OMX_OSAL_EventSet(pContext->hDisableEvent);
-                    break;
-                case OMX_CommandPortEnable:
-                    if (pContext->nEnabledPort == nData2) OMX_OSAL_EventSet(pContext->hEnableEvent);
-                    break;
-                case OMX_EventBufferFlag:
-                    OMX_OSAL_EventSet(pContext->hEOSEvent);
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE PDETWaitForState(PDETDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* disable all ports on the component under test for a given domain */
-    OMX_ERRORTYPE PDETDisableCUTPorts(OMX_HANDLETYPE hComp, PDETDATATYPE *pAppData, OMX_INDEXTYPE iIndex)
-    {
-        OMX_PORT_PARAM_TYPE oParam;
-        OMX_U32 i;
-        OMX_U32 iCUTPort;
-        OMX_ERRORTYPE eError;
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        INIT_PARAM(oParam);
-
-        /* query # of ports */
-        if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, iIndex, &oParam)))
-        {
-            return eError;
-        }
-
-        /* if no ports then return */
-        if (!oParam.nPorts) return OMX_ErrorNone;
-
-        OMX_OSAL_EventReset(pAppData->hDisableEvent);
-        pAppData->nDisabledPort = oParam.nStartPortNumber + (oParam.nPorts - 1);
-
-        /* disable each discovered port */
-        for (i = 0;i < oParam.nPorts;i++)
-        {
-            iCUTPort = oParam.nStartPortNumber + i;
-            if (OMX_ErrorNone != (eError = OMX_SendCommand(hComp, OMX_CommandPortDisable, iCUTPort, 0)))
-            {
-                return eError;
-            }
-        }
-
-        OMX_OSAL_EventWait(pAppData->hDisableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-
-        return bTimedOut ? OMX_ErrorUndefined : OMX_ErrorNone;
-    }
-
-    /* enable all ports on the component under test for a given domain */
-    OMX_ERRORTYPE PDETEnableCUTPorts(OMX_HANDLETYPE hComp, PDETDATATYPE *pAppData, OMX_INDEXTYPE iIndex)
-    {
-        OMX_PORT_PARAM_TYPE oParam;
-        OMX_U32 i;
-        OMX_U32 iCUTPort;
-        OMX_ERRORTYPE eError;
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        INIT_PARAM(oParam);
-
-        /* query # of ports */
-        if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, iIndex, &oParam)))
-        {
-            return eError;
-        }
-
-        /* if no ports then return */
-        if (!oParam.nPorts) return OMX_ErrorNone;
-
-        OMX_OSAL_EventReset(pAppData->hEnableEvent);
-        pAppData->nEnabledPort = oParam.nStartPortNumber + (oParam.nPorts - 1);
-
-        /* enable each discovered port */
-        for (i = 0;i < oParam.nPorts;i++)
-        {
-            iCUTPort = oParam.nStartPortNumber + i;
-            if (OMX_ErrorNone != (eError = OMX_SendCommand(hComp, OMX_CommandPortEnable, iCUTPort, 0)))
-            {
-                return eError;
-            }
-        }
-
-        OMX_OSAL_EventWait(pAppData->hEnableEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-
-        return bTimedOut ? OMX_ErrorUndefined : OMX_ErrorNone;
-    }
-
-    OMX_ERRORTYPE PDETDisableReenable(OMX_HANDLETYPE *phWrappedTTComp, PDETDATATYPE *pWrappedAppData,
-                                      OMX_CALLBACKTYPE *pWrappedCallbacks, OMX_HANDLETYPE *phTTComp,
-                                      OMX_HANDLETYPE hWrappedComp, PDETDATATYPE *pAppData)
-    {
-        OMX_ERRORTYPE eError;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning both components to executing.\n");
-
-        /* transition CUT to idle */
-        OMX_OSAL_EventReset(pAppData->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        /* transition TTC to idle */
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        /* transition CUT to executing */
-        if (OMX_ErrorNone != (eError = PDETWaitForState(pAppData, OMX_StateIdle))) return eError;
-        OMX_OSAL_EventReset(pAppData->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0))) return eError;
-        if (OMX_ErrorNone != (eError = PDETWaitForState(pAppData, OMX_StateExecuting))) return eError;
-
-        /* transition TTC to executing  */
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0))) return eError;
-
-        if (OMX_ErrorNone != (eError = OMX_CONF_WaitForBufferTraffic(*phTTComp))) return eError;
-
-        /* disable ports in each domain */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Disabling all ports.\n");
-        PDETDisableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamAudioInit);
-        PDETDisableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamVideoInit);
-        PDETDisableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamImageInit);
-        PDETDisableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamOtherInit);
-
-        /* transition TTC to idle then to loaded, then destroy it */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning TTC to idle then to loaded, then destroying it.\n");
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0))) return eError;
-        if (OMX_ErrorNone != (eError = OMX_CONF_FreeTunnelTestComponentHandle(*phTTComp))) return eError;
-        if (OMX_ErrorNone != (eError = OMX_CONF_ComponentTracerDestroy(*phWrappedTTComp))) return eError;
-
-        /* CREATE ANOTHER TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating another TTC.\n");
-
-        /* Acquire tunnel test component handle */
-        if (OMX_ErrorNone != (eError = OMX_CONF_GetTunnelTestComponentHandle(phTTComp, pWrappedAppData, pWrappedCallbacks))) return eError;
-        if (OMX_ErrorNone != (eError = OMX_CONF_ComponentTracerCreate(*phTTComp, "OMX.CONF.tunnel.test", phWrappedTTComp))) return eError;
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        if (OMX_ErrorNone != (eError = OMX_CONF_TTCConnectAllPorts(*phWrappedTTComp, hWrappedComp))) return eError;
-
-        /* transition TTC to idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning TTC to idle.\n");
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        /* transition TTC to executing */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning TTC to executing.\n");
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0))) return eError;
-
-        /* re-enable ports in each domain */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Re-enabling all ports.\n");
-        PDETEnableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamAudioInit);
-        PDETEnableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamVideoInit);
-        PDETEnableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamImageInit);
-        PDETEnableCUTPorts(hWrappedComp, pAppData, OMX_IndexParamOtherInit);
-
-        if (OMX_ErrorNone != (eError = OMX_CONF_WaitForBufferTraffic(*phTTComp))) return eError;
-
-        return eError;
-    }
-
-    /* Main entrypoint into the Port Disable Enable Test */
-    OMX_ERRORTYPE OMX_CONF_PortDisableEnableTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        PDETDATATYPE oAppData;
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEOSEvent);
-        OMX_OSAL_EventReset(oAppData.hEOSEvent);
-        OMX_OSAL_EventCreate(&oAppData.hDisableEvent);
-        OMX_OSAL_EventReset(oAppData.hDisableEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEnableEvent);
-        OMX_OSAL_EventReset(oAppData.hEnableEvent);
-
-        oAppData.nEnabledPort = 0xffffffff;
-        oAppData.nDisabledPort = 0xffffffff;
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = PDETEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all component ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_FALSE));
-
-        OMX_CONF_FAIL_IF_ERROR(PDETDisableReenable(&hWrappedTTComp, pWrappedAppData,
-                               pWrappedCallbacks, &hTTComp, hWrappedComp, &oAppData));
-
-        /* Force all CUT ports to be non-suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all component ports to be non-suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_FALSE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_TRUE));
-
-        OMX_CONF_FAIL_IF_ERROR(PDETDisableReenable(&hWrappedTTComp, pWrappedAppData,
-                               pWrappedCallbacks, &hTTComp, hWrappedComp, &oAppData));
-
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT and TTC to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            TTCReleaseBuffers(hTTComp);
-        }
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(PDETWaitForState(&oAppData, OMX_StateIdle));
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-            OMX_CONF_REMEMBER_ERROR(PDETWaitForState(&oAppData, OMX_StateLoaded));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEOSEvent);
-        OMX_OSAL_EventDestroy(oAppData.hDisableEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEnableEvent);
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-        }
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_seekingcomponenttest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_seekingcomponenttest.c
deleted file mode 100644 (file)
index 5a88dc3..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_SeekTest.c
- *  OpenMax IL conformance test validating the proper behavior of a seeking component.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    OMX_BOOL g_StartTimeDetected;
-
-    /* Callback data */
-    typedef struct SCTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hCUT;
-    } SCTDATATYPE;
-
-    /* Callback called when the Tunnel Test Component recieves a OnEmptythisBuffer call */
-    OMX_ERRORTYPE SCTOnEmptyThisBuffer(OMX_BUFFERHEADERTYPE *pHdr)
-    {
-        if (pHdr->nFlags & OMX_BUFFERFLAG_STARTTIME) g_StartTimeDetected = OMX_TRUE;
-        return OMX_ErrorNone;
-    }
-
-    /* Seek Component's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE SCTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        SCTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-
-        if (eEvent == OMX_EventBufferFlag)
-        {
-            OMX_OSAL_EventSet(pContext->hEOSEvent);
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE SCTWaitForState(SCTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return bTimedOut ? OMX_ErrorTimeout : OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Main entrypoint into the Seeking Component Test */
-    OMX_ERRORTYPE OMX_CONF_SeekingComponentTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_TIME_CONFIG_SEEKMODETYPE oSeekMode;
-        OMX_TIME_CONFIG_TIMESTAMPTYPE oTimeStamp;
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        SCTDATATYPE oAppData;
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEOSEvent);
-        OMX_OSAL_EventReset(oAppData.hEOSEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = SCTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        /* Set the OnEmptyThisBuffer callback */
-        OMX_CONF_SetTTCOnEmptyThisBuffer(hTTComp, SCTOnEmptyThisBuffer);
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all component ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_FALSE));
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning to executing.\n");
-
-        /* transition CUT to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition CUT to executing */
-        OMX_CONF_FAIL_IF_ERROR(SCTWaitForState(&oAppData, OMX_StateIdle));
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-        OMX_CONF_FAIL_IF_ERROR(SCTWaitForState(&oAppData, OMX_StateExecuting));
-
-        /* transition TTC to executing  */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0));
-
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_WaitForBufferTraffic(hTTComp));
-
-        /* Get/Set OMX_IndexConfigTimeSeekMode */
-        INIT_CONFIG(oSeekMode);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Confirm support for OMX_IndexConfigTimeSeekMode\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimeSeekMode, (OMX_PTR)&oSeekMode));
-        oSeekMode.eType = OMX_TIME_SeekModeAccurate;
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimeSeekMode, (OMX_PTR)&oSeekMode));
-
-        /* Get OMX_IndexConfigTimePosition */
-        INIT_CONFIG(oTimeStamp);
-        oTimeStamp.nPortIndex = 0; /* ignored - but we clear it anyway */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Confirm support for OMX_IndexConfigTimePosition\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Get the current position (remember it for later).\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetConfig(hComp, OMX_IndexConfigTimePosition, (OMX_PTR)&oTimeStamp));
-
-        /* Set OMX_IndexConfigTimePosition */
-        /* Wait for the position to move on and then return to it */
-        g_StartTimeDetected = OMX_FALSE;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Run for a while.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_WaitForBufferTraffic(hTTComp));
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Seek to the remembered position.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_SetConfig(hComp, OMX_IndexConfigTimePosition, (OMX_PTR)&oTimeStamp));
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "-Run for a while - wait for seek (i.e. a OMX_BUFFERFLAG_STARTTIME).\n");
-        OMX_CONF_WaitForBufferTraffic(hTTComp);
-
-        if (g_StartTimeDetected)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--OK: Saw OMX_BUFFERFLAG_STARTTIME.\n");
-        }
-        else
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "--ERROR: No OMX_BUFFERFLAG_STARTTIME.\n");
-            eError = OMX_ErrorUndefined;
-        }
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT and TTC to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            TTCReleaseBuffers(hTTComp);
-        }
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(SCTWaitForState(&oAppData, OMX_StateIdle));
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-            OMX_CONF_REMEMBER_ERROR(SCTWaitForState(&oAppData, OMX_StateLoaded));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEOSEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_tunnelledunittest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_tunnelledunittest.c
deleted file mode 100644 (file)
index 7bb80a5..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_TunnelledUnitTest.c
- *
- *  Utility test that runs the component under test until all appropriate end
- *  of stream flags are returned. This test is useful for unit testing a
- *  a component. The user must specify one input file per input port and
- *  may specify as many as one output file per output port (for capturing)
- *  the results of the component's transformation.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* callback data */
-    typedef struct TUTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hEOSEvent;
-        OMX_HANDLETYPE hCUT;
-        OMX_U32 nTotalStreams;
-        OMX_U32 nFinishedStreams;
-    } TUTDATATYPE;
-
-    /* Tunnelled Unit Test's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE TUTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TUTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((OMX_EventCmdComplete == eEvent) && (OMX_CommandStateSet == nData1))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-        else if (OMX_EventBufferFlag == eEvent)
-        {
-            pContext->nFinishedStreams++;
-            if (pContext->nFinishedStreams == pContext->nTotalStreams)
-            {
-                OMX_OSAL_EventSet(pContext->hEOSEvent);
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm
-       it is the one we expect */
-    OMX_ERRORTYPE TUTWaitForState(TUTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to finish processing all streams */
-    OMX_ERRORTYPE TUTWaitForEOS(TUTDATATYPE *pAppData)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hEOSEvent, 100*1000, &bTimedOut);
-        if (bTimedOut)
-        {
-            return OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    OMX_ERRORTYPE TUTRun(OMX_HANDLETYPE *phWrappedTTComp, OMX_HANDLETYPE hWrappedComp, TUTDATATYPE *pAppData)
-    {
-        OMX_ERRORTYPE eError;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Transitioning both components to executing.\n");
-
-        /* transition CUT to idle */
-        OMX_OSAL_EventReset(pAppData->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        /* transition TTC to idle */
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0))) return eError;
-
-        /* transition CUT to executing */
-        if (OMX_ErrorNone != (eError = TUTWaitForState(pAppData, OMX_StateIdle))) return eError;
-        OMX_OSAL_EventReset(pAppData->hStateChangeEvent);
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateExecuting, 0))) return eError;
-        if (OMX_ErrorNone != (eError = TUTWaitForState(pAppData, OMX_StateExecuting))) return eError;
-
-        /* transition TTC to executing  */
-        if (OMX_ErrorNone != (eError = OMX_SendCommand(*phWrappedTTComp, OMX_CommandStateSet, OMX_StateExecuting, 0))) return eError;
-
-        if (OMX_ErrorNone != (eError = TUTWaitForEOS(pAppData))) return eError;
-
-        return eError;
-    }
-
-    OMX_U32 TUTPortsOfDomainAndDirection(TUTDATATYPE *pAppData,
-                                         OMX_PORTDOMAINTYPE eDomain, OMX_DIRTYPE eDir)
-    {
-        OMX_ERRORTYPE  eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE oCUTPort;
-        OMX_U32 i, nTotal = 0;
-        OMX_PORT_PARAM_TYPE oParam;
-
-        INIT_PARAM(oParam);
-        INIT_PARAM(oCUTPort);
-
-        /* query the component's ports */
-        if (OMX_GetParameter(pAppData->hCUT, eDomain, &oParam))
-        {
-            return 0;
-        }
-
-        /* start with first port of domain */
-        oCUTPort.nPortIndex = oParam.nStartPortNumber;
-
-        /* for each discovered port */
-        for (i = 0;i < oParam.nPorts;i++)
-        {
-            eError = OMX_GetParameter(pAppData->hCUT, OMX_IndexParamPortDefinition,
-                                      &oCUTPort);
-            if (eError) return eError;
-            if (oCUTPort.eDir == eDir)
-            {
-                nTotal++;
-            }
-            oCUTPort.nPortIndex++;
-        }
-
-        return nTotal;
-    }
-
-
-    OMX_ERRORTYPE TUTGetTotalStreams(TUTDATATYPE *pAppData)
-    {
-        OMX_ERRORTYPE  eError = OMX_ErrorNone;
-
-        /* let total streams = total output ports */
-        pAppData->nTotalStreams =
-            TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamAudioInit, OMX_DirOutput) +
-            TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamVideoInit, OMX_DirOutput) +
-            TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamImageInit, OMX_DirOutput) +
-            TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamOtherInit, OMX_DirOutput);
-
-        /* if no output ports then let total streams = total input ports */
-        if (0 == pAppData->nTotalStreams)
-        {
-            pAppData->nTotalStreams =
-                TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamAudioInit, OMX_DirInput) +
-                TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamVideoInit, OMX_DirInput) +
-                TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamImageInit, OMX_DirInput) +
-                TUTPortsOfDomainAndDirection(pAppData, OMX_IndexParamOtherInit, OMX_DirInput);
-        }
-
-        return eError;
-    }
-
-    /* Main entrypoint into the Tunnelled Unit Test */
-    OMX_ERRORTYPE OMX_CONF_TunnelledUnitTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        TUTDATATYPE oAppData;
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventCreate(&oAppData.hEOSEvent);
-        OMX_OSAL_EventReset(oAppData.hEOSEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = TUTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-        oAppData.nFinishedStreams = 0;
-        TUTGetTotalStreams(&oAppData);
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* Force all CUT ports to be suppliers */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Forcing all component ports to be suppliers.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedComp, OMX_TRUE));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ForceSuppliers(hWrappedTTComp, OMX_FALSE));
-
-        OMX_CONF_FAIL_IF_ERROR(TUTRun(&hWrappedTTComp, hWrappedComp, &oAppData));
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT and TTC to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-            TTCReleaseBuffers(hTTComp);
-        }
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(TUTWaitForState(&oAppData, OMX_StateIdle));
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-            OMX_CONF_REMEMBER_ERROR(TUTWaitForState(&oAppData, OMX_StateLoaded));
-        }
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-        OMX_OSAL_EventDestroy(oAppData.hEOSEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_validinputoutputtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_validinputoutputtest.c
deleted file mode 100644 (file)
index 1b8429f..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_ValidInputOutputTest.c
- *  OpenMax IL conformance test validating valid input and output port tunnel setup.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-    /* Callback data */
-    typedef struct VIOTDATATYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hCUT;
-    } VIOTDATATYPE;
-
-    /* Incomplete Stop Component's implementation of OMX_CALLBACKTYPE.EventHandler */
-    OMX_ERRORTYPE VIOTEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        VIOTDATATYPE* pContext = pAppData;
-
-        UNUSED_PARAMETER(pEventData);
-
-        if (hComponent != pContext->hCUT)
-        {
-            return OMX_ErrorNone;
-        }
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            pContext->eState = (OMX_STATETYPE)(nData2);
-            OMX_OSAL_EventSet(pContext->hStateChangeEvent);
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /* Wait for the Component Under Test to change to state and confirm it is the one we expect */
-    OMX_ERRORTYPE VOITWaitForState(VIOTDATATYPE *pAppData, OMX_STATETYPE eState)
-    {
-        OMX_BOOL bTimedOut = OMX_FALSE;
-
-        OMX_OSAL_EventWait(pAppData->hStateChangeEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimedOut);
-        if (bTimedOut || pAppData->eState != eState)
-        {
-            return bTimedOut ? OMX_ErrorTimeout : OMX_ErrorUndefined;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* Main entrypoint into the Valid Input Output Test */
-    OMX_ERRORTYPE OMX_CONF_ValidInputOutputTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_HANDLETYPE hComp, hWrappedComp, hTTComp, hWrappedTTComp;
-        OMX_ERRORTYPE  eTemp, eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE oCallbacks;
-        VIOTDATATYPE oAppData;
-
-        /* create state change event */
-        OMX_OSAL_EventCreate(&oAppData.hStateChangeEvent);
-        OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-
-        /* init component handles */
-        hComp = hWrappedComp = hTTComp = hWrappedTTComp = 0;
-
-        oCallbacks.EventHandler    = VIOTEventHandler;
-        oCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone  = StubbedFillBufferDone;
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Creating component under test and tunnel test component.\n");
-
-        /* Acquire component under test handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp));
-        oAppData.hCUT = hComp;
-
-        /* Acquire tunnel test component handle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_GetTunnelTestComponentHandle(&hTTComp, pWrappedAppData, pWrappedCallbacks));
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_ComponentTracerCreate(hTTComp, "OMX.CONF.tunnel.test", &hWrappedTTComp));
-
-        /* Connect CUT to TTC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Connecting all ports.\n");
-        OMX_CONF_FAIL_IF_ERROR(OMX_CONF_TTCConnectAllPorts(hWrappedTTComp, hWrappedComp));
-
-        /* transition CUT to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-
-        /* transition TTC to idle */
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateIdle, 0));
-        OMX_CONF_FAIL_IF_ERROR(VOITWaitForState(&oAppData, OMX_StateIdle));
-
-OMX_CONF_TEST_FAIL:
-
-        /* Cleanup: Return function errors rather than closing errors if appropriate */
-
-        /* transition CUT to Loaded state */
-        if (hWrappedComp)
-        {
-            OMX_OSAL_EventReset(oAppData.hStateChangeEvent);
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        /* transition TTC to Loaded state */
-        if (hWrappedTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_SendCommand(hWrappedTTComp, OMX_CommandStateSet, OMX_StateLoaded, 0));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(VOITWaitForState(&oAppData, OMX_StateLoaded));
-
-        /* destroy state change event */
-        OMX_OSAL_EventDestroy(oAppData.hStateChangeEvent);
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedComp));
-        }
-
-        if (hComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_FreeHandle(hComp));
-        }
-
-        if (hTTComp)
-        {
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_FreeTunnelTestComponentHandle(hTTComp));
-            OMX_CONF_REMEMBER_ERROR(OMX_CONF_ComponentTracerDestroy(hWrappedTTComp));
-        }
-
-        OMX_CONF_REMEMBER_ERROR(OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks, pWrappedAppData));
-        OMX_CONF_REMEMBER_ERROR(OMX_Deinit());
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_waitforresourcestest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/interopprofiletests/omx_conf_waitforresourcestest.c
deleted file mode 100644 (file)
index 3a23bd7..0000000
+++ /dev/null
@@ -1,656 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_WaitForResourcesTest.c
- *  OpenMax IL conformance test validating proper behavior when a component is waiting for resources.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <stdlib.h>
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-#define OMX_RESOURCETEST_PRIORITY_LOW   100
-#define OMX_RESOURCETEST_PRIORITY_HIGH  0
-
-    OMX_ERRORTYPE OMX_CONF_ResourcePreemptionTest(OMX_IN OMX_STRING cComponentName);
-    OMX_ERRORTYPE OMX_CONF_WaitForResourcesTest(OMX_IN OMX_STRING cComponentName);
-
-    /* callback data */
-    typedef struct OMXWFRTESTDATA_T
-    {
-        OMX_U32 nInstantiation;
-        OMX_BOOL bErrorInsufficientResources;   /* Did we get an OMX_ErrorInsufficientResources? */
-        OMX_HANDLETYPE hEventStateChange;       /* Waiting for components to go to idle or waiting state */
-    } OMXWFRTESTDATA;
-
-    /* convert a component name and instantation # to an instantiation name */
-    void GetInstantiationName(OMX_STRING cComponentName, OMX_U32 nInstantation, OMX_STRING szInstantiationName)
-    {
-        char *pSrc, *pDst;
-
-        pSrc = cComponentName, pDst = szInstantiationName;
-        while (*pSrc != '\0')
-        {
-            *pDst = *pSrc;
-            pSrc++;
-            pDst++;
-        }
-        *pDst++ = '[';
-        *pDst++ = (char)((int)'0' + (nInstantation / 100));
-        nInstantation -= (nInstantation / 100) * 100;
-        *pDst++ = (char)((int)'0' + (nInstantation / 10));
-        nInstantation -= (nInstantation / 10) * 10;
-        *pDst++ = (char)((int)'0' + nInstantation);
-        *pDst++ = ']';
-        *pDst++ = '\0';
-    }
-
-    /* event that is signaled when the component changes state to idle */
-    OMX_HANDLETYPE hEventStateChangeIdle;
-    OMX_HANDLETYPE hEventStateChangeLoaded;
-
-    static OMX_ERRORTYPE DisableAllPorts(OMX_HANDLETYPE hComp)
-    {
-        OMX_PORT_PARAM_TYPE          oPortInit;
-        OMX_ERRORTYPE eError = OMX_ErrorUndefined;
-        OMX_U32 i, d;
-
-
-        INIT_PARAM(oPortInit);
-
-        for (d = 0; d < 4; d++)
-        {
-            switch (d)
-            {
-                case 0:
-                    eError = OMX_GetParameter(hComp, OMX_IndexParamOtherInit, &oPortInit);
-                    break;
-                case 1:
-                    eError = OMX_GetParameter(hComp, OMX_IndexParamAudioInit, &oPortInit);
-                    break;
-                case 2:
-                    eError = OMX_GetParameter(hComp, OMX_IndexParamVideoInit, &oPortInit);
-                    break;
-                case 3:
-                    eError = OMX_GetParameter(hComp, OMX_IndexParamImageInit, &oPortInit);
-                    break;
-                default:
-                    return OMX_ErrorUndefined;
-            }
-
-            if (OMX_ErrorNone == eError)
-            {
-                for (i = oPortInit.nStartPortNumber; i < oPortInit.nStartPortNumber + oPortInit.nPorts; i++)
-                {
-                    eError = OMX_SendCommand(hComp, OMX_CommandPortDisable, i, 0);
-                    if (OMX_ErrorNone != eError)
-                        return eError;
-                }
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-    /* Handle Events */
-    OMX_ERRORTYPE WaitResEventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        OMXWFRTESTDATA* pContext = pAppData;
-        OMX_STATETYPE eState;
-        char szState[256];
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if ((eEvent == OMX_EventCmdComplete) && ((OMX_COMMANDTYPE)(nData1) == OMX_CommandStateSet))
-        {
-            eState = (OMX_STATETYPE)nData2;
-
-            OMX_CONF_StateToString(eState, szState);
-
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "Instantiation %i changing to state %s\n", pContext->nInstantiation, szState);
-
-            /* Set event change notification */
-            OMX_OSAL_EventSet(pContext->hEventStateChange);
-
-            if (eState == OMX_StateIdle)
-            {
-                OMX_OSAL_EventSet(hEventStateChangeIdle);
-            }
-            if (eState == OMX_StateLoaded)
-            {
-                OMX_OSAL_EventSet(hEventStateChangeLoaded);
-            }
-        }
-        if ((eEvent == OMX_EventError) && ((OMX_ERRORTYPE)(nData1) == OMX_ErrorInsufficientResources))
-        {
-
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "Instantiation %i sent OMX_ErrorInsufficientResources error\n", pContext->nInstantiation);
-
-            pContext->bErrorInsufficientResources = OMX_TRUE;
-            OMX_OSAL_EventSet(pContext->hEventStateChange);
-        }
-        return OMX_ErrorNone;
-    }
-
-    OMX_ERRORTYPE OMX_CONF_ResourcePreemptionTest(OMX_IN OMX_STRING cComponentName)
-    {
-        /* Interop test 4.6: Resource Manager Preemption */
-        /* ------------------------------------------------
-         * 1. Load component and set priority to low
-         * 2. Transition to idle
-         * 3. Repeat from steps 1-3 until transition to idle returns
-         *    OMX_ErrorInsufficientResources and transitions to Wait state
-         * 4. Switch component in wait state to higher priority (lower number)
-         * 5. Verify component with lower priority gives up resources and one with
-         *    higher priority gets the necessary resources
-         */
-
-        OMX_HANDLETYPE hComp[1000];
-        OMX_U32 i, nComp = 0;
-        OMX_ERRORTYPE  eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE  oCallbacks;
-        OMXWFRTESTDATA    oAppData[1000];
-        OMX_STATETYPE     eState = OMX_StateLoaded;
-        OMX_BOOL          bTimeout  = OMX_FALSE;
-        OMX_PRIORITYMGMTTYPE oPriority;
-        OMX_HANDLETYPE hTraceComp[1000];
-        OMX_HANDLETYPE hEventStateChange;
-        OMX_ERRORTYPE eErrorCleanup;
-        OMX_PTR pWrappedAppData[1000];
-        OMX_CALLBACKTYPE *pWrappedCallbacks[1000];
-        char szInstantiationName[256];
-
-        /* Initialize data */
-        oCallbacks.EventHandler         = WaitResEventHandler;
-        oCallbacks.EmptyBufferDone      = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone       = StubbedFillBufferDone;
-
-        /* Begin test */
-        eError = OMX_Init();
-        if (OMX_ErrorNone != eError) return OMX_ErrorUndefined;
-
-        hEventStateChange       = 0;
-        hEventStateChangeIdle   = 0;
-        hEventStateChangeLoaded = 0;
-        eError = OMX_OSAL_EventCreate(&hEventStateChange);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_OSAL_EventCreate(&hEventStateChangeIdle);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_OSAL_EventCreate(&hEventStateChangeLoaded);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        INIT_PARAM(oPriority);
-        oPriority.nGroupPriority = OMX_RESOURCETEST_PRIORITY_LOW;
-
-        nComp = 0;
-        do
-        {
-            GetInstantiationName(cComponentName, nComp, szInstantiationName);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Trying to create and idle instantiation %i (priority=%i)\n",
-                           nComp, OMX_RESOURCETEST_PRIORITY_LOW);
-            if (nComp >= 1000)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Test unable to complete. Too many components requested (%d)\n", nComp);
-                eError = OMX_ErrorUndefined;
-                goto OMX_CONF_TEST_FAIL;
-            }
-
-            hComp[nComp] = hTraceComp[nComp] = NULL;
-            oAppData[nComp].bErrorInsufficientResources = OMX_FALSE;
-            oAppData[nComp].hEventStateChange      = hEventStateChange;
-            oAppData[nComp].nInstantiation = nComp;
-
-            eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData[nComp], szInstantiationName,
-                                                   &pWrappedCallbacks[nComp], &pWrappedAppData[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            hComp[nComp] = NULL;
-            eError = OMX_GetHandle(&hComp[nComp], cComponentName, pWrappedAppData[nComp], pWrappedCallbacks[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError); /* Problem acquiring handle. bail. */
-
-            eError = OMX_CONF_ComponentTracerCreate(hComp[nComp], szInstantiationName, &hTraceComp[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            /* Set priority and transition to idle */
-            oPriority.nGroupID       = nComp;
-            eError = OMX_SetParameter(hTraceComp[nComp], OMX_IndexParamPriorityMgmt, &oPriority);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            /* Disable all ports so we can go idle without buffers */
-            eError = DisableAllPorts(hTraceComp[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            eError = OMX_SendCommand(hTraceComp[nComp], OMX_CommandStateSet, OMX_StateIdle, 0);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-            OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (bTimeout == OMX_TRUE)
-            {
-                eError = OMX_ErrorTimeout;
-                goto OMX_CONF_TEST_FAIL;
-            }
-            OMX_OSAL_EventReset(hEventStateChange);
-
-            eError = OMX_GetState(hTraceComp[nComp], &eState);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-            nComp++;
-        }
-        while (!oAppData[nComp-1].bErrorInsufficientResources);
-
-        nComp--;
-
-        /* check that the last try stayed in loaded because of insufficient resources */
-        if ((eState != OMX_StateLoaded) || !oAppData[nComp].bErrorInsufficientResources)
-        {
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Instantiation %i failed to idle (insuffient resources)\n", nComp);
-
-        /* Set priority and transition to idle */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Raising the priority of instantiation %i (priority=%i)\n",
-                       nComp, OMX_RESOURCETEST_PRIORITY_HIGH);
-        oPriority.nGroupPriority = OMX_RESOURCETEST_PRIORITY_HIGH;
-        eError = OMX_SetParameter(hTraceComp[nComp], OMX_IndexParamPriorityMgmt, &oPriority);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        /* Disable all ports so we can go idle without buffers */
-        eError = DisableAllPorts(hTraceComp[nComp]);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        /* Retry transition to idle */
-        OMX_OSAL_EventReset(hEventStateChange);
-        OMX_OSAL_EventReset(hEventStateChangeIdle);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Trying to idle instantiation %i \n", nComp);
-        eError = OMX_SendCommand(hTraceComp[nComp], OMX_CommandStateSet, OMX_StateIdle, 0);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: Timed out waiting for state change from instantiation %i\n", nComp);
-            eError = OMX_ErrorTimeout;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        if (eState != OMX_StateLoaded)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: State of pre-empted instantiation is not OMX_StateLoaded\n", nComp);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        OMX_OSAL_EventWait(hEventStateChangeIdle, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        eError = OMX_GetState(hTraceComp[nComp], &eState);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        if (bTimeout == OMX_TRUE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: Timed out waiting for state change from instantiation %i\n", nComp);
-            eError = OMX_ErrorTimeout;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        if (eState != OMX_StateIdle)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: State of instantiation %i is not OMX_StateIdle\n", nComp);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-OMX_CONF_TEST_FAIL:
-        /* Cleanup */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Cleaning up\n");
-        for (i = 0;i <= nComp;i++)
-        {
-            OMX_ERRORTYPE eErrorCleanup;
-
-            if (hTraceComp[i] != NULL)
-            {
-                OMX_STATETYPE eState = OMX_StateInvalid;
-
-                if (OMX_ErrorNone == OMX_GetState(hTraceComp[i], &eState)
-                        && eState != OMX_StateInvalid
-                        && eState != OMX_StateLoaded)
-                {
-                    OMX_OSAL_EventReset(hEventStateChange);
-                    eErrorCleanup = OMX_SendCommand(hTraceComp[i], OMX_CommandStateSet, OMX_StateLoaded, 0);
-                    if (OMX_ErrorNone == eErrorCleanup)
-                    {
-                        OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-                    }
-                }
-            }
-
-        }
-
-        for (i = 0;i <= nComp;i++)
-        {
-            OMX_OSAL_EventReset(hEventStateChange);
-            OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (hComp[i])
-                eErrorCleanup = OMX_FreeHandle(hComp[i]);
-
-        }
-        for (i = 0;i <= nComp;i++)
-        {
-            /* unset trace component */
-            if (hTraceComp[i] != NULL)
-                OMX_CONF_ComponentTracerDestroy(hTraceComp[i]);
-        }
-
-        for (i = 0;i <= nComp;i++)
-        {
-            OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks[i], pWrappedAppData[i]);
-        }
-
-        if (hEventStateChange)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChange);
-        }
-        if (hEventStateChangeIdle)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChangeIdle);
-        }
-        if (hEventStateChangeLoaded)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChangeLoaded);
-        }
-        OMX_Deinit();
-
-        return eError;
-    }
-
-    OMX_ERRORTYPE OMX_CONF_WaitForResourcesTest(OMX_IN OMX_STRING cComponentName)
-    {
-        /* Interop test 4.7: Wait For Resources */
-        /* ---------------------------------------
-         * 1. Load component
-         * 2. Transition to idle
-         * 3. Repeat from steps 1-3 until transition to idle returns
-         *    OMX_ErrorInsufficientResources and transitions to Wait state
-         * 4. Switch one of the previous components to the loaded state to free resources
-         * 5. Verify the component in the WaitForResources state transitions to idle
-         */
-
-        OMX_HANDLETYPE hComp[1000];
-        OMX_U32 i, nComp = 0;
-        OMX_ERRORTYPE  eError = OMX_ErrorNone;
-        OMX_CALLBACKTYPE  oCallbacks;
-        OMXWFRTESTDATA    oAppData[1000];
-        OMX_STATETYPE     eState = OMX_StateLoaded;
-        OMX_BOOL          bTimeout  = OMX_FALSE;
-        OMX_PRIORITYMGMTTYPE oPriority;
-        OMX_HANDLETYPE hTraceComp[1000];
-        OMX_HANDLETYPE hEventStateChange;
-        OMX_ERRORTYPE eErrorCleanup;
-        OMX_PTR pWrappedAppData[1000];
-        OMX_CALLBACKTYPE *pWrappedCallbacks[1000];
-        char szInstantiationName[256];
-
-        /* Initialize data */
-        oCallbacks.EventHandler         = WaitResEventHandler;
-        oCallbacks.EmptyBufferDone      = StubbedEmptyBufferDone;
-        oCallbacks.FillBufferDone       = StubbedFillBufferDone;
-
-        /* Begin test */
-        eError = OMX_Init();
-        if (OMX_ErrorNone != eError) return OMX_ErrorUndefined;
-
-        hEventStateChange       = 0;
-        hEventStateChangeIdle   = 0;
-        hEventStateChangeLoaded = 0;
-        eError = OMX_OSAL_EventCreate(&hEventStateChange);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_OSAL_EventCreate(&hEventStateChangeIdle);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-        eError = OMX_OSAL_EventCreate(&hEventStateChangeLoaded);
-        OMX_CONF_FAIL_IF_ERROR(eError);
-
-        INIT_PARAM(oPriority);
-        oPriority.nGroupPriority = OMX_RESOURCETEST_PRIORITY_LOW;
-        oPriority.nGroupID       = 1;
-
-
-        nComp = 0;
-        do
-        {
-            hComp[nComp] = hTraceComp[nComp] = NULL;
-            GetInstantiationName(cComponentName, nComp, szInstantiationName);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Trying to create and idle instantiation %i (priority = %i)\n",
-                           nComp, OMX_RESOURCETEST_PRIORITY_LOW);
-            if (nComp >= 1000)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Test unable to complete. Too many components requested (%d)\n", nComp);
-                eError = OMX_ErrorUndefined;
-                goto OMX_CONF_TEST_FAIL;
-            }
-
-            oAppData[nComp].bErrorInsufficientResources = OMX_FALSE;
-            oAppData[nComp].hEventStateChange      = hEventStateChange;
-            oAppData[nComp].nInstantiation = nComp;
-
-            eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR) & oAppData[nComp], szInstantiationName,
-                                                   &pWrappedCallbacks[nComp], &pWrappedAppData[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            hComp[nComp] = NULL;
-            eError = OMX_GetHandle(&hComp[nComp], cComponentName, pWrappedAppData[nComp], pWrappedCallbacks[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError); /* Problem acquiring handle. bail. */
-
-            eError = OMX_CONF_ComponentTracerCreate(hComp[nComp], szInstantiationName, &hTraceComp[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            /* Set priority and transition to idle */
-            eError = OMX_SetParameter(hTraceComp[nComp], OMX_IndexParamPriorityMgmt, &oPriority);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            /* Disable all ports so we can go idle without buffers */
-            eError = DisableAllPorts(hTraceComp[nComp]);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-
-            eError = OMX_SendCommand(hTraceComp[nComp], OMX_CommandStateSet, OMX_StateIdle, 0);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-            OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-            if (bTimeout == OMX_TRUE)
-            {
-                eError = OMX_ErrorTimeout;
-                goto OMX_CONF_TEST_FAIL;
-            }
-            OMX_OSAL_EventReset(hEventStateChange);
-
-            eError = OMX_GetState(hTraceComp[nComp], &eState);
-            OMX_CONF_FAIL_IF_ERROR(eError);
-            nComp++;
-
-        }
-        while (!oAppData[nComp-1].bErrorInsufficientResources);
-
-        nComp--;
-
-        /* check that the last try stayed in loaded because of insufficient resources */
-        if ((eState != OMX_StateLoaded) || !oAppData[nComp].bErrorInsufficientResources)
-        {
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Instantiation %i failed to idle (insuffient resources)\n", nComp);
-
-        /* tell last try it to wait for resources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Telling instantiation %i to wait for resources\n", nComp);
-        OMX_OSAL_EventReset(hEventStateChange);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hTraceComp[nComp], OMX_CommandStateSet, OMX_StateWaitForResources, 0));
-        OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: Timed out waiting for state change from instantiation %i\n", nComp);
-            eError = OMX_ErrorTimeout;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetState(hTraceComp[nComp], &eState));
-        if (eState != OMX_StateWaitForResources)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: State of instantiation %i is not OMX_StateWaitForResources\n", nComp);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-
-        /* transition first try to loaded */
-        OMX_OSAL_EventReset(hEventStateChange);
-        OMX_OSAL_EventReset(hEventStateChangeIdle);
-        OMX_OSAL_EventReset(hEventStateChangeLoaded);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Telling instantiation 0 to go to loaded\n", nComp);
-        OMX_CONF_FAIL_IF_ERROR(OMX_SendCommand(hTraceComp[0], OMX_CommandStateSet, OMX_StateLoaded, 0));
-        OMX_OSAL_EventWait(hEventStateChangeLoaded, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: Timed out waiting for state change from instantiation 0\n");
-            eError = OMX_ErrorTimeout;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetState(hTraceComp[0], &eState));
-        if (eState != OMX_StateLoaded)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: State of instantiation 0 is not OMX_StateLoaded\n");
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-
-        /* wait for last try to get resources */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Waiting for instantiation %i to go to idle\n", nComp);
-        OMX_OSAL_EventWait(hEventStateChangeIdle, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-        if (bTimeout == OMX_TRUE)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: Timed out waiting for state change from instantiation %i\n", nComp);
-            eError = OMX_ErrorTimeout;
-            goto OMX_CONF_TEST_FAIL;
-        }
-        OMX_CONF_FAIL_IF_ERROR(OMX_GetState(hTraceComp[nComp], &eState));
-        if (eState != OMX_StateIdle)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                           "-ERROR: State of instantiation %i is not OMX_StateIdle\n", nComp);
-            eError = OMX_ErrorUndefined;
-            goto OMX_CONF_TEST_FAIL;
-        }
-
-OMX_CONF_TEST_FAIL:
-        /* Cleanup */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Cleaning up\n");
-        for (i = 1;i <= nComp;i++)
-        {
-            OMX_ERRORTYPE eErrorCleanup;
-
-            if (hTraceComp[i] != NULL)
-            {
-                OMX_OSAL_EventReset(hEventStateChange);
-                eErrorCleanup = OMX_SendCommand(hTraceComp[i], OMX_CommandStateSet, OMX_StateLoaded, 0);
-                if (OMX_ErrorNone == eErrorCleanup)
-                {
-                    OMX_OSAL_EventWait(hEventStateChange, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-                }
-            }
-        }
-
-        for (i = 0;i <= nComp;i++)
-        {
-            OMX_OSAL_EventReset(hEventStateChange);
-            OMX_OSAL_EventWait(hEventStateChange, 20, &bTimeout);
-            if (hComp[i] != NULL)
-                eErrorCleanup = OMX_FreeHandle(hComp[i]);
-        }
-
-        for (i = 0;i <= nComp;i++)
-        {
-            /* unset trace component */
-            if (hTraceComp[i] != NULL)
-                OMX_CONF_ComponentTracerDestroy(hTraceComp[i]);
-        }
-
-        for (i = 0;i <= nComp;i++)
-        {
-            OMX_CONF_CallbackTracerDestroy(pWrappedCallbacks[i], pWrappedAppData[i]);
-        }
-
-        if (hEventStateChange)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChange);
-        }
-
-        if (hEventStateChangeIdle)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChangeIdle);
-        }
-
-        if (hEventStateChangeLoaded)
-        {
-            OMX_OSAL_EventDestroy(hEventStateChangeLoaded);
-        }
-
-        OMX_Deinit();
-
-        return eError;
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.c
deleted file mode 100644 (file)
index f8c747f..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_CONF_StubbedCallbacks.c
- *  Implementation of stubbed of callback functions. Useful for tests that stub certain callback functions. 
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Component.h>
-#include <OMX_Core.h>
-#include <OMX_Index.h>
-#include <OMX_Image.h>
-#include <OMX_Audio.h>
-#include <OMX_Video.h>
-#include <OMX_IVCommon.h>
-#include <OMX_Other.h>
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-OMX_ERRORTYPE StubbedEventHandler(
-    OMX_IN OMX_HANDLETYPE hComponent, 
-    OMX_IN OMX_PTR pAppData, 
-    OMX_IN OMX_EVENTTYPE eEvent, 
-    OMX_IN OMX_U32 nData1, 
-    OMX_IN OMX_U32 nData2, 
-    OMX_IN OMX_PTR pEventData)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pAppData);
-    UNUSED_PARAMETER(eEvent);
-    UNUSED_PARAMETER(nData1);
-    UNUSED_PARAMETER(nData2);
-    UNUSED_PARAMETER(pEventData);
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE StubbedEmptyBufferDone(
-    OMX_IN OMX_HANDLETYPE hComponent,
-    OMX_IN OMX_PTR pAppData,
-    OMX_IN OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pAppData);
-    UNUSED_PARAMETER(pBuffer);
-    
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE StubbedFillBufferDone(
-    OMX_OUT OMX_HANDLETYPE hComponent,
-    OMX_OUT OMX_PTR pAppData,
-    OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pAppData);
-    UNUSED_PARAMETER(pBuffer);
-    
-    return OMX_ErrorNone;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcallbacks.h
deleted file mode 100644 (file)
index 37244a2..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StubbedCallbacks.h
- *  Definition of stubbed of callback functions. Useful for tests that stub certain callback functions.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Component.h>
-#include <OMX_Core.h>
-#include <OMX_Index.h>
-#include <OMX_Image.h>
-#include <OMX_Audio.h>
-#include <OMX_Video.h>
-#include <OMX_IVCommon.h>
-#include <OMX_Other.h>
-
-#include "OMX_OSAL_Interfaces.h"
-
-    OMX_ERRORTYPE StubbedEventHandler(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_PTR pAppData, OMX_IN OMX_EVENTTYPE eEvent, OMX_IN OMX_U32 nData1, OMX_IN OMX_U32 nData2, OMX_IN OMX_PTR pEventData);
-    OMX_ERRORTYPE StubbedEmptyBufferDone(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_PTR pAppData, OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
-    OMX_ERRORTYPE StubbedFillBufferDone(OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.c
deleted file mode 100644 (file)
index 42efa53..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_CONF_StubbedComponent.c
- *  Implementation of stubbed of component functions. Useful for tests that stub certain component functions. 
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Component.h>
-#include <OMX_Core.h>
-#include <OMX_Index.h>
-#include <OMX_Image.h>
-#include <OMX_Audio.h>
-#include <OMX_Video.h>
-#include <OMX_IVCommon.h>
-#include <OMX_Other.h>
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include <stdlib.h>
-
-OMX_ERRORTYPE StubbedGetComponentVersion(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_STRING cComponentName,
-        OMX_OUT OMX_VERSIONTYPE* pComponentVersion,
-        OMX_OUT OMX_VERSIONTYPE* pSpecVersion,
-        OMX_OUT OMX_UUIDTYPE* pComponentUUID)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(cComponentName);
-    UNUSED_PARAMETER(pComponentVersion);
-    UNUSED_PARAMETER(pSpecVersion);
-    UNUSED_PARAMETER(pComponentUUID);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedSendCommand(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_COMMANDTYPE Cmd,
-        OMX_IN  OMX_U32 nParam1,
-        OMX_IN  OMX_PTR pCmdData)
-{
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(Cmd);
-    UNUSED_PARAMETER(nParam1);
-    UNUSED_PARAMETER(pCmdData);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedGetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent, 
-        OMX_IN  OMX_INDEXTYPE nParamIndex,  
-        OMX_INOUT OMX_PTR ComponentParameterStructure)
-{
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(nParamIndex);
-    UNUSED_PARAMETER(ComponentParameterStructure);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedSetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent, 
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_IN  OMX_PTR ComponentParameterStructure)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(nIndex);
-    UNUSED_PARAMETER(ComponentParameterStructure);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedGetConfig(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nIndex, 
-        OMX_INOUT OMX_PTR pComponentConfigStructure)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(nIndex);
-    UNUSED_PARAMETER(pComponentConfigStructure);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedSetConfig(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nIndex, 
-        OMX_IN  OMX_PTR pComponentConfigStructure)
-{
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(nIndex);
-    UNUSED_PARAMETER(pComponentConfigStructure);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedGetExtensionIndex(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_STRING cParameterName,
-        OMX_OUT OMX_INDEXTYPE* pIndexType)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(cParameterName);
-    UNUSED_PARAMETER(pIndexType);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedGetState(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_STATETYPE* pState)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pState);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedComponentTunnelRequest(
-    OMX_IN  OMX_HANDLETYPE hComp,
-    OMX_IN  OMX_U32 nPort,
-    OMX_IN  OMX_HANDLETYPE hTunneledComp,
-    OMX_IN  OMX_U32 nTunneledPort,
-    OMX_INOUT  OMX_TUNNELSETUPTYPE* pTunnelSetup) 
-{   
-    UNUSED_PARAMETER(hComp);
-    UNUSED_PARAMETER(nPort);
-    UNUSED_PARAMETER(hTunneledComp);
-    UNUSED_PARAMETER(nTunneledPort);
-    UNUSED_PARAMETER(pTunnelSetup);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedUseBuffer(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN OMX_PTR pAppPrivate,
-        OMX_IN OMX_U32 nSizeBytes,
-        OMX_IN OMX_U8* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(ppBufferHdr);
-    UNUSED_PARAMETER(nPortIndex);
-    UNUSED_PARAMETER(pAppPrivate);
-    UNUSED_PARAMETER(nSizeBytes);
-    UNUSED_PARAMETER(pBuffer);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedAllocateBuffer(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_INOUT OMX_BUFFERHEADERTYPE** pBuffer,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN OMX_PTR pAppPrivate,
-        OMX_IN OMX_U32 nSizeBytes)
-{
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pBuffer);
-    UNUSED_PARAMETER(nPortIndex);
-    UNUSED_PARAMETER(pAppPrivate);
-    UNUSED_PARAMETER(nSizeBytes);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedFreeBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(nPortIndex);
-    UNUSED_PARAMETER(pBuffer);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedEmptyThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pBuffer);
-        
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedFillThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pBuffer);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedSetCallbacks(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_CALLBACKTYPE* pCallbacks, 
-        OMX_IN  OMX_PTR pAppData)
-{   
-    UNUSED_PARAMETER(hComponent);
-    UNUSED_PARAMETER(pCallbacks);
-    UNUSED_PARAMETER(pAppData);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedComponentDeInit(
-        OMX_IN  OMX_HANDLETYPE hComponent)
-{   
-    UNUSED_PARAMETER(hComponent);
-
-    return OMX_ErrorNotImplemented;
-}
-
-OMX_ERRORTYPE StubbedComponentInit(OMX_IN  OMX_HANDLETYPE hComponent)
-{   
-    UNUSED_PARAMETER(hComponent);
-    
-    return OMX_ErrorNotImplemented;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_stubbedcomponent.h
deleted file mode 100644 (file)
index 5ae7cf2..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StubbedComponent.h
- *  Definition of stubbed of component functions. Useful for tests that stub certain component functions.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Core.h>
-
-#include <stdlib.h>
-
-    OMX_ERRORTYPE StubbedGetComponentVersion(OMX_IN  OMX_HANDLETYPE hComponent, OMX_OUT OMX_STRING cComponentName, OMX_OUT OMX_VERSIONTYPE* pComponentVersion, OMX_OUT OMX_VERSIONTYPE* pSpecVersion, OMX_OUT OMX_UUIDTYPE* pComponentUUID);
-    OMX_ERRORTYPE StubbedSendCommand(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_COMMANDTYPE Cmd, OMX_IN  OMX_U32 nParam1, OMX_IN  OMX_PTR pCmdData);
-    OMX_ERRORTYPE StubbedGetParameter(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure);
-    OMX_ERRORTYPE StubbedSetParameter(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_INDEXTYPE nIndex, OMX_IN  OMX_PTR ComponentParameterStructure);
-    OMX_ERRORTYPE StubbedGetConfig(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_INDEXTYPE nIndex, OMX_INOUT OMX_PTR pComponentConfigStructure);
-    OMX_ERRORTYPE StubbedSetConfig(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_INDEXTYPE nIndex, OMX_IN  OMX_PTR pComponentConfigStructure);
-    OMX_ERRORTYPE StubbedGetExtensionIndex(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_STRING cParameterName, OMX_OUT OMX_INDEXTYPE* pIndexType);
-    OMX_ERRORTYPE StubbedGetState(OMX_IN  OMX_HANDLETYPE hComponent, OMX_OUT OMX_STATETYPE* pState);
-    OMX_ERRORTYPE StubbedComponentTunnelRequest(OMX_IN  OMX_HANDLETYPE hComp, OMX_IN  OMX_U32 nPort, OMX_IN  OMX_HANDLETYPE hTunneledComp, OMX_IN  OMX_U32 nTunneledPort, OMX_INOUT  OMX_TUNNELSETUPTYPE* pTunnelSetup);
-    OMX_ERRORTYPE StubbedUseBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_PTR pAppPrivate, OMX_IN OMX_U32 nSizeBytes, OMX_IN OMX_U8* pBuffer);
-    OMX_ERRORTYPE StubbedAllocateBuffer(OMX_IN OMX_HANDLETYPE hComponent, OMX_INOUT OMX_BUFFERHEADERTYPE** pBuffer, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_PTR pAppPrivate, OMX_IN OMX_U32 nSizeBytes);
-    OMX_ERRORTYPE StubbedFreeBuffer(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_U32 nPortIndex, OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer);
-    OMX_ERRORTYPE StubbedEmptyThisBuffer(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer);
-    OMX_ERRORTYPE StubbedFillThisBuffer(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer);
-    OMX_ERRORTYPE StubbedSetCallbacks(OMX_IN  OMX_HANDLETYPE hComponent, OMX_IN  OMX_CALLBACKTYPE* pCallbacks, OMX_IN  OMX_PTR pAppData);
-    OMX_ERRORTYPE StubbedComponentDeInit(OMX_IN  OMX_HANDLETYPE hComponent);
-    OMX_ERRORTYPE StubbedComponentInit(OMX_IN  OMX_HANDLETYPE hComponent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.c
deleted file mode 100644 (file)
index 2236ba7..0000000
+++ /dev/null
@@ -1,884 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_CONF_TestHarness.c
- *  Implemenation of the OpenMax IL conformance test harness that accepts a list of 
- *  commands (from a prompt or from file) to set tracing/logfiles, add/remove tests 
- *  from the list applied to components, and ultimately launch testing against components).
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-#include "OMX_CONF_TunnelTestComponent.h"
-
-#include <string.h>
-#include <stdlib.h>
-
-/***********************************************************************
- * GLOBAL VARIABLES
- ***********************************************************************/
-OMX_VERSIONTYPE g_OMX_CONF_Version;
-
-/***********************************************************************
- * INFILE MAP TABLE IMPLEMENTATION
- ***********************************************************************/
-
-#define OMX_CONF_MAXINFILEMAPPINGS 100
-OMX_CONF_INFILEMAPPINGTYPE g_OMX_CONF_InFileMap[OMX_CONF_MAXINFILEMAPPINGS];
-OMX_U32 g_OMX_CONF_nInFileMappings;
-
-/***********************************************************************
- * INFILE MAP TABLE IMPLEMENTATION
- ***********************************************************************/
-
-#define OMX_CONF_MAXOUTFILEMAPPINGS 100
-OMX_CONF_OUTFILEMAPPINGTYPE g_OMX_CONF_OutFileMap[OMX_CONF_MAXOUTFILEMAPPINGS];
-OMX_U32 g_OMX_CONF_nOutFileMappings;
-
-/**********************************************************************
- * TEST LOOKUP TABLE
- **********************************************************************/
-
-/* global state storing list of test indices */
-OMX_U32 g_OMX_CONF_TestIndexList[OMX_CONF_MAXTESTNUMBER];
-OMX_U32 g_OMX_CONF_nTests;
-extern OMX_U32 g_OMX_OSAL_TraceFlags;
-
-OMX_ERRORTYPE OMX_CONF_AddTest( OMX_IN OMX_STRING sTestName )
-{
-    OMX_U32 i,j;
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_AddTest %s\n\n", sTestName);
-
-    // add all tests?
-    if ('*' == sTestName[0])
-    {
-        g_OMX_CONF_nTests = 0;
-
-        for (i=0;i<g_OMX_CONF_nTestLookupTableEntries;i++)
-        {
-            /* add index to list */
-            g_OMX_CONF_TestIndexList[g_OMX_CONF_nTests++] = i;
-        }
-        return OMX_ErrorNone;
-    }
-
-    /* search for test in lookup table */
-    for (i=0;i<g_OMX_CONF_nTestLookupTableEntries;i++)
-    {
-        /* found test */
-        if (!strcmp(g_OMX_CONF_TestLookupTable[i].pName,sTestName))
-        {
-            /* check test isn't already in list */
-            for (j=0;j<g_OMX_CONF_nTests;j++)
-            {
-                /* duplicate test */
-                if (g_OMX_CONF_TestIndexList[j] == i) 
-                {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,"OMX_CONF_AddTest failed. Duplicate test.\n");
-                    return OMX_ErrorBadParameter;
-                }
-            }
-            /* add index to list */
-            g_OMX_CONF_TestIndexList[g_OMX_CONF_nTests++] = i;
-            return OMX_ErrorNone;
-        }
-    }
-
-    /* invalid test */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,"OMX_CONF_AddTest failed. Invalid test name.\n");
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_CONF_RemoveTest( OMX_IN OMX_STRING sTestName )
-{
-    OMX_U32 i,j;
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_RemoveTest %s\n\n", sTestName);
-
-    // remove all tests?
-    if ('*' == sTestName[0])
-    {
-        g_OMX_CONF_nTests = 0;
-        return OMX_ErrorNone;
-    }
-
-    /* search for test in lookup table */
-    for (i=0;i<g_OMX_CONF_nTestLookupTableEntries;i++)
-    {
-        /* found test */
-        if (!strcmp(g_OMX_CONF_TestLookupTable[i].pName,sTestName))
-        {
-            /* search for test in list */
-            for (j=0;j<g_OMX_CONF_nTests;j++)
-            {
-                /* found test */
-                if (g_OMX_CONF_TestIndexList[j] == i) 
-                {
-                    /* remove index from list */
-                    g_OMX_CONF_nTests -= 1;
-                    for (;j<g_OMX_CONF_nTests;j++){
-                        g_OMX_CONF_TestIndexList[j] = g_OMX_CONF_TestIndexList[j+1];
-                    }
-                    return OMX_ErrorNone;
-                }
-            }
-            /* test not in list */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,"OMX_CONF_RemoveTest. Test not found.\n");
-            return OMX_ErrorBadParameter;
-       }
-    }
-
-    /* invalid test */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR,"OMX_CONF_RemoveTest. Invalid test name.\n");
-    return OMX_ErrorBadParameter;
-}
-
-OMX_BOOL OMX_CONF_ComponentExists(OMX_IN OMX_STRING cComponentName)
-{
-    OMX_ERRORTYPE  eError = OMX_ErrorNone;
-    OMX_U32 i = 0;
-    OMX_S8 cCompEnumName[256];
-    
-    /* Initialize OpenMax */
-    if (OMX_ErrorNone == (eError = OMX_Init()))
-    {
-        while (OMX_ErrorNone == eError) 
-        {
-            /* loop through all enumerated components to determine if the component name
-            specificed for the test is enumerated by the OMX core */
-            eError = OMX_ComponentNameEnum((OMX_STRING) cCompEnumName, 256, i);
-            if (OMX_ErrorNone == eError){
-                if (!strcmp((OMX_STRING) cCompEnumName, cComponentName)) {
-                    /* found it */    
-                    OMX_Deinit();
-                    return OMX_TRUE;
-                }
-            } 
-            i++;
-        }
-    }
-
-    /* didn't find it */
-    OMX_Deinit();
-    return OMX_FALSE;
-}
-
-OMX_ERRORTYPE OMX_CONF_ListComponents()
-{
-    OMX_ERRORTYPE  eError = OMX_ErrorNone;
-    OMX_U32 i = 0;
-    OMX_S8 cCompEnumName[256];
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nAvailable Components:\n\n"); 
-
-    /* Initialize OpenMax */
-    if (OMX_ErrorNone == (eError = OMX_Init()))
-    {
-        while (OMX_ErrorNone == eError) 
-        {
-            /* loop through all enumerated components to determine if the component name
-            specificed for the test is enumerated by the OMX core */
-            eError = OMX_ComponentNameEnum((OMX_STRING) cCompEnumName, 256, i);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t%s\n", cCompEnumName);            
-            i++;
-        }
-    }
-
-    /* didn't find it */
-    OMX_Deinit();
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_TestComponent( OMX_IN OMX_STRING sComponentName, OMX_BOOL *bPassed)
-{
-    OMX_U32 i;
-    OMX_ERRORTYPE eError;
-    char szDesc[256]; 
-    OMX_U32 nPassedTests, nFailedTests;
-    OMX_U32 testId;
-
-    if (!OMX_CONF_ComponentExists(sComponentName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, "Cannot find component %s, all tests FAILED\n", sComponentName);
-        return OMX_ErrorUndefined;
-    }
-
-    /* initialize passed and failed test counters */
-    nPassedTests = 0;
-    nFailedTests = 0;
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_TestComponent %s\n\n", sComponentName);
-
-    /* Run each test in current list on component */
-    for (i=0;i<g_OMX_CONF_nTests;i++)
-    {
-        /* get test id */
-        testId = g_OMX_CONF_TestIndexList[i];
-
-        /* emit test header */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "##\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "## %s \n", g_OMX_CONF_TestLookupTable[testId].pName );
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "##\n");
-
-        /* perform test */
-        eError = g_OMX_CONF_TestLookupTable[testId].pFunc(sComponentName);
-
-        /* emit test result */
-        if( OMX_ErrorNone != eError ) {
-            OMX_CONF_ErrorToString( eError, szDesc );
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " %s %s FAILED, %x %s\n",
-                g_OMX_CONF_TestLookupTable[testId].pName, sComponentName, eError, szDesc);
-            bPassed[i] = OMX_FALSE;
-            nFailedTests++;
-        } else {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " %s %s PASSED\n",
-                g_OMX_CONF_TestLookupTable[testId].pName, sComponentName);
-            bPassed[i] = OMX_TRUE;
-            nPassedTests++;
-        }
-    }
-
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, "\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Summary for %s\n", sComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \n");
-
-    /* Report passed tests */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " %i tests passed:\n", nPassedTests);
-    for (i=0;i<g_OMX_CONF_nTests;i++)
-    {
-        /* if passed emit test name */
-        if (bPassed[i]){
-            testId = g_OMX_CONF_TestIndexList[i];
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \t%s\n", g_OMX_CONF_TestLookupTable[testId].pName);
-        }
-    }
-
-    /* Report failed tests */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " %i tests failed: \n", nFailedTests);
-    for (i=0;i<g_OMX_CONF_nTests;i++)
-    {
-        /* if failed emit test name */
-        if (!bPassed[i]){
-            testId = g_OMX_CONF_TestIndexList[i];
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \t%s\n", g_OMX_CONF_TestLookupTable[testId].pName);
-        }
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " \n");
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_PrintSettings()
-{
-    OMX_U32 i;
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_PrintSettings\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Trace Flags = 0x%08x\n", g_OMX_OSAL_TraceFlags);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Active Tests:\n");
-    for (i=0;i<g_OMX_CONF_nTests;i++){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t%s\n", 
-            g_OMX_CONF_TestLookupTable[g_OMX_CONF_TestIndexList[i]].pName);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Input File Mappings:\n");
-    for (i=0;i<g_OMX_CONF_nInFileMappings;i++){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t%i:%s\n", 
-            g_OMX_CONF_InFileMap[i].nPortIndex, g_OMX_CONF_InFileMap[i].sInputFileName);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Output File Mappings:\n");
-    for (i=0;i<g_OMX_CONF_nOutFileMappings;i++){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t%i:%s\n", 
-            g_OMX_CONF_OutFileMap[i].nPortIndex, g_OMX_CONF_OutFileMap[i].sOutputFileName);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\n");
-
-    return OMX_ErrorNone;
-}
-
-void OMX_CONF_PrintCcUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tcc <testname> : conformance test component given the \n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\ttrace flags and tests appropriate for compliance\n"); 
-}
-
-void OMX_CONF_PrintStUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tst <traceflags>: set trace flags to given value.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t <traceflags> = bitwise ORing of these flags:\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0001 = Pass/fail.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0002 = Call sequence.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0004 = Parameters.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0008 = Info.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0010 = Error.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t\t0x0020 = Buffer.\n");
-}
-
-void OMX_CONF_PrintOlUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tol <logfilename>: open given log file.\n");
-}
-
-void OMX_CONF_PrintAtUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tat <testname>: add test (""*"" indicates all tests)\n");
-}
-
-void OMX_CONF_PrintRtUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\trt <testname>: remove given test (""*"" indicates all tests).\n");
-}
-
-void OMX_CONF_PrintTcUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\ttc <testname>: test given component.\n");
-}
-
-void OMX_CONF_PrintMiUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tmi <inputfilename> <portindex> : map input file to port.\n");
-}
-
-void OMX_CONF_PrintMoUsage()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tmo <outputfilename> <portindex> : map output file to port.\n");
-}
-
-void OMX_CONF_PrintHelp()
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_PrintHelp()\n");
-
-    OMX_CONF_PrintCcUsage();
-    OMX_CONF_PrintStUsage();
-    OMX_CONF_PrintOlUsage();
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tcl : close log file.\n");
-    OMX_CONF_PrintAtUsage();
-    OMX_CONF_PrintRtUsage();
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tlt : list all available tests\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tlc : list all available components\n");
-    OMX_CONF_PrintTcUsage();
-    OMX_CONF_PrintMiUsage();
-    OMX_CONF_PrintMoUsage();
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tps: print settings.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\th: help.\n");
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tq: quit.\n\n");
-}
-
-OMX_ERRORTYPE OMX_CONF_ListTests()
-{
-    OMX_U32 i;
-   
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nAvailable Tests:\n\n"); 
-    for (i=0;i<g_OMX_CONF_nTestLookupTableEntries;i++)
-    {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\t%s\n", 
-            g_OMX_CONF_TestLookupTable[i].pName);
-    }
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_MapInputfile( OMX_IN OMX_STRING sInputFileName, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_MapInputFile \"%s\" %d\n", sInputFileName, nPortIndex); 
-    if (g_OMX_CONF_nInFileMappings >= OMX_CONF_MAXINFILEMAPPINGS) return OMX_ErrorInsufficientResources;
-
-    strcpy( g_OMX_CONF_InFileMap[g_OMX_CONF_nInFileMappings].sInputFileName, sInputFileName);
-    g_OMX_CONF_InFileMap[g_OMX_CONF_nInFileMappings].nPortIndex = nPortIndex;
-    g_OMX_CONF_nInFileMappings++;
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_MapOutputfile( OMX_IN OMX_STRING sOutputFileName, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_MapOutputFile \"%s\" %d\n", sOutputFileName, nPortIndex); 
-    if (g_OMX_CONF_nOutFileMappings >= OMX_CONF_MAXOUTFILEMAPPINGS) return OMX_ErrorInsufficientResources;
-
-    strcpy( g_OMX_CONF_OutFileMap[g_OMX_CONF_nOutFileMappings].sOutputFileName, sOutputFileName);
-    g_OMX_CONF_OutFileMap[g_OMX_CONF_nOutFileMappings].nPortIndex = nPortIndex;
-    g_OMX_CONF_nOutFileMappings++;
-    return OMX_ErrorNone;
-}
-
-OMX_U32 DummyThreadFunction(OMX_PTR pParam)
-{
-    UNUSED_PARAMETER(pParam);
-
-    return 0;
-}
-
-/* detect the compliance profile(s) that the component is eligible for */
-OMX_U32 DetectComplianceProfile(OMX_STRING sArgument)
-{
-    OMX_U32 detectedCompliance;
-    OMX_HANDLETYPE hThread, hComp, hTTC;
-    OMX_CALLBACKTYPE oDummyCallbacks;
-    OMX_TIME_CONFIG_TIMESTAMPTYPE oTimeStamp;
-    OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE oRefClock;
-
-    detectedCompliance = OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_AutoOutput;
-
-    /* try to create a thread -> implies threading compliance */
-    if (OMX_ErrorNone == OMX_OSAL_ThreadCreate( DummyThreadFunction, 0, 0, &hThread)){
-        if (OMX_ErrorNone == OMX_OSAL_ThreadDestroy( hThread)){
-            detectedCompliance |= OMX_CONF_TestFlag_Threaded;
-        }
-    }
-    oDummyCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-    oDummyCallbacks.FillBufferDone = StubbedFillBufferDone;
-    oDummyCallbacks.EventHandler = StubbedEventHandler;
-    if (OMX_ErrorNone != OMX_Init()){
-        return 0;
-    }
-    if (OMX_ErrorNone != OMX_GetHandle(&hComp, sArgument, NULL, &oDummyCallbacks)){
-        OMX_Deinit();
-        return 0;
-    }
-    if (OMX_ErrorNone != OMX_CONF_GetTunnelTestComponentHandle(&hTTC, NULL, &oDummyCallbacks)){
-        OMX_FreeHandle(hComp);
-        OMX_Deinit();
-        return 0;
-    }
-
-    if (OMX_ErrorNone == OMX_CONF_TTCConnectAllPorts(hTTC, hComp))
-    {
-        INIT_PARAM(oRefClock);
-        INIT_PARAM(oTimeStamp);
-        oTimeStamp.nPortIndex = 0;
-
-        detectedCompliance |= OMX_CONF_TestFlag_Interop;
-
-        /* try to set active ref clock -> implies clock component compliance */
-        if (OMX_ErrorUnsupportedIndex != OMX_SetConfig(hComp, OMX_IndexConfigTimeActiveRefClock, &oRefClock)){
-            detectedCompliance &= ~OMX_CONF_TestFlag_AutoOutput; /* only clock component doesn't have autooutput */
-            detectedCompliance |=  OMX_CONF_TestFlag_ClockComp; 
-        } 
-
-        /* try to set time position -> implies seeking compliance */
-        if (OMX_ErrorUnsupportedIndex != OMX_SetConfig(hComp, OMX_IndexConfigTimePosition, &oTimeStamp)){
-            detectedCompliance |=  OMX_CONF_TestFlag_Seeking; 
-        }
-    }
-
-    OMX_CONF_FreeTunnelTestComponentHandle(hTTC);
-    OMX_FreeHandle(hComp);
-    OMX_Deinit();
-
-    return detectedCompliance;
-}
-
-static const char * OMX_CONF_ConformanceResult(OMX_U32 flags, OMX_U32 detectedCompliance, OMX_U32 actualCompliance)
-{
-    if ((flags & detectedCompliance) != flags)
-        return "NOT RUN";
-    if ((flags & actualCompliance) != flags)
-        return "FAILED";
-    else
-        return "PASSED";
-}
-
-OMX_ERRORTYPE OMX_CONF_ConformancetestComponent(OMX_STRING sArgument, OMX_BOOL *bPassed)
-{
-    OMX_U32 i, nTestFlags[OMX_CONF_MAXTESTNUMBER], nTests;
-    OMX_U32 detectedCompliance, actualCompliance;
-
-    if (!OMX_CONF_ComponentExists(sArgument)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, "Cannot find component %s, all tests FAILED\n", sArgument);
-        return OMX_ErrorUndefined;
-    }
-
-    detectedCompliance = DetectComplianceProfile(sArgument);
-
-    /* only add tests in that compliance profile */
-    nTests = 0;
-    for(i=0;i<g_OMX_CONF_nTestLookupTableEntries;i++)
-    {
-        OMX_U32 nFlag = g_OMX_CONF_TestLookupTable[i].nFlags;
-        if (nFlag == 0)
-            nFlag = OMX_CONF_TestFlag_Base;
-        if ((nFlag & detectedCompliance)==nFlag)
-        {         
-            nTestFlags[nTests++] = nFlag;
-            OMX_CONF_AddTest(g_OMX_CONF_TestLookupTable[i].pName);
-        }
-    }
-        
-    /* run the tests */
-    OMX_CONF_SetTraceflags(OMX_OSAL_TRACE_PASSFAIL|OMX_OSAL_TRACE_WARNING|OMX_OSAL_TRACE_INFO);
-    OMX_CONF_TestComponent(sArgument, bPassed);
-    
-    /* determine actual compliance */
-    actualCompliance = detectedCompliance;  /* assume best case */
-    for(i=0;i<nTests;i++)
-    {
-        /* if the test failed invalidate appropriate profiles */
-        if (OMX_FALSE == bPassed[i]){
-            if (0==(OMX_CONF_TestFlag_Interop & nTestFlags[i])){
-                /* not an interop test */
-                if (OMX_CONF_TestFlag_Threaded & nTestFlags[i]){
-                    /* failed a threaded test - fail threaded compliance */
-                    actualCompliance &= ~OMX_CONF_TestFlag_Threaded;                             
-                } else {
-                    /* failed a non-thread test - fail base comformance */
-                    actualCompliance &=  ~OMX_CONF_TestFlag_Base;
-                }
-            } else if ( OMX_CONF_TestFlag_Interop == nTestFlags[i]
-                        || (OMX_CONF_TestFlag_Interop|OMX_CONF_TestFlag_AutoOutput) == nTestFlags[i] ) {
-                /* failed a interop test without clock/threaded/seeking - fail interop */
-                actualCompliance &= ~OMX_CONF_TestFlag_Interop;     
-            } else {
-                /* failed something above and beyond interop - fail that flag */
-                actualCompliance &= ~(~OMX_CONF_TestFlag_Interop & nTestFlags[i]);
-            }
-        }
-    }
-
-    /* report on actual compliance */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Base Profile:                   %s\n", 
-        OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Base, detectedCompliance, actualCompliance));
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Base Profile with threading:    %s\n", 
-        OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_Threaded, detectedCompliance, actualCompliance));
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Interop Profile:                %s\n", 
-        OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Interop, detectedCompliance, actualCompliance));
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Interop Profile with threading: %s\n", 
-         OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Interop|OMX_CONF_TestFlag_Threaded, detectedCompliance, actualCompliance));
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Clock Component:                %s\n", 
-         OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Interop|OMX_CONF_TestFlag_ClockComp, detectedCompliance, actualCompliance));
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, " Seeking Component:              %s\n", 
-         OMX_CONF_ConformanceResult(OMX_CONF_TestFlag_Interop|OMX_CONF_TestFlag_Seeking, detectedCompliance, actualCompliance));
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_ParseCommand( OMX_IN OMX_STRING sCommandAndArgs )
-{
-    char sLocalCopy[512];
-    char sCommand[5], *sArgument, *sArgument2;
-    char *pC;
-    OMX_BOOL bPassed[OMX_CONF_MAXTESTNUMBER];
-
-    if (('h' == sCommandAndArgs[0]) || ('H' == sCommandAndArgs[0]))
-    {
-        OMX_CONF_PrintHelp();
-        return OMX_ErrorNone;
-    } 
-
-    // make a local copy to ensure we're non-destructive
-    strcpy(sLocalCopy, sCommandAndArgs);
-
-    // extract command
-    for(pC=sLocalCopy;(*pC == ' ')||(*pC == '\t');pC++);     // strip spaces before command
-    if (strlen(pC) < 2) return OMX_ErrorNone;                         // ensure at least 2 chars
-    if ((pC[0] >= 'A') && (pC[0] <= 'Z')) 
-        sCommand[0] = (char) (pC[0]-'A'+'a');
-    else sCommand[0] = pC[0]; // lower case (1st char)
-    if ((pC[1] >= 'A') && (pC[1] <= 'Z')) 
-        sCommand[1] = (char) (pC[1]-'A'+'a');
-    else sCommand[1] = pC[1]; // lower case (2nd char)
-    sCommand[2] = '\0';
-    pC +=2;
-
-    // extract argument
-    for(;(*pC == ' ')||(*pC == '\t');pC++);     // strip spaces before argument
-    sArgument = pC;
-    for(;(*pC != ' ')&&(*pC != '\t')&&(*pC != '\0');pC++);     // null terminate argument
-    *pC = '\0';
-    pC++;
-
-    if (!strcmp("cc", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintCcUsage();     
-        } else{
-          OMX_CONF_ConformancetestComponent(sArgument, bPassed);
-        }
-    }
-    if (!strcmp("st", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintStUsage();     
-        } else {
-           OMX_CONF_SetTraceflags(strtol(sArgument,NULL,0));
-        }
-    }
-    else if (!strcmp("ol", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintOlUsage();     
-        } else {
-            OMX_OSAL_OpenLogfile(sArgument);
-        }
-    }
-    else if (!strcmp("cl", sCommand)){
-        OMX_OSAL_CloseLogfile();
-    } 
-    else if (!strcmp("at", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintAtUsage();     
-        } else {
-            OMX_CONF_AddTest(sArgument);
-        }
-    } 
-    else if (!strcmp("rt", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintRtUsage();     
-        } else {
-            OMX_CONF_RemoveTest(sArgument);
-        }
-    }
-    else if (!strcmp("lt", sCommand))
-    {
-        OMX_CONF_ListTests();
-    } 
-    else if (!strcmp("lc", sCommand))
-    {
-        OMX_CONF_ListComponents();
-    }
-    else if (!strcmp("tc", sCommand))
-    {
-        if (sArgument[0] == '\0'){
-           OMX_CONF_PrintTcUsage();     
-        } else {
-            OMX_CONF_TestComponent(sArgument, bPassed);
-        }
-    } 
-    else if (!strcmp("ps", sCommand))
-    {
-        OMX_CONF_PrintSettings();
-    } 
-    else if (!strcmp("mi", sCommand))
-    {
-        // extract second argument
-        for(;(*pC == ' ')||(*pC == '\t');pC++);     // strip spaces before argument
-        sArgument2 = pC;
-        for(;(*pC != ' ')&&(*pC != '\t')&&(*pC != '\0');pC++);     // null terminate argument
-        *pC = '\0';
-
-        if ((sArgument[0] == '\0')||(sArgument2[0] == '\0')){
-           OMX_CONF_PrintMiUsage();     
-        } else {
-            OMX_CONF_MapInputfile(sArgument, strtol(sArgument2,NULL,0));
-        }
-    }
-    else if (!strcmp("mo", sCommand))
-    {
-        // extract second argument
-        for(;(*pC == ' ')||(*pC == '\t');pC++);     // strip spaces before argument
-        sArgument2 = pC;
-        for(;(*pC != ' ')&&(*pC != '\t')&&(*pC != '\0');pC++);     // null terminate argument
-        *pC = '\0';
-
-        if ((sArgument[0] == '\0')||(sArgument2[0] == '\0')){
-           OMX_CONF_PrintMoUsage();     
-        } else {
-            OMX_CONF_MapOutputfile(sArgument, strtol(sArgument2,NULL,0));
-        }
-    }
-
-    return OMX_ErrorNone;
-}
-
-/* For each domain: force all the component's ports to be suppliers/non-suppliers */
-OMX_ERRORTYPE ForceSuppliersPerDomain(OMX_INDEXTYPE nIndex, OMX_HANDLETYPE hComp, OMX_BOOL bSupplier)
-{
-    OMX_PORT_PARAM_TYPE oParam;
-    OMX_U32 i;
-    OMX_U32 iPort;
-    OMX_ERRORTYPE eError;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oSupplier;
-    OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
-    INIT_PARAM(oSupplier);
-    INIT_PARAM(oParam);
-    INIT_PARAM(oPortDef);
-    oSupplier.eBufferSupplier = bSupplier ? OMX_BufferSupplyInput : OMX_BufferSupplyOutput;
-
-       if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, nIndex, &oParam))) return eError;
-    for (i=0;i<oParam.nPorts;i++)
-    {
-        iPort = oParam.nStartPortNumber + i;
-        oPortDef.nPortIndex = iPort;
-        OMX_GetParameter(hComp, OMX_IndexParamPortDefinition, &oPortDef);
-        
-        /* only set inputs */
-        if (oPortDef.eDir == OMX_DirInput){
-            oSupplier.nPortIndex = iPort;
-            OMX_SetParameter(hComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
-        }
-    }
-
-       return OMX_ErrorNone;
-}
-
-/* Force all the component's ports to be suppliers/non-suppliers */
-OMX_ERRORTYPE OMX_CONF_ForceSuppliers(OMX_HANDLETYPE hComp, OMX_BOOL bSupplier)
-{
-       ForceSuppliersPerDomain(OMX_IndexParamAudioInit, hComp, bSupplier);
-       ForceSuppliersPerDomain(OMX_IndexParamVideoInit, hComp, bSupplier);
-       ForceSuppliersPerDomain(OMX_IndexParamImageInit, hComp, bSupplier);
-       ForceSuppliersPerDomain(OMX_IndexParamOtherInit, hComp, bSupplier);
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE AreAllPortsSameDirection(OMX_HANDLETYPE hComp, OMX_BOOL *pbAllSame, OMX_DIRTYPE eDir,
-                                                OMX_INDEXTYPE eIndexParamDomainInit)
-{
-    OMX_PORT_PARAM_TYPE oParam;
-    OMX_U32 i;
-    OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
-    OMX_ERRORTYPE eError;
-
-    *pbAllSame = OMX_TRUE;
-    INIT_PARAM(oPortDef);
-
-    /* query the component's ports */
-    INIT_PARAM(oParam);
-    if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, eIndexParamDomainInit, &oParam))) return eError;
-    oPortDef.nPortIndex = oParam.nStartPortNumber;
-
-    /* for each discovered port */
-    for (i=0;i<oParam.nPorts;i++)
-    {        
-        /* check direction of port */
-        if (OMX_ErrorNone != (eError = OMX_GetParameter(hComp, OMX_IndexParamPortDefinition, &oPortDef)) ||
-            (oPortDef.eDir != eDir))
-        { 
-            *pbAllSame = OMX_FALSE;
-            return eError;
-        }
-        oPortDef.nPortIndex++;
-    }
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_IsSink(OMX_HANDLETYPE hComp, OMX_BOOL *pbIsSink)
-{
-    OMX_ERRORTYPE eError;
-
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSink, OMX_DirInput, OMX_IndexParamAudioInit)) || (OMX_FALSE == *pbIsSink)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSink, OMX_DirInput, OMX_IndexParamVideoInit)) || (OMX_FALSE == *pbIsSink)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSink, OMX_DirInput, OMX_IndexParamImageInit)) || (OMX_FALSE == *pbIsSink)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSink, OMX_DirInput, OMX_IndexParamOtherInit)) || (OMX_FALSE == *pbIsSink)){
-        return eError;
-    }
-
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_IsSource(OMX_HANDLETYPE hComp, OMX_BOOL *pbIsSource)
-{
-    OMX_ERRORTYPE eError;
-
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSource, OMX_DirOutput, OMX_IndexParamAudioInit)) || (OMX_FALSE == *pbIsSource)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSource, OMX_DirOutput, OMX_IndexParamVideoInit)) || (OMX_FALSE == *pbIsSource)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSource, OMX_DirOutput, OMX_IndexParamImageInit)) || (OMX_FALSE == *pbIsSource)){
-        return eError;
-    }
-    if (OMX_ErrorNone != (eError = AreAllPortsSameDirection(
-        hComp, pbIsSource, OMX_DirOutput, OMX_IndexParamOtherInit)) || (OMX_FALSE == *pbIsSource)){
-        return eError;
-    }
-
-    return eError;
-}
-
-int main(int argc, char **argv)
-{
-    g_OMX_CONF_nTests = 0;
-    g_OMX_CONF_nInFileMappings = 0;
-    g_OMX_CONF_nOutFileMappings = 0;
-    g_OMX_CONF_hTraceMutex = 0;
-
-    OMX_OSAL_MutexCreate(&g_OMX_CONF_hTraceMutex);
-
-    /* Setup common version structure */
-    g_OMX_CONF_Version.s.nVersionMajor = 1;
-    g_OMX_CONF_Version.s.nVersionMinor = 0;
-    g_OMX_CONF_Version.s.nRevision = 0;
-    g_OMX_CONF_Version.s.nStep = 0;    
-    g_OMX_CONF_Version.nVersion = 0x00000001;
-
-    /* set default error level, so that you can detect errors in script startup! */
-    OMX_CONF_SetTraceflags(OMX_OSAL_TRACE_INFO|OMX_OSAL_TRACE_ERROR|OMX_OSAL_TRACE_PASSFAIL|OMX_OSAL_TRACE_WARNING);
-    if (2==argc){
-        OMX_OSAL_ProcessCommandsFromFile(argv[1]);
-    } else if (1==argc){
-        OMX_OSAL_ProcessCommandsFromPrompt();
-    }
-
-    OMX_OSAL_MutexDestroy(g_OMX_CONF_hTraceMutex);
-
-    return 0;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_testharness.h
deleted file mode 100644 (file)
index 39c9206..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_TestHarness.h
- *  Header for the OpenMAX IL conformance test harness that accepts a list of commands
- *  (from a prompt or from file) to set tracing/logfiles, add/remove tests from the list
- *  applied to components, and ultimately launch testing against components).
- */
-
-#ifndef OMX_CONF_TestHarness_h
-#define OMX_CONF_TestHarness_h
-
-#include <OMX_Types.h>
-#include <OMX_Core.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-    /***********************************************************************
-     * GLOBAL VARIABLES/CONSTANTS
-     ***********************************************************************/
-    extern OMX_VERSIONTYPE g_OMX_CONF_Version;
-#define OMX_CONF_TIMEOUT_EXPECTING_SUCCESS 500  /* duration of event timeout in msec when we expect event to be set */
-#define OMX_CONF_TIMEOUT_EXPECTING_FAILURE 2000 /* duration of event timeout in msec when we don't expect event to be set */
-
-    /***********************************************************************
-     * UTILITY FUNCTIONS
-     ***********************************************************************/
-
-    /* Constants for when we are waiting on buffer traffic (to implement "wait a while" in OMX_StateExecuting). */
-#define OMX_CONF_TIMEOUT_BUFFER_TRAFFIC    5000 /* duration of event timeout in msec when we are waiting on buffer traffic */
-#define OMX_CONF_BUFFERS_OF_TRAFFIC 100 /* number of buffers exchanged by TTC's Fill/EmptyThisBuffer when we are waiting on buffer traffic */
-
-    /* Force all the component's ports to be suppliers/non-suppliers */
-    OMX_ERRORTYPE OMX_CONF_ForceSuppliers(OMX_HANDLETYPE hComp, OMX_BOOL bSupplier);
-
-    /* Examines the direction of all the component's ports to determine if it is a source */
-    OMX_ERRORTYPE OMX_CONF_IsSource(OMX_HANDLETYPE hComp, OMX_BOOL *pbIsSource);
-
-    /* Examines the direction of all the component's ports to determine if it is a sink */
-    OMX_ERRORTYPE OMX_CONF_IsSink(OMX_HANDLETYPE hComp, OMX_BOOL *pbIsSink);
-
-    /**********************************************************************
-     * COMMON MACROS
-     **********************************************************************/
-#define INIT_PARAM(_X_)  (((_X_).nSize = sizeof (_X_)), (_X_).nVersion = g_OMX_CONF_Version)
-#define INIT_CONFIG(_X_)  (((_X_).nSize = sizeof (_X_)), (_X_).nVersion = g_OMX_CONF_Version)
-
-    /**********************************************************************
-     * UNUSED PARAMETERS
-     **********************************************************************/
-#define UNUSED_PARAMETER(p) (void)(p)
-
-    /**********************************************************************
-     * TRACING
-     **********************************************************************/
-
-
-#define OMX_CONF_FAIL() OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "%s:%d FAILED\n", __FILE__, __LINE__);  \
-    eError = OMX_ErrorUndefined;                                                                    \
-    goto OMX_CONF_TEST_FAIL;
-
-#define OMX_CONF_FAIL_IF_NEQ( __X, __Y ) if( (long)(__X) != (long)(__Y) ) {         \
-         OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "!!! %s:%d %s (%ld)!= %s (%ld)\n",     \
-                        __FILE__, __LINE__, #__X, (long)(__X), #__Y, (long)(__Y));  \
-         eError = OMX_ErrorUndefined;                                               \
-         goto OMX_CONF_TEST_FAIL;                                                   \
-    }
-
-#define OMX_CONF_FAIL_IF( __X) if(__X) {                        \
-         OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "!!! %s:%d %s\n",  \
-                        __FILE__, __LINE__, #__X);              \
-         eError = OMX_ErrorUndefined;                           \
-         goto OMX_CONF_TEST_FAIL;                               \
-    }
-
-#define OMX_CONF_FAIL_IF_ERROR( __X ) eError = __X;                     \
-    if( OMX_ErrorNone != eError ) {                                     \
-        char szDesc[256];                                               \
-        OMX_CONF_ErrorToString( eError, szDesc );                       \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "!!! %s:%d Error %x %s\n",  \
-                       __FILE__, __LINE__, eError, szDesc);             \
-        goto OMX_CONF_TEST_FAIL;                                        \
-    }
-
-#define OMX_CONF_REMEMBER_ERROR(__X) if( OMX_ErrorNone != (eTemp = __X) && (OMX_ErrorNone == eError)) {  \
-       eError = eTemp;                                                                                   \
-    }
-
-    /* Component Tracer
-
-       A component tracer is a thin wrapper around a component structure (OMX_COMPONENTTYPE)
-       that adds trace message displaying the call sequences, parameters, and return values
-       to component method calls.
-
-       The IL client should create a component tracer around a OMX_COMPONENTTYPE structure
-       after it has been returned by OMX_GetHandle. The IL client should use the returned
-       component wrapper instead of the original component interface.
-    */
-    OMX_ERRORTYPE OMX_CONF_ComponentTracerCreate(OMX_IN OMX_HANDLETYPE hOrigComp,
-            OMX_IN OMX_STRING sComponentName,
-            OMX_OUT OMX_HANDLETYPE *phWrappedComp);
-    OMX_ERRORTYPE OMX_CONF_ComponentTracerDestroy(OMX_IN OMX_HANDLETYPE hWrappedComp);
-
-    /* Component Tracer
-
-       A callback tracer is a thin wrapper around a callback structure (OMX_CALLBACKTYPE)
-       that adds trace message displaying the call sequences, parameters, and return values
-       to callback calls. The tracer also stores the name of the component that will use the
-       given callbacks and appdata.
-
-       The IL client should create a callback tracer around a OMX_CALLBACK structure and the
-       accompanying appdata prior to OMX_GetHandle. The IL client should pass the returned
-       callbacks and appdata wrappers to OMX_GetHandle instead of the original callbacks and
-       appdata.
-    */
-    OMX_ERRORTYPE OMX_CONF_CallbackTracerCreate(OMX_IN OMX_CALLBACKTYPE *pOrigCallbacks,
-            OMX_IN OMX_PTR pOrigAppData,
-            OMX_IN OMX_STRING sComponentName,
-            OMX_OUT OMX_CALLBACKTYPE **ppWrappedCallbacks,
-            OMX_OUT OMX_PTR *ppWrappedAppData);
-    OMX_ERRORTYPE OMX_CONF_CallbackTracerDestroy(OMX_IN OMX_CALLBACKTYPE *pWrappedCallbacks,
-            OMX_OUT OMX_PTR *pWrappedAppData);
-
-    /* Trace utility functions */
-    OMX_ERRORTYPE OMX_CONF_ErrorToString(OMX_IN OMX_ERRORTYPE eError, OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_StateToString(OMX_IN OMX_STATETYPE eState, OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_CommandToString(OMX_IN OMX_COMMANDTYPE eCommand, OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_CONF_IndexToString(OMX_IN OMX_INDEXTYPE nIndex, OMX_OUT OMX_STRING sName);
-    OMX_ERRORTYPE OMX_OSAL_GetTracePrefix(OMX_IN OMX_U32 nTraceFlags, OMX_OUT OMX_STRING szPrefix);
-
-    /**********************************************************************
-     * TEST FUNCTION PROTOTYPES
-     **********************************************************************/
-
-    /** The signature of all test functions should match that of OMX_CONF_TESTFUNCTION
-     *   so test names may be mapped to test functions (i.e. via the g_OMX_CONF_TestLookupTable). */
-    typedef OMX_ERRORTYPE(*OMX_CONF_TESTFUNCTION)(OMX_IN OMX_STRING cComponentName);
-
-#define OMX_CONF_TestFlag_Base          0x80000000
-#define OMX_CONF_TestFlag_Interop       0x01
-#define OMX_CONF_TestFlag_Threaded      0x02
-#define OMX_CONF_TestFlag_ClockComp     0x04
-#define OMX_CONF_TestFlag_Seeking       0x08
-#define OMX_CONF_TestFlag_AutoOutput    0x10
-#define OMX_CONF_TestFlag_StdComponent  0x20
-
-    /**< Maps a test name to a test entrypoint */
-    typedef struct OMX_CONF_TESTLOOKUPTYPE
-    {
-        char *pName;
-        OMX_CONF_TESTFUNCTION pFunc;
-        OMX_U32 nFlags;
-    } OMX_CONF_TESTLOOKUPTYPE;
-
-#define OMX_CONF_MAXTESTNUMBER 200
-    extern OMX_CONF_TESTLOOKUPTYPE g_OMX_CONF_TestLookupTable[];
-    extern OMX_U32 g_OMX_CONF_nTestLookupTableEntries;
-
-    /**********************************************************************
-     * TEST HARNESS INTERFACE
-     *
-     * This interface may be called programmatically or indirectly via
-     * a conformance test script as described below.
-     *********************************************************************/
-
-    /** Set the trace types that are enabled. nTraceFlags are a bitmask of
-     *  OMX_OSAL_Trace flags indicating which type of messages will be emit.*/
-    OMX_ERRORTYPE OMX_CONF_SetTraceflags(OMX_IN OMX_U32 nTraceFlags);
-
-    /** Add the given test those that will be executed upon components on a
-     *  OMX_CONF_TestComponent. sTestname must be one of the strings listed in
-     *  g_OMX_CONF_TestLookupTable or "*" which indicates all tests. */
-    OMX_ERRORTYPE OMX_CONF_AddTest(OMX_IN OMX_STRING sTestName);
-
-    /** Remove the given test to those that will be executed upon components on a
-     *  OMX_CONF_TestComponent. sTestname must be one of the strings listed in
-     *  g_OMX_CONF_TestLookupTable or "*" which indicates all tests. */
-    OMX_ERRORTYPE OMX_CONF_RemoveTest(OMX_IN OMX_STRING sTestName);
-
-    /** List all available tests */
-    OMX_ERRORTYPE OMX_CONF_ListTests();
-
-    /** List all available components */
-    OMX_ERRORTYPE OMX_CONF_ListComponents();
-
-    /** Test the component using the current trace flags, input/output mapping, and test settings */
-    OMX_ERRORTYPE OMX_CONF_TestComponent(OMX_IN OMX_STRING sComponentName, OMX_BOOL *bPassed);
-
-    /** Test the component using the official trace flags, input/output mapping, and test settings
-        for conformance testing. Report on compliance. */
-    OMX_ERRORTYPE OMX_CONF_ConformanceTestComponent(OMX_IN OMX_STRING sComponentName, OMX_BOOL *bPassed);
-
-    /** Print the current list of all tests that will be applied to a component and the trace flags.*/
-    OMX_ERRORTYPE OMX_CONF_PrintSettings();
-
-    /** Print a help message explaining all commands */
-    void OMX_CONF_PrintHelp();
-
-    /* Parse input string into a command an arguments and execute that command with those arguments.*/
-    OMX_ERRORTYPE OMX_CONF_ParseCommand(OMX_IN OMX_STRING sCommandAndArgs);
-
-    /** Map an input file to a port. The test will feed the input data from the file to the port
-     *  (if the test requires this). */
-    OMX_ERRORTYPE OMX_CONF_MapInputfile(OMX_IN OMX_STRING sInputFileName, OMX_IN OMX_U32 nPortIndex);
-
-    /***********************************************************************
-     * INFILE MAP TABLE DEFINITION
-     ***********************************************************************/
-
-    typedef struct OMX_CONF_INFILEMAPPINGTYPE
-    {
-        char sInputFileName[512];
-        OMX_U32 nPortIndex;
-    } OMX_CONF_INFILEMAPPINGTYPE;
-
-#define OMX_CONF_MAXINFILEMAPPINGS 100
-    extern OMX_CONF_INFILEMAPPINGTYPE g_OMX_CONF_InFileMap[OMX_CONF_MAXINFILEMAPPINGS];
-    extern OMX_U32 g_OMX_CONF_nInFileMappings;
-
-    /***********************************************************************
-     * OUTFILE MAP TABLE DEFINITION
-     ***********************************************************************/
-
-    typedef struct OMX_CONF_OUTFILEMAPPINGTYPE
-    {
-        char sOutputFileName[512];
-        OMX_U32 nPortIndex;
-    } OMX_CONF_OUTFILEMAPPINGTYPE;
-
-#define OMX_CONF_MAXOUTFILEMAPPINGS 100
-    extern OMX_CONF_OUTFILEMAPPINGTYPE g_OMX_CONF_OutFileMap[OMX_CONF_MAXOUTFILEMAPPINGS];
-    extern OMX_U32 g_OMX_CONF_nOutFileMappings;
-
-    /**********************************************************************
-     * CONFORMANCE TEST SCRIPT
-     *
-     * A conformance test script consists of a series of commands
-     * that equate to the execution of the corresponding conformance test
-     * functions:
-     *
-     * cc <testname> : conformance test component (sets appropriate flags, adds all tests, tests component)
-     * st <traceflags>: OMX_CONF_SetTraceflags(<traceflags>);
-     * ol <logfilename>: OMX_OSAL_OpenLogfile(<logfilename>);
-     * cl : OMX_OSAL_CloseLogfile();
-     * at <testname>: OMX_CONF_AddTest(<testname>);
-     * rt <testname>: OMX_CONF_RemoveTest(<testname>);
-     * mi <inputfilename> <portindex> : OMX_CONF_MapInputfile(<inputfilename>,<portindex>);
-     * tc <testname>: OMX_CONF_TestComponent(<testname>);
-     * ps: OMX_CONF_PrintSettings();
-     * h: OMX_CONF_PrintHelp();
-     * lt: list all available tests.
-     * lc: list all available components.
-     *
-     * The ';' starts a comment all characters after the ';' are ignored.
-     * Lines consisting entirely of whitespace are ignored.
-     *
-     * EXAMPLE:
-     *
-
-    <Start-of-file>
-    ; setup tracing, open logfile
-    st 0x7 ; (OMX_OSAL_TRACE_PASSFAIL|OMX_OSAL_TRACE_CALLSEQUENCE|OMX_OSAL_TRACE_PARAMTERS)
-    ol log1.txt
-
-    ; add tests
-    at StateTransitionTest
-    at InvalidStateTest
-    at MultiThreadTest
-
-    ; test components
-    tc OMX.CompanyXYZ.mp3.decode
-    tc OMX.CompanyABC.audio.render
-
-    ; close logfile, alter tracing settings, open new logfile
-    cl
-    st 0x3 ; (OMX_OSAL_TRACE_PASSFAIL|OMX_OSAL_TRACE_CALLSEQUENCE)
-    ol log2.txt
-
-    ; remove tests
-    rt MultiThreadTest
-
-    ; test components
-    tc OMX.CompanyABC.mp3.decode
-
-    ; close logfile
-    cl
-    <End-of-File>
-
-     *
-     **********************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tests.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tests.c
deleted file mode 100644 (file)
index 6c81250..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_CONF_Tests.c
- *  Implemenation of the OpenMax IL conformance tests lookup table. 
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-/** Base Profile Tests */
-OMX_ERRORTYPE OMX_CONF_StateTransitionTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ComponentNameTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ParameterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_BufferTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_BufferFlagTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_FlushTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_BaseMultiThreadedTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_PortCommunicationTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ResourceExhaustionTest(OMX_IN OMX_STRING cComponentName);
-
-/** Interop Profile Tests */
-OMX_ERRORTYPE OMX_CONF_ClockComponentTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ParameterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_MultiThreadedTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_PortBufferSupplierTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_PortDisableEnableTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_InvalidInputOutputTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ValidInputOutputTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_IncompleteStopTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_ResourcePreemptionTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_WaitForResourcesTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_MinPayloadSizeTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_SeekingComponentTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_TunnelledUnitTest(OMX_IN OMX_STRING cComponentName);
-
-/* OSAL Test Prototypes */
-OMX_ERRORTYPE OMX_OSAL_TestAll(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_OSAL_MemoryTest1(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_OSAL_MultiThreadTest1(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_OSAL_TimerTest1(OMX_IN OMX_STRING cComponentName);
-
-/* Standard Component Class tests */
-OMX_ERRORTYPE OMX_CONF_StdAudioDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdMp3DecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAacDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdRealAudioDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdWmaDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdVideoDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdH263DecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAvcDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdMpeg4DecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdRvDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdWmvDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdReaderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryAudioReaderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryVideoReaderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryImageReaderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdWriterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryAudioWriterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryVideoWriterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdBinaryImageWriterTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAudioCapturerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdPcmCapturerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdVideoEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdH263EncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAvcEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdMpeg4EncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdImageDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdJpegDecoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdImageEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdJpegEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdIVRendererTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdYuvOverlayTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdRgbOverlayTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAudioProcessorTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAudioMixerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdPcmMixerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAudioRendererTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdPcmRendererTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAudioEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdMp3EncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAacEncoderTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdClockTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdComponentRoleTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdCameraTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdYuvCameraTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdContainerDemuxerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_Std3GpContainerDemuxerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdAsfContainerDemuxerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdRealContainerDemuxerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_Std3GpContainerMuxerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_StdVideoSchedulerTest(OMX_IN OMX_STRING cComponentName);
-OMX_ERRORTYPE OMX_CONF_DataMetabolismTest(OMX_IN OMX_STRING cComponentName);
-
-
-OMX_CONF_TESTLOOKUPTYPE g_OMX_CONF_TestLookupTable [] = 
-{
-    /* Base Profile Tests */
-    {"StateTransitionTest",       OMX_CONF_StateTransitionTest,       OMX_CONF_TestFlag_Base},
-    {"ComponentNameTest",         OMX_CONF_ComponentNameTest,         OMX_CONF_TestFlag_Base},
-    {"ParameterTest",             OMX_CONF_ParameterTest,             OMX_CONF_TestFlag_Base},
-    {"BufferTest",                OMX_CONF_BufferTest,                OMX_CONF_TestFlag_Base},
-    {"BufferFlagTest",            OMX_CONF_BufferFlagTest,            OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_AutoOutput},
-    {"BaseMultiThreadedTest",     OMX_CONF_BaseMultiThreadedTest,     OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_AutoOutput|OMX_CONF_TestFlag_Threaded},
-    {"FlushTest",                 OMX_CONF_FlushTest,                 OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_AutoOutput}, 
-    {"PortCommunicationTest",     OMX_CONF_PortCommunicationTest,     OMX_CONF_TestFlag_Base|OMX_CONF_TestFlag_AutoOutput}, 
-    {"ResourceExhaustionTest",    OMX_CONF_ResourceExhaustionTest,    OMX_CONF_TestFlag_Base}, 
-
-//We don't want to run all these tests, just pick whatever is applicable
-    
-#ifdef OSAL_TESTS
-    /* special tests for OSAL layer (useful when bringing up new platform); component is ignored */
-    ,{"_OSAL_All", OMX_OSAL_TestAll},
-    {"_OSAL_MemoryTest1", OMX_OSAL_MemoryTest1},
-    {"_OSAL_MultiThreadTest1", OMX_OSAL_MultiThreadTest1},
-    {"_OSAL_TimereTest1", OMX_OSAL_TimerTest1}
-#endif
-};
-
-OMX_U32 g_OMX_CONF_nTestLookupTableEntries = sizeof(g_OMX_CONF_TestLookupTable)/sizeof(OMX_CONF_TESTLOOKUPTYPE);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_trace.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_trace.c
deleted file mode 100644 (file)
index 3068045..0000000
+++ /dev/null
@@ -1,1386 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_Trace.c
- *  Implementation of tracing functions for OpenMax IL conformance testing.
- *  Includes tracing for component and callback functions and their parameters.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Component.h>
-#include <OMX_Core.h>
-#include <OMX_Index.h>
-#include <OMX_Image.h>
-#include <OMX_Audio.h>
-#include <OMX_Video.h>
-#include <OMX_IVCommon.h>
-#include <OMX_Other.h>
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-#include "string.h"
-
-/**********************************************************************
- * TRACING
- **********************************************************************/
-
-OMX_U32 g_OMX_OSAL_TraceFlags = 0;
-OMX_HANDLETYPE g_OMX_CONF_hTraceMutex;
-
-OMX_ERRORTYPE OMX_CONF_SetTraceflags(OMX_IN OMX_U32 nTraceFlags)
-{
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\nOMX_CONF_SetTraceFlags 0x%08x\n\n", nTraceFlags);
-
-    if (!nTraceFlags){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_WARNING,
-            "Setting Trace Flags to 0. Test harness will emit no output whatsoever.\n");
-    }
-
-    g_OMX_OSAL_TraceFlags = nTraceFlags;
-    return OMX_ErrorNone;
-}
-
-/**********************************************************************
- * COMMAND TO STRING
- **********************************************************************/
-
-typedef struct OMX_CONF_COMMANDLOOKUPTYPE {
-    OMX_COMMANDTYPE eCommand;
-    OMX_STRING sName;
-} OMX_CONF_COMMANDLOOKUPTYPE;
-
-OMX_CONF_COMMANDLOOKUPTYPE OMX_CONF_CommandLookupTable[] =
-{
-    {OMX_CommandStateSet,     "OMX_CommandStateSet"},
-    {OMX_CommandFlush,        "OMX_CommandFlush"},
-    {OMX_CommandPortDisable,     "OMX_CommandPortDisable"},
-    {OMX_CommandPortEnable,  "OMX_CommandPortEnable"},
-    {OMX_CommandMarkBuffer,   "OMX_CommandMarkBuffer"},
-    {OMX_CommandMax,          "OMX_CommandMax"}
-};
-
-OMX_ERRORTYPE OMX_CONF_CommandToString( OMX_IN OMX_COMMANDTYPE eCommand, OMX_OUT OMX_STRING sName)
-{
-    int i;
-    for(i =0;i<(sizeof(OMX_CONF_CommandLookupTable)/sizeof(OMX_CONF_COMMANDLOOKUPTYPE));i++){
-        if (OMX_CONF_CommandLookupTable[i].eCommand == eCommand){
-            strcpy( sName, OMX_CONF_CommandLookupTable[i].sName);
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-/**********************************************************************
- * EVENT TO STRING
- **********************************************************************/
-
-typedef struct OMX_CONF_EVENTLOOKUPTYPE {
-    OMX_EVENTTYPE eEvent;
-    OMX_STRING sName;
-} OMX_CONF_EVENTLOOKUPTYPE;
-
-OMX_CONF_EVENTLOOKUPTYPE OMX_CONF_EventLookupTable[] =
-{
-    {OMX_EventCmdComplete,           "OMX_EventCmdComplete"},
-    {OMX_EventError,                 "OMX_EventError"},
-    {OMX_EventMark,                  "OMX_EventMark"},
-    {OMX_EventPortSettingsChanged,   "OMX_EventPortSettingsChanged"},
-    {OMX_EventBufferFlag,            "OMX_EventBufferFlag"},
-    {OMX_EventMax,                   "OMX_EventMax"}
-};
-
-OMX_ERRORTYPE OMX_CONF_EventToString( OMX_IN OMX_EVENTTYPE eEvent, OMX_OUT OMX_STRING sName)
-{
-    int i;
-    for(i =0;i<(sizeof(OMX_CONF_EventLookupTable)/sizeof(OMX_CONF_EVENTLOOKUPTYPE));i++){
-        if (OMX_CONF_EventLookupTable[i].eEvent == eEvent){
-            strcpy( sName, OMX_CONF_EventLookupTable[i].sName);
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-/**********************************************************************
- * STATE TO STRING
- **********************************************************************/
-
-typedef struct OMX_CONF_STATELOOKUPTYPE {
-    OMX_STATETYPE eState;
-    OMX_STRING sName;
-} OMX_CONF_STATELOOKUPTYPE;
-
-OMX_CONF_STATELOOKUPTYPE OMX_CONF_StateLookupTable[] =
-{
-    {OMX_StateInvalid,              "OMX_StateInvalid"},
-    {OMX_StateLoaded,               "OMX_StateLoaded"},
-    {OMX_StateIdle,                 "OMX_StateIdle"},
-    {OMX_StateExecuting,            "OMX_StateExecuting"},
-    {OMX_StatePause,                "OMX_StatePause"},
-    {OMX_StateWaitForResources,     "OMX_StateWaitForResources"},
-    {OMX_StateMax,                   "OMX_StateMax"}
-};
-
-OMX_ERRORTYPE OMX_CONF_StateToString( OMX_IN OMX_STATETYPE eState, OMX_OUT OMX_STRING sName)
-{
-    int i;
-    for(i =0;i<(sizeof(OMX_CONF_StateLookupTable)/sizeof(OMX_CONF_STATELOOKUPTYPE));i++){
-        if (OMX_CONF_StateLookupTable[i].eState == eState){
-            strcpy( sName, OMX_CONF_StateLookupTable[i].sName);
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-
-/**********************************************************************
- * ERROR TO STRING
- **********************************************************************/
-
-typedef struct OMX_CONF_ERRORLOOKUPTYPE {
-    OMX_ERRORTYPE eError;
-    OMX_STRING sName;
-} OMX_CONF_ERRORLOOKUPTYPE;
-
-OMX_CONF_ERRORLOOKUPTYPE OMX_CONF_ErrorLookupTable[] =
-{
-    {OMX_ErrorNone,                                  "OMX_ErrorNone"},
-    {OMX_ErrorInsufficientResources,                 "OMX_ErrorInsufficientResources"},
-    {OMX_ErrorUndefined,                             "OMX_ErrorUndefined"},
-    {OMX_ErrorInvalidComponentName,                  "OMX_ErrorInvalidComponentName"},
-    {OMX_ErrorComponentNotFound,                     "OMX_ErrorComponentNotFound"},
-    {OMX_ErrorInvalidComponent,                      "OMX_ErrorInvalidComponent"},
-    {OMX_ErrorBadParameter,                          "OMX_ErrorBadParameter"},
-    {OMX_ErrorNotImplemented,                        "OMX_ErrorNotImplemented"},
-    {OMX_ErrorUnderflow,                             "OMX_ErrorUnderflow"},
-    {OMX_ErrorOverflow,                              "OMX_ErrorOverflow"},
-    {OMX_ErrorHardware,                              "OMX_ErrorHardware"},
-    {OMX_ErrorInvalidState,                          "OMX_ErrorInvalidState"},
-    {OMX_ErrorStreamCorrupt,                         "OMX_ErrorStreamCorrupt"},
-    {OMX_ErrorPortsNotCompatible,                    "OMX_ErrorPortsNotCompatible"},
-    {OMX_ErrorResourcesLost,                         "OMX_ErrorResourcesLost"},
-    {OMX_ErrorNoMore,                                "OMX_ErrorNoMore"},
-    {OMX_ErrorVersionMismatch,                       "OMX_ErrorVersionMismatch"},
-    {OMX_ErrorNotReady,                              "OMX_ErrorNotReady"},
-    {OMX_ErrorTimeout,                               "OMX_ErrorTimeout"},
-    {OMX_ErrorSameState,                             "OMX_ErrorSameState"},
-    {OMX_ErrorResourcesPreempted,                    "OMX_ErrorResourcesPreempted"},
-    {OMX_ErrorPortUnresponsiveDuringAllocation,      "OMX_ErrorPortUnresponsiveDuringAllocation"},
-    {OMX_ErrorPortUnresponsiveDuringDeallocation,    "OMX_ErrorPortUnresponsiveDuringDeallocation"},
-    {OMX_ErrorPortUnresponsiveDuringStop,            "OMX_ErrorPortUnresponsiveDuringStop"},
-    {OMX_ErrorIncorrectStateTransition,              "OMX_ErrorIncorrectStateTransition"},
-    {OMX_ErrorIncorrectStateOperation,               "OMX_ErrorIncorrectStateOperation"},
-    {OMX_ErrorUnsupportedSetting,                    "OMX_ErrorUnsupportedSetting"},
-    {OMX_ErrorUnsupportedIndex,                      "OMX_ErrorUnsupportedIndex"},
-    {OMX_ErrorBadPortIndex,                          "OMX_ErrorBadPortIndex"},
-    {OMX_ErrorPortUnpopulated,                       "OMX_ErrorPortUnpopulated"}, 
-    {OMX_ErrorComponentSuspended,                    "OMX_ErrorComponentSuspended"},
-    {OMX_ErrorDynamicResourcesUnavailable,           "OMX_ErrorDynamicResourcesUnavailable"},
-    {OMX_ErrorMbErrorsInFrame,                       "OMX_ErrorMbErrorsInFrame"},
-    {OMX_ErrorFormatNotDetected,                     "OMX_ErrorFormatNotDetected"},
-    {OMX_ErrorContentPipeOpenFailed,                 "OMX_ErrorContentPipeOpenFailed"},
-    {OMX_ErrorContentPipeCreationFailed,             "OMX_ErrorContentPipeCreationFailed"},
-    {OMX_ErrorMax,                                   "OMX_ErrorMax"}
-};
-
-OMX_ERRORTYPE OMX_CONF_ErrorToString( OMX_IN OMX_ERRORTYPE eError, OMX_OUT OMX_STRING sName)
-{
-    int i;
-    for(i =0;i<(sizeof(OMX_CONF_ErrorLookupTable)/sizeof(OMX_CONF_ERRORLOOKUPTYPE));i++){
-        if (OMX_CONF_ErrorLookupTable[i].eError == eError){
-            strcpy( sName, OMX_CONF_ErrorLookupTable[i].sName);
-            return OMX_ErrorNone;
-        }
-    }
-    strcpy( sName, "(vendor OMX_ERRORTYPE value?)");
-    return OMX_ErrorBadParameter;
-}
-
-#define OMX_CONF_SHORT_TIMELIMIT 5
-#define OMX_CONF_LONG_TIMELIMIT 20
-
-void OMX_OSAL_TraceResultAndTime(OMX_ERRORTYPE eError, OMX_U32 nMsec, OMX_U32 nMsecLimit, OMX_STRING sComp, OMX_STRING sFunc)
-{
-    char sErrorName[256];
-    if (OMX_ErrorNone == OMX_CONF_ErrorToString(eError, sErrorName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, ") returned %s, took %i ms\n", sErrorName, nMsec);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, ") returned 0x%08x, took %i ms\n", eError, nMsec);
-    }
-
-    if (nMsec > nMsecLimit && strncmp("OMX.CONF.", sComp, 9) != 0) {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_WARNING, "Call execution of %s on %s took longer than limit: Limit=%i ms Actual=%i ms\n",
-            sFunc, sComp, nMsecLimit, nMsec );
-    }
-}
-
-/**********************************************************************
- * INDEX TO STRING
- **********************************************************************/
-
-typedef struct OMX_CONF_INDEXLOOKUPTYPE {
-    OMX_INDEXTYPE nIndex;
-    OMX_STRING sName;
-} OMX_CONF_INDEXLOOKUPTYPE;
-
-OMX_CONF_INDEXLOOKUPTYPE OMX_CONF_IndexLookupTable[] =
-{
-    {OMX_IndexComponentStartUnused,"OMX_IndexComponentStartUnused"},
-    {OMX_IndexParamCompBufferSupplier,"OMX_IndexParamCompBufferSupplier"},
-    {OMX_IndexReservedStartUnused,"OMX_IndexReservedStartUnused"},
-    {OMX_IndexParamPortDefinition,"OMX_IndexParamPortDefinition"},
-    {OMX_IndexReservedStartUnused,"OMX_IndexReservedStartUnused"},
-    {OMX_IndexParamAudioPortFormat,"OMX_IndexParamAudioPortFormat"},
-    {OMX_IndexParamAudioPcm,"OMX_IndexParamAudioPcm"},
-    {OMX_IndexParamAudioAac,"OMX_IndexParamAudioAac"},
-    {OMX_IndexParamAudioRa,"OMX_IndexParamAudioRa"},
-    {OMX_IndexParamAudioMp3,"OMX_IndexParamAudioMp3"},
-    {OMX_IndexParamAudioAdpcm,"OMX_IndexParamAudioAdpcm"},
-    {OMX_IndexParamAudioG723,"OMX_IndexParamAudioG723"},
-    {OMX_IndexParamAudioG729,"OMX_IndexParamAudioG729"},
-    {OMX_IndexParamAudioAmr,"OMX_IndexParamAudioAmr"},
-    {OMX_IndexParamAudioWma,"OMX_IndexParamAudioWma"},
-    {OMX_IndexParamAudioSbc,"OMX_IndexParamAudioSbc"},
-    {OMX_IndexParamAudioMidi,"OMX_IndexParamAudioMidi"},
-    {OMX_IndexParamAudioGsm_FR,"OMX_IndexParamAudioGsm_FR"},
-    {OMX_IndexParamAudioMidiLoadUserSound,"OMX_IndexParamAudioMidiLoadUserSound"},
-    {OMX_IndexParamAudioG726,"OMX_IndexParamAudioG726"},
-    {OMX_IndexParamAudioGsm_EFR,"OMX_IndexParamAudioGsm_EFR"},
-    {OMX_IndexParamAudioGsm_HR,"OMX_IndexParamAudioGsm_HR"},
-    {OMX_IndexParamAudioPdc_FR,"OMX_IndexParamAudioPdc_FR"},
-    {OMX_IndexParamAudioPdc_EFR,"OMX_IndexParamAudioPdc_EFR"},
-    {OMX_IndexParamAudioPdc_HR,"OMX_IndexParamAudioPdc_HR"},
-    {OMX_IndexParamAudioTdma_FR,"OMX_IndexParamAudioTdma_FR"},
-    {OMX_IndexParamAudioTdma_EFR,"OMX_IndexParamAudioTdma_EFR"},
-    {OMX_IndexParamAudioQcelp8,"OMX_IndexParamAudioQcelp8"},
-    {OMX_IndexParamAudioQcelp13,"OMX_IndexParamAudioQcelp13"},
-    {OMX_IndexParamAudioEvrc,"OMX_IndexParamAudioEvrc"},
-    {OMX_IndexParamAudioSmv,"OMX_IndexParamAudioSmv"},
-    {OMX_IndexConfigAudioMidiImmediateEvent,"OMX_IndexConfigAudioMidiImmediateEvent"},
-    {OMX_IndexConfigAudioMidiControl,"OMX_IndexConfigAudioMidiControl"},
-    {OMX_IndexConfigAudioMidiSoundBankProgram,"OMX_IndexConfigAudioMidiSoundBankProgram"},
-    {OMX_IndexConfigAudioMidiStatus,"OMX_IndexConfigAudioMidiStatus"},
-    {OMX_IndexConfigAudioMidiMetaEvent,"OMX_IndexConfigAudioMidiMetaEvent"},
-    {OMX_IndexConfigAudioMidiMetaEventData,"OMX_IndexConfigAudioMidiMetaEventData"},
-    {OMX_IndexParamAudioInit,"OMX_IndexParamAudioInit"},
-    {OMX_IndexConfigAudioVolume,"OMX_IndexConfigAudioVolume"},
-    {OMX_IndexConfigAudioBalance,"OMX_IndexConfigAudioBalance"},
-    {OMX_IndexConfigAudioChannelMute,"OMX_IndexConfigAudioChannelMute"},
-    {OMX_IndexConfigAudioMute,"OMX_IndexConfigAudioMute"},
-
-    {OMX_IndexConfigAudioLoudness,"OMX_IndexConfigAudioLoudness"},
-    {OMX_IndexConfigAudioEchoCancelation,"OMX_IndexConfigAudioEchoCancelation"},
-    {OMX_IndexConfigAudioNoiseReduction,"OMX_IndexConfigAudioNoiseReduction"},
-    {OMX_IndexConfigAudioBass,"OMX_IndexConfigAudioBass"},
-    {OMX_IndexConfigAudioTreble,"OMX_IndexConfigAudioTreble"},
-    {OMX_IndexConfigAudioStereoWidening,"OMX_IndexConfigAudioStereoWidening"},
-    {OMX_IndexConfigAudioChorus,"OMX_IndexConfigAudioChorus"},
-    {OMX_IndexConfigAudioEqualizer,"OMX_IndexConfigAudioEqualizer"},
-    {OMX_IndexConfigAudioReverberation,"OMX_IndexConfigAudioReverberation"},
-
-    {OMX_IndexImageStartUnused,"OMX_IndexImageStartUnused"},
-    {OMX_IndexParamImagePortFormat,"OMX_IndexParamImagePortFormat"},
-    {OMX_IndexParamImageInit,"OMX_IndexParamImageInit"},
-    {OMX_IndexParamFlashControl,"OMX_IndexParamFlashControl"},
-    {OMX_IndexConfigFocusControl,"OMX_IndexConfigFocusControl"},
-    {OMX_IndexParamQFactor,"OMX_IndexParamQFactor"},
-    {OMX_IndexParamQuantizationTable,"OMX_IndexParamQuantizationTable"},
-
-    {OMX_IndexParamHuffmanTable,"OMX_IndexParamHuffmanTable"},
-
-    {OMX_IndexVideoStartUnused,"OMX_IndexVideoStartUnused"},
-    {OMX_IndexParamVideoPortFormat,"OMX_IndexParamVideoPortFormat"},
-    {OMX_IndexParamVideoInit,"OMX_IndexParamVideoInit"},
-    {OMX_IndexParamVideoQuantization,"OMX_IndexParamVideoQuantization"},
-    {OMX_IndexParamVideoFastUpdate,"OMX_IndexParamVideoFastUpdate"},
-    {OMX_IndexParamVideoBitrate,"OMX_IndexParamVideoBitrate"},
-    {OMX_IndexParamVideoMotionVector,"OMX_IndexParamVideoMotionVector"},
-    {OMX_IndexParamVideoIntraRefresh,"OMX_IndexParamVideoIntraRefresh"},
-    {OMX_IndexParamVideoErrorCorrection,"OMX_IndexParamVideoErrorCorrection"},
-    {OMX_IndexParamVideoVBSMC,"OMX_IndexParamVideoVBSMC"},
-
-    {OMX_IndexParamVideoMpeg2,"OMX_IndexParamVideoMpeg2"},
-    {OMX_IndexParamVideoMpeg4,"OMX_IndexParamVideoMpeg4"},
-    {OMX_IndexParamVideoWmv,"OMX_IndexParamVideoWmv"},
-    {OMX_IndexParamVideoRv,"OMX_IndexParamVideoRv"},
-    {OMX_IndexParamVideoAvc,"OMX_IndexParamVideoAvc"},
-    {OMX_IndexParamVideoH263,"OMX_IndexParamVideoH263"},
-  
-    {OMX_IndexCommonStartUnused,"OMX_IndexCommonStartUnused"},
-    {OMX_IndexParamCommonDeblocking,"OMX_IndexParamCommonDeblocking"},
-    {OMX_IndexParamCommonSensorMode,"OMX_IndexParamCommonSensorMode"},
-    {OMX_IndexConfigCommonColorFormatConversion,"OMX_IndexConfigCommonColorFormatConversion"},
-    {OMX_IndexConfigCommonScale,"OMX_IndexConfigCommonScale"},
-    {OMX_IndexConfigCommonImageFilter,"OMX_IndexConfigCommonImageFilter"},
-    {OMX_IndexConfigCommonColorEnhancement,"OMX_IndexConfigCommonColorEnhancement"},
-    {OMX_IndexConfigCommonColorKey,"OMX_IndexConfigCommonColorKey"},
-    {OMX_IndexConfigCommonColorBlend,"OMX_IndexConfigCommonColorBlend"},
-    {OMX_IndexConfigCommonFrameStabilisation,"OMX_IndexConfigCommonFrameStabilisation"},
-    {OMX_IndexConfigCommonRotate,"OMX_IndexConfigCommonRotate"},
-    {OMX_IndexConfigCommonMirror,"OMX_IndexConfigCommonMirror"},
-    {OMX_IndexConfigCommonOutputPosition,"OMX_IndexConfigCommonOutputPosition"},
-    {OMX_IndexConfigCommonInputCrop,"OMX_IndexConfigCommonInputCrop"},
-    {OMX_IndexConfigCommonOutputCrop,"OMX_IndexConfigCommonOutputCrop"},
-    {OMX_IndexConfigCommonDigitalZoom,"OMX_IndexConfigCommonDigitalZoom"},
-    {OMX_IndexConfigCommonOpticalZoom,"OMX_IndexConfigCommonOpticalZoom"},
-    {OMX_IndexConfigCommonWhiteBalance,"OMX_IndexConfigCommonWhiteBalance"},
-    {OMX_IndexConfigCommonExposure,"OMX_IndexConfigCommonExposure"},
-
-    {OMX_IndexConfigCommonContrast,"OMX_IndexConfigCommonContrast"},
-    {OMX_IndexConfigCommonBrightness,"OMX_IndexConfigCommonBrightness"},
-    {OMX_IndexConfigCommonBacklight,"OMX_IndexConfigCommonBacklight"},
-    {OMX_IndexConfigCommonGamma,"OMX_IndexConfigCommonGamma"},
-    {OMX_IndexConfigCommonSaturation,"OMX_IndexConfigCommonSaturation"},
-    {OMX_IndexConfigCommonLightness,"OMX_IndexConfigCommonLightness"},
-    {OMX_IndexConfigCommonExclusionRect,"OMX_IndexConfigCommonExclusionRect"},
-    {OMX_IndexConfigCommonDithering,"OMX_IndexConfigCommonDithering"},
-
-    {OMX_IndexConfigCommonPlaneBlend,"OMX_IndexConfigCommonPlaneBlend"},
-    {OMX_IndexParamCommonInterleave,"OMX_IndexParamCommonInterleave"},
-
-    {OMX_IndexOtherStartUnused,"OMX_IndexOtherStartUnused"},
-    {OMX_IndexConfigOtherPower,"OMX_IndexConfigOtherPower"},
-    {OMX_IndexConfigOtherStats,"OMX_IndexConfigOtherStats"},
-    {OMX_IndexParamOtherPortFormat,"OMX_IndexParamOtherPortFormat"},
-    {OMX_IndexParamOtherInit,"OMX_IndexParamOtherInit"},
-
-    {OMX_IndexParamPriorityMgmt,"OMX_IndexParamPriorityMgmt"},
-
-    {OMX_IndexTimeStartUnused,"OMX_IndexTimeStartUnused"},
-    {OMX_IndexConfigTimeScale,"OMX_IndexConfigTimeScale"},
-    {OMX_IndexConfigTimeClockState,"OMX_IndexConfigTimeClockState"},
-    {OMX_IndexConfigTimeActiveRefClock,"OMX_IndexConfigTimeActiveRefClock"},
-    {OMX_IndexConfigTimeCurrentMediaTime,"OMX_IndexConfigTimeCurrentMediaTime"},
-    {OMX_IndexConfigTimeCurrentWallTime,"OMX_IndexConfigTimeCurrentWallTime"},
-    {OMX_IndexConfigTimeCurrentAudioReference,"OMX_IndexConfigTimeCurrentAudioReference"},
-    {OMX_IndexConfigTimeCurrentVideoReference,"OMX_IndexConfigTimeCurrentVideoReference"},
-    {OMX_IndexConfigTimeMediaTimeRequest,"OMX_IndexConfigTimeMediaTimeRequest"},
-    {OMX_IndexConfigTimeClientStartTime,"OMX_IndexConfigTimeClientStartTime"},
-    {OMX_IndexConfigTimePosition,"OMX_IndexConfigTimePosition"},
-    {OMX_IndexConfigTimeSeekMode,"OMX_IndexConfigTimeSeekMode"},
-
-    {OMX_IndexParamNumAvailableStreams,"OMX_IndexParamNumAvailableStreams"},
-    {OMX_IndexParamActiveStream,"OMX_IndexParamActiveStream"},
-    {OMX_IndexParamSuspensionPolicy,"OMX_IndexParamSuspensionPolicy"},
-    {OMX_IndexParamComponentSuspended,"OMX_IndexParamComponentSuspended"},
-    {OMX_IndexConfigCapturing,"OMX_IndexConfigCapturing"},
-    {OMX_IndexConfigCaptureMode,"OMX_IndexConfigCaptureMode"},
-    {OMX_IndexAutoPauseAfterCapture,"OMX_IndexAutoPauseAfterCapture"},
-    {OMX_IndexParamContentURI,"OMX_IndexParamContentURI"},
-    {OMX_IndexParamCustomContentPipe,"OMX_IndexParamCustomContentPipe"},
-    {OMX_IndexParamDisableResourceConcealment,"OMX_IndexParamDisableResourceConcealment"},
-       {OMX_IndexConfigPriorityMgmt,"OMX_IndexConfigPriorityMgmt"},
-    {OMX_IndexParamStandardComponentRole,"OMX_IndexParamStandardComponentRole"},
-//    {OMX_IndexParamAudioMp3StreamFormat,"OMX_IndexParamAudioMp3StreamFormat"},
-    {OMX_IndexConfigAudioChannelVolume,"OMX_IndexConfigAudioChannelVolume"},
-    {OMX_IndexConfigFlashControl,"OMX_IndexConfigFlashControl"},
-    {OMX_IndexParamVideoProfileLevelQuerySupported,"OMX_IndexParamVideoProfileLevelQuerySupported"},
-    {OMX_IndexParamVideoProfileLevelCurrent,"OMX_IndexParamVideoProfileLevelCurrent"},
-    {OMX_IndexConfigVideoBitrate,"OMX_IndexConfigVideoBitrate"},
-    {OMX_IndexConfigVideoFramerate,"OMX_IndexConfigVideoFramerate"},
-    {OMX_IndexConfigVideoIntraVOPRefresh,"OMX_IndexConfigVideoIntraVOPRefresh"},
-    {OMX_IndexConfigVideoIntraMBRefresh,"OMX_IndexConfigVideoIntraMBRefresh"},
-    {OMX_IndexConfigVideoMBErrorReporting,"OMX_IndexConfigVideoMBErrorReporting"},
-    {OMX_IndexParamVideoMacroblocksPerFrame,"OMX_IndexParamVideoMacroblocksPerFrame"},
-    {OMX_IndexConfigVideoMacroBlockErrorMap,"OMX_IndexConfigVideoMacroBlockErrorMap"},
-    {OMX_IndexParamVideoSliceFMO,"OMX_IndexParamVideoSliceFMO"},
-    {OMX_IndexConfigVideoAVCIntraPeriod,"OMX_IndexConfigVideoAVCIntraPeriod"},
-    {OMX_IndexConfigVideoNalSize,"OMX_IndexConfigVideoNalSize"},
-    {OMX_IndexConfigCommonExposureValue,"OMX_IndexConfigCommonExposureValue"},
-    {OMX_IndexConfigCommonOutputSize,"OMX_IndexConfigCommonOutputSize"},
-    {OMX_IndexParamCommonExtraQuantData,"OMX_IndexParamCommonExtraQuantData"},
-    {OMX_IndexConfigCommonFocusRegion,"OMX_IndexConfigCommonFocusRegion"},
-    {OMX_IndexConfigCommonFocusStatus,"OMX_IndexConfigCommonFocusStatus"},
-
-    //{OMX_IndexIndexVendorStartUnused,"OMX_IndexIndexVendorStartUnused"},
-    {OMX_IndexMax,"OMX_IndexMax"}
-};
-
-OMX_ERRORTYPE OMX_CONF_IndexToString( OMX_IN OMX_INDEXTYPE nIndex, OMX_OUT OMX_STRING sName)
-{
-    int i;
-    for(i =0;i<(sizeof(OMX_CONF_IndexLookupTable)/sizeof(OMX_CONF_INDEXLOOKUPTYPE));i++){
-        if (OMX_CONF_IndexLookupTable[i].nIndex == nIndex){
-            strcpy( sName, OMX_CONF_IndexLookupTable[i].sName);
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_CONF_TraceBuffer(OMX_BUFFERHEADERTYPE *pHeader)
-{
-    if (!pHeader) {
-        return OMX_ErrorNone;
-    }
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnSize = 0x%08x",pHeader->nSize);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnVersion = 0x%08x",pHeader->nVersion.nVersion);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpBuffer = 0x%08x",pHeader->pBuffer);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnAllocLen = 0x%08x",pHeader->nAllocLen);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnFilledLen = 0x%08x",pHeader->nFilledLen);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnOffset = 0x%08x",pHeader->nOffset);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnOutputPortIndex = 0x%08x",pHeader->nOutputPortIndex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnInputPortIndex = 0x%08x",pHeader->nInputPortIndex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpOutputPortPrivate = 0x%08x",pHeader->pOutputPortPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpInputPortPrivate = 0x%08x",pHeader->pInputPortPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpAppPrivate = 0x%08x",pHeader->pAppPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpPlatformPrivate = 0x%08x",pHeader->pPlatformPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\thMarkTargetComponent = 0x%08x",pHeader->hMarkTargetComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tpMarkData = 0x%08x",pHeader->pMarkData);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnTickCount = 0x%08x",pHeader->nTickCount);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnTimeStamp = 0x%x",pHeader->nTimeStamp);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_BUFFER, "\n\t\tnFlags = 0x%08x",pHeader->nFlags);
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return OMX_ErrorNone;
-}
-
-/**************************************************************
- * COMPONENT TRACER - wraps an existing component structure
- * with functions that trace calls, parameters, and return
- * values.
- **************************************************************/
-
-typedef struct OMX_CONF_COMPTRACERDATATYPE {
-    OMX_PTR pOrigComponent;
-    char sComponentName[256];
-} OMX_CONF_COMPTRACERDATATYPE;
-
-/* Wrapper functions */
-
-OMX_ERRORTYPE Trace_GetComponentVersion(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_STRING pComponentName,
-        OMX_OUT OMX_VERSIONTYPE* pComponentVersion,
-        OMX_OUT OMX_VERSIONTYPE* pSpecVersion,
-        OMX_OUT OMX_UUIDTYPE* pComponentUUID)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->GetComponentVersion((OMX_HANDLETYPE)pComp, pComponentName, pComponentVersion, pSpecVersion, pComponentUUID);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- GetComponentVersion(", sCompName);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpComponentName = %s", pComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpComponentVersion = %s", pComponentVersion);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpSpecVersion = %s", pSpecVersion);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpComponentUUID = %s", pComponentUUID);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "GetComponentVersion");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-OMX_ERRORTYPE Trace_SendCommand(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_COMMANDTYPE Cmd,
-        OMX_IN  OMX_U32 nParam1,
-        OMX_IN  OMX_PTR pCmdData)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sCmdName[256];
-    char sStateName[256];
-    OMX_U32 nMsec;
-    OMX_MARKTYPE *pMark;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "calling %s<- SendCommand(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_CommandToString(Cmd,sCmdName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "\n\tCmd = %s", sCmdName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tCmd = 0x%08x", Cmd);
-    }
-    switch(Cmd){
-    case OMX_CommandStateSet:
-        if (OMX_ErrorNone == OMX_CONF_StateToString((OMX_COMMANDTYPE)nParam1, sStateName)){
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "\n\tstate(nParam1) = %s", sStateName);
-        }else {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tstate(nParam1) = 0x%08x", nParam1);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-        break;
-    case OMX_CommandFlush:
-    case OMX_CommandPortDisable:
-    case OMX_CommandPortEnable:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex(nParam1) = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-        break;
-    case OMX_CommandMarkBuffer:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParam1 = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpMarkData(pCmdData) = 0x%08x", pCmdData);
-        pMark = (OMX_MARKTYPE *)pCmdData;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t\thMarkTargetComponent = 0x%08x", pMark->hMarkTargetComponent);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t\tpMarkData = 0x%08x", pMark->pMarkData);
-        break;
-    default:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParam1 = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "\n)....\n");
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    eError = pComp->SendCommand((OMX_HANDLETYPE)pComp, Cmd, nParam1, pCmdData);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- SendCommand(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_CommandToString(Cmd,sCmdName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tCmd = %s", sCmdName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tCmd = 0x%08x", Cmd);
-    }
-
-    switch(Cmd){
-    case OMX_CommandStateSet:
-        if (OMX_ErrorNone == OMX_CONF_StateToString((OMX_COMMANDTYPE)nParam1, sStateName)){
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tstate(nParam1) = %s", sStateName);
-        }else {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tstate(nParam1) = 0x%08x", nParam1);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-        break;
-    case OMX_CommandFlush:
-    case OMX_CommandPortDisable:
-    case OMX_CommandPortEnable:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex(nParam1) = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-        break;
-    case OMX_CommandMarkBuffer:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParam1 = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpMarkData(pCmdData) = 0x%08x", pCmdData);
-        pMark = (OMX_MARKTYPE *)pCmdData;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t\thMarkTargetComponent = 0x%08x", pMark->hMarkTargetComponent);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t\tpMarkData = 0x%08x", pMark->pMarkData);
-        break;
-    default:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParam1 = 0x%08x", nParam1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCmdData = 0x%08x", pCmdData);
-    }
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "SendCommand");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_GetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nParamIndex,
-        OMX_INOUT OMX_PTR ComponentParameterStructure)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sIndexName[256];
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->GetParameter((OMX_HANDLETYPE)pComp, nParamIndex, ComponentParameterStructure);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- GetParameter(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_IndexToString(nParamIndex, sIndexName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParamIndex = %s", sIndexName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnParamIndex = 0x%08x", nParamIndex);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tComponentParameterStructure = 0x%08x", ComponentParameterStructure);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_LONG_TIMELIMIT, sCompName, "GetParameter");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_SetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_IN  OMX_PTR ComponentParameterStructure)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sIndexName[256];
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->SetParameter((OMX_HANDLETYPE)pComp, nIndex, ComponentParameterStructure);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- SetParameter(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_IndexToString(nIndex, sIndexName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = %s", sIndexName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = 0x%08x", nIndex);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tComponentParameterStructure = 0x%08x", ComponentParameterStructure);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_LONG_TIMELIMIT, sCompName, "SetParameter");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_GetConfig(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_INOUT OMX_PTR pComponentConfigStructure)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sIndexName[256];
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->GetConfig((OMX_HANDLETYPE)pComp, nIndex, pComponentConfigStructure);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- GetConfig(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_IndexToString(nIndex, sIndexName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = %s", sIndexName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = 0x%08x", nIndex);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpComponentConfigStructure = 0x%08x", pComponentConfigStructure);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "GetConfig");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_SetConfig(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_IN  OMX_PTR pComponentConfigStructure)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sIndexName[256];
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->SetConfig((OMX_HANDLETYPE)pComp, nIndex, pComponentConfigStructure);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- SetConfig(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_IndexToString(nIndex, sIndexName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = %s", sIndexName);
-    } else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnIndex = 0x%08x", nIndex);
-    }
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpComponentConfigStructure = 0x%08x", pComponentConfigStructure);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "SetConfig");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_GetExtensionIndex(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_STRING cParameterName,
-        OMX_OUT OMX_INDEXTYPE* pIndexType)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->GetExtensionIndex((OMX_HANDLETYPE)pComp, cParameterName, pIndexType);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- GetExtensionIndex(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tcParameterName = %s", cParameterName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpIndexType = 0x%08x", pIndexType);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "GetExtensionIndex");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_GetState(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_STATETYPE* pState)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    char sStateName[256];
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->GetState((OMX_HANDLETYPE)pComp, pState);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- GetState(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    if (OMX_ErrorNone == OMX_CONF_StateToString(*pState, sStateName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t*pState = %s", sStateName);
-    }else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\t*pState = 0x%08x", pState);
-    }
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "GetState");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_ComponentTunnelRequest(
-    OMX_IN  OMX_HANDLETYPE hComp,
-    OMX_IN  OMX_U32 nPort,
-    OMX_IN  OMX_HANDLETYPE hTunneledComp,
-    OMX_IN  OMX_U32 nTunneledPort,
-    OMX_INOUT  OMX_TUNNELSETUPTYPE* pTunnelSetup)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComp)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComp)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->ComponentTunnelRequest((OMX_HANDLETYPE)pComp, nPort, hTunneledComp, nTunneledPort, pTunnelSetup);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- ComponentTunnelRequest(",
-        ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComp)->pApplicationPrivate))->sComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComp = 0x%08x", hComp);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPort = 0x%08x", nPort);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thTunneledComp = 0x%08x", hTunneledComp);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnTunneledPort = 0x%08x", nTunneledPort);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpTunnelSetup = 0x%08x", pTunnelSetup);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "ComponentTunnelRequest");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_UseBuffer(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN OMX_PTR pAppPrivate,
-        OMX_IN OMX_U32 nSizeBytes,
-        OMX_IN OMX_U8* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->UseBuffer((OMX_HANDLETYPE)pComp, ppBufferHdr, nPortIndex, pAppPrivate, nSizeBytes, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- UseBuffer(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tppBufferHdr = 0x%08x", ppBufferHdr);
-    if (OMX_ErrorNone == eError) OMX_CONF_TraceBuffer(*ppBufferHdr);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex = 0x%08x", nPortIndex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppPrivate = 0x%08x", pAppPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnSizeBytes = 0x%08x", nSizeBytes);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_LONG_TIMELIMIT, sCompName, "UseBuffer");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_AllocateBuffer(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_INOUT OMX_BUFFERHEADERTYPE** pBuffer,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN OMX_PTR pAppPrivate,
-        OMX_IN OMX_U32 nSizeBytes)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->AllocateBuffer((OMX_HANDLETYPE)pComp, pBuffer, nPortIndex, pAppPrivate, nSizeBytes);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- AllocateBuffer(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    if (OMX_ErrorNone == eError) OMX_CONF_TraceBuffer(*pBuffer);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex = 0x%08x", nPortIndex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppPrivate = 0x%08x", pAppPrivate);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnSizeBytes = 0x%08x", nSizeBytes);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "AllocateBuffer");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_FreeBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    /* do a trace buffer prior to freeing the buffer */
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- FreeBuffer(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex = 0x%08x", nPortIndex);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_CONF_TraceBuffer(pBuffer);
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->FreeBuffer((OMX_HANDLETYPE)pComp, nPortIndex, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_LONG_TIMELIMIT, sCompName, "FreeBuffer");
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_EmptyThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->EmptyThisBuffer((OMX_HANDLETYPE)pComp, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- EmptyThisBuffer(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_CONF_TraceBuffer(pBuffer);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "EmptyThisBuffer");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-
-OMX_ERRORTYPE Trace_FillThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->FillThisBuffer((OMX_HANDLETYPE)pComp, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- FillThisBuffer(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_CONF_TraceBuffer(pBuffer);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "FillThisBuffer");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-OMX_ERRORTYPE Trace_SetCallbacks(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_CALLBACKTYPE* pCallbacks,
-        OMX_IN  OMX_PTR pAppData)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = pComp->SetCallbacks((OMX_HANDLETYPE)pComp, pCallbacks, pAppData);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- SetCallbacks(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpCallbacks = 0x%08x", pCallbacks);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppData = 0x%08x", pAppData);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "SetCallbacks");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-OMX_ERRORTYPE Trace_ComponentDeInit(
-        OMX_IN  OMX_HANDLETYPE hComponent)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->sComponentName;
-
-    pComp = ((OMX_CONF_COMPTRACERDATATYPE *)(((OMX_COMPONENTTYPE *)hComponent)->pApplicationPrivate))->pOrigComponent;
-    nMsec = OMX_OSAL_GetTime();
-    eError = (pComp->ComponentDeInit)((OMX_HANDLETYPE)pComp);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s<- ComponentDeInit(", sCompName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_LONG_TIMELIMIT, sCompName, "ComponentDeInit");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-/* Component Tracer methods */
-
-OMX_ERRORTYPE OMX_CONF_ComponentTracerCreate( OMX_IN OMX_HANDLETYPE hOrigComp,
-                                              OMX_IN OMX_STRING sComponentName,
-                                              OMX_OUT OMX_HANDLETYPE *phWrappedComp)
-{
-    OMX_CONF_COMPTRACERDATATYPE *pTracerData;
-    OMX_COMPONENTTYPE *pOrigComp;
-    OMX_COMPONENTTYPE *pWrappedComp;
-
-    pOrigComp = (OMX_COMPONENTTYPE *)hOrigComp;
-
-    /* Create wrapper */
-    pWrappedComp = (OMX_COMPONENTTYPE *)OMX_OSAL_Malloc(sizeof(OMX_COMPONENTTYPE));
-
-    /* Create tracer data structure. Store original component structure and component name. */
-    pTracerData = (OMX_CONF_COMPTRACERDATATYPE *)OMX_OSAL_Malloc(sizeof(OMX_CONF_COMPTRACERDATATYPE));
-    pTracerData->pOrigComponent = pOrigComp;
-    strcpy(pTracerData->sComponentName, sComponentName);
-    pWrappedComp->pApplicationPrivate = (OMX_PTR)pTracerData;
-
-    /* Copy all */
-    pWrappedComp->nSize = sizeof(OMX_COMPONENTTYPE);
-    pWrappedComp->nVersion = pOrigComp->nVersion;
-    pWrappedComp->pComponentPrivate = pOrigComp->pComponentPrivate;
-
-    /* Set function pointers to wrapper functions */
-    pWrappedComp->AllocateBuffer           = Trace_AllocateBuffer;
-    pWrappedComp->ComponentTunnelRequest   = Trace_ComponentTunnelRequest;
-    pWrappedComp->EmptyThisBuffer          = Trace_EmptyThisBuffer;
-    pWrappedComp->FillThisBuffer           = Trace_FillThisBuffer;
-    pWrappedComp->FreeBuffer               = Trace_FreeBuffer;
-    pWrappedComp->GetComponentVersion      = Trace_GetComponentVersion;
-    pWrappedComp->GetConfig                = Trace_GetConfig;
-    pWrappedComp->GetExtensionIndex        = Trace_GetExtensionIndex;
-    pWrappedComp->GetParameter             = Trace_GetParameter;
-    pWrappedComp->GetState                 = Trace_GetState;
-    pWrappedComp->ComponentDeInit          = Trace_ComponentDeInit;
-    pWrappedComp->SendCommand              = Trace_SendCommand;
-    pWrappedComp->SetCallbacks             = Trace_SetCallbacks;
-    pWrappedComp->SetConfig                = Trace_SetConfig;
-    pWrappedComp->SetParameter             = Trace_SetParameter;
-    pWrappedComp->UseBuffer                = Trace_UseBuffer;
-
-    *phWrappedComp = (OMX_HANDLETYPE)pWrappedComp;
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_ComponentTracerDestroy(OMX_IN OMX_HANDLETYPE hWrappedComp)
-{
-    OMX_COMPONENTTYPE *pWrappedComp;
-    pWrappedComp = (OMX_COMPONENTTYPE *)hWrappedComp;
-    if (hWrappedComp == NULL)
-        return OMX_ErrorNone;
-
-    OMX_OSAL_Free(pWrappedComp->pApplicationPrivate);
-    OMX_OSAL_Free(pWrappedComp);
-    return OMX_ErrorNone;
-}
-
-/**************************************************************
- * CALLBACK TRACER - wraps an existing callback structure
- * with functions that trace calls, parameters, and return
- * values.
- **************************************************************/
-
-typedef struct OMX_CONF_APPDATAWRAPPERTYPE {
-    OMX_PTR pOrigAppData;
-    char sComponentName[256];
-    OMX_CALLBACKTYPE *pOrigCallbacks;
-} OMX_CONF_APPDATAWRAPPERTYPE;
-
-/* wrapper functions */
-
-OMX_ERRORTYPE Trace_EventHandler(
-    OMX_IN OMX_HANDLETYPE hComponent,
-    OMX_IN OMX_PTR pAppData,
-    OMX_IN OMX_EVENTTYPE eEvent,
-    OMX_IN OMX_U32 nData1,
-    OMX_IN OMX_U32 nData2,
-    OMX_IN OMX_PTR pEventData)
-{
-    OMX_ERRORTYPE eError;
-    OMX_CONF_APPDATAWRAPPERTYPE *pAppDataWrapper;
-    OMX_U32 nMsec;
-    char sEventName[256];
-    char sCmdName[256];
-    char sStateName[256];
-    char sErrorName[256];
-    OMX_STRING sCompName;
-
-    pAppDataWrapper = (OMX_CONF_APPDATAWRAPPERTYPE *)pAppData;
-
-    nMsec = OMX_OSAL_GetTime();
-    eError = pAppDataWrapper->pOrigCallbacks->EventHandler(hComponent, pAppDataWrapper->pOrigAppData,
-        eEvent, nData1, nData2, pEventData);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-    sCompName = pAppDataWrapper->sComponentName;
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s-> EventHandler(", pAppDataWrapper->sComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppData = 0x%08x", pAppData);
-    if (OMX_ErrorNone == OMX_CONF_EventToString(eEvent, sEventName)){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\teEvent = %s", sEventName);
-    }else {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\teEvent = 0x%08x", eEvent);
-    }
-    switch(eEvent)
-    {
-    case OMX_EventCmdComplete:
-        if (OMX_ErrorNone == OMX_CONF_CommandToString(nData1,sCmdName)){
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tCommand(nData1) = %s", sCmdName);
-        } else {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tCommand(nData1) = 0x%08x", nData1);
-        }
-        switch ((OMX_COMMANDTYPE)nData1)
-        {
-        case OMX_CommandPortDisable:
-        case OMX_CommandPortEnable:
-        case OMX_CommandFlush:
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex(nData2) = 0x%08x", nData2);
-            break;
-        case OMX_CommandStateSet:
-            if (OMX_ErrorNone == OMX_CONF_StateToString((OMX_STATETYPE)nData2, sStateName)){
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tstate(nData2) = %s", sStateName);
-            } else {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tstate(nData2) = 0x%08x", nData2);
-            }
-        default:
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData2 = 0x%08x", nData2);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpEventData = 0x%08x", pEventData);
-        break;
-    case OMX_EventError:
-        if (OMX_ErrorNone == OMX_CONF_ErrorToString((OMX_ERRORTYPE)nData1, sErrorName)){
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "\n\terror(nData2) = %s", sErrorName);
-        } else {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "\n\terror(nData2) = 0x%08x", nData1);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData2 = 0x%08x", nData2);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpEventData = 0x%08x", pEventData);
-        break;
-    case OMX_EventMark:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData1 = 0x%08x", nData1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData2 = 0x%08x", nData2);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpMarkData(pEventData) = 0x%08x", pEventData);
-        break;
-    case OMX_EventPortSettingsChanged:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tPortIndex(nData1) = 0x%08x", nData1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData2 = 0x%08x", nData2);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpEventData = 0x%08x", pEventData);
-        break;
-    case OMX_EventBufferFlag:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnPortIndex(nData1) = 0x%08x", nData1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnFlags(nData2) = 0x%08x", nData2);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpEventData = 0x%08x", pEventData);
-    default:
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData1 = 0x%08x", nData1);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tnData2 = 0x%08x", nData2);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpEventData = 0x%08x", pEventData);
-    }
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "EventHandler");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-OMX_ERRORTYPE Trace_EmptyBufferDone(
-    OMX_OUT OMX_HANDLETYPE hComponent,
-    OMX_OUT OMX_PTR pAppData,
-    OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_CONF_APPDATAWRAPPERTYPE *pAppDataWrapper;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName;
-
-    pAppDataWrapper = (OMX_CONF_APPDATAWRAPPERTYPE *)pAppData;
-    sCompName = pAppDataWrapper->sComponentName;
-
-    nMsec = OMX_OSAL_GetTime();
-    eError = pAppDataWrapper->pOrigCallbacks->EmptyBufferDone(hComponent, pAppDataWrapper->pOrigAppData, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s-> EmptyBufferDone(", pAppDataWrapper->sComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppData = 0x%08x", pAppData);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_CONF_TraceBuffer(pBuffer);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "EmptyBufferDone");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-OMX_ERRORTYPE Trace_FillBufferDone(
-    OMX_OUT OMX_HANDLETYPE hComponent,
-    OMX_OUT OMX_PTR pAppData,
-    OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer)
-{
-    OMX_ERRORTYPE eError;
-    OMX_CONF_APPDATAWRAPPERTYPE *pAppDataWrapper;
-    OMX_U32 nMsec;
-    OMX_STRING sCompName;
-
-    pAppDataWrapper = (OMX_CONF_APPDATAWRAPPERTYPE *)pAppData;
-    sCompName = pAppDataWrapper->sComponentName;
-
-    nMsec = OMX_OSAL_GetTime();
-    eError = pAppDataWrapper->pOrigCallbacks->FillBufferDone( hComponent, pAppDataWrapper->pOrigAppData, pBuffer);
-    nMsec = OMX_OSAL_GetTime() - nMsec;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_CALLSEQUENCE, "%s-> FillBufferDone(", pAppDataWrapper->sComponentName);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpAppData = 0x%08x", pAppData);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_PARAMETERS, "\n\tpBuffer = 0x%08x", pBuffer);
-    OMX_CONF_TraceBuffer(pBuffer);
-    OMX_OSAL_TraceResultAndTime(eError,nMsec,OMX_CONF_SHORT_TIMELIMIT, sCompName, "FillBufferDone");
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return eError;
-}
-
-/* Callback tracer methods */
-
-OMX_ERRORTYPE OMX_CONF_CallbackTracerCreate( OMX_IN OMX_CALLBACKTYPE *pOrigCallbacks,
-                                             OMX_IN OMX_PTR pOrigAppData,
-                                             OMX_IN OMX_STRING sComponentName,
-                                             OMX_OUT OMX_CALLBACKTYPE **ppWrappedCallbacks,
-                                             OMX_OUT OMX_PTR *ppWrappedAppData)
-{
-    /* Create callback wrapper */
-    *ppWrappedCallbacks = (OMX_CALLBACKTYPE *)OMX_OSAL_Malloc(sizeof(OMX_CALLBACKTYPE));
-
-    /* Set function pointers to wrapper functions */
-    (*ppWrappedCallbacks)->EventHandler    = Trace_EventHandler;
-    (*ppWrappedCallbacks)->FillBufferDone        = Trace_FillBufferDone;
-    (*ppWrappedCallbacks)->EmptyBufferDone       = Trace_EmptyBufferDone;
-
-    /* Create app data wrapper */
-    *ppWrappedAppData = (OMX_PTR)OMX_OSAL_Malloc(sizeof(OMX_CONF_APPDATAWRAPPERTYPE));
-
-    /* Store original values */
-    ((OMX_CONF_APPDATAWRAPPERTYPE*)*ppWrappedAppData)->pOrigCallbacks = pOrigCallbacks;
-    ((OMX_CONF_APPDATAWRAPPERTYPE*)*ppWrappedAppData)->pOrigAppData = pOrigAppData;
-    strcpy(((OMX_CONF_APPDATAWRAPPERTYPE*)*ppWrappedAppData)->sComponentName, sComponentName);
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_CallbackTracerDestroy(OMX_IN OMX_CALLBACKTYPE *pWrappedCallbacks,
-                                             OMX_OUT OMX_PTR *pWrappedAppData)
-{
-   OMX_OSAL_Free(pWrappedCallbacks);
-   OMX_OSAL_Free(pWrappedAppData);
-   return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_OSAL_GetTracePrefix(OMX_IN OMX_U32 nTraceFlags, OMX_OUT OMX_STRING szPrefix)
-{
-    switch(nTraceFlags)
-    {
-    case OMX_OSAL_TRACE_PASSFAIL:
-        szPrefix[0] = '*';
-        szPrefix[1] = '*';
-        szPrefix[2] = '*';
-        szPrefix[3] = '\0';
-        break;
-    case OMX_OSAL_TRACE_CALLSEQUENCE:
-        szPrefix[0] = '=';
-        szPrefix[1] = '\0';
-        break;
-    case OMX_OSAL_TRACE_INFO:
-        szPrefix[0] = '-';
-        szPrefix[1] = '\0';
-        break;
-    case OMX_OSAL_TRACE_ERROR:
-        szPrefix[0] = '!';
-        szPrefix[1] = '!';
-        szPrefix[2] = '!';
-        szPrefix[3] = '\0';
-        break;
-    case OMX_OSAL_TRACE_WARNING:
-        szPrefix[0] = '^';
-        szPrefix[1] = '^';
-        szPrefix[2] = '^';
-        szPrefix[3] = '\0';
-        break;
-    case OMX_OSAL_TRACE_PARAMETERS:
-    case OMX_OSAL_TRACE_BUFFER:
-    default:
-        szPrefix[0] = '\0';
-    }
-
-    return OMX_ErrorNone;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.c
deleted file mode 100644 (file)
index 91c9afa..0000000
+++ /dev/null
@@ -1,1221 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_CONF_TunnelTestComponent.c
- *  Common "Tunnel Test Component" as described in OpenMax IL Conformance Test Document used by
- *  Interop tests.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "OMX_CONF_TunnelTestComponent.h"
-#include "OMX_CONF_StubbedComponent.h"
-#include "OMX_CONF_TestHarness.h"
-#include <stdlib.h>
-#include <string.h>
-
-#define NO_MINSIZE 0x7fffffff
-
-OMX_ERRORTYPE TTCCreateInvalidPortTypes(OMX_IN  OMX_HANDLETYPE hTTC, OMX_IN  OMX_U8 bCreateInvalid)
-{
-    TTCDATATYPE *pData;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-    pData->bCreateInvalidPorts = bCreateInvalid;
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCDontSupportIndexParamCompBufferSupplier(OMX_IN  OMX_HANDLETYPE hTTC, OMX_IN  OMX_U8 bSupportIndex)
-{
-    TTCDATATYPE *pData;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-    pData->bDontSupportIndexParamCompBufferSupplier = bSupportIndex;
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCInvertBufferSupplier(OMX_IN  OMX_HANDLETYPE hTTC, OMX_IN  OMX_U8 bInvert)
-{
-    TTCDATATYPE *pData;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-    pData->bInvertBufferSupplier = bInvert;
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCDontSupportUseBuffer(OMX_IN  OMX_HANDLETYPE hTTC, OMX_IN  OMX_U8 bSupportUseBuffer)
-{
-    TTCDATATYPE *pData;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-    pData->bDontDoUseBuffer = bSupportUseBuffer;
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCSetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent, 
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_IN  OMX_PTR ComponentParameterStructure);
-
-OMX_ERRORTYPE TTCConnectPort(OMX_HANDLETYPE hTTC, OMX_HANDLETYPE hCUT, OMX_U32 iCUTPort)
-{
-    OMX_PARAM_PORTDEFINITIONTYPE oTTCPort, oCUTPort;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oTTCSupplier;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oCUTSupplier;
-    OMX_ERRORTYPE eError;
-    TTCDATATYPE *pData;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-
-    INIT_PARAM(oTTCSupplier);
-    INIT_PARAM(oCUTSupplier);
-    INIT_PARAM(oCUTPort);
-    INIT_PARAM(oTTCPort);
-    
-    /* get CUT port definition */
-    oCUTPort.nPortIndex = iCUTPort;
-    TTC_RETURN_ANY_ERROR(eError = OMX_GetParameter(hCUT, OMX_IndexParamPortDefinition, &oCUTPort));
-
-    /* Setup the TTC's port to be identical to CUT port except in the opposite direction */
-    /* Setup the TTC's port to prefer that the CUT allocate buffers */
-    /* We can only do this because this is the tunnel test component. */
-    oTTCSupplier.nPortIndex = pData->nUsedPorts;
-    oTTCPort = oCUTPort;
-    oTTCPort.nPortIndex = pData->nUsedPorts;
-
-    /* Create an invalid type if asked */
-    if (pData->bCreateInvalidPorts){
-        switch (oCUTPort.eDomain) {
-        case OMX_PortDomainAudio:
-            oTTCPort.format.audio.eEncoding = OMX_AUDIO_CodingMax;
-            break;
-
-        case OMX_PortDomainVideo:
-            oTTCPort.format.video.eCompressionFormat = OMX_VIDEO_CodingMax;
-            break;
-
-        case OMX_PortDomainImage:
-            oTTCPort.format.image.eCompressionFormat = OMX_IMAGE_CodingMax;
-            break;
-        default:
-        case OMX_PortDomainOther:
-            oTTCPort.format.other.eFormat = OMX_OTHER_FormatMax;
-            break;
-        }
-    }
-
-    if (oCUTPort.eDir == OMX_DirInput){
-        oTTCPort.eDir = OMX_DirOutput;
-        oTTCSupplier.eBufferSupplier = OMX_BufferSupplyInput;
-    } else { /* OMX_DirOutput */
-        oTTCPort.eDir = OMX_DirInput;
-        oTTCSupplier.eBufferSupplier = OMX_BufferSupplyOutput;
-    }
-    if (pData->bInvertBufferSupplier) {
-        oCUTSupplier.nSize = sizeof(oCUTSupplier);
-        oCUTSupplier.nPortIndex = iCUTPort;
-        oCUTSupplier.nVersion = g_OMX_CONF_Version;
-        TTC_RETURN_ANY_ERROR(eError = OMX_GetParameter(hCUT, OMX_IndexParamCompBufferSupplier, &oCUTSupplier));
-        if (oCUTSupplier.eBufferSupplier == OMX_BufferSupplyUnspecified) {
-            oCUTSupplier.eBufferSupplier = OMX_BufferSupplyOutput;
-            TTC_RETURN_ANY_ERROR(eError = OMX_SetParameter(hCUT, OMX_IndexParamCompBufferSupplier, &oCUTSupplier));
-        }
-    }
-
-    TTC_RETURN_ANY_ERROR(eError = TTCSetParameter(hTTC, OMX_IndexParamPortDefinition, &oTTCPort));
-    TTCSetParameter(hTTC, OMX_IndexParamCompBufferSupplier, &oTTCSupplier);
-
-    /* create a tunnel between TTC port and CUT port depending on direction */
-    if (oCUTPort.eDir == OMX_DirInput)
-    {
-        /* CUT port is an input: TTC to CUT */
-        TTC_RETURN_ANY_ERROR(eError = OMX_SetupTunnel(hTTC, pData->nUsedPorts, hCUT, iCUTPort));
-    } 
-    else  /* OMX_DirOutput */
-    {
-        /* CUT port is an output CUT to TTC */
-        TTC_RETURN_ANY_ERROR(eError = OMX_SetupTunnel(hCUT, iCUTPort, hTTC, pData->nUsedPorts));
-    }
-    pData->nUsedPorts++;
-
-    return eError;
-}
-
-OMX_ERRORTYPE TTCDisconnectAllPorts(OMX_IN  OMX_HANDLETYPE hTTC)
-{
-    TTCDATATYPE *pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTTC)->pComponentPrivate);
-    OMX_U32 i;
-    TTCPORTTYPE *pPort;
-
-    for (i = 0, pPort = &pData->oPort[0]; i < pData->nUsedPorts; i++, pPort++) {
-        if (pPort->hTunnelComponent) {
-            /* tell the component to disconnect the tunnel if we're still connected */
-            ((OMX_COMPONENTTYPE *)pPort->hTunnelComponent)->ComponentTunnelRequest(pPort->hTunnelComponent, pPort->nTunnelPort,
-                                                                                   NULL, 0, NULL);
-        }
-        pPort->hTunnelComponent = 0;
-        pPort->nTunnelPort = 0;
-        pPort->eSupplierSetting = OMX_BufferSupplyUnspecified;
-    }
-
-    pData->nUsedPorts = 0;
-    return OMX_ErrorNone;
-}
-
-static OMX_ERRORTYPE TTCConnectDomainPorts(OMX_INDEXTYPE eIndexParamDomainInit, OMX_HANDLETYPE hTTC, OMX_HANDLETYPE hCUT)
-{
-    OMX_PORT_PARAM_TYPE oParam;
-    OMX_U32 i;
-    OMX_U32 iCUTPort;
-    OMX_ERRORTYPE eError;
-
-    INIT_PARAM(oParam);
-
-    /* query the component's other ports */
-    TTC_RETURN_ANY_ERROR(eError = OMX_GetParameter(hCUT, eIndexParamDomainInit, &oParam));
-
-    /* for each discovered port */
-    for (i=0;i<oParam.nPorts;i++)
-    {        
-        iCUTPort = oParam.nStartPortNumber + i;
-        TTC_RETURN_ANY_ERROR(eError = TTCConnectPort(hTTC, hCUT, iCUTPort));
-    }
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_TTCConnectAllPorts(    
-    OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-    OMX_IN  OMX_HANDLETYPE hComponentUnderTest)
-{
-    OMX_ERRORTYPE eError = OMX_ErrorNone;
-    if (OMX_ErrorNone != (eError = TTCConnectDomainPorts(OMX_IndexParamAudioInit, hTunnelTestComponent, hComponentUnderTest))) return eError;
-    if (OMX_ErrorNone != (eError = TTCConnectDomainPorts(OMX_IndexParamVideoInit, hTunnelTestComponent, hComponentUnderTest))) return eError;
-    if (OMX_ErrorNone != (eError = TTCConnectDomainPorts(OMX_IndexParamImageInit, hTunnelTestComponent, hComponentUnderTest))) return eError;
-    if (OMX_ErrorNone != (eError = TTCConnectDomainPorts(OMX_IndexParamOtherInit, hTunnelTestComponent, hComponentUnderTest))) return eError;
-
-    return eError;
-}
-
-/* Allows a conformance test to specify a callback (back to the test) to be called on EmptyThisBuffer calls */ 
-OMX_ERRORTYPE OMX_CONF_SetTTCOnEmptyThisBuffer(    
-    OMX_IN  OMX_HANDLETYPE hComponent,
-    OMX_ERRORTYPE (*OnEmptyThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-)
-{
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    pData->OnEmptyThisBuffer = OnEmptyThisBuffer;
-    return OMX_ErrorNone;
-}
-
-/* Allows a conformance test to specify a callback (back to the test) to be called on FillThisBuffer calls */ 
-OMX_ERRORTYPE OMX_CONF_SetTTCOnFillThisBuffer(    
-    OMX_IN  OMX_HANDLETYPE hComponent,
-    OMX_ERRORTYPE (*OnFillThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-)
-{
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    pData->OnFillThisBuffer = OnFillThisBuffer;
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_SetTTCOnInvalidPayloadSize(
-    OMX_IN  OMX_HANDLETYPE hComponent,
-    OMX_ERRORTYPE (*OnInvalidPayloadSize)(OMX_IN OMX_U32 nOutPort, OMX_IN OMX_U32 nMin, OMX_IN OMX_U32 nActual)
-    )
-{
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    pData->OnInvalidPayloadSize = OnInvalidPayloadSize;
-    return OMX_ErrorNone;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.SetCallbacks */
-OMX_ERRORTYPE TTCSetCallbacks(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_CALLBACKTYPE* pCallbacks, 
-        OMX_IN  OMX_PTR pAppData)
-{
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    pData->pCallbacks = pCallbacks;
-    pData->pAppData = pAppData;
-
-    return OMX_ErrorNone; 
-}
-
-static OMX_ERRORTYPE TTCFillInitStructure(OMX_HANDLETYPE hComponent,
-    OMX_IN OMX_INDEXTYPE nPortDefParamIndex, OMX_INOUT OMX_PTR pComponentParameterStructure)
-{
-    OMX_PORT_PARAM_TYPE* pInitStruct = pComponentParameterStructure;
-    unsigned i, nFirstPort, nLastPort;
-    TTCDATATYPE *pData; 
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    nFirstPort = nLastPort = pData->nUsedPorts;
-    for (i = 0; i < pData->nUsedPorts; i++) {
-        if (pData->oPort[i].nPortDefParamIndex == nPortDefParamIndex)
-        {
-            if (nFirstPort > i)
-                nFirstPort = i;
-            nLastPort = i;
-        }
-        else if (nFirstPort < i)
-            break;
-    }
-    if (nFirstPort < pData->nUsedPorts)
-    {
-        pInitStruct->nPorts = nLastPort-nFirstPort+1;
-        pInitStruct->nStartPortNumber = nFirstPort;
-        return OMX_ErrorNone;
-    }
-    else
-    {
-        pInitStruct->nPorts = 0;
-        pInitStruct->nStartPortNumber = 0;
-        return OMX_ErrorNone;
-    }
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.GetParameter */
-OMX_ERRORTYPE TTCGetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent, 
-        OMX_IN  OMX_INDEXTYPE nParamIndex,  
-        OMX_INOUT OMX_PTR ComponentParameterStructure)
-{   
-    OMX_PARAM_PORTDEFINITIONTYPE *pPortDef;
-    OMX_PARAM_BUFFERSUPPLIERTYPE *pSupplier;
-    TTCDATATYPE *pData;
-    TTCPORTTYPE *pPort;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    switch(nParamIndex)
-    {
-    case OMX_IndexParamAudioInit: 
-        return TTCFillInitStructure(hComponent, OMX_PortDomainAudio, ComponentParameterStructure);
-    case OMX_IndexParamOtherInit:
-        return TTCFillInitStructure(hComponent, OMX_PortDomainOther, ComponentParameterStructure);
-    case OMX_IndexParamVideoInit:
-        return TTCFillInitStructure(hComponent, OMX_PortDomainVideo, ComponentParameterStructure);
-    case OMX_IndexParamImageInit:
-        return TTCFillInitStructure(hComponent, OMX_PortDomainImage, ComponentParameterStructure);
-
-    case OMX_IndexParamPortDefinition:            
-        pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE *)ComponentParameterStructure;
-        *pPortDef = pData->oPort[pPortDef->nPortIndex].oPortDef;
-        return OMX_ErrorNone;
-
-    case OMX_IndexParamCompBufferSupplier:
-        if (pData->bDontSupportIndexParamCompBufferSupplier)
-            return OMX_ErrorNotImplemented;
-
-        pSupplier = (OMX_PARAM_BUFFERSUPPLIERTYPE *)ComponentParameterStructure;
-        pPort = &pData->oPort[pSupplier->nPortIndex];
-        if (pPort->hTunnelComponent){
-            pSupplier->eBufferSupplier = pPort->eSupplierSetting;
-        } else {
-            pSupplier->eBufferSupplier = pPort->eSupplierPreference;
-        }
-        return OMX_ErrorNone;
-
-       default:
-               return OMX_ErrorBadParameter;
-    }
-    return OMX_ErrorBadParameter; 
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.SetParameter */
-OMX_ERRORTYPE TTCSetParameter(
-        OMX_IN  OMX_HANDLETYPE hComponent, 
-        OMX_IN  OMX_INDEXTYPE nIndex,
-        OMX_IN  OMX_PTR ComponentParameterStructure)
-{   
-    OMX_PARAM_PORTDEFINITIONTYPE *pPortDef;
-    OMX_PARAM_BUFFERSUPPLIERTYPE *pSupplier;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oTunnelBufferSupply;
-    TTCDATATYPE *pData;
-    TTCPORTTYPE *pPort;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    switch(nIndex)
-    {
-    case OMX_IndexParamPortDefinition:            
-        pPortDef = (OMX_PARAM_PORTDEFINITIONTYPE *)ComponentParameterStructure;
-        pPort = &pData->oPort[pPortDef->nPortIndex];
-        pPort->nPreferredCount = pPortDef->nBufferCountMin;
-        pPort->nPreferredSize = pPortDef->nBufferSize;
-        pPort->oPortDef = *pPortDef;
-        return OMX_ErrorNone;
-    case OMX_IndexParamCompBufferSupplier:
-        if (pData->bDontSupportIndexParamCompBufferSupplier)
-            return OMX_ErrorNotImplemented;
-
-        pSupplier = (OMX_PARAM_BUFFERSUPPLIERTYPE *)ComponentParameterStructure;
-        pPort = &pData->oPort[pSupplier->nPortIndex];
-        if (pPort->hTunnelComponent){
-            pPort->eSupplierSetting = pSupplier->eBufferSupplier;
-            if (pPort->oPortDef.eDir == OMX_DirInput){
-                oTunnelBufferSupply = *pSupplier;
-                oTunnelBufferSupply.nPortIndex = pPort->nTunnelPort;
-                return OMX_SetParameter(pPort->hTunnelComponent, OMX_IndexParamCompBufferSupplier, &oTunnelBufferSupply);
-            }
-        } else {
-            pPort->eSupplierPreference = pSupplier->eBufferSupplier;            
-        }
-        return OMX_ErrorNone;
-
-       default:
-               return OMX_ErrorBadParameter;
-    }
-    return OMX_ErrorBadParameter; 
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.DeInit */
-OMX_ERRORTYPE TTCDeInit(
-        OMX_IN  OMX_HANDLETYPE hComponent)
-{ 
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-
-    OMX_OSAL_EventDestroy(pData->hBufferCountEvent);
-    OMX_OSAL_MutexDestroy(pData->hMutex);
-    OMX_OSAL_EventDestroy(pData->hHoldingBuffersEvent);
-
-    OMX_OSAL_Free(pData);
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCTunnelVerifyConnection(TTCPORTTYPE *pPort, OMX_HANDLETYPE hTunneledComp)
-{
-    /* 1.4 Check if input port is compatible with output port */
-    OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
-    OMX_ERRORTYPE error = OMX_ErrorNone;
-
-   oPortDef.nSize = sizeof(oPortDef);
-   oPortDef.nVersion = g_OMX_CONF_Version;
-   oPortDef.nPortIndex = pPort->nTunnelPort;
-   if (OMX_ErrorNone != 
-       (error = OMX_GetParameter( hTunneledComp, OMX_IndexParamPortDefinition, &oPortDef))) return error;
-   switch(pPort->oPortDef.eDomain)
-   {
-   case OMX_PortDomainOther:
-       if (pPort->oPortDef.format.other.eFormat!= oPortDef.format.other.eFormat) 
-        {
-            pPort->hTunnelComponent = 0; 
-            pPort->nTunnelPort      = 0;
-            return OMX_ErrorPortsNotCompatible;
-        }
-        break;
-    case OMX_PortDomainAudio:
-        if (pPort->oPortDef.format.audio.eEncoding != oPortDef.format.audio.eEncoding) 
-        {
-            pPort->hTunnelComponent = 0; 
-            pPort->nTunnelPort      = 0;
-            return OMX_ErrorPortsNotCompatible;
-        }
-        break;
-    case OMX_PortDomainVideo:
-        if (pPort->oPortDef.format.video.eCompressionFormat != oPortDef.format.video.eCompressionFormat) 
-        {
-            pPort->hTunnelComponent = 0; 
-            pPort->nTunnelPort      = 0;
-            return OMX_ErrorPortsNotCompatible;
-        }
-        break;
-    case OMX_PortDomainImage:
-        if (pPort->oPortDef.format.image.eCompressionFormat != oPortDef.format.image.eCompressionFormat) 
-        {
-            pPort->hTunnelComponent = 0; 
-            pPort->nTunnelPort      = 0;
-            return OMX_ErrorPortsNotCompatible;
-        }
-        break;
-    default: 
-        pPort->hTunnelComponent = 0;
-        pPort->nTunnelPort      = 0;
-        return OMX_ErrorPortsNotCompatible; /* Our current port is not set up correctly */
-    }
-    return error;
-}
-
-OMX_ERRORTYPE TTCPortGetMinPayloadSize(TTCPORTTYPE *pPort)
-{
-    OMX_AUDIO_PARAM_PCMMODETYPE oPcm;
-
-    pPort->nMinBytes = NO_MINSIZE; /* default to a very large size */
-
-    switch(pPort->oPortDef.eDomain){
-    case OMX_PortDomainAudio:
-        if (pPort->oPortDef.format.audio.eEncoding == OMX_AUDIO_CodingPCM)
-        {
-            oPcm.nSize = sizeof(oPcm);
-            oPcm.nVersion = g_OMX_CONF_Version;
-            oPcm.nPortIndex = pPort->nTunnelPort;
-            if (OMX_ErrorNone == OMX_GetParameter(pPort->hTunnelComponent, OMX_IndexParamAudioPcm, &oPcm)){
-                pPort->nMinBytes = 
-                    (oPcm.nBitPerSample * oPcm.nChannels * oPcm.nSamplingRate) /* bits per sec */
-                    /( (1000/OMX_MIN_PCMPAYLOAD_MSEC) /* Divide by number of time segments in a second */
-                        *8);                          /* and by 8 bits per byte */
-            }
-        }
-        break;
-    case OMX_PortDomainVideo:
-        if ((pPort->oPortDef.format.video.eCompressionFormat == OMX_VIDEO_CodingUnused) &&
-            (pPort->oPortDef.format.video.eColorFormat != OMX_COLOR_FormatUnused))
-        {
-            pPort->nMinBytes = pPort->oPortDef.format.video.nStride * 
-                pPort->oPortDef.format.video.nSliceHeight;
-
-            pPort->nPlaneBytesTotal = pPort->oPortDef.format.video.nStride * 
-                pPort->oPortDef.format.video.nFrameHeight;
-        }
-        break;
-    case OMX_PortDomainImage:
-        if ((pPort->oPortDef.format.image.eCompressionFormat == OMX_IMAGE_CodingUnused) &&
-            (pPort->oPortDef.format.image.eColorFormat != OMX_COLOR_FormatUnused))
-        {
-            pPort->nMinBytes = pPort->oPortDef.format.image.nStride * 
-                pPort->oPortDef.format.image.nSliceHeight; 
-        }
-        break;               
-    default:
-    case OMX_PortDomainOther:
-        pPort->nMinBytes = 0;
-        break;               
-    }
-    return OMX_ErrorNone;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.TunnelRequest */
-OMX_ERRORTYPE TTCTunnelRequest(
-    OMX_IN  OMX_HANDLETYPE hComp,
-    OMX_IN  OMX_U32 nPort,
-    OMX_IN  OMX_HANDLETYPE hTunneledComp,
-    OMX_IN  OMX_U32 nTunneledPort,
-    OMX_INOUT  OMX_TUNNELSETUPTYPE* pTunnelSetup)
-{
-    OMX_ERRORTYPE error = OMX_ErrorNone;
-    TTCDATATYPE *pData;
-    TTCPORTTYPE *pPort;
-    OMX_PARAM_BUFFERSUPPLIERTYPE oSupplier;
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComp)->pComponentPrivate);
-    pPort = &pData->oPort[nPort];
-
-    if (pTunnelSetup == NULL || hTunneledComp == 0) {
-        /* cancel previous tunnel */
-        pPort->hTunnelComponent = 0;
-        pPort->nTunnelPort = 0;
-        pPort->eSupplierSetting = OMX_BufferSupplyUnspecified;
-    }
-    else {
-        if (pPort->oPortDef.eDir != OMX_DirInput && pPort->oPortDef.eDir != OMX_DirOutput) return OMX_ErrorBadParameter;
-
-        pPort->hTunnelComponent = hTunneledComp;
-        pPort->nTunnelPort = nTunneledPort;
-
-        if (pPort->oPortDef.eDir == OMX_DirOutput) {
-            /* first call, where we're the output (source of data) */
-
-            pTunnelSetup->eSupplier = pPort->eSupplierSetting;
-        }
-        else {
-            /* second call, where we're the input (sink of data) */
-            error = TTCTunnelVerifyConnection(pPort, hTunneledComp);
-            if(OMX_ErrorNone != error)
-            {
-                /* Invalid connection formats. Return error */
-                return OMX_ErrorPortsNotCompatible;
-            }
-           
-            /* If specified obey output port's preferences. Otherwise choose CUT (output). */
-            if (pData->bInvertBufferSupplier) {
-                if (pTunnelSetup->eSupplier == OMX_BufferSupplyInput)
-                    pPort->eSupplierSetting = OMX_BufferSupplyOutput;
-                else
-                    pPort->eSupplierSetting = OMX_BufferSupplyInput;
-            }
-            else {
-                pPort->eSupplierSetting = pTunnelSetup->eSupplier;
-            }
-            if (OMX_BufferSupplyUnspecified == pPort->eSupplierSetting){
-                pPort->eSupplierSetting = pTunnelSetup->eSupplier = OMX_BufferSupplyOutput;
-            }
-
-            /* Tell the output port who the supplier is */
-            oSupplier.nSize = sizeof(oSupplier);
-            oSupplier.nVersion = g_OMX_CONF_Version;
-            oSupplier.nPortIndex = nTunneledPort;
-            oSupplier.eBufferSupplier = pPort->eSupplierSetting;
-            error = OMX_SetParameter(hTunneledComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
-
-            if (pData->bInvertBufferSupplier) {
-                oSupplier.nSize = sizeof(oSupplier);
-                oSupplier.nVersion = g_OMX_CONF_Version;
-                oSupplier.nPortIndex = nTunneledPort;
-                error = OMX_GetParameter(hTunneledComp, OMX_IndexParamCompBufferSupplier, &oSupplier);
-                if (oSupplier.eBufferSupplier != pPort->eSupplierSetting) {
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "- SetParameter: OMX_IndexParamCompBufferSupplier failed to change setting\n" );
-                    return OMX_ErrorUndefined;
-                }
-            }
-        }
-
-        /* determine min playload size if any */
-        TTCPortGetMinPayloadSize(pPort);
-
-    }
-    return error;
-}
-
-/* TTC calls this on transition to idle to allocate buffers for a supplier port */
-OMX_ERRORTYPE TTCUpdatePortBufferInfo(TTCPORTTYPE *pPort)
-{
-    OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
-
-    /* initialize buffer info to this ports preferences first */
-    pPort->nBufferCount = pPort->nPreferredCount;
-    pPort->nBufferSize = pPort->nPreferredSize;
-
-    oPortDef.nVersion = g_OMX_CONF_Version;
-    oPortDef.nSize = sizeof(oPortDef);
-    oPortDef.nPortIndex = pPort->nTunnelPort;
-    if (OMX_ErrorNone != OMX_GetParameter(pPort->hTunnelComponent, OMX_IndexParamPortDefinition, &oPortDef)){
-        return OMX_ErrorUndefined;
-    }
-    if (oPortDef.nBufferCountMin >= MAX_TTCBUFFERS) {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "TunnelTestComponent: CUT needs too many buffer (%d min for CUT, %d max for TTC)\n", oPortDef.nBufferCountMin, MAX_TTCBUFFERS);
-        return OMX_ErrorUndefined;
-    }
-
-    if (pPort->nBufferCount < oPortDef.nBufferCountMin) pPort->nBufferCount = oPortDef.nBufferCountMin;
-    if (pPort->nBufferSize < oPortDef.nBufferSize) pPort->nBufferSize = oPortDef.nBufferSize;
-
-   return OMX_ErrorNone;
-}
-
-/* Returns true is and only if the port is a supplier */
-OMX_BOOL TTCPortIsSupplier(TTCPORTTYPE *pPort)
-{
-    if ((pPort->oPortDef.eDir == OMX_DirInput && pPort->eSupplierSetting == OMX_BufferSupplyInput) ||
-        (pPort->oPortDef.eDir == OMX_DirOutput && pPort->eSupplierSetting == OMX_BufferSupplyOutput))
-    {
-        return OMX_TRUE;
-    }
-    return OMX_FALSE;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.SendCommand */
-OMX_ERRORTYPE TTCSendCommand(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_COMMANDTYPE Cmd,
-        OMX_IN  OMX_U32 nParam1,
-        OMX_IN  OMX_PTR pCmdData)
-{   
-    TTCDATATYPE *pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-    TTCPORTTYPE *pPort;
-    OMX_ERRORTYPE eError;
-    OMX_U32 i,j;
-
-    UNUSED_PARAMETER(pCmdData);
-
-    switch(Cmd){
-    case OMX_CommandStateSet:
-        /* skip error checking - trust conformance test */
-
-        /* if transitioning to idle then allocate buffers for any supplier ports*/
-        if (OMX_StateIdle == (OMX_STATETYPE)nParam1 && pData->eState == OMX_StateLoaded)
-        {
-            for (i=0;i<MAX_TTCPORTS;i++)
-            {
-                pPort = &(pData->oPort[i]);
-                /* if port is tunneling and is the supplier*/
-                if (pPort->hTunnelComponent &&  TTCPortIsSupplier(pPort)) 
-                {
-                    if (OMX_ErrorNone != (eError = TTCUpdatePortBufferInfo(pPort))) return eError;
-
-                    /* allocate buffers and pass them to non-supplier port */
-                    for (j=0;j<pPort->nBufferCount;j++)
-                    {
-                        pPort->pBuffer[j] = OMX_OSAL_Malloc(pPort->nBufferSize);
-                        if (OMX_ErrorNone != (eError = OMX_UseBuffer(pPort->hTunnelComponent, &pPort->pBufferHdr[j],
-                            pPort->nTunnelPort, pPort, pPort->nBufferSize, pPort->pBuffer[j]))) return eError;
-                    }
-                }   
-                /* if tunneling with an input open the file that will feed the input*/
-                if (pPort->hTunnelComponent){
-                    if (pPort->oPortDef.eDir == OMX_DirOutput){
-                        eError = OMX_OSAL_OpenInputFile(pPort->nTunnelPort);
-                    } else { /* input */ 
-                        eError = OMX_OSAL_OpenOutputFile(pPort->nTunnelPort);                    
-                    }
-                    if (eError != OMX_ErrorNone && eError != OMX_ErrorBadParameter) {
-                        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "TTC: file open on port %d failed\n", pPort->nTunnelPort);
-                        return eError;
-                    }
-                }    
-            }
-        }
-        if (OMX_StateLoaded == (OMX_STATETYPE)nParam1)
-        {
-            for(i=0;i<MAX_TTCPORTS;i++)
-            {
-                /* deallocate any buffers if we are supplier - because of the way tests are constructed 
-                * (i.e. free component under test first) all buffers should be returned. So we don't
-                * check. */
-                pPort = &pData->oPort[i];
-                if (pPort->hTunnelComponent){
-                    if (TTCPortIsSupplier(pPort))
-                    {   
-                        /* supplier - for each buffer... */
-                        for (j=0;j<pPort->nBufferCount;j++)
-                        {
-                            /* free buffer */
-                            if (pPort->pBuffer[j]) {
-                                OMX_OSAL_Free(pPort->pBuffer[j]);
-                                pPort->pBuffer[j] = 0;              
-                            }
-
-                            /* tell the non-supplier to free the buffer header */
-                            if (pPort->pBufferHdr[j]) {
-                                OMX_FreeBuffer(pPort->hTunnelComponent, pPort->nTunnelPort, pPort->pBufferHdr[j]);
-                                pPort->pBufferHdr[j] = 0;
-                            }
-                        }
-                    }
-              
-                    /* if tunneling with an input close the file that will feed the input*/
-                    if (pPort->hTunnelComponent){
-                        if (pPort->oPortDef.eDir == OMX_DirOutput) {
-                            OMX_OSAL_CloseInputFile(pPort->nTunnelPort);
-                        } else { /* input */ 
-                            OMX_OSAL_CloseOutputFile(pPort->nTunnelPort);
-                        }
-                    }
-                }
-            }        
-        }
-        if (OMX_StateExecuting == (OMX_STATETYPE)nParam1)
-        {
-            /* initialize any plane byte counters */
-            for(i=0;i<MAX_TTCPORTS;i++)
-            {
-                pPort = &pData->oPort[i];
-                if ((pPort->oPortDef.eDir == OMX_DirOutput) && 
-                    (pPort->nMinBytes != NO_MINSIZE) &&
-                    (pPort->oPortDef.eDomain == OMX_PortDomainVideo))
-                {
-                    pPort->nPlaneBytesEmitted = 0;
-                }
-            }
-        }
-        pData->eState = (OMX_STATETYPE)nParam1;
-        break;
-    default:
-        return OMX_ErrorNotImplemented; 
-    }
-
-    /* call event handler */
-/*    pData->pCallbacks->EventHandler(hComponent, pData->pAppData, OMX_EventCmdComplete,
-        OMX_CommandStateSet, pData->eState, 0);
-*/        
-    return OMX_ErrorNone;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.UseBuffer */
-OMX_ERRORTYPE TTCUseBuffer(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr,
-        OMX_IN OMX_U32 nPortIndex,
-        OMX_IN OMX_PTR pAppPrivate,
-        OMX_IN OMX_U32 nSizeBytes,
-        OMX_IN OMX_U8* pBuffer)
-{   
-    TTCDATATYPE *pData; 
-    TTCPORTTYPE *pPort;
-    OMX_U32 i;
-    OMX_U8 *p;
-    
-    /* Note: we can always assume pAppPrivate is from another port because we're the TTC.
-     * I.e. our ports *always* tunnel. */
-
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    if (pData->bDontDoUseBuffer)
-        return OMX_ErrorNotImplemented;
-
-    pPort = &pData->oPort[nPortIndex];
-    pPort->pBufferHdr[pPort->nBufferCount] = OMX_OSAL_Malloc(sizeof(OMX_BUFFERHEADERTYPE));
-    *ppBufferHdr = pPort->pBufferHdr[pPort->nBufferCount]; 
-
-    /* clear buffer header */
-    for(p=(OMX_U8*)(*ppBufferHdr),i=0;i<sizeof(OMX_BUFFERHEADERTYPE);i++) *p=0;
-
-    /* set relevant fields */
-    (*ppBufferHdr)->nSize = sizeof(OMX_BUFFERHEADERTYPE);
-    (*ppBufferHdr)->nVersion = g_OMX_CONF_Version;
-    (*ppBufferHdr)->pBuffer = pBuffer;
-    (*ppBufferHdr)->nAllocLen = nSizeBytes;
-
-    /* set direction dependent fields */
-    if (pPort->oPortDef.eDir == OMX_DirInput){
-        (*ppBufferHdr)->nInputPortIndex     = nPortIndex;
-        (*ppBufferHdr)->pInputPortPrivate   = pPort;
-        (*ppBufferHdr)->nOutputPortIndex    = pPort->nTunnelPort;
-        (*ppBufferHdr)->pOutputPortPrivate  = pAppPrivate;
-        (*ppBufferHdr)->pAppPrivate         = pAppPrivate;
-    } else {
-        (*ppBufferHdr)->nInputPortIndex     = pPort->nTunnelPort;
-        (*ppBufferHdr)->pInputPortPrivate   = pAppPrivate;
-        (*ppBufferHdr)->nOutputPortIndex    = nPortIndex;
-        (*ppBufferHdr)->pOutputPortPrivate  = pPort;
-        (*ppBufferHdr)->pAppPrivate         = pAppPrivate;
-    }
-        
-    /* increment buffer count */
-    pPort->nBufferCount++;
-
-    /* todo: put hook into conformance test */
-   
-    return OMX_ErrorNone; 
-}
-
-OMX_ERRORTYPE TTCHoldThisBuffer(OMX_IN TTCDATATYPE *pData, OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
-{
-    TTCPORTTYPE *pPort;
-    OMX_U32 i;
-
-    pPort = &pData->oPort[pBuffer->nInputPortIndex];
-    /* find the buffer in the ports list of buffers and set the corresponding boolean to mark it held */
-    for (i=0;i<pPort->nBufferCount;i++){
-        if (pBuffer == pPort->pBufferHdr[i]){
-            pPort->bHoldingBuffer[i] = OMX_TRUE;
-            OMX_OSAL_EventSet(pData->hHoldingBuffersEvent);
-            return OMX_ErrorNone;     
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.EmptyThisBuffer */
-OMX_ERRORTYPE TTCEmptyThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    TTCDATATYPE *pData;    
-    TTCPORTTYPE *pPort;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    /* check for buffer countdown */
-    OMX_OSAL_MutexLock(pData->hMutex);
-    if (pData->nBuffersLeft)
-    {
-        /* decrement buffer count and signal if last one */
-        pData->nBuffersLeft--;
-        if (0==pData->nBuffersLeft){
-            OMX_OSAL_EventSet(pData->hBufferCountEvent);
-        }
-    }
-    OMX_OSAL_MutexUnlock(pData->hMutex);
-
-    if (pData->OnInvalidPayloadSize){
-        pPort = &pData->oPort[pBuffer->nInputPortIndex];
-        if (pPort->nMinBytes > pBuffer->nFilledLen && pPort->nMinBytes != NO_MINSIZE && 0 == (pBuffer->nFlags & OMX_BUFFERFLAG_EOS)){
-            pData->OnInvalidPayloadSize(pBuffer->nOutputPortIndex, pPort->nMinBytes , pBuffer->nFilledLen); 
-        }
-    }
-
-    if (pData->OnEmptyThisBuffer){
-        pData->OnEmptyThisBuffer(pBuffer);
-    }
-    
-    /* write to output file */
-    OMX_OSAL_WriteToOutputFile(pBuffer->pBuffer+pBuffer->nOffset,
-        pBuffer->nFilledLen,pBuffer->nInputPortIndex);
-
-    /* are we holding buffers? */
-    if (pData->bHoldBuffers){
-        /* then keep the buffer */
-        return TTCHoldThisBuffer(pData,pBuffer);
-    }
-
-    OMX_FillThisBuffer(pData->oPort[pBuffer->nInputPortIndex].hTunnelComponent,pBuffer);
-
-    /* todo: put hook into conformance test */
-
-    return OMX_ErrorNone; 
-}
-
-OMX_ERRORTYPE TTCFillThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    OMX_U32 nReadSize;
-    TTCDATATYPE *pData;    
-    TTCPORTTYPE *pPort;    
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-    pPort = &pData->oPort[pBuffer->nOutputPortIndex];
-
-    /* clear relevant buffer header fields */
-    pBuffer->nFilledLen = 0;
-    pBuffer->nOffset = 0;
-    pBuffer->nFlags = 0;
-    pBuffer->hMarkTargetComponent = 0;
-    pBuffer->pMarkData = 0;
-    pBuffer->nTimeStamp = 0;
-    pBuffer->nTickCount = 0;
-
-    /* check for buffer countdown */
-    OMX_OSAL_MutexLock(pData->hMutex);
-    if (pData->nBuffersLeft)
-    {
-        /* decrement buffer count and signal if last one */
-        pData->nBuffersLeft--;
-        if (0==pData->nBuffersLeft){
-            OMX_OSAL_EventSet(pData->hBufferCountEvent);
-        }
-    }
-    OMX_OSAL_MutexUnlock(pData->hMutex);
-
-    if (pData->OnFillThisBuffer){
-        pData->OnFillThisBuffer(pBuffer);
-    }   
-
-    /* did we reach the EOS on a previous call? Are we holding buffers?*/
-    if (pPort->bEOS || pData->bHoldBuffers){
-        /* then keep the buffer */
-        return TTCHoldThisBuffer(pData,pBuffer);
-    }
-
-    nReadSize = pBuffer->nAllocLen;
-    if ((NO_MINSIZE != pPort->nMinBytes) && (pPort->nMinBytes<nReadSize)){ 
-        nReadSize = pPort->nMinBytes;
-        /* if uncompressed video and a plane boundary */
-        if ((pPort->oPortDef.eDomain == OMX_PortDomainVideo) && 
-            ((nReadSize + pPort->nPlaneBytesEmitted) > pPort->nPlaneBytesTotal))
-        {
-            nReadSize = pPort->nPlaneBytesTotal - pPort->nPlaneBytesEmitted;
-            pPort->nPlaneBytesEmitted = 0; /* reset counter */
-        }
-    }
-
-    /* read more data from input file */
-    /* if we didn't get as much data as expected then send EOS */ 
-    if (nReadSize != (pBuffer->nFilledLen = OMX_OSAL_ReadFromInputFile(pBuffer->pBuffer,
-        nReadSize, pBuffer->nInputPortIndex)))
-    {
-        pBuffer->nFlags |= OMX_BUFFERFLAG_EOS;
-        pPort->bEOS = OMX_TRUE;
-    }
-    OMX_EmptyThisBuffer(pPort->hTunnelComponent,pBuffer);
-
-    return OMX_ErrorNone; 
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.GetState */
-OMX_ERRORTYPE TTCGetState(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_STATETYPE* pState)
-{   
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-    *pState = pData->eState;
-    return OMX_ErrorNone; 
-}
-
-OMX_ERRORTYPE TTCHoldBuffers(OMX_IN  OMX_HANDLETYPE hTunnelTestComponent)
-{
-    OMX_BOOL bTimedOut;
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTunnelTestComponent)->pComponentPrivate);
-
-    /* reset the holding buffers event */
-    OMX_OSAL_EventReset(pData->hHoldingBuffersEvent);
-
-    /* tell ports to hold their buffers */
-    pData->bHoldBuffers = OMX_TRUE;
-
-    /* wait until we're holding a buffer */
-    OMX_OSAL_EventWait(pData->hHoldingBuffersEvent,500, &bTimedOut);
-
-    return bTimedOut ? OMX_ErrorTimeout:OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE TTCReleaseBuffers(OMX_IN  OMX_HANDLETYPE hTunnelTestComponent)
-{
-    OMX_U32 i,j;
-    TTCPORTTYPE *pPort;
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hTunnelTestComponent)->pComponentPrivate);
-    
-    /* tell ports not to hold their buffers */
-    pData->bHoldBuffers = OMX_FALSE;
-
-    for(i=0;i<pData->nUsedPorts;i++)
-    {
-        pPort = &pData->oPort[i];
-        
-        /* if port is an input but not the supplier then return the buffers to the supplier */
-        if ((pPort->oPortDef.eDir == OMX_DirInput) && (pPort->eSupplierSetting != OMX_BufferSupplyInput)) {
-            for(j=0;j<pPort->nBufferCount;j++){
-                if (pPort->bHoldingBuffer[j] ){
-                    OMX_FillThisBuffer(pPort->hTunnelComponent,pPort->pBufferHdr[j]);
-                }
-            }
-        }         /* if port is an output but not the supplier then return the buffers to the supplier */
-        else if ((pPort->oPortDef.eDir == OMX_DirOutput) && (pPort->eSupplierSetting != OMX_BufferSupplyOutput)){
-            for(j=0;j<pPort->nBufferCount;j++){
-                if (pPort->bHoldingBuffer[j] ){
-                    OMX_EmptyThisBuffer(pPort->hTunnelComponent,pPort->pBufferHdr[j]);
-                }
-            }
-        }
-    }
-    return OMX_ErrorNone;
-}
-
-/* Tunnel Test Component's implementation of OMX_COMPONENTTYPE.FreeBuffer */
-OMX_ERRORTYPE TTCFreeBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_IN  OMX_U32 nPortIndex,
-        OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-{   
-    OMX_U32 i;
-    TTCPORTTYPE *pPort;
-    TTCDATATYPE *pData;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-    pPort = &pData->oPort[nPortIndex];
-
-    /* find the buffer header and delete it */
-    /* NOTE: the TTC will never have a port connected to the IL client so we can assume tunneling. */
-    for (i=0;i<pPort->nBufferCount;i++){
-        if (pPort->pBufferHdr[i] == pBuffer){
-            OMX_OSAL_Free(pBuffer);
-            pPort->pBufferHdr[i] = 0;
-            pPort->pBuffer[i] = 0;
-        }
-    }
-
-    return OMX_ErrorNone; 
-}
-
-/* Component Initialization function for Tunnel Test Component. */
-OMX_ERRORTYPE TunnelTestComponentInit(OMX_IN  OMX_HANDLETYPE hComponent)
-{
-    OMX_U32 i,j;
-    OMX_COMPONENTTYPE *pComp;
-    TTCDATATYPE *pData; 
-    OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-    pComp = (OMX_COMPONENTTYPE *)hComponent;
-
-    /* create private data */
-    pData = (TTCDATATYPE *)OMX_OSAL_Malloc(sizeof(TTCDATATYPE));
-    pData->OnEmptyThisBuffer = NULL;
-    pData->OnFillThisBuffer = NULL;
-    pData->OnInvalidPayloadSize = NULL;
-    pData->nUsedPorts = 0;
-    pComp->pComponentPrivate = (OMX_PTR)pData;
-    pData->bCreateInvalidPorts = OMX_FALSE;
-    pData->bDontSupportIndexParamCompBufferSupplier = OMX_FALSE;
-    pData->bInvertBufferSupplier = OMX_FALSE;
-    pData->bDontDoUseBuffer = OMX_FALSE;
-    pData->bHoldBuffers = OMX_FALSE;
-    OMX_OSAL_EventCreate(&pData->hHoldingBuffersEvent);
-
-    OMX_OSAL_EventCreate(&pData->hBufferCountEvent);
-    pData->nBuffersLeft = 0;
-    OMX_OSAL_MutexCreate(&pData->hMutex);
-
-    /* fill in function pointers */
-    pComp->SetCallbacks =           TTCSetCallbacks;
-    pComp->GetComponentVersion =    StubbedGetComponentVersion;
-    pComp->SendCommand =            TTCSendCommand;
-    pComp->GetParameter =           TTCGetParameter;
-    pComp->SetParameter =           TTCSetParameter;
-    pComp->GetConfig =              StubbedGetConfig;
-    pComp->SetConfig =              StubbedSetConfig;
-    pComp->GetExtensionIndex =      StubbedGetExtensionIndex;
-    pComp->GetState =               TTCGetState;
-    pComp->ComponentTunnelRequest = TTCTunnelRequest;
-    pComp->UseBuffer =              TTCUseBuffer;
-    pComp->AllocateBuffer =         StubbedAllocateBuffer;
-    pComp->FreeBuffer =             TTCFreeBuffer;
-    pComp->EmptyThisBuffer =        TTCEmptyThisBuffer;
-    pComp->FillThisBuffer =         TTCFillThisBuffer;
-    pComp->ComponentDeInit =        TTCDeInit;
-
-    /* initialize ports */
-    for (i=0;i<MAX_TTCPORTS; i++)
-    {
-        pData->oPort[i].nPortIndex = i;
-        pData->oPort[i].hTunnelComponent = NULL;
-        pData->oPort[i].nTunnelPort = 0;
-        pData->oPort[i].nPreferredCount = 0;
-        pData->oPort[i].nPreferredSize = 0;
-        pData->oPort[i].nBufferCount = 0;
-        pData->oPort[i].nBufferSize = 0;
-        pData->oPort[i].nPortDefParamIndex = 0;
-        pData->oPort[i].bEOS = OMX_FALSE;
-        pData->oPort[i].eSupplierSetting = pData->oPort[i].eSupplierPreference = OMX_BufferSupplyUnspecified;
-        memset(&pData->oPort[i].oPortDef, 0, sizeof(pData->oPort[i].oPortDef));
-        for(j=0;j<MAX_TTCBUFFERS;j++) pData->oPort[i].bHoldingBuffer[j] = OMX_FALSE;
-    }
-
-    /* initialize state */
-    pData->eState = OMX_StateLoaded;
-
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_WaitForBufferTraffic(OMX_IN OMX_HANDLETYPE hComponent)
-{
-    TTCDATATYPE *pData; 
-    OMX_BOOL bTimedOut;
-    pData = (TTCDATATYPE *)(((OMX_COMPONENTTYPE*)hComponent)->pComponentPrivate);
-
-    /* trigger buffer countdown */
-    OMX_OSAL_MutexLock(pData->hMutex);
-    OMX_OSAL_EventReset(pData->hBufferCountEvent);
-    pData->nBuffersLeft = OMX_CONF_BUFFERS_OF_TRAFFIC;
-    OMX_OSAL_MutexUnlock(pData->hMutex);
-
-    /* wait for the countdown to get to zero */
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, 
-        "Waiting for at least %i calls to EmptyThisBuffer or FillThisBuffer.\n", 
-        OMX_CONF_BUFFERS_OF_TRAFFIC);
-    OMX_OSAL_EventWait(pData->hBufferCountEvent, OMX_CONF_TIMEOUT_BUFFER_TRAFFIC, &bTimedOut);
-
-    /* cancel buffer countdown */
-    OMX_OSAL_MutexLock(pData->hMutex);
-    pData->nBuffersLeft = 0;
-    OMX_OSAL_MutexUnlock(pData->hMutex);
-
-    /* if we timed out then the wait has failed */
-    if (bTimedOut){
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,
-                       "Expected %i buffers processed in %i ms.  Timed out, proceeding with test.\n",
-                       OMX_CONF_BUFFERS_OF_TRAFFIC,
-                       OMX_CONF_TIMEOUT_BUFFER_TRAFFIC);
-    }        
-
-    return OMX_ErrorNone;
-}
-
-OMX_ERRORTYPE OMX_CONF_GetTunnelTestComponentHandle(
-        OMX_OUT OMX_HANDLETYPE *pHandle, 
-        OMX_IN  OMX_PTR pAppData,
-        OMX_IN  OMX_CALLBACKTYPE* pCallBacks)
-{
-    OMX_ERRORTYPE eError;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_HANDLETYPE hHandle;
-
-    if (pHandle == NULL || pCallBacks == NULL)
-        return OMX_ErrorBadParameter;
-
-    hHandle = 0;
-    pComp = (OMX_COMPONENTTYPE *)OMX_OSAL_Malloc(sizeof(OMX_COMPONENTTYPE));
-    hHandle = (OMX_HANDLETYPE)pComp;
-    pComp->nVersion.s.nVersionMajor    = 1;
-    pComp->nVersion.s.nVersionMinor    = 0;
-    pComp->nVersion.s.nRevision        = 0;
-    pComp->nVersion.s.nStep            = 0;
-    pComp->nSize = sizeof(OMX_COMPONENTTYPE);
-    eError = TunnelTestComponentInit(hHandle);
-    if (eError == OMX_ErrorNone) {
-        eError = pComp->SetCallbacks(hHandle,pCallBacks,pAppData);
-        if (eError != OMX_ErrorNone)
-            TTCDeInit(hHandle);
-    }
-    if (eError == OMX_ErrorNone) {
-        *pHandle = hHandle;
-    }
-    else {
-        *pHandle = NULL;
-        OMX_OSAL_Free(pComp);
-    }
-    return eError;
-}
-
-OMX_ERRORTYPE OMX_CONF_FreeTunnelTestComponentHandle(OMX_IN OMX_HANDLETYPE hComponent)
-{
-    OMX_ERRORTYPE eError = OMX_ErrorNone;
-    OMX_COMPONENTTYPE *pComp;
-    OMX_STATETYPE eState;
-
-    if (hComponent == NULL)
-        return OMX_ErrorBadParameter;
-
-    eError = OMX_GetState(hComponent, &eState);
-    if (eError != OMX_ErrorNone)
-        return eError;
-    else if (eState != OMX_StateInvalid && eState != OMX_StateLoaded)
-        return OMX_ErrorInvalidState;
-
-    pComp = (OMX_COMPONENTTYPE*)hComponent;
-    eError = TTCDeInit(hComponent);
-    if (eError == OMX_ErrorNone) {
-        OMX_OSAL_Free(pComp);
-    }
-
-    return eError;
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_conf_tunneltestcomponent.h
deleted file mode 100644 (file)
index 188c821..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_TunnelComponent.h
- *  Definition of tunneled component. Useful for stress testing tunneling features of OpenMax
- */
-#ifndef OMX_CONF_TunnelTestComponent_h
-#define OMX_CONF_TunnelTestComponent_h
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include <OMX_Types.h>
-#include <OMX_Component.h>
-#include <OMX_Core.h>
-#include <OMX_Index.h>
-#include <OMX_Image.h>
-#include <OMX_Audio.h>
-#include <OMX_Video.h>
-#include <OMX_IVCommon.h>
-#include <OMX_Other.h>
-
-#include "OMX_OSAL_Interfaces.h"
-
-    /* todo: dynamically allocate ports and buffer pointers instead of statically allocating them */
-#define MAX_TTCPORTS 100
-#define MAX_TTCBUFFERS 256
-
-    /* Tunnel Test Component Port Context */
-    typedef struct TTCPORTTYPE
-    {
-        OMX_HANDLETYPE hTunnelComponent;
-        OMX_U32 nTunnelPort;
-        OMX_BUFFERSUPPLIERTYPE eSupplierSetting;
-        OMX_BUFFERSUPPLIERTYPE eSupplierPreference;
-        OMX_U32 nPortIndex;
-        OMX_BOOL bEOS;
-
-        /* buffer info */
-        OMX_U32 nPreferredCount;
-        OMX_U32 nPreferredSize;
-        OMX_U32 nBufferCount;
-        OMX_U32 nBufferSize;
-        OMX_U8 *pBuffer[MAX_TTCBUFFERS];
-        OMX_BUFFERHEADERTYPE *pBufferHdr[MAX_TTCBUFFERS];
-
-        OMX_INDEXTYPE nPortDefParamIndex;
-
-        OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
-
-        OMX_BOOL bHoldingBuffer[MAX_TTCBUFFERS];
-
-        OMX_U32 nMinBytes;
-        OMX_U32 nPlaneBytesEmitted;
-        OMX_U32 nPlaneBytesTotal;
-
-    } TTCPORTTYPE;
-
-    /** Tunnel Test Component Context */
-    typedef struct TTCDATATYPE
-    {
-        OMX_STATETYPE eState;
-        TTCPORTTYPE oPort[MAX_TTCPORTS];
-        OMX_U32 nUsedPorts;
-        OMX_CALLBACKTYPE *pCallbacks;
-        OMX_PTR pAppData;
-        OMX_ERRORTYPE(*OnEmptyThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer);
-        OMX_ERRORTYPE(*OnFillThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer);
-        OMX_ERRORTYPE(*OnInvalidPayloadSize)(OMX_IN OMX_U32 nOutPort, OMX_IN OMX_U32 nMin, OMX_IN OMX_U32 nActual);
-        OMX_BOOL bCreateInvalidPorts;
-        OMX_BOOL bDontSupportIndexParamCompBufferSupplier;
-        OMX_BOOL bInvertBufferSupplier;
-        OMX_BOOL bDontDoUseBuffer;
-        OMX_BOOL bHoldBuffers;
-        OMX_HANDLETYPE hHoldingBuffersEvent;
-
-        OMX_HANDLETYPE hBufferCountEvent;
-        OMX_U32 nBuffersLeft;
-        OMX_HANDLETYPE hMutex;
-    } TTCDATATYPE;
-
-#define TTC_RETURN_ANY_ERROR(__X) \
-{ \
-    OMX_ERRORTYPE __eErr; \
-    if (OMX_ErrorNone != (__eErr = (__X))) \
-        return __eErr; \
-}
-
-    /* Sets the Tunnel Test Component's OnEmptyThisBuffer callback. If this callback is non-NULL
-     * the TTC calls it on a EmptyThisBuffer calls */
-    OMX_ERRORTYPE OMX_CONF_SetTTCOnEmptyThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_ERRORTYPE(*OnEmptyThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-    );
-
-    /* Sets the Tunnel Test Component's OnFillThisBuffer callback. If this callback is non-NULL
-     * the TTC calls it on a OnFillThisBuffer calls */
-    OMX_ERRORTYPE OMX_CONF_SetTTCOnFillThisBuffer(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_ERRORTYPE(*OnFillThisBuffer)(OMX_IN  OMX_BUFFERHEADERTYPE* pBuffer)
-    );
-
-    /* Sets the Tunnel Test Components OnInvalidPayloadSize callback. If this callback is non-NULL
-     * the TTC checks the payload size on EmptyThisBuffer calls. If the size is invalid it calls this
-     * function. */
-    OMX_ERRORTYPE OMX_CONF_SetTTCOnInvalidPayloadSize(
-        OMX_IN  OMX_HANDLETYPE hComponent,
-        OMX_ERRORTYPE(*OnInvalidPayloadSize)(OMX_IN OMX_U32 nOutPort, OMX_IN OMX_U32 nMin, OMX_IN OMX_U32 nActual)
-    );
-
-    /* Connects a single port of any domain type from a component under test to the tunnel test component. The
-     * TTC will query and clone the CUT port (flipping direction). */
-    OMX_ERRORTYPE TTCConnectPort(
-        OMX_HANDLETYPE hTTC,
-        OMX_HANDLETYPE hCUT,
-        OMX_U32 iCUTPort);
-
-    /* Connects all of the component under test's ports for all domains to the tunnel test component. The
-     * TTC will query and clone all CUT ports (flipping direction). */
-    OMX_ERRORTYPE OMX_CONF_TTCConnectAllPorts(
-        OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-        OMX_IN  OMX_HANDLETYPE hComponentUnderTest);
-
-    /* Connects all of the component under test's audio ports to the tunnel test component. The
-     * TTC will query and clone all CUT ports (flipping direction). */
-    OMX_ERRORTYPE OMX_CONF_TTCConnectAudioPorts(
-        OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-        OMX_IN  OMX_HANDLETYPE hComponentUnderTest);
-    /* Connects all of the component under test's video ports to the tunnel test component. The
-     * TTC will query and clone all CUT ports (flipping direction). */
-    OMX_ERRORTYPE OMX_CONF_TTCConnectVideoPorts(
-        OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-        OMX_IN  OMX_HANDLETYPE hComponentUnderTest);
-    /* Connects all of the component under test's image ports to the tunnel test component. The
-     * TTC will query and clone all CUT ports (flipping direction). */
-    OMX_ERRORTYPE OMX_CONF_TTCConnectImagePorts(
-        OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-        OMX_IN  OMX_HANDLETYPE hComponentUnderTest);
-    /* Connects all of the component under test's otheer ports to the tunnel test component. The
-     * TTC will query and clone all CUT ports (flipping direction). */
-    OMX_ERRORTYPE OMX_CONF_TTCConnectOtherPorts(
-        OMX_IN  OMX_HANDLETYPE hTunnelTestComponent,
-        OMX_IN  OMX_HANDLETYPE hComponentUnderTest);
-
-    /* Disconnect all of the ports connected with above: effectively resets for another test */
-    OMX_ERRORTYPE TTCDisconnectAllPorts(OMX_IN  OMX_HANDLETYPE hTunnelTestComponent);
-
-    /* Tells the 'ConnectXPort' functions to select an invalid encoding type (instead of a matching one) */
-    OMX_ERRORTYPE TTCCreateInvalidPortTypes(
-        OMX_IN  OMX_HANDLETYPE hTTC,
-        OMX_IN  OMX_U8 bCreateInvalid);
-
-    /* Makes the TTC not support IndexParamCompBufferSupplier */
-    OMX_ERRORTYPE TTCDontSupportIndexParamCompBufferSupplier(
-        OMX_IN  OMX_HANDLETYPE hTTC,
-        OMX_IN  OMX_U8 bSupportIndex);
-
-    /* Makes the TTC input ports pick the opposite buffer supplier from the output ports */
-    OMX_ERRORTYPE TTCInvertBufferSupplier(
-        OMX_IN  OMX_HANDLETYPE hTTC,
-        OMX_IN  OMX_U8 bSupportIndex);
-
-    /* Makes the TTC's UseBuffer implementation fail */
-    OMX_ERRORTYPE TTCDontSupportUseBuffer(
-        OMX_IN  OMX_HANDLETYPE hTTC,
-        OMX_IN  OMX_U8 bSupportUseBuffer);
-
-    /* Freeze processing and hold at least one buffer */
-    OMX_ERRORTYPE TTCHoldBuffers(OMX_IN  OMX_HANDLETYPE hTunnelTestComponent);
-
-    /* Unfreeze processing and release all held buffers*/
-    OMX_ERRORTYPE TTCReleaseBuffers(OMX_IN  OMX_HANDLETYPE hTunnelTestComponent);
-
-    /* Wait for some some buffers to be exchanged */
-    OMX_ERRORTYPE OMX_CONF_WaitForBufferTraffic(OMX_IN OMX_HANDLETYPE hComponent);
-
-    /* TTC GetHandle and FreeHandle functions exposed here so that solutions that do not statically link
-       components may still create and destroy the Tunnel Test Component */
-    OMX_ERRORTYPE OMX_CONF_GetTunnelTestComponentHandle(
-        OMX_OUT OMX_HANDLETYPE *pHandle,
-        OMX_IN  OMX_PTR pAppData,
-        OMX_IN  OMX_CALLBACKTYPE* pCallBacks);
-    OMX_ERRORTYPE OMX_CONF_FreeTunnelTestComponentHandle(
-        OMX_IN OMX_HANDLETYPE hComponent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* OMX_CONF_TunnelTestComponent_h */
-
-/* File EOF */
-
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_interfaces.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_interfaces.h
deleted file mode 100644 (file)
index e28ea43..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-#ifndef OMX_CONF_PlatformAbstraction_h
-#define OMX_CONF_PlatformAbstraction_h
-
-#include <OMX_Types.h>
-#include <OMX_Core.h>
-
-/** OMX_OSAL_Interfaces.h
- *  Interface definitions of the OpenMax IL OS abstraction layer including memory, threading,
- *  mutex, event, time query and tracing functionality.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-    /**********************************************************************
-     * MEMORY
-     **********************************************************************/
-    OMX_PTR OMX_OSAL_Malloc(OMX_IN OMX_U32 size);
-    void OMX_OSAL_Free(OMX_IN OMX_PTR pData);
-
-    /**********************************************************************
-     * THREADS
-     **********************************************************************/
-
-    /** Create a thread given the thread function, a data parameter to pass
-     *  to the thread, and the thread priority (higher values=higher priority,
-     *  0 = normal priority). The thread is created and executed immediately
-     *  calling the thread function with the supplied data parameter. */
-    OMX_ERRORTYPE OMX_OSAL_ThreadCreate(OMX_IN OMX_U32(*pFunc)(OMX_PTR pParam),
-                                        OMX_IN OMX_PTR pParam,
-                                        OMX_IN OMX_U32 nPriority,
-                                        OMX_OUT OMX_HANDLETYPE *phThread);
-    OMX_ERRORTYPE OMX_OSAL_ThreadDestroy(OMX_IN OMX_HANDLETYPE hThread);   /** Destroy a thread */
-
-    /**********************************************************************
-     * MUTEX
-     **********************************************************************/
-
-    OMX_ERRORTYPE OMX_OSAL_MutexCreate(OMX_OUT OMX_HANDLETYPE *phMutex); /** Create a mutex */
-    OMX_ERRORTYPE OMX_OSAL_MutexDestroy(OMX_IN OMX_HANDLETYPE hMutex); /** Destroy a mutex */
-    OMX_ERRORTYPE OMX_OSAL_MutexLock(OMX_IN OMX_HANDLETYPE hMutex); /** Lock a mutex. Block until available if neccessary.*/
-    OMX_ERRORTYPE OMX_OSAL_MutexUnlock(OMX_IN OMX_HANDLETYPE hMutex); /** Unlock a mutex */
-
-    /**********************************************************************
-     * EVENTS
-     **********************************************************************/
-
-#define INFINITE_WAIT 0xffffffff
-
-    OMX_ERRORTYPE OMX_OSAL_EventCreate(OMX_OUT OMX_HANDLETYPE *phEvent); /** Create an event */
-    OMX_ERRORTYPE OMX_OSAL_EventDestroy(OMX_IN OMX_HANDLETYPE hEvent);/** Destroy an event */
-    OMX_ERRORTYPE OMX_OSAL_EventReset(OMX_IN OMX_HANDLETYPE hEvent);/** Reset an event */
-    OMX_ERRORTYPE OMX_OSAL_EventSet(OMX_IN OMX_HANDLETYPE hEvent);/** Set an event */
-    /** Wait at most mSec milliseconds for the specified event to be set.
-     *  If mSec==INFINITE_WAIT wait indefinitely. If bTimedout is set the wait timed out before
-     *  the event was signaled. */
-    OMX_ERRORTYPE OMX_OSAL_EventWait(OMX_IN OMX_HANDLETYPE hEvent, OMX_IN OMX_U32 mSec, OMX_OUT OMX_BOOL *pbTimedOut);
-
-    /**********************************************************************
-     * TIME
-     **********************************************************************/
-
-    /** Returns a time value in milliseconds based on a clock starting at
-     *  some arbitrary base. Given a call to GetTime that returns a value
-     *  of n a subsequent call to GetTime made m milliseconds later should
-     *  return a value of (approximately) (n+m). This method is used, for
-     *  instance, to compute the duration of call. */
-    OMX_U32 OMX_OSAL_GetTime();
-
-    /***********************************************************************
-     * TRACE
-     *
-     * Examples:
-     *   OMX_OSAL_Trace(OMX_OSAL_TracePASSFAIL, "StateTransitionTest FAILED!\n");
-     *   OMX_OSAL_Trace(OMX_OSAL_TraceCALLSEQUENCE, "FreeBuffer(");
-     *   OMX_OSAL_Trace(OMX_OSAL_TracePARAMETERS, "\n\thComponent = 0x%08x", hComponent);
-     *   OMX_OSAL_Trace(OMX_OSAL_TracePARAMETERS, "\n\tnPortIndex = 0x%08x", nPortIndex);
-     *   OMX_OSAL_Trace(OMX_OSAL_TracePARAMETERS, "\n\tpBufer = 0x%08x", pBuffer);
-     *   OMX_OSAL_Trace(OMX_OSAL_TraceCALLSEQUENCE, ")\n");
-     *
-     ***********************************************************************/
-
-    extern OMX_HANDLETYPE g_OMX_CONF_hTraceMutex;
-
-    /** Trace flags. */
-#define OMX_OSAL_TRACE_PASSFAIL       0x0001 /**< Messages indicating the success or failure of a test*/
-#define OMX_OSAL_TRACE_CALLSEQUENCE   0x0002 /**< The name of each function in the call sequence */
-#define OMX_OSAL_TRACE_PARAMETERS     0x0004 /**< The parameters of each function in the call sequence */
-#define OMX_OSAL_TRACE_INFO           0x0008 /**< Generalized info. */
-#define OMX_OSAL_TRACE_ERROR          0x0010 /**< Errors that occur during processing. */
-#define OMX_OSAL_TRACE_BUFFER         0x0020 /**< Buffer header fields. */
-#define OMX_OSAL_TRACE_WARNING        0x0040 /**< Warnings reported during processing. */
-
-    /** Output a trace message */
-    OMX_ERRORTYPE OMX_OSAL_Trace(OMX_IN OMX_U32 nTraceFlags, OMX_IN char *format, ...);
-
-    OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromFile(OMX_STRING sFileName);
-    OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromPrompt();
-
-    /** Open logfile. All enabled tracing will be sent to the file (in addition
-     *  to the display). */
-    OMX_ERRORTYPE OMX_OSAL_OpenLogfile(OMX_IN OMX_STRING sFilename);
-    /** Close logfile.*/
-    OMX_ERRORTYPE OMX_OSAL_CloseLogfile();
-
-    /**********************************************************************
-     * INPUT FILE MAPPING
-     **********************************************************************/
-
-    /** Open the input file associated with the given port index.*/
-    OMX_ERRORTYPE OMX_OSAL_OpenInputFile(OMX_IN OMX_U32 nPortIndex);
-
-    /** Read the given number bytes from the input file associated with the given port index.
-     *  Return the actual number of bytes read. */
-    OMX_U32 OMX_OSAL_ReadFromInputFile(OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex);
-
-    /** Close the input file associated with the given port index.*/
-    OMX_ERRORTYPE OMX_OSAL_CloseInputFile(OMX_IN OMX_U32 nPortIndex);
-
-    /**********************************************************************
-     * OUTPUT FILE MAPPING
-     **********************************************************************/
-
-    /** Open the output file associated with the given port index.*/
-    OMX_ERRORTYPE OMX_OSAL_OpenOutputFile(OMX_IN OMX_U32 nPortIndex);
-
-    /** Write the given bytes to the output file associated with the given port index.
-     *  Return the actual number of bytes written. */
-    OMX_U32 OMX_OSAL_WriteToOutputFile(OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex);
-
-    /** Close the output file associated with the given port index.*/
-    OMX_ERRORTYPE OMX_OSAL_CloseOutputFile(OMX_IN OMX_U32 nPortIndex);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_linux.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_linux.c
deleted file mode 100644 (file)
index 7bc7776..0000000
+++ /dev/null
@@ -1,722 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_OSAL_Linux.c
- *  Linux implemenation of the OpenMax IL OS abstraction layer including memory, threading,
- *  mutex, event, time query and tracing functionality.
- */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-#define _XOPEN_SOURCE 600   /* version 6.0 of XOpen source (for recursive locks) */
-#include <stdio.h>
-#include <sys/time.h>
-#include <pthread.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-extern OMX_U32 g_OMX_OSAL_TraceFlags;
-
-/**********************************************************************
- * MEMORY               
- **********************************************************************/
-OMX_PTR OMX_OSAL_Malloc( OMX_IN OMX_U32 size )
-{
-    return (OMX_PTR)malloc(size);
-}
-
-void OMX_OSAL_Free( OMX_IN OMX_PTR pData )
-{
-    free(pData);
-}
-
-/* JVW-NVIDIA: Added for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=217 */
-
-OMX_PTR OMX_OSAL_Memset( OMX_IN OMX_PTR pDest, OMX_IN OMX_U32 cChar, OMX_IN OMX_U32 nCount)
-{    
-    return memset(pDest, cChar, nCount);
-}
-
-/* JVW-NVIDIA: Added for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=217 */
-
-OMX_PTR OMX_OSAL_Memcpy( OMX_IN OMX_PTR pDest, OMX_IN OMX_PTR pSrc, OMX_IN OMX_U32 nCount)
-{
-    return memcpy(pDest, pSrc, nCount);
-}
-
-/**********************************************************************
- * THREADS               
- **********************************************************************/
-
-typedef struct OMX_OSAL_THREADDATATYPE {
-    pthread_t oPosixThread;
-    pthread_attr_t oThreadAttr;
-    OMX_U32 (*pFunc)(OMX_PTR pParam);
-    OMX_PTR pParam;
-    OMX_U32 uReturn;
-} OMX_OSAL_THREADDATATYPE;
-
-static void *threadFunc(void *pParameter)
-{ 
-   OMX_OSAL_THREADDATATYPE *pThreadData;
-   pThreadData = (OMX_OSAL_THREADDATATYPE *)pParameter;
-   pThreadData->uReturn = pThreadData->pFunc(pThreadData->pParam);
-   return pThreadData;
-}
-
-/** Create a thread given the thread function, a data parameter to pass 
- *  to the thread, and the thread priority (higher values=higher priority).
- *  The thread is created and executed immediately calling the thread 
- *  function with the supplied data parameter. */
-OMX_ERRORTYPE OMX_OSAL_ThreadCreate( OMX_IN OMX_U32 (*pFunc)(OMX_PTR pParam), 
-                                     OMX_IN OMX_PTR pParam, 
-                                     OMX_IN OMX_U32 nPriority, 
-                                     OMX_OUT OMX_HANDLETYPE *phThread )
-{
-    OMX_OSAL_THREADDATATYPE *pThreadData;
-    struct sched_param sched;
-
-    pThreadData = (OMX_OSAL_THREADDATATYPE*)OMX_OSAL_Malloc(sizeof(OMX_OSAL_THREADDATATYPE));
-    if (pThreadData == NULL)
-        return OMX_ErrorInsufficientResources;
-
-    pThreadData->pFunc = pFunc;
-    pThreadData->pParam = pParam;
-    pThreadData->uReturn = 0;
-    
-    pthread_attr_init(&pThreadData->oThreadAttr);
-
-    pthread_attr_getschedparam(&pThreadData->oThreadAttr, &sched);
-    sched.sched_priority += nPriority; /* relative to the default priority */
-    pthread_attr_setschedparam(&pThreadData->oThreadAttr, &sched);
-
-
-    if (pthread_create(&pThreadData->oPosixThread,
-                       &pThreadData->oThreadAttr,
-                       threadFunc,
-                       pThreadData)) {
-        OMX_OSAL_Free(pThreadData);
-        return OMX_ErrorInsufficientResources;
-    }
-
-    *phThread = (OMX_HANDLETYPE)pThreadData;
-    return OMX_ErrorNone;       
-}
-
-/* JVW-NVIDIA: Moved local variable declarations up for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=224 */
-
-OMX_ERRORTYPE OMX_OSAL_ThreadDestroy( OMX_IN OMX_HANDLETYPE hThread )
-{
-    OMX_OSAL_THREADDATATYPE *pThreadData = (OMX_OSAL_THREADDATATYPE *)hThread;
-    void *retVal;
-    
-    if (pThreadData == NULL || pthread_join(pThreadData->oPosixThread, &retVal)) {
-        return OMX_ErrorBadParameter;
-    }
-
-    OMX_OSAL_Free(pThreadData);
-    return OMX_ErrorNone;       
-}
-
-/**********************************************************************
- * MUTEX               
- **********************************************************************/
-
-OMX_ERRORTYPE OMX_OSAL_MutexCreate(OMX_OUT OMX_HANDLETYPE *phMutex)
-{
-    pthread_mutex_t *pMutex = (pthread_mutex_t *)OMX_OSAL_Malloc(sizeof(pthread_mutex_t));
-    static pthread_mutexattr_t oAttr;
-    static pthread_mutexattr_t *pAttr = NULL;
-    if (pAttr == NULL
-        && !pthread_mutexattr_init(&oAttr)
-        && !pthread_mutexattr_settype(&oAttr, PTHREAD_MUTEX_RECURSIVE))
-    {
-        pAttr = &oAttr;
-    }
-
-    if (pMutex == NULL || pthread_mutex_init(pMutex, pAttr)) {
-        OMX_OSAL_Free(pMutex);
-        return OMX_ErrorInsufficientResources;
-    }
-    *phMutex = (void *)pMutex;
-    return OMX_ErrorNone;       
-}
-
-
-OMX_ERRORTYPE OMX_OSAL_MutexDestroy(OMX_IN OMX_HANDLETYPE hMutex)
-{
-    pthread_mutex_t *pMutex = (pthread_mutex_t *)hMutex;
-    if (pMutex == NULL || pthread_mutex_destroy(pMutex)) {
-        return OMX_ErrorBadParameter;
-    }    
-    OMX_OSAL_Free(pMutex);
-    return OMX_ErrorNone;
-}
-
-/* JVW-NVIDIA: Moved local variable declarations up for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=224 */
-
-OMX_ERRORTYPE OMX_OSAL_MutexLock(OMX_IN OMX_HANDLETYPE hMutex)
-{
-    pthread_mutex_t *pMutex = (pthread_mutex_t *)hMutex;
-    int err;
-    if (pMutex == NULL)
-        return OMX_ErrorBadParameter;
-    err = pthread_mutex_lock(pMutex);
-    switch (err) {
-    case 0:
-        return OMX_ErrorNone;
-    case EINVAL:
-        return OMX_ErrorBadParameter;
-    case EDEADLK:
-        return OMX_ErrorNotReady;
-
-    default:
-        return OMX_ErrorUndefined;
-    }
-    return OMX_ErrorNone;       
-}
-
-/* JVW-NVIDIA: Moved local variable declarations up for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=224 */
-
-OMX_ERRORTYPE OMX_OSAL_MutexUnlock(OMX_IN OMX_HANDLETYPE hMutex)
-{
-    pthread_mutex_t *pMutex = (pthread_mutex_t *)hMutex;
-    int err;
-    if (pMutex == NULL)
-        return OMX_ErrorBadParameter;
-    err = pthread_mutex_unlock(pMutex);
-    switch (err) {
-    case 0:
-        return OMX_ErrorNone;
-    case EINVAL:
-        return OMX_ErrorBadParameter;
-    case EPERM:
-        return OMX_ErrorNotReady;
-
-    default:
-        return OMX_ErrorUndefined;
-    }
-}
-
-/**********************************************************************
- * EVENTS               
- **********************************************************************/
-
-typedef struct {
-    OMX_BOOL bSignaled;
-    pthread_mutex_t mutex;
-    pthread_cond_t  condition;
-} OMX_OSAL_THREAD_EVENT;
-
-OMX_ERRORTYPE OMX_OSAL_EventCreate(OMX_OUT OMX_HANDLETYPE *phEvent)
-{
-    /* Emulate a win32 event that
-        - has default security
-        - must be manualy reset
-        - starts as nonsignaled
-        - is unnamed
-    */
-    OMX_OSAL_THREAD_EVENT *pEvent = OMX_OSAL_Malloc(sizeof(OMX_OSAL_THREAD_EVENT));
-    pEvent->bSignaled = OMX_FALSE;
-
-    if (pEvent == NULL)
-        return OMX_ErrorInsufficientResources;
-
-    if (pthread_mutex_init(&pEvent->mutex, NULL)) {
-        OMX_OSAL_Free(pEvent);
-        return OMX_ErrorInsufficientResources;
-    }
-    if (pthread_cond_init(&pEvent->condition, NULL)) {
-        pthread_mutex_destroy(&pEvent->mutex);
-        OMX_OSAL_Free(pEvent);
-        return OMX_ErrorInsufficientResources;
-    }
-
-    *phEvent = (OMX_HANDLETYPE)pEvent;
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventDestroy(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    OMX_OSAL_THREAD_EVENT *pEvent = (OMX_OSAL_THREAD_EVENT *)hEvent;
-    if (pEvent == NULL)
-        return OMX_ErrorBadParameter;
-
-    if (pthread_mutex_lock(&pEvent->mutex))
-        return OMX_ErrorBadParameter;
-
-    pthread_cond_destroy(&pEvent->condition);
-    pthread_mutex_unlock(&pEvent->mutex);
-    pthread_mutex_destroy(&pEvent->mutex);
-    
-    OMX_OSAL_Free(pEvent);
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventReset(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    OMX_OSAL_THREAD_EVENT *pEvent = (OMX_OSAL_THREAD_EVENT *)hEvent;
-    if (pEvent == NULL)
-        return OMX_ErrorBadParameter;
-
-    if (pthread_mutex_lock(&pEvent->mutex))
-        return OMX_ErrorBadParameter;
-    pEvent->bSignaled = OMX_FALSE;
-    pthread_mutex_unlock(&pEvent->mutex);
-
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventSet(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    OMX_OSAL_THREAD_EVENT *pEvent = (OMX_OSAL_THREAD_EVENT *)hEvent;
-    if (pEvent == NULL)
-        return OMX_ErrorBadParameter;
-
-    if (pthread_mutex_lock(&pEvent->mutex))
-        return OMX_ErrorBadParameter;
-    pEvent->bSignaled = OMX_TRUE;
-    pthread_cond_signal(&pEvent->condition);
-    pthread_mutex_unlock(&pEvent->mutex);
-
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventWait(OMX_IN OMX_HANDLETYPE hEvent, OMX_IN OMX_U32 uMSec, OMX_OUT OMX_BOOL *pbTimedOut)
-{
-    OMX_OSAL_THREAD_EVENT *pEvent = (OMX_OSAL_THREAD_EVENT *)hEvent;
-    OMX_U32         timeout_us;
-    struct timespec timeout;
-    int             retcode;
-
-    struct timeval now;
-    gettimeofday(&now, NULL);
-
-    *pbTimedOut = OMX_FALSE;
-
-    timeout_us = now.tv_usec + 1000*uMSec;
-    timeout.tv_sec = now.tv_sec + timeout_us / 1000000;
-    timeout.tv_nsec = (timeout_us % 1000000) * 1000;
-
-    if (pEvent == NULL)
-        return OMX_ErrorBadParameter;
-    if (pthread_mutex_lock(&pEvent->mutex))
-        return OMX_ErrorBadParameter;
-
-    if (uMSec == 0) {
-        if (!pEvent->bSignaled) {
-            *pbTimedOut = OMX_TRUE;
-        }
-    }
-    else if (uMSec == INFINITE_WAIT) {
-        while (!pEvent->bSignaled) {
-            pthread_cond_wait(&pEvent->condition, &pEvent->mutex);
-        }
-    }
-    else {
-        while (!pEvent->bSignaled) {
-            retcode = pthread_cond_timedwait(&pEvent->condition, &pEvent->mutex, &timeout);
-            if (retcode == ETIMEDOUT && !pEvent->bSignaled) {
-                *pbTimedOut = OMX_TRUE;
-                break;
-            }
-        }
-    }
-
-    pthread_mutex_unlock(&pEvent->mutex);
-    return OMX_ErrorNone;
-}
-
-/**********************************************************************
- * TIME
- **********************************************************************/
-
-/** Returns a time value in milliseconds based on a clock starting at
- *  some arbitrary base. Given a call to GetTime that returns a value
- *  of n a subsequent call to GetTime made m milliseconds later should 
- *  return a value of (approximately) (n+m). This method is used, for
- *  instance, to compute the duration of call. */
-OMX_U32 OMX_OSAL_GetTime()
-{
-    struct timeval now;
-    gettimeofday(&now, NULL);
-    return ((OMX_U32)now.tv_sec) * 1000 + ((OMX_U32)now.tv_usec) / 1000;
-}
-
-/**************************************************************
- * LOG FILES
- **************************************************************/
-
-FILE *g_pLogFile=NULL;
-
-/** Open logfile. All enabled tracing will be sent to the file (in addition
- *  to the display). */
-OMX_ERRORTYPE OMX_OSAL_OpenLogfile(OMX_IN OMX_STRING sFilename)
-{
-    OMX_OSAL_CloseLogfile();
-    g_pLogFile = fopen(sFilename, "w");
-    return g_pLogFile? OMX_ErrorNone : OMX_ErrorBadParameter;
-}
-
-/** Close logfile.*/
-OMX_ERRORTYPE OMX_OSAL_CloseLogfile()
-{
-    if (g_pLogFile){
-        fclose(g_pLogFile);
-        g_pLogFile = NULL;
-    }
-    return OMX_ErrorNone;
-}
-
-/***********************************************************************
- * TRACE
- ***********************************************************************/
-
-static OMX_BOOL bSkipPrefix = OMX_FALSE;
-
-/** Output a trace message */
-OMX_ERRORTYPE OMX_OSAL_Trace(OMX_IN OMX_U32 nTraceFlags, OMX_IN char *format, ...)
-{
-    char szPrefix[5];
-    va_list args;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    if (g_OMX_OSAL_TraceFlags & nTraceFlags)
-    {
-        if (format[0]!='#' && format[0]!='\n' && !bSkipPrefix)
-        {
-            /* emit trace prefix */
-            OMX_OSAL_GetTracePrefix(nTraceFlags,szPrefix);
-            printf(szPrefix);
-            if (g_pLogFile){
-                fprintf(g_pLogFile,szPrefix);
-            }
-        }
-
-        /* emit trace */
-        va_start(args, format);
-        vprintf(format, args);
-        if (g_pLogFile){
-            vfprintf(g_pLogFile,format, args);
-        }
-        va_end(args);
-
-        /* skip prefix on next output if this is no the end of line */
-        if (format[0] != 0)
-            bSkipPrefix = (format[strlen(format)-1]  != '\n');
-    }    
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return OMX_ErrorNone;       
-}
-
-/**********************************************************************
- * INPUT FILE MAPPING
- **********************************************************************/
-
-FILE *g_OMX_CONF_pInFile[OMX_CONF_MAXINFILEMAPPINGS];
-
-OMX_ERRORTYPE OMX_OSAL_PortIndexToArrayIndex( OMX_IN OMX_U32 nPortIndex, OMX_OUT OMX_U32 *pArrayIndex )
-{
-    OMX_U32 i;
-    for (i=0;i<g_OMX_CONF_nInFileMappings;i++){
-        if (g_OMX_CONF_InFileMap[i].nPortIndex == nPortIndex){
-            *pArrayIndex = i;
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_OSAL_OpenInputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    
-    if ( OMX_ErrorNone != OMX_OSAL_PortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    g_OMX_CONF_pInFile[nArrayIndex] = fopen(g_OMX_CONF_InFileMap[nArrayIndex].sInputFileName, "rb");
-
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-OMX_U32 OMX_OSAL_ReadFromInputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_PortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return 0;
-    }
-
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return 0;
-
-    return (OMX_U32)fread(pData, 1, nBytes, g_OMX_CONF_pInFile[nArrayIndex]);
-}
-
-OMX_ERRORTYPE OMX_OSAL_CloseInputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_PortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return OMX_ErrorBadParameter;
-
-    if (fclose(g_OMX_CONF_pInFile[nArrayIndex])) return OMX_ErrorUndefined;
-    g_OMX_CONF_pInFile[nArrayIndex] = 0;
-
-    return OMX_ErrorNone;
-}
-
-/**********************************************************************
- * OUTPUT FILE MAPPING
- **********************************************************************/
-
-FILE *g_OMX_CONF_pOutFile[OMX_CONF_MAXOUTFILEMAPPINGS];
-
-OMX_ERRORTYPE OMX_OSAL_OutPortIndexToArrayIndex( OMX_IN OMX_U32 nPortIndex, OMX_OUT OMX_U32 *pArrayIndex )
-{
-    OMX_U32 i;
-    for (i=0;i<g_OMX_CONF_nOutFileMappings;i++){
-        if (g_OMX_CONF_OutFileMap[i].nPortIndex == nPortIndex){
-            *pArrayIndex = i;
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_OSAL_OpenOutputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    g_OMX_CONF_pOutFile[nArrayIndex] = fopen(g_OMX_CONF_OutFileMap[nArrayIndex].sOutputFileName, "wb");
-
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-OMX_U32 OMX_OSAL_WriteToOutputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return 0;
-    }
-
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return 0;
-
-    return (OMX_U32)fwrite(pData, 1, nBytes, g_OMX_CONF_pOutFile[nArrayIndex]);
-}
-
-OMX_ERRORTYPE OMX_OSAL_CloseOutputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return OMX_ErrorBadParameter;
-
-    if (fclose(g_OMX_CONF_pOutFile[nArrayIndex])) return OMX_ErrorUndefined;
-    g_OMX_CONF_pOutFile[nArrayIndex] = 0;
-
-    return OMX_ErrorNone;
-}
-
-/***********************************************************************
- * Conformance Script Parser
- ***********************************************************************/
-
-OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromFile(OMX_STRING sFileName)
-{
-    FILE *fptr;
-    char sLine[512];
-
-    fptr = fopen(sFileName, "r");
-    if (!fptr) {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Failed to open script file %s\n", sFileName);
-        exit(1);
-    }
-    
-    while (!feof(fptr)){
-        if (fgets(sLine, sizeof(sLine)-1, fptr))
-        {
-            size_t len = strlen(sLine);
-            while (sLine[len-1] == '\n' || sLine[len-1] == '\r')
-                sLine[--len] = 0;
-            OMX_CONF_ParseCommand(sLine);  
-        }
-    }
-    fclose(fptr);
-
-    return OMX_ErrorNone;
-}
-
-
-OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromPrompt()
-{
-    char sLine[512];
-    do{
-        printf("> ");fflush(stdout);
-        if (fgets(sLine, sizeof(sLine)-1, stdin))
-        {
-            size_t len = strlen(sLine);
-            while (sLine[len-1] == '\n' || sLine[len-1] == '\r')
-                sLine[--len] = 0;
-            OMX_CONF_ParseCommand(sLine);  
-        }
-    } while (1 != strlen(sLine) || ('q' != tolower(sLine[0])));
-
-    return OMX_ErrorNone;
-}
-
-/**This function open a file */
-OMX_ERRORTYPE OMX_OSAL_OpenBufferVarFile( OMX_INOUT FILE** pFile,OMX_IN OMX_STRING sInFileName,OMX_STRING sMode)
-{
-    *pFile = fopen(sInFileName, sMode);
-
-    if (!*pFile) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-/**This function read data from a file */
-OMX_U32 OMX_OSAL_ReadFromBufferVarInputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_INOUT FILE* pFile )
-{
-    if (!pFile) return 0;
-
-    return (OMX_U32)fread(pData, 1, nBytes, pFile);
-}
-
-/**This function write output of a file */
-OMX_U32 OMX_OSAL_WriteToBufferVarOutputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN FILE* pFile)
-{
-    if (!pFile) return 0;
-
-    return (OMX_U32)fwrite(pData, 1, nBytes, pFile);
-}
-
-/**This function close a file */
-OMX_ERRORTYPE OMX_OSAL_CloseBufferVarFile( OMX_INOUT FILE* pFile )
-{
-    if (fclose(pFile)) return OMX_ErrorUndefined;
-    
-    return OMX_ErrorNone;
-}
-/**This function parses buffer variance file */
-OMX_ERRORTYPE OMX_OSAL_ReadBufferVarianceFile (OMX_OUT OMX_U8 *sPortIndex,
-                                               OMX_OUT OMX_STRING sParamName,
-                                               OMX_OUT OMX_STRING sFieldName,
-                                               OMX_OUT OMX_U32 *nFieldValue,
-                                               OMX_OUT OMX_U32 *nArraySize,
-                                               OMX_OUT OMX_U32* nMaxBufSize,
-                                               OMX_INOUT OMX_U32 **nBufferVarArray,
-                                               OMX_IN FILE* pInFile)
-{
-    OMX_U32 nRead,nTotalRead;
-    OMX_U8 *pLine = NULL;
-    OMX_U32 nValue;
-    OMX_U32 nLen = 1,i=0;
-
-    if (!pInFile) return OMX_ErrorUndefined;
-
-    /*Read Port Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy(sPortIndex,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"sPortIndex=%s", sPortIndex);
-    nTotalRead=nRead;
-
-    /*Read Parameter Name Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy(sParamName,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Param Type=%s", sParamName);
-    nTotalRead+=nRead;
-
-    /*Read Field Name Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy(sFieldName,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Field Type=%s", sFieldName);
-    nTotalRead+=nRead;
-
-    nRead = getline(&pLine, &nLen, pInFile);
-    if(nRead!=0)
-    *nFieldValue=(OMX_U32)atoi(pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Field Value=%d\n", *nFieldValue);
-    nTotalRead+=nRead;
-
-    /*Count number of buffer to be sent on the input port*/
-    *nArraySize=0;
-    while ((nRead = getline(&pLine, &nLen, pInFile)) != -1) {
-        (*nArraySize)++;
-    }
-
-    /*Allocate buffer size and It's freed in cleanup ports function*/
-    *nBufferVarArray=(OMX_U32 *)OMX_OSAL_Malloc(sizeof(OMX_U32)*(*nArraySize));
-    *nMaxBufSize=0;
-
-    fseek(pInFile,nTotalRead,SEEK_SET);
-    while ((nRead = getline(&pLine, &nLen, pInFile)) != -1) {
-        (*nBufferVarArray)[i]=atoi(pLine);
-        /*Calculation maximum size of the buffer*/
-        *nMaxBufSize=((*nMaxBufSize>(*nBufferVarArray)[i])?*nMaxBufSize:(*nBufferVarArray)[i]);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"i=%3d nBufferSize=%5d\n",i, (*nBufferVarArray)[i]);
-        i++;
-    }
-
-    if (pLine)
-        free(pLine);
-
-    return OMX_ErrorNone;
-
-}
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_test.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_test.c
deleted file mode 100644 (file)
index d2bcbac..0000000
+++ /dev/null
@@ -1,342 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_OSAL_Test.c
- *  Tests to verify a working implementation of OSAL functions.
- */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-#define OMX_OSAL_TESTERR( eError ) if( OMX_ErrorNone != eError ) {                            \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s:%d Error %x\n", __FILE__, __LINE__, eError); \
-        goto OMX_OSAL_TEST_BAIL;                                                              \
-    }
-
-
-/* ******************************************************************
- *  Memory test 1:
- * ******************************************************************
- *  Just basic memory tests 
- */
-OMX_ERRORTYPE OMX_OSAL_MemoryTest1(OMX_IN OMX_STRING cComponentName)
-{
-    OMX_ERRORTYPE eError = OMX_ErrorNone;    
-    OMX_U32 *pValues = 0;
-    OMX_U8 * pBuffer = (OMX_U8 *)OMX_OSAL_Malloc( sizeof(OMX_U32) * 4);
-
-    UNUSED_PARAMETER(cComponentName);
-
-    if(!pBuffer) {
-        eError = OMX_ErrorInsufficientResources;
-    }
-
-    /* Write into memory */
-    pValues = (OMX_U32 *)pBuffer;
-    pValues[0] = 0; pValues[1] = OMX_ALL; pValues[2] = 0; pValues[3] = OMX_ALL; 
-
-    /* Read from memory */
-    if( pValues[2] != 0 ) {
-        OMX_OSAL_Free( pBuffer ); 
-        return OMX_ErrorUndefined;
-    }
-
-    /* Free memory */
-    OMX_OSAL_Free( pBuffer ); 
-
-    return eError;
-}
-
-
-/* ******************************************************************
- *  Multi-thread test 1:
- * ******************************************************************
- *  Creates threads to increment a common variable. 
- *  At the end, nFilledIn should equal MULTITHREAD_TEST1_ARRAYSIZE 
- *  (can test w/ and w/o thread protection)
- */
-#define MULTITHREAD_TEST1_LOOPSIZE   1024*10
-#define MULTITHREAD_TEST1_NUMTHREADS 32
-#define MULTITHREAD_TEST1_ARRAYSIZE  MULTITHREAD_TEST1_LOOPSIZE*MULTITHREAD_TEST1_NUMTHREADS
-
-typedef struct SMultiThreadTest1Param 
-{   /* Each thread has a handle to the mutex lock and it's event handle */
-    OMX_U32 *       pFilledIn;
-    OMX_HANDLETYPE  oMutex;
-    OMX_HANDLETYPE  oEvent;
-} MultiThreadTest1Param;
-
-OMX_U32 MultiThreadTest1Func(OMX_PTR pParam)
-{
-    OMX_U32 nIndex = 0;
-    MultiThreadTest1Param *pData = (MultiThreadTest1Param *)pParam;
-
-    /* Increment number filled in */
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_LOOPSIZE; nIndex++) {
-        OMX_OSAL_MutexLock( pData->oMutex );
-        *(pData->pFilledIn) += 1;
-        *(pData->pFilledIn) -= 1;
-        *(pData->pFilledIn) *= 2;
-        *(pData->pFilledIn) /= 2;
-        *(pData->pFilledIn) += 1;
-        *(pData->pFilledIn) -= 1;
-        *(pData->pFilledIn) *= 2;
-        *(pData->pFilledIn) /= 2;
-
-        *(pData->pFilledIn) += 1;
-        OMX_OSAL_MutexUnlock( pData->oMutex );
-    }
-
-    /* Set event to notify thread complete */
-    OMX_OSAL_EventSet( pData->oEvent );
-    return 0;
-}
-
-OMX_ERRORTYPE OMX_OSAL_MultiThreadTest1(OMX_IN OMX_STRING cComponentName)
-{    
-    OMX_HANDLETYPE          oMutex;
-    OMX_HANDLETYPE          oEvent[MULTITHREAD_TEST1_NUMTHREADS]; 
-    OMX_HANDLETYPE          oThread[MULTITHREAD_TEST1_NUMTHREADS];
-    MultiThreadTest1Param   oThreadParams[MULTITHREAD_TEST1_NUMTHREADS];
-    OMX_U32                 nIndex;
-    OMX_U32                 nFilledIn; 
-    OMX_ERRORTYPE           eError;    
-    OMX_BOOL                bTimeout;
-
-    UNUSED_PARAMETER(cComponentName);
-
-    /* Initialize variables */
-    eError              = OMX_ErrorNone;
-    oMutex              = 0; 
-    nFilledIn           = 0;     
-    bTimeout            = OMX_FALSE;
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_NUMTHREADS; nIndex++) {
-        oEvent[nIndex]  = 0; 
-        oThread[nIndex] = 0; 
-    }
-    
-    /* Create mutex and event instances */
-    eError = OMX_OSAL_MutexCreate( &oMutex ); 
-    OMX_OSAL_TESTERR( eError );
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_EventCreate( &oEvent[nIndex] ); 
-        OMX_OSAL_TESTERR( eError );
-
-        oThreadParams[nIndex].pFilledIn = &nFilledIn;
-        oThreadParams[nIndex].oMutex    = oMutex;
-        oThreadParams[nIndex].oEvent    = oEvent[nIndex];        
-    }
-
-    /* Launch threads */
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_ThreadCreate( MultiThreadTest1Func, 
-            (OMX_PTR) &oThreadParams[nIndex],
-            0, &oThread[nIndex] ); 
-        OMX_OSAL_TESTERR( eError );
-    }
-
-    /* Wait for the threads to complete */
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_EventWait( oEvent[nIndex], INFINITE_WAIT, &bTimeout);
-    }
-
-    /* Check if values are correct */
-    if( nFilledIn == MULTITHREAD_TEST1_ARRAYSIZE ) {
-        /* Threading passes */
-        nFilledIn = 1; 
-    }
-    else {
-        /* Error */
-        nFilledIn = 0; 
-
-        /* TO DO: Set correct error */
-        eError = OMX_ErrorUndefined;
-    }
-
-OMX_OSAL_TEST_BAIL:
-    /* Free memory and return error value */    
-    for(nIndex = 0; nIndex < MULTITHREAD_TEST1_NUMTHREADS; nIndex++) {
-        if( oThread[nIndex] ) OMX_OSAL_ThreadDestroy( oThread[nIndex] ); 
-        if( oEvent[nIndex] )  OMX_OSAL_EventDestroy( oEvent[nIndex] );         
-    }
-    if(oMutex) OMX_OSAL_MutexDestroy( oMutex );
-
-    return eError; 
-}
-
-/* ******************************************************************
- *  Timer test 1:
- * ******************************************************************
- *  Basic timer test: 
- *  Fill in an array without using threads first. Should be fast.
- *  Next, fill in the array using threads. See how much extra time
- *  used in overhead/waiting.
- */
-typedef struct STimerTest1Param 
-{ 
-    OMX_U8 *        pBuffer;
-    OMX_U32         uStartIndex;
-    OMX_U32         uEndIndex;
-    OMX_HANDLETYPE  oEvent;
-} TimerTest1Param;
-
-#define TIMER_TEST1_NUMTHREADS 10
-#define TIMER_TEST1_LOOPSIZE   1024*40
-#define TIMER_TEST1_ARRAYSIZE  TIMER_TEST1_LOOPSIZE*TIMER_TEST1_NUMTHREADS
-
-OMX_U32 TimerTest1Func(OMX_PTR pParam)
-{
-    OMX_U32 nIndex = 0;
-    TimerTest1Param *pData = (TimerTest1Param *)pParam;
-
-    /* Increment number filled in */
-    for(nIndex = pData->uStartIndex; nIndex <= pData->uEndIndex; nIndex++) {
-        pData->pBuffer[nIndex] = 2;
-    }
-
-    /* Set event to notify thread complete */
-    OMX_OSAL_EventSet( pData->oEvent );
-    return 0;
-}
-
-OMX_ERRORTYPE OMX_OSAL_TimerTest1(OMX_IN OMX_STRING cComponentName)
-{
-    OMX_ERRORTYPE   eError = OMX_ErrorNone;
-    OMX_U32 nIndex  = 0;
-    OMX_U32 uBegin  = 0;
-    OMX_U32 uEnd    = 0;
-    OMX_U8 *pBuffer = 0;
-
-    OMX_HANDLETYPE     oEvent[TIMER_TEST1_NUMTHREADS]; 
-    OMX_HANDLETYPE     oThread[TIMER_TEST1_NUMTHREADS];
-    TimerTest1Param    oThreadParams[TIMER_TEST1_NUMTHREADS]; 
-    OMX_BOOL           bTimeout = OMX_FALSE;
-
-    UNUSED_PARAMETER(cComponentName);
-    
-    pBuffer = OMX_OSAL_Malloc( TIMER_TEST1_ARRAYSIZE * sizeof(OMX_U32) );
-    if(!pBuffer) {
-        return OMX_ErrorInsufficientResources;
-    }
-
-    /* Time how long it takes to fill in an array */
-    uBegin = OMX_OSAL_GetTime();
-    for( nIndex = 0; nIndex < TIMER_TEST1_ARRAYSIZE; nIndex++) {
-        pBuffer[nIndex] = 1;
-    }
-    uEnd = OMX_OSAL_GetTime(); 
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Total time without threads: %d\n", uEnd - uBegin ); 
-
-    for(nIndex = 0; nIndex < TIMER_TEST1_NUMTHREADS; nIndex++) {
-        oEvent[nIndex]  = 0; 
-        oThread[nIndex] = 0; 
-    }
-    for(nIndex = 0; nIndex < TIMER_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_EventCreate( &oEvent[nIndex] ); 
-        OMX_OSAL_TESTERR( eError );
-
-        oThreadParams[nIndex].pBuffer       = pBuffer;
-        oThreadParams[nIndex].oEvent        = oEvent[nIndex];  
-        oThreadParams[nIndex].uStartIndex   = nIndex * TIMER_TEST1_LOOPSIZE;
-        oThreadParams[nIndex].uEndIndex     = nIndex * TIMER_TEST1_LOOPSIZE 
-                                                + TIMER_TEST1_LOOPSIZE -1;
-    }
-
-    uBegin = OMX_OSAL_GetTime();
-    /* Launch threads */
-    for(nIndex = 0; nIndex < TIMER_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_ThreadCreate( TimerTest1Func, 
-            (OMX_PTR) &oThreadParams[nIndex],
-            0, &oThread[nIndex] ); 
-        OMX_OSAL_TESTERR( eError );
-    }
-
-    /* Wait for the threads to complete */
-    for(nIndex = 0; nIndex < TIMER_TEST1_NUMTHREADS; nIndex++) {
-        eError = OMX_OSAL_EventWait( oEvent[nIndex], INFINITE_WAIT, &bTimeout);
-    }
-    uEnd = OMX_OSAL_GetTime(); 
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Total time with threads: %d\n", uEnd - uBegin ); 
-
-    for( nIndex = 0; nIndex < TIMER_TEST1_ARRAYSIZE; nIndex++) {
-        if( pBuffer[nIndex] != 2 ) {
-            eError = OMX_ErrorUndefined;
-            break;
-        }
-    }
-
-OMX_OSAL_TEST_BAIL:
-    /* Free memory and return error value */    
-    for(nIndex = 0; nIndex < TIMER_TEST1_NUMTHREADS; nIndex++) {
-        if( oThread[nIndex] ) OMX_OSAL_ThreadDestroy( oThread[nIndex] ); 
-        if( oEvent[nIndex] )  OMX_OSAL_EventDestroy( oEvent[nIndex] );         
-    }
-    if(pBuffer) OMX_OSAL_Free(pBuffer);
-    return eError;
-}
-
-
-#define OMX_CONF_DOTEST(_T_) eError = _T_(cComponentName);          \
-    if (eError != OMX_ErrorNone) {                                  \
-        nErrors++;                                                  \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s:%d Error %x\n",    \
-                       __FILE__, __LINE__, eError);                 \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, #_T_ " FAILED\n");  \
-    }                                                               \
-    else                                                            \
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, #_T_ " PASSED\n");
-
-OMX_ERRORTYPE OMX_OSAL_TestAll(OMX_IN OMX_STRING cComponentName)
-{
-    int nErrors = 0;
-    OMX_ERRORTYPE eError;
-
-    UNUSED_PARAMETER(cComponentName);
-
-    OMX_CONF_DOTEST(OMX_OSAL_MemoryTest1);
-    OMX_CONF_DOTEST(OMX_OSAL_MultiThreadTest1);
-    OMX_CONF_DOTEST(OMX_OSAL_TimerTest1);
-    if (nErrors > 0)
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_PASSFAIL, "OMX_OSAL_TestAll FAILED\n");
-    return (nErrors > 0) ? OMX_ErrorUndefined : OMX_ErrorNone;
-}
-
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_win32.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/omx_osal_win32.c
deleted file mode 100644 (file)
index a31b0da..0000000
+++ /dev/null
@@ -1,653 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc. 
- * 
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions: 
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software. 
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
- *
- */
-
-/** OMX_OSAL_Win32.c
- *  Win32 implemenation of the OpenMax IL OS abstraction layer including memory, threading,
- *  mutex, event, time query and tracing functionality.
- */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-
-#include <stdio.h>
-#include <windows.h>
-#include <mmsystem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-extern OMX_U32 g_OMX_OSAL_TraceFlags;
-
-/**********************************************************************
- * MEMORY               
- **********************************************************************/
-OMX_PTR OMX_OSAL_Malloc( OMX_IN OMX_U32 size )
-{
-    OMX_PTR pData;
-    pData = (OMX_PTR)malloc(size);
-    return pData;
-}
-
-void OMX_OSAL_Free( OMX_IN OMX_PTR pData )
-{
-    free(pData);
-}
-
-/* JVW-NVIDIA: Added for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=217 */
-
-OMX_PTR OMX_OSAL_Memset( OMX_IN OMX_PTR pDest, OMX_IN OMX_U32 cChar, OMX_IN OMX_U32 nCount)
-{    
-    return memset(pDest, cChar, nCount);
-}
-
-/* JVW-NVIDIA: Added for http://cvs.khronos.org/bugzilla/show_bug.cgi?id=217 */
-
-OMX_PTR OMX_OSAL_Memcpy( OMX_IN OMX_PTR pDest, OMX_IN OMX_PTR pSrc, OMX_IN OMX_U32 nCount)
-{
-    return memcpy(pDest, pSrc, nCount);
-}
-
-/**********************************************************************
- * THREADS               
- **********************************************************************/
-
-typedef struct OMX_CONF_THREADDATATYPE {
-    OMX_HANDLETYPE hActualThread;
-    OMX_U32 (*pFunc)(OMX_PTR pParam);
-    OMX_PTR pParam;
-} OMX_CONF_THREADDATATYPE;
-
-DWORD WINAPI ThreadProc( LPVOID lpParameter )
-{ 
-   OMX_CONF_THREADDATATYPE *pThreadData;
-   pThreadData = (OMX_CONF_THREADDATATYPE *)lpParameter;
-   return pThreadData->pFunc(pThreadData->pParam);
-}
-
-/** Create a thread given the thread function, a data parameter to pass 
- *  to the thread, and the thread priority (higher values=higher priority).
- *  The thread is created and executed immediately calling the thread 
- *  function with the supplied data parameter. */
-OMX_ERRORTYPE OMX_OSAL_ThreadCreate( OMX_IN OMX_U32 (*pFunc)(OMX_PTR pParam), 
-                                     OMX_IN OMX_PTR pParam, 
-                                     OMX_IN OMX_U32 nPriority, 
-                                     OMX_OUT OMX_HANDLETYPE *phThread )
-{
-    OMX_CONF_THREADDATATYPE *pThreadData;
-
-    pThreadData = (OMX_CONF_THREADDATATYPE*)OMX_OSAL_Malloc(sizeof(OMX_CONF_THREADDATATYPE));
-    pThreadData->pFunc = pFunc;
-    pThreadData->pParam = pParam;
-    
-    pThreadData->hActualThread = CreateThread(NULL, 0, ThreadProc, pThreadData, 0, 0);
-    if (pThreadData->hActualThread == NULL) {
-        *phThread = NULL;
-        OMX_OSAL_Free(pThreadData);
-        return OMX_ErrorInsufficientResources;
-    }
-
-    if (nPriority) {
-        SetThreadPriority(*phThread, nPriority);
-    }
-
-    *phThread = (OMX_HANDLETYPE)pThreadData;
-
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_ThreadDestroy( OMX_IN OMX_HANDLETYPE hThread )
-{
-   OMX_CONF_THREADDATATYPE *pThreadData;
-   pThreadData = (OMX_CONF_THREADDATATYPE *)hThread;
-
-   if (WaitForSingleObject(pThreadData->hActualThread, INFINITE) != WAIT_OBJECT_0) {
-        return OMX_ErrorBadParameter;
-    }
-
-    if (!CloseHandle(pThreadData->hActualThread)) {
-        return OMX_ErrorBadParameter;
-    }
-        
-    OMX_OSAL_Free(hThread);
-
-    return OMX_ErrorNone;       
-}
-
-/**********************************************************************
- * MUTEX               
- **********************************************************************/
-
-OMX_ERRORTYPE OMX_OSAL_MutexCreate(OMX_OUT OMX_HANDLETYPE *phMutex)
-{
-    *phMutex = CreateMutex(NULL, FALSE, NULL);
-    if (*phMutex == NULL) {
-        return OMX_ErrorInsufficientResources;
-    }
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_MutexDestroy(OMX_IN OMX_HANDLETYPE hMutex)
-{
-    if (!CloseHandle(hMutex)) {
-        return OMX_ErrorBadParameter;
-    }    
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_MutexLock(OMX_IN OMX_HANDLETYPE hMutex)
-{
-   if (WaitForSingleObject(hMutex, INFINITE) != WAIT_OBJECT_0) {
-        return OMX_ErrorBadParameter;
-    }
-   return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_MutexUnlock(OMX_IN OMX_HANDLETYPE hMutex)
-{
-    if (!ReleaseMutex(hMutex)) {
-          return OMX_ErrorBadParameter;  
-    }
-    return OMX_ErrorNone;       
-}
-
-/**********************************************************************
- * EVENTS               
- **********************************************************************/
-
-#define INFINITE_WAIT 0xffffffff
-
-OMX_ERRORTYPE OMX_OSAL_EventCreate(OMX_OUT OMX_HANDLETYPE *phEvent)
-{
-    /* Create a win32 event that
-        - has default security
-        - must be manualy reset
-        - starts as nonsignaled
-        - is unnamed
-    */
-    *phEvent = CreateEvent(NULL, TRUE, 0, NULL);
-    if (*phEvent == NULL) {
-        return OMX_ErrorInsufficientResources;
-    }
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventDestroy(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    if (!CloseHandle(hEvent)) {
-        return OMX_ErrorBadParameter;
-    }    
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventReset(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    if (!ResetEvent(hEvent)) {
-        return OMX_ErrorBadParameter;
-    }
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventSet(OMX_IN OMX_HANDLETYPE hEvent)
-{
-    if (!SetEvent(hEvent)) {
-        return OMX_ErrorBadParameter;
-    }    
-    return OMX_ErrorNone;       
-}
-
-OMX_ERRORTYPE OMX_OSAL_EventWait(OMX_IN OMX_HANDLETYPE hEvent, OMX_IN OMX_U32 mSec, OMX_OUT OMX_BOOL *pbTimedOut)
-{
-    *pbTimedOut = 0;
-    switch (WaitForSingleObject(hEvent, mSec)) 
-    {
-    case WAIT_TIMEOUT:
-        *pbTimedOut = 1; 
-    case WAIT_OBJECT_0:
-        return OMX_ErrorNone;       
-    default:
-        return OMX_ErrorBadParameter;
-    }
-}
-
-/**********************************************************************
- * TIME
- **********************************************************************/
-
-/** Returns a time value in milliseconds based on a clock starting at
- *  some arbitrary base. Given a call to GetTime that returns a value
- *  of n a subsequent call to GetTime made m milliseconds later should 
- *  return a value of (approximately) (n+m). This method is used, for
- *  instance, to compute the duration of call. */
-OMX_U32 OMX_OSAL_GetTime()
-{
-    //return (OMX_U32) timeGetTime();
-       return 0;
-}
-
-/**************************************************************
- * LOG FILES
- **************************************************************/
-
-FILE *g_pLogFile=NULL;
-
-/** Open logfile. All enabled tracing will be sent to the file (in addition
- *  to the display). */
-OMX_ERRORTYPE OMX_OSAL_OpenLogfile(OMX_IN OMX_STRING sFilename)
-{
-    OMX_OSAL_CloseLogfile();
-    g_pLogFile = fopen(sFilename, "w");
-    return g_pLogFile? OMX_ErrorNone : OMX_ErrorBadParameter;
-}
-
-/** Close logfile.*/
-OMX_ERRORTYPE OMX_OSAL_CloseLogfile()
-{
-    if (g_pLogFile){
-        fclose(g_pLogFile);
-        g_pLogFile = NULL;
-    }
-    return OMX_ErrorNone;
-}
-
-/***********************************************************************
- * TRACE
- ***********************************************************************/
-
-static OMX_BOOL bSkipPrefix = OMX_FALSE;
-
-/** Output a trace message */
-OMX_ERRORTYPE OMX_OSAL_Trace(OMX_IN OMX_U32 nTraceFlags, OMX_IN char *format, ...)
-{
-    char szPrefix[5];
-    va_list args;
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexLock(g_OMX_CONF_hTraceMutex);
-
-    if (g_OMX_OSAL_TraceFlags & nTraceFlags)
-    {
-        if (format[0]!='#' && format[0]!='\n' && !bSkipPrefix)
-        {
-            /* emit trace prefix */
-            OMX_OSAL_GetTracePrefix(nTraceFlags,szPrefix);
-            printf(szPrefix);
-            if (g_pLogFile){
-                fprintf(g_pLogFile,szPrefix);
-            }
-        }
-
-        /* emit trace */
-        va_start(args, format);
-        vprintf(format, args);
-        if (g_pLogFile){
-            vfprintf(g_pLogFile,format, args);
-        }
-        va_end(args);
-
-        /* skip prefix on next output if this is no the end of line */
-        if (format[0] != 0)
-            bSkipPrefix = (format[strlen(format)-1]  != '\n');
-    }    
-
-    if (g_OMX_CONF_hTraceMutex) OMX_OSAL_MutexUnlock(g_OMX_CONF_hTraceMutex);
-
-    return OMX_ErrorNone;       
-}
-
-/**********************************************************************
- * INPUT FILE MAPPING
- **********************************************************************/
-
-FILE *g_OMX_CONF_pInFile[OMX_CONF_MAXINFILEMAPPINGS];
-
-OMX_ERRORTYPE OMX_OSAL_InPortIndexToArrayIndex( OMX_IN OMX_U32 nPortIndex, OMX_OUT OMX_U32 *pArrayIndex )
-{
-    OMX_U32 i;
-    for (i=0;i<g_OMX_CONF_nInFileMappings;i++){
-        if (g_OMX_CONF_InFileMap[i].nPortIndex == nPortIndex){
-            *pArrayIndex = i;
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_OSAL_OpenInputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    
-    if ( OMX_ErrorNone != OMX_OSAL_InPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    g_OMX_CONF_pInFile[nArrayIndex] = fopen(g_OMX_CONF_InFileMap[nArrayIndex].sInputFileName, "rb");
-
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-OMX_U32 OMX_OSAL_ReadFromInputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_InPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return 0;
-    }
-
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return 0;
-
-    return (OMX_U32)fread(pData, 1, nBytes, g_OMX_CONF_pInFile[nArrayIndex]);
-}
-
-OMX_ERRORTYPE OMX_OSAL_CloseInputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_InPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    if (!g_OMX_CONF_pInFile[nArrayIndex]) return OMX_ErrorBadParameter;
-
-    if (fclose(g_OMX_CONF_pInFile[nArrayIndex])) return OMX_ErrorUndefined;
-    g_OMX_CONF_pInFile[nArrayIndex] = 0;
-
-    return OMX_ErrorNone;
-}
-
-/**********************************************************************
- * OUTPUT FILE MAPPING
- **********************************************************************/
-
-FILE *g_OMX_CONF_pOutFile[OMX_CONF_MAXOUTFILEMAPPINGS];
-
-OMX_ERRORTYPE OMX_OSAL_OutPortIndexToArrayIndex( OMX_IN OMX_U32 nPortIndex, OMX_OUT OMX_U32 *pArrayIndex )
-{
-    OMX_U32 i;
-    for (i=0;i<g_OMX_CONF_nOutFileMappings;i++){
-        if (g_OMX_CONF_OutFileMap[i].nPortIndex == nPortIndex){
-            *pArrayIndex = i;
-            return OMX_ErrorNone;
-        }
-    }
-    return OMX_ErrorBadParameter;
-}
-
-OMX_ERRORTYPE OMX_OSAL_OpenOutputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-    
-    g_OMX_CONF_pOutFile[nArrayIndex] = fopen(g_OMX_CONF_OutFileMap[nArrayIndex].sOutputFileName, "wb");
-
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-OMX_U32 OMX_OSAL_WriteToOutputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return 0;
-    }
-
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return 0;
-
-    return (OMX_U32)fwrite(pData, 1, nBytes, g_OMX_CONF_pOutFile[nArrayIndex]);
-}
-
-OMX_ERRORTYPE OMX_OSAL_CloseOutputFile( OMX_IN OMX_U32 nPortIndex )
-{
-    OMX_U32 nArrayIndex;
-    if ( OMX_ErrorNone != OMX_OSAL_OutPortIndexToArrayIndex(nPortIndex, &nArrayIndex)){
-        return OMX_ErrorBadParameter;
-    }
-
-    if (!g_OMX_CONF_pOutFile[nArrayIndex]) return OMX_ErrorBadParameter;
-
-    if (fclose(g_OMX_CONF_pOutFile[nArrayIndex])) return OMX_ErrorUndefined;
-    g_OMX_CONF_pOutFile[nArrayIndex] = 0;
-
-    return OMX_ErrorNone;
-}
-
-/***********************************************************************
- * Conformance Script Parser
- ***********************************************************************/
-
-OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromFile(OMX_STRING sFileName)
-{
-    FILE *fptr;
-    char sLine[512];
-
-    fptr = fopen(sFileName, "r");
-    if (!fptr) {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Failed to open script file %s\n", sFileName);
-        exit(1);
-    }
-    while (!feof(fptr)){
-        if (fgets(sLine, 512, fptr))
-        {
-            size_t len = strlen(sLine);
-            while (sLine[len-1] == '\r' || sLine[len-1] == '\n')
-                sLine[--len] = 0;  /* delete CR/LF from end of line */
-            OMX_CONF_ParseCommand(sLine);  
-        }
-    }
-    fclose(fptr);
-
-    return OMX_ErrorNone;
-}
-
-
-OMX_ERRORTYPE OMX_OSAL_ProcessCommandsFromPrompt()
-{
-    char sLine[512];
-    do{
-        printf("> ");fflush(stdout);
-        if (gets(sLine))
-        {
-            OMX_CONF_ParseCommand(sLine);  
-        }
-    } while (1 != strlen(sLine) || ('q' != tolower(sLine[0])));
-
-    return OMX_ErrorNone;
-}
-
-#define START_LEN      256
-
-OMX_U32 getline(OMX_STRING *buf, OMX_U32 *pLen, FILE *file)
-{
-       OMX_STRING p = 0;
-       OMX_U32 len, new_len;
-       OMX_U32 n = 0;
-       OMX_U8 c;
-       OMX_U32 dirty_buffer = 0;
-
-       len = START_LEN;
-    /*Allocate memory is not allocated*/
-    if(*buf==NULL)
-        *buf = (OMX_STRING)malloc(START_LEN + 1);
-       if (!*buf) {
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Failed to Allocate Memory\n");
-        exit(1);
-       }
-
-       p = *buf;
-
-    for (;;) {
-        c = (OMX_U8) getc(file);
-        if (feof(file)) {
-            if (dirty_buffer)
-                   break;
-            *pLen= (OMX_U32) -1;
-            return ((OMX_U32) -1);
-        }
-        if (c == '\n')
-        break;
-
-        if (n++ >= len) {
-            new_len = len << 1;
-            *buf = (OMX_STRING)realloc(buf, new_len + 1);
-            if (*buf == NULL) {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "Failed to Re-allocate Memory\n");
-                exit(1);
-            }
-            len = new_len;
-            p = *buf;
-            p += len >> 1;
-        }
-        *p = c;
-        p++;
-        dirty_buffer = 1;
-    }
-
-    *p = '\0';
-    *pLen=n;
-    return n;
-}
-
-/**This function open buffer file */
-OMX_ERRORTYPE OMX_OSAL_OpenBufferVarFile( OMX_INOUT FILE** pInFile,OMX_IN OMX_STRING sInFileName,OMX_STRING sMode)
-{
-    *pInFile = fopen(sInFileName, sMode);
-
-    if (!*pInFile) return OMX_ErrorUndefined;
-
-    return OMX_ErrorNone;
-}
-
-/**This function read data from file */
-OMX_U32 OMX_OSAL_ReadFromBufferVarInputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_INOUT FILE* pInFile )
-{
-    if (!pInFile) return 0;
-
-    return (OMX_U32)fread(pData, 1, nBytes, pInFile);
-}
-
-OMX_U32 OMX_OSAL_WriteToBufferVarOutputFile( OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN FILE* pInFile)
-{
-    if (!pInFile) return 0;
-
-    return (OMX_U32)fwrite(pData, 1, nBytes, pInFile);
-}
-
-/**This function close a file */
-OMX_ERRORTYPE OMX_OSAL_CloseBufferVarFile( OMX_INOUT FILE* pInFile )
-{
-    if (fclose(pInFile)) return OMX_ErrorUndefined;
-    
-    return OMX_ErrorNone;
-}
-
-/**This function parsed buffer variance file */
-OMX_ERRORTYPE OMX_OSAL_ReadBufferVarianceFile (OMX_OUT OMX_U8 *sPortIndex,
-                                               OMX_OUT OMX_STRING sParamName,
-                                               OMX_OUT OMX_STRING sFieldName,
-                                               OMX_OUT OMX_U32 *nFieldValue,
-                                               OMX_OUT OMX_U32 *nArraySize,
-                                               OMX_OUT OMX_U32* nMaxBufSize,
-                                               OMX_INOUT OMX_U32 **nBufferVarArray,
-                                               OMX_IN FILE* pInFile)
-{
-    OMX_U32 nRead;
-    OMX_U32 nListStartPosition;
-    OMX_STRING pLine = NULL;
-    OMX_U32 nLen = 0,i=0;
-
-    if (!pInFile) return 1;
-
-    /*Read Port Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy((OMX_STRING)sPortIndex,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"sPortIndex=%s\n", sPortIndex);
-
-    /*Read Parameter Name Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy(sParamName,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Param Type=%s, %s\n", sParamName,pLine);
-
-    /*Read Field Name Index*/
-    nRead = getline(&pLine, &nLen, pInFile);
-    strcpy(sFieldName,pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Field Type=%s, %s\n", sFieldName,pLine);
-
-    nRead = getline(&pLine, &nLen, pInFile);
-    if(nRead!=0)
-    *nFieldValue=(OMX_U32)atoi(pLine);
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"Field Value=%d, %s\n", *nFieldValue,pLine);
-    nListStartPosition = ftell(pInFile);
-
-    /*Count number of buffer to be sent on the input port*/
-    *nArraySize=0;
-    while ((nRead = getline(&pLine, &nLen, pInFile)) != -1) {
-      (*nArraySize)++;
-    }
-
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"nArraySize=%d\n", *nArraySize);
-
-    /*Allocate buffer size and It's freed in cleanup ports function*/
-    *nBufferVarArray=(OMX_U32 *)malloc((*nArraySize)*sizeof(OMX_U32));
-    *nMaxBufSize=0;
-
-    fseek(pInFile,nListStartPosition,SEEK_SET);
-    while ((nRead = getline(&pLine, &nLen, pInFile)) != -1) {
-        (*nBufferVarArray)[i]=atoi(pLine);
-        /*Calculation maximum size of the buffer*/
-        *nMaxBufSize=((*nMaxBufSize>(*nBufferVarArray)[i])?*nMaxBufSize:(*nBufferVarArray)[i]);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO,"i=%d nBufferSize=%d, %s\n",i, (*nBufferVarArray)[i],pLine);
-        i++;
-    }
-
-    if (pLine)
-        free(pLine);
-
-    return 0;
-
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_datametabolismtest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_datametabolismtest.c
deleted file mode 100644 (file)
index ad6305b..0000000
+++ /dev/null
@@ -1,1750 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_DataMetabolismTest.c
- *  OpenMax IL conformance test - Data Metabolism Test
- */
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_OSAL_Interfaces.h"
-#include "OMX_CONF_TestHarness.h"
-#include "OMX_CONF_StubbedCallbacks.h"
-
-#include <string.h>
-#include <stdio.h>
-
-    /*
-     *  D E C L A R A T I O N S
-     */
-
-#define TEST_NAME_STRING "DataMetabolismTest"
-#define TEST_COMPONENT_NAME_SIZE 128
-
-#define NUM_DOMAINS 0x4
-
-    static char szDesc[256];
-    static char szState[256];
-
-    OMX_U32 nNumOfBufferToProcess;
-    OMX_U32 nStartTime;
-
-    /*
-     *     M A C R O S
-     */
-
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0
-
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_ASSERT(_e_, _a_, _r_) \
-    if (!(_a_))\
-    {\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", (_r_));\
-        (_e_) = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }
-
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL
-
-#define OMX_CONF_TIMEOUT_STATE_CHANGE 2000 /* duration of event timeout in msec when changing states */
-
-#define OMX_CONF_WAIT_STATE(_p_, _s_, _e_)\
-{\
-    OMX_BOOL _bTimeout_;\
-    OMX_OSAL_EventWait((_p_)->hStateChangeEvent, OMX_CONF_TIMEOUT_STATE_CHANGE, &_bTimeout_);\
-    if (OMX_TRUE == _bTimeout_)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "State transition to %s never occured\n", szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-    _e_ = OMX_GetState((_p_)->hWrappedComp, &(_p_)->eState);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_s_ != (_p_)->eState)\
-    {\
-        OMX_CONF_StateToString(_s_, szState);\
-        OMX_CONF_StateToString((_p_)->eState, szDesc);\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "OMX_GetState reported %s, expecting %s\n",\
-                       szDesc, szState);\
-        _e_ = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }\
-}
-
-#define OMX_CONF_SET_STATE(_p_, _s_, _e_)\
-{\
-    OMX_CONF_StateToString(_s_, szState);\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Command component to %s\n", szState);\
-    OMX_OSAL_EventReset((_p_)->hStateChangeEvent);\
-    _e_ = OMX_SendCommand((_p_)->hWrappedComp, OMX_CommandStateSet, _s_, 0x0);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-}
-
-#define OMX_CONF_SET_STATE_AND_WAIT(_p_, _s_, _e_)\
-    OMX_CONF_SET_STATE(_p_, _s_, _e_);\
-    OMX_CONF_WAIT_STATE(_p_, _s_, _e_)
-
-#define Q_ALLOC(_p_, _n_)\
-    _p_ = (QTYPE*)OMX_OSAL_Malloc(sizeof(QTYPE) + (sizeof(OMX_PTR) * (_n_ + 1)));\
-    if (0x0 != _p_)\
-    {\
-        _p_->nNumEntries = _n_;\
-        _p_->nEnd = 0;\
-        _p_->nStart = 0;\
-        _p_->nInQueue = 0;\
-    }
-
-#define Q_FREE(_p_)\
-    if (0x0 != _p_)\
-    {\
-        OMX_OSAL_Free(_p_);\
-    }\
-    _p_ = 0x0
-
-#define Q_ADD(_p_, _e_)\
-    _p_->aEntires[_p_->nStart++] = (OMX_PTR)_e_;\
-    if (_p_->nStart == _p_->nNumEntries) _p_->nStart = 0;\
-    _p_->nInQueue++
-
-#define Q_PEEK(_p_, _e_)\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd];\
-    }
-
-#define Q_REMOVE(_p_, _e_)\
-    if (0x0 != _p_->nInQueue)\
-    {\
-        _e_ = _p_->aEntires[_p_->nEnd++];\
-        if (_p_->nEnd == _p_->nNumEntries) _p_->nEnd = 0;\
-        _p_->nInQueue--;\
-    }
-
-#define Q_INQUEUE(_p_) _p_->nInQueue
-
-    /*
-     *     D E F I N I T I O N S
-     */
-
-    typedef struct _TEST_CTXTYPE TEST_CTXTYPE;
-
-    typedef struct _QTYPE
-    {
-        OMX_U32 nNumEntries;
-        OMX_U32 nEnd;
-        OMX_U32 nStart;
-        OMX_U32 nInQueue;
-        OMX_PTR aEntires[1];
-
-    } QTYPE;
-
-    typedef struct _TEST_PORTTYPE
-    {
-        TEST_CTXTYPE *pCtx;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDef;
-        QTYPE *pQ;
-        OMX_U32 nBuffersOutstanding;
-        OMX_BOOL bEOS;
-        OMX_BOOL bOpenFile;
-        OMX_U32 nNumBuffer;
-        OMX_U32 *nBufferVarArray;
-        OMX_U32 nBufferIndex;
-        FILE *pFile;
-        OMX_STRING sFileName;
-    } TEST_PORTTYPE;
-
-    struct _TEST_CTXTYPE
-    {
-        OMX_STATETYPE eState;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_U32 nNumPorts;
-        OMX_PORT_PARAM_TYPE sPortParam[NUM_DOMAINS];
-        OMX_HANDLETYPE hStateChangeEvent;
-        OMX_HANDLETYPE hBufferCallbackEvent;
-        OMX_U32 nBuffersProcessed;
-        TEST_PORTTYPE *aPorts;
-        OMX_STRING *sRoleArray;
-        OMX_U32 nNumBuffer;
-
-    };
-
-
-    /*
-     *  E X T E R N A L   F U N C T I O N S
-     */
-
-    OMX_ERRORTYPE OMX_CONF_CommandToString(
-        OMX_IN OMX_COMMANDTYPE eCommand,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE OMX_CONF_StateToString(
-        OMX_IN OMX_STATETYPE eState,
-        OMX_OUT OMX_STRING sName);
-
-    OMX_ERRORTYPE DataMetabolismTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex);
-
-    OMX_ERRORTYPE OMX_OSAL_OpenBufferVarFile(OMX_INOUT FILE** pFile, OMX_IN OMX_STRING sInFileName, OMX_STRING sMode);
-    OMX_U32 OMX_OSAL_ReadFromBufferVarDataInputFile(OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_INOUT FILE* pFile);
-    OMX_ERRORTYPE OMX_OSAL_CloseBufferVarFile(OMX_INOUT FILE* pFile);
-    OMX_U32 OMX_OSAL_ReadFromBufferVarInputFile(OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_INOUT FILE* pInFile);
-    OMX_U32 OMX_OSAL_WriteToBufferVarOutputFile(OMX_OUT OMX_PTR pData, OMX_IN OMX_U32 nBytes, OMX_IN FILE* pInFile);
-    OMX_ERRORTYPE OMX_OSAL_ReadBufferVarianceFile(OMX_OUT OMX_U8 *nPortIndex,
-            OMX_OUT OMX_STRING sParamName,
-            OMX_OUT OMX_STRING sFieldName,
-            OMX_OUT OMX_U32 *nFieldValue,
-            OMX_OUT OMX_U32 *nArraySize,
-            OMX_OUT OMX_U32* nMaxBufSize,
-            OMX_INOUT OMX_U32 **nBufferVarArray,
-            OMX_IN FILE* pInFile);
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_EmptyBufferDone(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* EmptyBufferDone can only be called from an input port */
-            if (OMX_DirInput == pPort->sPortDef.eDir)
-            {
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    pPort->nBuffersOutstanding--;
-                    pCtx->nBuffersProcessed++;
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_FillBufferDone(
-        OMX_OUT OMX_HANDLETYPE hComponent,
-        OMX_OUT OMX_PTR pAppData,
-        OMX_OUT OMX_BUFFERHEADERTYPE* pBufHdr)
-    {
-        TEST_CTXTYPE *pCtx;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 nMsec;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pAppData);
-
-        if (0x0 != pBufHdr->pAppPrivate)
-        {
-            pPort = (TEST_PORTTYPE*)pBufHdr->pAppPrivate;
-            pCtx = pPort->pCtx;
-
-            /* FillBufferDone can only be called from an output port */
-            if (OMX_DirOutput == pPort->sPortDef.eDir)
-            {
-                nMsec = OMX_OSAL_GetTime();
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Received Output Buffer nFilledLen=%d,Time Offset=%d ms\n", pBufHdr->nFilledLen, nMsec - nStartTime);
-                /* when the queue is full, don't add another buffer header
-                   as something is wrong with the component.  It is
-                   incorrectly returning more buffers than sent in */
-                if (Q_INQUEUE(pPort->pQ) < pPort->sPortDef.nBufferCountActual)
-                {
-                    /* write to file if enabled */
-                    if (OMX_TRUE == pPort->bOpenFile)
-                    {
-                        OMX_OSAL_WriteToBufferVarOutputFile((pBufHdr->pBuffer + pBufHdr->nOffset), pBufHdr->nFilledLen, pPort->pFile);
-                    }
-
-                    Q_ADD(pPort->pQ, pBufHdr);
-                    OMX_OSAL_EventSet(pCtx->hBufferCallbackEvent);
-                }
-
-            }
-
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_EventHandler(
-        OMX_IN OMX_HANDLETYPE hComponent,
-        OMX_IN OMX_PTR pAppData,
-        OMX_IN OMX_EVENTTYPE eEvent,
-        OMX_IN OMX_U32 nData1,
-        OMX_IN OMX_U32 nData2,
-        OMX_IN OMX_PTR pEventData)
-    {
-        TEST_CTXTYPE *pCtx;
-
-        UNUSED_PARAMETER(hComponent);
-        UNUSED_PARAMETER(pEventData);
-
-        if (0x0 == pAppData) return(OMX_ErrorNone);
-        pCtx = (TEST_CTXTYPE*)pAppData;
-
-
-        if (eEvent == OMX_EventCmdComplete)
-        {
-            switch ((OMX_COMMANDTYPE)(nData1))
-            {
-                case OMX_CommandStateSet:
-                    OMX_CONF_StateToString((OMX_STATETYPE)(nData2), szDesc);
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component transitioned to %s\n", szDesc);
-                    pCtx->eState = (OMX_STATETYPE)(nData2);
-                    OMX_OSAL_EventSet(pCtx->hStateChangeEvent);
-                    break;
-                case OMX_CommandPortDisable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i completed stopping\n", nData2);
-                    break;
-                case OMX_CommandPortEnable:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port completed %i restart\n", nData2);
-                    break;
-                case OMX_CommandFlush:
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Port %i reported flush complete\n", nData2);
-                    break;
-                case OMX_EventBufferFlag:
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        return OMX_ErrorNone;
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_FindPortFromIndex(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE **ppPort,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorUndefined;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        *ppPort = 0x0;
-        pPort = pCtx->aPorts;
-
-        if (0x0 != pPort)
-        {
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                if (pPort->sPortDef.nPortIndex == nPortIndex)
-                {
-                    *ppPort = pPort;
-                    eError = OMX_ErrorNone;
-                    break;
-                }
-                pPort++;
-            }
-        }
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_ResetPortStream(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            pPort->bEOS = OMX_FALSE;
-
-            if (OMX_TRUE == pPort->bOpenFile)
-            {
-                /* only close and reopen files for input ports */
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-                    eError = OMX_OSAL_CloseBufferVarFile(pPort->pFile);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-
-                    pPort->bOpenFile = OMX_FALSE;
-
-                    eError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "r");
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_TRUE;
-                }
-
-            }
-
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_SendNBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers,
-        OMX_BOOL bReadFromInputFile)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        if (OMX_DirInput == pPort->sPortDef.eDir)
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                if (OMX_TRUE == pPort->bEOS)
-                {
-                    /* no more buffers to process, so fail */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "End of stream on port, no more data to send\n");
-                }
-
-                Q_REMOVE(pPort->pQ, pBufHdr);
-                if (OMX_TRUE == bReadFromInputFile)
-                {
-                    pBufHdr->nFilledLen = OMX_OSAL_ReadFromBufferVarInputFile(pBufHdr->pBuffer,
-                                          pPort->nBufferVarArray[pPort->nBufferIndex],
-                                          pPort->pFile);
-                    if (pBufHdr->nFilledLen != pPort->nBufferVarArray[pPort->nBufferIndex])
-                    {
-                        pBufHdr->nFlags |= OMX_BUFFERFLAG_EOS;
-                        pPort->bEOS = OMX_TRUE;
-                        if (pBufHdr->nFlags)
-                        {
-                            eError = DataMetabolismTest_ResetPortStream(pCtx);
-                            OMX_CONF_BAIL_ON_ERROR(eError);
-                        }
-
-                    }
-                    OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Buffer Index=%d\n", pPort->nBufferIndex);
-                    pPort->nBufferIndex++;
-
-                }
-                eError = OMX_EmptyThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                pPort->nBuffersOutstanding++;
-                nNumBuffers--;
-            }
-
-        }
-        else
-        {
-            while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-            {
-                Q_REMOVE(pPort->pQ, pBufHdr);
-
-                /* mark buffer header as empty on OMX_FillThisBuffer calls */
-                pBufHdr->nFlags = 0x0;
-                pBufHdr->nFilledLen = 0x0;
-                pBufHdr->hMarkTargetComponent = 0x0;
-                pBufHdr->pMarkData = 0x0;
-                eError = OMX_FillThisBuffer(pCtx->hWrappedComp, pBufHdr);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                nNumBuffers--;
-            }
-
-        }
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_ProcessNBuffers(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nBufToProcess)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_BOOL bTimeout;
-        OMX_U32 i;
-        OMX_U32 nToSend;
-        OMX_U32 nSent;
-
-        /* reset buffers to process counter */
-        pCtx->nBuffersProcessed = 0x0;
-
-        /* reset start time*/
-        nStartTime = OMX_OSAL_GetTime();
-
-        /*For the last buffer sent pCtx->nBuffersProcessed is incremented after getting callback.
-        So we reduce nBufToProcess by 1 so that we don't send one more buffer */
-        while ((nBufToProcess - 1) > pCtx->nBuffersProcessed)
-        {
-            nSent = 0x0;
-            pPort = pCtx->aPorts;
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                nToSend = Q_INQUEUE(pPort->pQ);
-                eError = DataMetabolismTest_SendNBuffers(pCtx, pPort, nToSend, OMX_TRUE);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                nSent += nToSend;
-
-                pPort++;
-            }
-
-            if (0x0 == nSent)
-            {
-                /* no buffers were sent, so the component hasn't returned any
-                   buffers, so wait until the component does return a buffer */
-                OMX_OSAL_EventWait(pCtx->hBufferCallbackEvent, OMX_CONF_TIMEOUT_EXPECTING_SUCCESS, &bTimeout);
-                OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-                if (OMX_TRUE == bTimeout)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "Component unresponsive to processing buffers\n");
-                }
-            }
-
-        }
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_PortAllocateNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        while (0x0 != nNumBuffers)
-        {
-            eError = OMX_AllocateBuffer(pCtx->hWrappedComp, &pBufHdr,
-                                        pPort->sPortDef.nPortIndex,
-                                        pPort, pPort->sPortDef.nBufferSize);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            Q_ADD(pPort->pQ, pBufHdr);
-            if (pBufHdr->pAppPrivate != (OMX_PTR)pPort)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                        "OMX_AllocateBuffer did not populate pAppPrivate\n");
-            }
-
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_PortFreeNumBuffers(
-        TEST_CTXTYPE *pCtx,
-        TEST_PORTTYPE *pPort,
-        OMX_U32 nNumBuffers)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_BUFFERHEADERTYPE *pBufHdr = NULL;
-
-        while ((0x0 != Q_INQUEUE(pPort->pQ)) && (0x0 != nNumBuffers))
-        {
-            Q_REMOVE(pPort->pQ, pBufHdr);
-            eError = OMX_FreeBuffer(pCtx->hWrappedComp, pPort->sPortDef.nPortIndex, pBufHdr);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            nNumBuffers--;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_AllocatePortStructures(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 nSize;
-        OMX_U32 i, j;
-        OMX_U32 nPortIndex;
-
-        /* allocate port structures */
-        nSize = (sizeof(TEST_PORTTYPE) * pCtx->nNumPorts);
-        pCtx->aPorts = (TEST_PORTTYPE*)OMX_OSAL_Malloc(nSize);
-        if (0x0 == pCtx->aPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "OMX_OSAL_Malloc failed\n");
-        }
-
-        memset(pCtx->aPorts, 0x0, nSize);
-        pPort = pCtx->aPorts;
-        /* initialize port structures */
-        for (i = 0; i < NUM_DOMAINS; i++)
-        {
-            for (j = 0x0; j < pCtx->sPortParam[i].nPorts; j++)
-            {
-                pPort->pCtx = pCtx;
-                pPort->bEOS = OMX_FALSE;
-                pPort->bOpenFile = OMX_FALSE;
-                nPortIndex = pCtx->sPortParam[i].nStartPortNumber + j;
-                OMX_CONF_INIT_STRUCT(pPort->sPortDef, OMX_PARAM_PORTDEFINITIONTYPE);
-                pPort->sPortDef.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & pPort->sPortDef);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-
-                if (0x0 == pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCount incorrect\n");
-                }
-
-                if (pPort->sPortDef.nBufferCountMin > pPort->sPortDef.nBufferCountActual)
-                {
-                    /* a buffer count of 0x0 is not allowed */
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "PortDefinition nBufferCountActual incorrect\n");
-                }
-
-                /* allocate LIFO with that or the actual required buffers */
-                Q_ALLOC(pPort->pQ, (pPort->sPortDef.nBufferCountActual));
-                if (0x0 == pPort->pQ)
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined,
-                                            "memory allocation failure\n");
-                }
-
-                pPort++;
-            }
-
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_FreePortStructures(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        if (0x0 != pCtx->aPorts)
-        {
-            pPort = pCtx->aPorts;
-
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                /* free all allocated buffers */
-                if (0x0 != pPort->pQ)
-                {
-                    if (OMX_ErrorNone == eError)
-                    {
-                        /* record the return code, but don't exit on failure as the
-                           test has memory it must free */
-                        eError = DataMetabolismTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-
-                    }
-                    else
-                    {
-                        /* preserve the first failure from freeing buffers */
-                        DataMetabolismTest_PortFreeNumBuffers(pCtx, pPort, Q_INQUEUE(pPort->pQ));
-                    }
-
-                    /* free LIFO */
-                    Q_FREE(pPort->pQ);
-                    pPort->pQ = 0x0;
-
-                }
-
-                pPort++;
-            }
-
-            OMX_OSAL_Free(pCtx->aPorts);
-            pCtx->aPorts = 0x0;
-        }
-
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_AllocateAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-        OMX_U32 nCount;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocating %i buffers on port %i\n",
-                           pPort->sPortDef.nBufferCountActual, pPort->sPortDef.nPortIndex);
-            /* allocate all buffers on each port */
-            nCount = pPort->sPortDef.nBufferCountActual;
-            nCount -= Q_INQUEUE(pPort->pQ);
-            eError = DataMetabolismTest_PortAllocateNumBuffers(pCtx, pPort, nCount);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE DataMetabolismTest_FreeAllBuffers(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        pPort = pCtx->aPorts;
-
-        for (i = 0; i < pCtx->nNumPorts; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Freeing all buffers on port %i\n",
-                           pPort->sPortDef.nPortIndex);
-            eError = DataMetabolismTest_PortFreeNumBuffers(pCtx, pPort,
-                     Q_INQUEUE(pPort->pQ));
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            pPort++;
-        }
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    OMX_ERRORTYPE datametabolismtest_videoport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_U32 nRoleIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eOtherError = OMX_ErrorNone;
-        OMX_STRING sBufVarFileName;
-        FILE *pInFile;
-        OMX_U8 sReadPortIndex[4];
-        OMX_U8 sPortIndex[4];
-        OMX_STRING sParamName;
-        OMX_STRING sFieldName;
-        OMX_U32 nFieldValue;
-        OMX_U32 nMaxBufSize;
-        TEST_PORTTYPE *pPort;
-
-        DataMetabolismTest_FindPortFromIndex(pCtx, &pPort, nPortIndex);
-
-        pPort->nBufferIndex = 0;
-
-        /*Create File Name <role_name>_<port_specifier>min.bin*/
-        sBufVarFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        pPort->sFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        sParamName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-        sFieldName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting video port %i\n", nPortIndex);
-
-        if (pPort->sPortDef.eDir == OMX_DirInput)
-        {
-
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "video_reader.binary"))
-            {
-                /* allocate buffers on all ports */
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "No Data Metabolism Test Applicable\n");
-                eError = OMX_ErrorNone;
-                goto OMX_CONF_TEST_BAIL;
-            }
-
-            sprintf(sBufVarFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_v", nPortIndex, "def.txt");
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_v", nPortIndex, "def.bin");
-
-            eError = OMX_OSAL_OpenBufferVarFile(&pInFile, sBufVarFileName, "r");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_ReadBufferVarianceFile(&sReadPortIndex[0], sParamName, sFieldName, &nFieldValue, &pPort->nNumBuffer, &nMaxBufSize, &pPort->nBufferVarArray, pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_CloseBufferVarFile(pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            sprintf((OMX_STRING) &sPortIndex[0], "%c%lu", 'v', nPortIndex);
-            if (strncmp((OMX_STRING) &sPortIndex[0], (OMX_STRING) &sReadPortIndex[0], strlen((OMX_STRING) &sPortIndex[0])) != 0)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port Index mismatch in input file\n");
-            }
-
-            if (nMaxBufSize > pPort->sPortDef.nBufferSize)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer Size Greater Than Allowed in the port\n");
-            }
-
-            /*This File should be closed somewhere*/
-            eError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "rb");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            pPort->bOpenFile = OMX_TRUE;
-
-            /*Assuming number of buffer sent on each port are equal*/
-            nNumOfBufferToProcess = pPort->nNumBuffer;
-
-            /* No variance settings for video port*/
-        }
-        else if (pPort->sPortDef.eDir == OMX_DirOutput)
-        {
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_v", nPortIndex, "def_out.bin");
-
-            /*This File should be closed somewhere*/
-            eOtherError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "wb");
-            if (eOtherError != OMX_ErrorNone)
-            {
-                pPort->pFile = NULL;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Can't Open output file on this port=%d\n", nPortIndex);
-            }
-            else
-                pPort->bOpenFile = OMX_TRUE;
-        }
-
-        OMX_OSAL_Free(sBufVarFileName);
-        OMX_OSAL_Free(sParamName);
-        OMX_OSAL_Free(sFieldName);
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-    OMX_ERRORTYPE datametabolismtest_imageport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_U32 nRoleIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eOtherError = OMX_ErrorNone;
-
-        OMX_STRING sBufVarFileName;
-        FILE *pInFile;
-        OMX_U8 sReadPortIndex[4];
-        OMX_U8 sPortIndex[4];
-        OMX_STRING sParamName;
-        OMX_STRING sFieldName;
-        OMX_U32 nFieldValue;
-        OMX_U32 nMaxBufSize;
-        TEST_PORTTYPE *pPort;
-
-        DataMetabolismTest_FindPortFromIndex(pCtx, &pPort, nPortIndex);
-
-        pPort->nBufferIndex = 0;
-
-        /*Create File Name <role_name>_<port_specifier>min.bin*/
-        sBufVarFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        pPort->sFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        sParamName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-        sFieldName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting image port %i\n", nPortIndex);
-
-        if (pPort->sPortDef.eDir == OMX_DirInput)
-        {
-
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "image_reader.binary"))
-            {
-                /* allocate buffers on all ports */
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "No Data Metabolism Test Applicable\n");
-                eError = OMX_ErrorNone;
-                goto OMX_CONF_TEST_BAIL;
-            }
-
-            sprintf(sBufVarFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_i", nPortIndex, "def.txt");
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_i", nPortIndex, "def.bin");
-
-            eError = OMX_OSAL_OpenBufferVarFile(&pInFile, sBufVarFileName, "r");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_ReadBufferVarianceFile(&sReadPortIndex[0], sParamName, sFieldName, &nFieldValue, &pPort->nNumBuffer, &nMaxBufSize, &pPort->nBufferVarArray, pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_CloseBufferVarFile(pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            sprintf((OMX_STRING) &sPortIndex[0], "%c%lu", 'i', nPortIndex);
-            if (strncmp((OMX_STRING) &sPortIndex[0], (OMX_STRING) &sReadPortIndex[0], strlen((OMX_STRING) &sPortIndex[0])) != 0)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port Index mismatch in input file\n");
-            }
-            if (nMaxBufSize > pPort->sPortDef.nBufferSize)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer Size Greater Than Allowed in the port\n");
-            }
-
-            /* No variance settings for video port*/
-
-            /*This File should be closed somewhere*/
-            eError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "rb");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            pPort->bOpenFile = OMX_TRUE;
-
-            /*Assuming number of buffer sent on each port are equal*/
-            nNumOfBufferToProcess = pPort->nNumBuffer;
-
-
-        }
-        else if (pPort->sPortDef.eDir == OMX_DirOutput)
-        {
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_i", nPortIndex, "def_out.bin");
-
-            /*This File should be closed somewhere*/
-            eOtherError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "wb");
-            if (eOtherError != OMX_ErrorNone)
-            {
-                pPort->pFile = NULL;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Can't Open output file on this port=%d\n", nPortIndex);
-            }
-            else
-                pPort->bOpenFile = OMX_TRUE;
-        }
-        OMX_OSAL_Free(sBufVarFileName);
-        OMX_OSAL_Free(sParamName);
-        OMX_OSAL_Free(sFieldName);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-    OMX_ERRORTYPE datametabolismtest_otherport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_U32 nRoleIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eOtherError = OMX_ErrorNone;
-        OMX_STRING sBufVarFileName;
-        FILE *pInFile;
-        OMX_U8 sReadPortIndex[4];
-        OMX_U8 sPortIndex[4];
-        OMX_STRING sParamName;
-        OMX_STRING sFieldName;
-        OMX_U32 nFieldValue;
-        OMX_U32 nMaxBufSize;
-        TEST_PORTTYPE *pPort;
-
-        DataMetabolismTest_FindPortFromIndex(pCtx, &pPort, nPortIndex);
-
-        pPort->nBufferIndex = 0;
-
-        /*Create File Name <role_name>_<port_specifier>min.bin*/
-        sBufVarFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        pPort->sFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        sParamName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-        sFieldName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting other port %i\n", nPortIndex);
-
-        if (pPort->sPortDef.eDir == OMX_DirInput)
-        {
-
-            sprintf(sBufVarFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_o", nPortIndex, "def.txt");
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_o", nPortIndex, "def.bin");
-
-            eError = OMX_OSAL_OpenBufferVarFile(&pInFile, sBufVarFileName, "r");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_ReadBufferVarianceFile(&sReadPortIndex[0], sParamName, sFieldName, &nFieldValue, &pPort->nNumBuffer, &nMaxBufSize, &pPort->nBufferVarArray, pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_CloseBufferVarFile(pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            sprintf((OMX_STRING) &sPortIndex[0], "%c%lu", 'o', nPortIndex);
-            if (strncmp((OMX_STRING) &sPortIndex[0], (OMX_STRING) &sReadPortIndex[0], strlen((OMX_STRING) &sPortIndex[0])) != 0)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port Index mismatch in input file\n");
-            }
-
-
-            if (nMaxBufSize > pPort->sPortDef.nBufferSize)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer Size Greater Than Allowed in the port\n");
-            }
-
-            /* No variance settings for video port*/
-
-            /*This File should be closed somewhere*/
-            eError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "rb");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            pPort->bOpenFile = OMX_TRUE;
-
-            /*Assuming number of buffer sent on each port are equal*/
-            nNumOfBufferToProcess = pPort->nNumBuffer;
-        }
-        else if (pPort->sPortDef.eDir == OMX_DirOutput)
-        {
-            sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_o", nPortIndex, "def_out.bin");
-
-            /*This File should be closed somewhere*/
-            eOtherError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "wb");
-            if (eOtherError != OMX_ErrorNone)
-            {
-                pPort->pFile = NULL;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Can't Open output file on this port=%d\n", nPortIndex);
-            }
-            else
-                pPort->bOpenFile = OMX_TRUE;
-        }
-        OMX_OSAL_Free(sBufVarFileName);
-        OMX_OSAL_Free(sParamName);
-        OMX_OSAL_Free(sFieldName);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE datametabolismtest_audioport(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_U32 nRoleIndex,
-        OMX_BOOL bMinMax)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eOtherError = OMX_ErrorNone;
-        OMX_AUDIO_PARAM_PCMMODETYPE sFormatPCM;
-        OMX_AUDIO_PARAM_AMRTYPE sFormatAMR;
-        OMX_AUDIO_PARAM_MP3TYPE sFormatMP3;
-        OMX_AUDIO_PARAM_AACPROFILETYPE sFormatAAC;
-        OMX_AUDIO_PARAM_WMATYPE sFormatWMA;
-        OMX_AUDIO_PARAM_RATYPE sFormatRA;
-        OMX_STRING sBufVarFileName;
-        FILE *pInFile;
-        OMX_U8 sReadPortIndex[4];
-        OMX_U8 sPortIndex[4];
-        OMX_STRING sParamName;
-        OMX_STRING sFieldName;
-        OMX_U32 nFieldValue;
-        OMX_U32 nMaxBufSize;
-        TEST_PORTTYPE *pPort;
-
-        DataMetabolismTest_FindPortFromIndex(pCtx, &pPort, nPortIndex);
-
-        pPort->nBufferIndex = 0;
-
-        /*Create File Name <role_name>_<port_specifier>min.bin*/
-        sBufVarFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        pPort->sFileName = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128 + 16));
-        sParamName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-        sFieldName      = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * (128));
-
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting audio port %i\n", nPortIndex);
-
-        if (pPort->sPortDef.eDir == OMX_DirInput)
-        {
-
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_reader.binary") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_writer.bin") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_capturer.pcm"))
-            {
-                /* allocate buffers on all ports */
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "No Data Metabolism Test Applicable\n");
-                eError = OMX_ErrorInvalidComponentName;
-                goto OMX_CONF_TEST_BAIL;
-            }
-
-            if (bMinMax == OMX_TRUE)
-            {
-                sprintf(sBufVarFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "min.txt");
-                sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "min.bin");
-            }
-            else
-            {
-                sprintf(sBufVarFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "max.txt");
-                sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "max.bin");
-            }
-
-            eError = OMX_OSAL_OpenBufferVarFile(&pInFile, sBufVarFileName, "r");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_ReadBufferVarianceFile(&sReadPortIndex[0], sParamName, sFieldName, &nFieldValue, &pPort->nNumBuffer, &nMaxBufSize, &pPort->nBufferVarArray, pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_OSAL_CloseBufferVarFile(pInFile);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            sprintf((OMX_STRING) &sPortIndex[0], "%c%lu", 'a', nPortIndex);
-            if (strncmp((OMX_STRING) &sPortIndex[0], (OMX_STRING) &sReadPortIndex[0], strlen((OMX_STRING) &sPortIndex[0])) != 0)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Port Index mismatch in input file\n");
-            }
-
-            if (nMaxBufSize > pPort->sPortDef.nBufferSize)
-            {
-                OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Buffer Size Greater Than Allowed in the port\n");
-            }
-
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "nMaxBufSize %d nBufferSize %d \n", nMaxBufSize, pPort->sPortDef.nBufferSize);
-
-
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.aac") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_encoder.aac"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_AACPROFILETYPE", 30))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nSampleRate", 11))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatAAC, OMX_AUDIO_PARAM_AACPROFILETYPE);
-                sFormatAAC.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioAac,
-                                          (OMX_PTR) & sFormatAAC);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatAAC.nSampleRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioAac,
-                                          (OMX_PTR) & sFormatAAC);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.amrnb") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_encoder.amrnb") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.amrwb") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_encoder.amrwb"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_AMRTYPE", 23))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nBitRate", 8))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatAMR, OMX_AUDIO_PARAM_AMRTYPE);
-                sFormatAMR.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioAmr,
-                                          (OMX_PTR) & sFormatAMR);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatAMR.nBitRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioAmr,
-                                          (OMX_PTR) & sFormatAMR);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.mp3"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_MP3TYPE", 23))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nSampleRate", 11))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatMP3, OMX_AUDIO_PARAM_MP3TYPE);
-                sFormatMP3.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioMp3,
-                                          (OMX_PTR) & sFormatMP3);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatMP3.nSampleRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioMp3,
-                                          (OMX_PTR) & sFormatMP3);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.wma"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_WMATYPE", 23))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nBitRate", 8))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatWMA, OMX_AUDIO_PARAM_WMATYPE);
-                sFormatWMA.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioWma,
-                                          (OMX_PTR) & sFormatWMA);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatWMA.nBitRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioWma,
-                                          (OMX_PTR) & sFormatWMA);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_decoder.ra"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_RATYPE", 22))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nSampleRate", 11))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatRA, OMX_AUDIO_PARAM_RATYPE);
-                sFormatRA.nPortIndex = nPortIndex;
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioRa,
-                                          (OMX_PTR) & sFormatRA);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatRA.nSamplingRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioRa,
-                                          (OMX_PTR) & sFormatRA);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            if (!strcmp(pCtx->sRoleArray[nRoleIndex], "audio_renderer.pcm") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_processor.pcm.stereo_widening_loudspeakers") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_processor.pcm.stereo_widening_headphones") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_processor.pcm.reverberation") ||
-                    !strcmp(pCtx->sRoleArray[nRoleIndex], "audio_processor.pcm.chorus") ||
-                    strstr(pCtx->sRoleArray[nRoleIndex], "audio_processor.pcm.equalizer"))
-            {
-
-                if (strncmp(sParamName, "OMX_AUDIO_PARAM_PCMMODETYPE", 27))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Parameter Name Mismatch\n");
-                }
-                if (strncmp(sFieldName, "nSampleRate", 11))
-                {
-                    OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Field Name Mismatch\n");
-                }
-
-                OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-                if (!strstr(pCtx->sRoleArray[nRoleIndex], "audio_processor."))
-                    sFormatPCM.nPortIndex = nPortIndex;
-                else
-                    sFormatPCM.nPortIndex = OMX_ALL; // the standard audio processor port sampling rates must be the same
-
-                eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPcm,
-                                          (OMX_PTR) & sFormatPCM);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-                sFormatPCM.nSamplingRate = nFieldValue;
-                eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPcm,
-                                          (OMX_PTR) & sFormatPCM);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /*This File should be closed somewhere*/
-            eError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "rb");
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            pPort->bOpenFile = OMX_TRUE;
-
-            /*Assuming number of buffer sent on each port are equal*/
-            nNumOfBufferToProcess = pPort->nNumBuffer;
-
-        }
-        else if (pPort->sPortDef.eDir == OMX_DirOutput)
-        {
-
-            if (bMinMax == OMX_TRUE)
-            {
-                sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "min_out.bin");
-            }
-            else
-            {
-                sprintf(pPort->sFileName, "%s%s%lu%s", pCtx->sRoleArray[nRoleIndex], "_a", nPortIndex, "max_out.bin");
-            }
-
-            /*This File should be closed somewhere*/
-            eOtherError = OMX_OSAL_OpenBufferVarFile(&pPort->pFile, pPort->sFileName, "wb");
-            if (eOtherError != OMX_ErrorNone)
-            {
-                pPort->pFile = NULL;
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Can't Open output file on this port=%d\n", nPortIndex);
-            }
-            else
-                pPort->bOpenFile = OMX_TRUE;
-        }
-        OMX_OSAL_Free(sBufVarFileName);
-        OMX_OSAL_Free(sParamName);
-        OMX_OSAL_Free(sFieldName);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    OMX_ERRORTYPE cleanup_ports(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eOtherError = OMX_ErrorNone;
-        TEST_PORTTYPE *pPort;
-        OMX_U32 i;
-
-        if (0x0 != pCtx->aPorts)
-        {
-            pPort = pCtx->aPorts;
-
-            for (i = 0; i < pCtx->nNumPorts; i++)
-            {
-                if (OMX_DirInput == pPort->sPortDef.eDir)
-                {
-
-                    eError = OMX_OSAL_CloseBufferVarFile(pPort->pFile);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-                    pPort->bOpenFile = OMX_FALSE;
-                    /*Free Buffer Variance Data File Name*/
-                    OMX_OSAL_Free(pPort->sFileName);
-                    /*Free Buffer Variance Array*/
-                    OMX_OSAL_Free(pPort->nBufferVarArray);
-
-                }
-                else if (OMX_DirOutput == pPort->sPortDef.eDir)
-                {
-                    if (pPort->bOpenFile == OMX_TRUE)
-                    {
-                        eOtherError = OMX_OSAL_CloseBufferVarFile(pPort->pFile);
-                        if (eOtherError != OMX_ErrorNone)
-                        {
-                            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Can't Close output file on this port=%d\n", pPort->sPortDef.nPortIndex);
-                        }
-                        else
-                            pPort->bOpenFile = OMX_FALSE;
-                    }
-
-                }
-
-                pPort++;
-            }
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE OMX_CONF_DataMetabolismTest(OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_CALLBACKTYPE oCallbacks;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        TEST_CTXTYPE ctx;
-        TEST_CTXTYPE *pCtx;
-        OMX_U32 nPortIndex;
-        OMX_U32 i, j;
-        OMX_U32 nRoles;
-        OMX_PARAM_COMPONENTROLETYPE sComponentRole;
-
-        oCallbacks.EventHandler    =  DataMetabolismTest_EventHandler;
-        oCallbacks.EmptyBufferDone =  DataMetabolismTest_EmptyBufferDone;
-        oCallbacks.FillBufferDone  =  DataMetabolismTest_FillBufferDone;
-
-        pCtx = &ctx;
-        memset(pCtx, 0x0, sizeof(TEST_CTXTYPE));
-
-        /* initialize events to track callbacks */
-        OMX_OSAL_EventCreate(&pCtx->hStateChangeEvent);
-        OMX_OSAL_EventReset(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventCreate(&pCtx->hBufferCallbackEvent);
-        OMX_OSAL_EventReset(pCtx->hBufferCallbackEvent);
-
-        eError = OMX_CONF_CallbackTracerCreate(&oCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        pCtx->hWrappedComp = hWrappedComp;
-        pCtx->sRoleArray = NULL;
-
-        /*Get number of supported roles by this component*/
-        eError = OMX_GetRolesOfComponent(cComponentName, &nRoles, (OMX_U8**) pCtx->sRoleArray);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Component Name %s\n", cComponentName);
-
-        /*Allocate memory to role array*/
-        pCtx->sRoleArray = (OMX_STRING *)OMX_OSAL_Malloc(nRoles * sizeof(OMX_STRING));
-        for (i = 0; i < nRoles; i++)
-        {
-            pCtx->sRoleArray[i] = (OMX_STRING)OMX_OSAL_Malloc(sizeof(OMX_U8) * 128);
-        }
-
-        /*Get Names of supported roles by this component*/
-        eError = OMX_GetRolesOfComponent(cComponentName, &nRoles, (OMX_U8**) pCtx->sRoleArray);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        if (pCtx->sRoleArray != NULL)
-        {
-            for (i = 0; i < nRoles; i++)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "THE ROLE %i FOR COMPONENT :  %s \n", (i + 1), pCtx->sRoleArray[i]);
-            }
-        }
-        else
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Component Return Role Array NULL\n");
-        }
-
-        /* inspect component's ports */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[0], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamAudioInit, (OMX_PTR) & pCtx->sPortParam[0]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i audio ports starting at %i \n",
-                       pCtx->sPortParam[0].nPorts, pCtx->sPortParam[0].nStartPortNumber);
-
-        /* detect all video ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[1], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamVideoInit, (OMX_PTR) & pCtx->sPortParam[1]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i video ports starting at %i \n",
-                       pCtx->sPortParam[1].nPorts, pCtx->sPortParam[1].nStartPortNumber);
-
-        /* detect all image ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[2], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamImageInit, (OMX_PTR) & pCtx->sPortParam[2]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i image ports starting at %i \n",
-                       pCtx->sPortParam[2].nPorts, pCtx->sPortParam[2].nStartPortNumber);
-
-        /* detect all other ports on the component */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParam[3], OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(hWrappedComp, OMX_IndexParamOtherInit, (OMX_PTR) & pCtx->sPortParam[3]);
-        if (OMX_ErrorUnsupportedIndex == eError)  eError = OMX_ErrorNone;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "detected %i other ports starting at %i \n",
-                       pCtx->sPortParam[3].nPorts, pCtx->sPortParam[3].nStartPortNumber);
-
-        /* record total number of ports and allocate port structures */
-        pCtx->nNumPorts = pCtx->sPortParam[0].nPorts +
-                          pCtx->sPortParam[1].nPorts +
-                          pCtx->sPortParam[2].nPorts +
-                          pCtx->sPortParam[3].nPorts;
-
-        if (0x0 == pCtx->nNumPorts)
-        {
-            OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorUndefined, "Component has no ports\n");
-        }
-
-        /*Set the component into specific role*/
-        for (j = 0;j < nRoles;j++)
-        {
-
-            OMX_CONF_INIT_STRUCT(sComponentRole, OMX_PARAM_COMPONENTROLETYPE);
-            strcpy((OMX_STRING) sComponentRole.cRole , pCtx->sRoleArray[j]);
-
-            eError = OMX_SetParameter(hWrappedComp, OMX_IndexParamStandardComponentRole, &sComponentRole);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* allocate port structures */
-            eError = DataMetabolismTest_AllocatePortStructures(pCtx);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* process parameters on all audio ports for min settings*/
-            for (i = 0x0; i < pCtx->sPortParam[0].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[0].nStartPortNumber + i;
-                eError = datametabolismtest_audioport(&ctx, nPortIndex, j, OMX_TRUE);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process parameters on all video ports */
-            for (i = 0x0; i < pCtx->sPortParam[1].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[1].nStartPortNumber + i;
-                eError = datametabolismtest_videoport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process parameters on all image ports */
-            for (i = 0x0; i < pCtx->sPortParam[2].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[2].nStartPortNumber + i;
-                eError = datametabolismtest_imageport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process parameters on all other ports */
-            for (i = 0x0; i < pCtx->sPortParam[3].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[3].nStartPortNumber + i;
-                eError = datametabolismtest_otherport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* transition component from loaded->idle */
-            OMX_CONF_SET_STATE(pCtx, OMX_StateIdle, eError);
-
-            /* allocate buffers on all ports */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on all ports\n");
-            eError = DataMetabolismTest_AllocateAllBuffers(pCtx);
-            OMX_CONF_WAIT_STATE(pCtx, OMX_StateIdle, eError);
-
-            /* transition component to executing */
-            OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-            /* process some buffers */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing buffers\n", nNumOfBufferToProcess);
-            eError = DataMetabolismTest_ProcessNBuffers(pCtx, nNumOfBufferToProcess);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-            /* transition component to idle */
-            OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-            /* transition to loaded */
-            OMX_CONF_SET_STATE(pCtx, OMX_StateLoaded, eError);
-
-            /* free all buffers */
-            eError = DataMetabolismTest_FreeAllBuffers(pCtx);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_CONF_WAIT_STATE(pCtx, OMX_StateLoaded, eError);
-
-            /*Close open file on input ports and Free allocated memories on ports  */
-            eError = cleanup_ports(pCtx) ;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-            /* process parameters on all audio ports for max settings */
-            for (i = 0x0; i < pCtx->sPortParam[0].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[0].nStartPortNumber + i;
-                eError = datametabolismtest_audioport(&ctx, nPortIndex, j, OMX_FALSE);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process parameters on all video ports */
-            for (i = 0x0; i < pCtx->sPortParam[1].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[1].nStartPortNumber + i;
-                eError = datametabolismtest_videoport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process port definitions and parameters on all image ports */
-            for (i = 0x0; i < pCtx->sPortParam[2].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[2].nStartPortNumber + i;
-                eError = datametabolismtest_imageport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* process parameters on all other ports */
-            for (i = 0x0; i < pCtx->sPortParam[3].nPorts; i++)
-            {
-                nPortIndex = pCtx->sPortParam[3].nStartPortNumber + i;
-                eError = datametabolismtest_otherport(&ctx, nPortIndex, j);
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-
-            /* transition component from loaded->idle */
-            OMX_CONF_SET_STATE(pCtx, OMX_StateIdle, eError);
-
-            /* allocate buffers on all ports */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Allocate buffers on all ports\n");
-            eError = DataMetabolismTest_AllocateAllBuffers(pCtx);
-            OMX_CONF_WAIT_STATE(pCtx, OMX_StateIdle, eError);
-
-            /* transition component to executing */
-            OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateExecuting, eError);
-
-            /* process some buffers */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Processing buffers\n", nNumOfBufferToProcess);
-            eError = DataMetabolismTest_ProcessNBuffers(pCtx, nNumOfBufferToProcess);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-            /* transition component to idle */
-            OMX_CONF_SET_STATE_AND_WAIT(pCtx, OMX_StateIdle, eError);
-
-            /* transition to loaded */
-            OMX_CONF_SET_STATE(pCtx, OMX_StateLoaded, eError);
-
-            /* free all buffers */
-            eError = DataMetabolismTest_FreeAllBuffers(pCtx);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_CONF_WAIT_STATE(pCtx, OMX_StateLoaded, eError);
-
-            /*Close open file on input ports and Free allocated memories on ports  */
-            eError = cleanup_ports(pCtx) ;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eCleanupError = DataMetabolismTest_FreePortStructures(pCtx);
-        }
-
-        /*Free Role Array*/
-        for (i = 0;i < nRoles;i++)
-        {
-            OMX_OSAL_Free(pCtx->sRoleArray[i]);
-        }
-        OMX_OSAL_Free(pCtx->sRoleArray);
-
-
-OMX_CONF_TEST_BAIL:
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        OMX_OSAL_EventDestroy(pCtx->hStateChangeEvent);
-        OMX_OSAL_EventDestroy(pCtx->hBufferCallbackEvent);
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return(eError);
-    }
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiocapturertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiocapturertest.c
deleted file mode 100644 (file)
index 94e4556..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioCapturerTest.c
- *  OpenMax IL conformance test - Standard Audio Capturer Class Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioCapturerTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioCapturerTest_PcmCapturer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-        OMX_AUDIO_CONFIG_MUTETYPE sMuteType;
-        OMX_AUDIO_CONFIG_VOLUMETYPE sVolumeType;
-
-        OMX_CONF_INIT_STRUCT(sMuteType, OMX_AUDIO_CONFIG_MUTETYPE);
-        OMX_CONF_INIT_STRUCT(sVolumeType, OMX_AUDIO_CONFIG_VOLUMETYPE);
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_capturer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard PCM Capturer component, there must be at least one port each of
-           audio domain and other domain. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Output port, PCM format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM output port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioMute and verify the default value. */
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        sMuteType.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigAudioMute, (OMX_PTR) & sMuteType);
-        if (sMuteType.bMute != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify this value can be changed.*/
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioMute,
-                                          (OMX_PTR)&sMuteType,
-                                          sMuteType.bMute,
-                                          OMX_TRUE, OMX_FALSE, eError);
-
-        /* Verify support for OMX_IndexConfigAudioVolume and verify the default value. */
-        sVolumeType.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigAudioVolume, (OMX_PTR) & sVolumeType);
-        if (sVolumeType.bLinear != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify this value can be changed.*/
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioVolume,
-                                          (OMX_PTR)&sVolumeType,
-                                          sVolumeType.bLinear,
-                                          OMX_TRUE, OMX_FALSE, eError);
-
-        /* Verify - Port Index = OPB + 0; input port, OTHER format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other (media time) input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard PCM Capturer. */
-
-    OMX_ERRORTYPE OMX_CONF_StdPcmCapturerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_capturer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioCapturerTest_PcmCapturer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the audio capturer class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdAudioCapturerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_capturer.pcm") != NULL)
-            {
-                eError = OMX_CONF_StdPcmCapturerTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiodecodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiodecodertest.c
deleted file mode 100644 (file)
index 1cbb9ee..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioDecoderTest.c
- *  OpenMax IL conformance test - Standard Audio Decoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioDecoderTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE StdAudioDecoderTest_Mp3Decoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_decoder.mp3");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MP3 decoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, mp3 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying mp3 input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_Mp3PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioDecoderTest_AacDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_decoder.aac");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard AAC decoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, AAC format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AAC input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_AacPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioDecoderTest_RealAudioDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_decoder.ra");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard Real Audio decoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, Real Audio format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Real Audio input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_RealAudioPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioDecoderTest_WmaDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_decoder.wma");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard WMA decoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, WMA format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying WMA input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_WmaPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard MP3 Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdMp3DecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_decoder.mp3");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioDecoderTest_Mp3Decoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard AAC Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdAacDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_decoder.aac");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioDecoderTest_AacDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard RealAudio Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdRealAudioDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_decoder.ra");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioDecoderTest_RealAudioDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard WMA Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdWmaDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_decoder.wma");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioDecoderTest_WmaDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the audio decoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdAudioDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles = 0;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_decoder.mp3") != NULL)
-            {
-                eError = OMX_CONF_StdMp3DecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_decoder.aac") != NULL)
-            {
-                eError = OMX_CONF_StdAacDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_decoder.ra") != NULL)
-            {
-                eError = OMX_CONF_StdRealAudioDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_decoder.wma") != NULL)
-            {
-                eError = OMX_CONF_StdWmaDecoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioencodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioencodertest.c
deleted file mode 100644 (file)
index fa8ed06..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioEncoderTest.c
- *  OpenMax IL conformance test - Standard Audio Encoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioEncoderTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-    OMX_ERRORTYPE StdAudioEncoderTest_Mp3Encoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_encoder.mp3");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MP3 encoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, mp3 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Mp3 output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_Mp3PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioEncoderTest_AacEncoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_encoder.aac");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard AAC encoder component, there must be at least two audio domain ports. */
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, PCM format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 1; outpt port, AAC format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AAC output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_AacPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard MP3 Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdMp3EncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_encoder.mp3");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioEncoderTest_Mp3Encoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard AAC Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdAacEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_encoder.aac");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioEncoderTest_AacEncoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the audio encoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdAudioEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_encoder.mp3") != NULL)
-            {
-                eError = OMX_CONF_StdMp3EncoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_encoder.aac") != NULL)
-            {
-                eError = OMX_CONF_StdAacEncoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiomixertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiomixertest.c
deleted file mode 100644 (file)
index 58096eb..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCameraTest.c
- *  OpenMax IL conformance test - Standard Binary Clock Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioMixerTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioMixerTest_PcmMixer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex, i;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_mixer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; output port, PCM format */
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM output port %d \n", nPortIndex);
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = (APB + 1) + i; input port, PCM format */
-        for (i = 1; i < pCtx->sPortParamAudio.nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + i;
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM input port %d \n", nPortIndex);
-            if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard PCM Audio Mixer. */
-
-    OMX_ERRORTYPE OMX_CONF_StdPcmMixerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_mixer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioMixerTest_PcmMixer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the Audio Mixer
-       class exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdAudioMixerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_mixer") != NULL)
-            {
-                eError = OMX_CONF_StdPcmMixerTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.c
deleted file mode 100644 (file)
index 65fb179..0000000
+++ /dev/null
@@ -1,751 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2006 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioProcessorTest.c
- *  OpenMax IL conformance test - Standard Audio Processor Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdAudioProcessorTest.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioProcessorTest"
-
-    /* StdCompAudioProcessorEndianness gives the native endianness of the
-     * platform under which the tests are run
-     */
-    OMX_ENDIANTYPE StdCompAudioProcessorEndianness(void)
-    {
-        union
-        {
-            OMX_U32 u32;
-            OMX_U8 bytes[4];
-        } endian_union;
-
-        endian_union.u32 = 1;
-        return endian_union.bytes[0] ? OMX_EndianLittle : OMX_EndianBig;
-    }
-
-    /* Common port test for standard audio processors. Verifies port count,
-     *  domain and directions. */
-    OMX_ERRORTYPE StdAudioProcessorTest_Common(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        /* For the standard audio processor component, there must be at least
-         *  two audio domain ports. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying that there are two audio domain ports\n");
-        if (pCtx->sPortParamAudio.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; input port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " port direction correct\n");
-
-        /* Verify - Port Index = APB + 1; output port, pcm format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying pcm output port 1 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " port direction correct\n");
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-
-
-    /* PCM port parameter test checks the common parameters for pcm ports of the
-     * standard audio processor components.
-     * @param pCtx test context pointer
-     * @param nPcmSamplingRateArrayLength length of the sampling rate array
-     * @param pPcmSamplingRate the sampling rate array to be tested
-     */
-    OMX_ERRORTYPE StdCompCommonAudioProcessor_PcmPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPcmSamplingRateArrayLength,
-        OMX_U32 *pPcmSamplingRate)
-    {
-        OMX_U32 i, nStartPort;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_AUDIO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_AUDIO_PARAM_PCMMODETYPE sFormatPCM;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-
-        nStartPort = pCtx->sPortParamAudio.nStartPortNumber;
-
-        /* Verify support for the common standard component port parameters. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying common standard component parameters for both ports\n");
-        eError = StdComponentTest_StdPortParameters(pCtx, nStartPort);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdPortParameters(pCtx, nStartPort + 1);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definitions */
-
-        for (i = nStartPort; i <= nStartPort + 1; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying from the port %d definition that the port domain is audio and format is pcm\n", i);
-            sPortDefinition.nPortIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp,
-                                      OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-            if ((sPortDefinition.eDomain != OMX_PortDomainAudio) ||
-                    (sPortDefinition.format.audio.eEncoding != OMX_AUDIO_CodingPCM))
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* Verify support for OMX_IndexParamAudioPortFormat and verify
-           that the port format is as expected.
-        */
-        for (i = nStartPort; i <= nStartPort + 1; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexParamAudioPortFormat, and that the port %d coding is pcm\n", i);
-            sPortFormat.nPortIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp,
-                                      OMX_IndexParamAudioPortFormat, (OMX_PTR) & sPortFormat);
-            if (sPortFormat.eEncoding != OMX_AUDIO_CodingPCM)
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* Verify default settings for PCM */
-        for (i = nStartPort; i <= nStartPort + 1; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying the default PCM settings for port %d\n", i);
-            OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-            sFormatPCM.nPortIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp,
-                                      OMX_IndexParamAudioPcm, (OMX_PTR) & sFormatPCM);
-            if ((sFormatPCM.nChannels != 2) ||
-                    (sFormatPCM.eNumData != OMX_NumericalDataSigned) ||
-                    (sFormatPCM.nSamplingRate != 48000) ||
-                    (sFormatPCM.ePCMMode != OMX_AUDIO_PCMModeLinear) ||
-                    (sFormatPCM.eEndian != StdCompAudioProcessorEndianness()) ||
-                    (sFormatPCM.bInterleaved != OMX_TRUE) ||
-                    (sFormatPCM.nBitPerSample != 16) ||
-                    (sFormatPCM.eChannelMapping[0] != OMX_AUDIO_ChannelLF) ||
-                    (sFormatPCM.eChannelMapping[1] != OMX_AUDIO_ChannelRF))
-                eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        /* Verify all possible settings for OMX_IndexParamAudioPcm now. */
-        /* Verify all allowed sample rates can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying that all allowed sample rates can be set for the input port\n");
-        for (i = 0; i < nPcmSamplingRateArrayLength; i++)
-        {
-            sFormatPCM.nPortIndex = nStartPort;
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d Hz\n", pPcmSamplingRate[i]);
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                             (OMX_PTR)&sFormatPCM,
-                                             sFormatPCM.nSamplingRate,
-                                             pPcmSamplingRate[i], eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " Verifying that the output port sampling rate changed automatically\n");
-            sFormatPCM.nSamplingRate = -1; // invalidate memory
-            sFormatPCM.nPortIndex = nStartPort + 1;
-            eError = OMX_GetParameter(pCtx->hWrappedComp,
-                                      OMX_IndexParamAudioPcm, (OMX_PTR) & sFormatPCM);
-            if (sFormatPCM.nSamplingRate != pPcmSamplingRate[i])
-            {
-                eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /* Equalizer test implementation */
-    OMX_ERRORTYPE StdAudioProcessorTest_Equalizer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_U32 PcmSamplingRate[2] = { 44100, 48000 };
-        OMX_BOOL TrueFalse[2] = { OMX_TRUE, OMX_FALSE };
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_CONFIG_EQUALIZERTYPE sEqualizer;
-        OMX_AUDIO_CONFIG_LOUDNESSTYPE sLoudness;
-        OMX_AUDIO_CONFIG_BASSTYPE sBass;
-        OMX_AUDIO_CONFIG_TREBLETYPE sTreble;
-        OMX_S32 i;
-        OMX_U32 band;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setting role audio_processor.pcm.equalizer\n");
-        eError = StdComponentTest_SetRole(pCtx, "audio_processor.pcm.equalizer");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sEqualizer, OMX_AUDIO_CONFIG_EQUALIZERTYPE);
-        OMX_CONF_INIT_STRUCT(sLoudness, OMX_AUDIO_CONFIG_LOUDNESSTYPE);
-        OMX_CONF_INIT_STRUCT(sBass, OMX_AUDIO_CONFIG_BASSTYPE);
-        OMX_CONF_INIT_STRUCT(sTreble, OMX_AUDIO_CONFIG_TREBLETYPE);
-
-        eError = StdAudioProcessorTest_Common(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudioProcessor_PcmPortParameters(pCtx,
-                 2, PcmSamplingRate);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioEqualizer */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioEqualizer\n");
-        sEqualizer.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        /* set values to such that will fail the default tests */
-        sEqualizer.bEnable = OMX_TRUE;
-        sTreble.bEnable = OMX_TRUE;
-        sBass.bEnable = OMX_TRUE;
-        sLoudness.bLoudness = OMX_TRUE;
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioEqualizer, (OMX_PTR) & sEqualizer);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioEqualizer\n");
-        if (sEqualizer.bEnable != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sBass.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioBass\n");
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioBass, (OMX_PTR) & sBass);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioBass\n");
-        if (sBass.bEnable != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sTreble.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioTreble\n");
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioTreble, (OMX_PTR) & sTreble);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioTreble\n");
-        if (sTreble.bEnable != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sLoudness.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioLoudness\n");
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioLoudness, (OMX_PTR) & sLoudness);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioLoudness\n");
-        if (sLoudness.bLoudness != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify true and false can be set for bEnabled in all structs. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying true and false can be set for bEnabled in EQ, Bass, Treble and Loudness\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioEqualizer,
-                                              (OMX_PTR)&sEqualizer,
-                                              sEqualizer.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioLoudness,
-                                              (OMX_PTR)&sLoudness,
-                                              sLoudness.bLoudness,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioBass,
-                                              (OMX_PTR)&sBass,
-                                              sBass.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioTreble,
-                                              (OMX_PTR)&sTreble,
-                                              sTreble.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-        }
-
-        /* verify that each EQ band allows setting at least the -1200 to 1200
-         * millibel range */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying all EQ bands support -1200 to 1200 millibel range\n");
-        for (band = sEqualizer.sBandIndex.nMin; band <= sEqualizer.sBandIndex.nMax;
-                band++)
-        {
-            for (i = -1200; i <= 1200; i++)
-            {
-                sEqualizer.sBandIndex.nValue = band;
-                OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx,
-                                                  OMX_IndexConfigAudioEqualizer,
-                                                  (OMX_PTR)&sEqualizer,
-                                                  sEqualizer.sBandLevel.nValue,
-                                                  i,  10000, eError);
-            }
-        }
-
-        /* verify that bass and treble allow setting the -100 to 100 range */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying bass and treble support -100 to 100 range\n");
-        for (i = -100; i <= 100; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioBass,
-                                              (OMX_PTR)&sBass,
-                                              sBass.nBass,
-                                              i, 10000, eError);
-
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioTreble,
-                                              (OMX_PTR)&sTreble,
-                                              sTreble.nTreble,
-                                              i, 10000, eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "End of StdAudioProcessorTest_Equalizer\n");
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /* Chorus test implementation */
-    OMX_ERRORTYPE StdAudioProcessorTest_Chorus(TEST_CTXTYPE *pCtx)
-    {
-        OMX_U32 PcmSamplingRate[2] = { 44100, 48000 };
-        OMX_BOOL TrueFalse[2] = { OMX_TRUE, OMX_FALSE };
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_CONFIG_CHORUSTYPE sChorus;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setting role audio_processor.pcm.chorus\n");
-        eError = StdComponentTest_SetRole(pCtx, "audio_processor.pcm.chorus");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sChorus, OMX_AUDIO_CONFIG_CHORUSTYPE);
-
-        eError = StdAudioProcessorTest_Common(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudioProcessor_PcmPortParameters(pCtx,
-                 2, PcmSamplingRate);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioChorus */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioChorus\n");
-        sChorus.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        /* set values to such that will fail the default test */
-        sChorus.bEnable = OMX_TRUE;
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioChorus, (OMX_PTR) & sChorus);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioChorus\n");
-        if (sChorus.bEnable != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify true and false can be set for bEnabled. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying true and false can be set for bEnabled\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigAudioChorus,
-                                              (OMX_PTR)&sChorus,
-                                              sChorus.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "End of StdAudioProcessorTest_Chorus\n");
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Reverberation test implementation */
-    OMX_ERRORTYPE StdAudioProcessorTest_Reverberation(TEST_CTXTYPE *pCtx)
-    {
-        OMX_U32 PcmSamplingRate[2] = { 44100, 48000 };
-        OMX_BOOL TrueFalse[2] = { OMX_TRUE, OMX_FALSE };
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_CONFIG_REVERBERATIONTYPE sReverberation;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setting role audio_processor.pcm.reverberation\n");
-        eError = StdComponentTest_SetRole(pCtx, "audio_processor.pcm.reverberation");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sReverberation, OMX_AUDIO_CONFIG_REVERBERATIONTYPE);
-
-        eError = StdAudioProcessorTest_Common(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudioProcessor_PcmPortParameters(pCtx,
-                 2, PcmSamplingRate);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioReverberation */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioReverberation\n");
-        sReverberation.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        /* set values to such that will fail the default test */
-        sReverberation.bEnable = OMX_TRUE;
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioReverberation, (OMX_PTR) & sReverberation);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioReverberation\n");
-        if (sReverberation.bEnable != OMX_FALSE)
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify true and false can be set for bEnabled. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying true and false can be set for bEnabled\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx,
-                                              OMX_IndexConfigAudioReverberation,
-                                              (OMX_PTR)&sReverberation,
-                                              sReverberation.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "End of StdAudioProcessorTest_Reverberation\n");
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Headphone Stereo Widening test implementation */
-    OMX_ERRORTYPE StdAudioProcessorTest_StereoWideningHeadphones(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_U32 PcmSamplingRate[6] = { 16000, 22050, 24000, 32000, 44100, 48000 };
-        OMX_BOOL TrueFalse[2] = { OMX_TRUE, OMX_FALSE };
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE sStereoWidening;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setting role audio_processor.pcm.stereo_widening_headphones\n");
-        eError = StdComponentTest_SetRole(pCtx, "audio_processor.pcm.stereo_widening_headphones");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sStereoWidening, OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE);
-
-        eError = StdAudioProcessorTest_Common(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudioProcessor_PcmPortParameters(pCtx,
-                 6, PcmSamplingRate);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioStereoWidening */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioStereoWidening\n");
-        sStereoWidening.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        /* set values to such that will fail the default test */
-        sStereoWidening.bEnable = OMX_TRUE;
-        sStereoWidening.eWideningType = OMX_AUDIO_StereoWideningLoudspeakers;
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioStereoWidening\n");
-        if ((sStereoWidening.bEnable != OMX_FALSE) ||
-                (sStereoWidening.eWideningType != OMX_AUDIO_StereoWideningHeadphones))
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify true and false can be set for bEnabled. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying true and false can be set for bEnabled\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx,
-                                              OMX_IndexConfigAudioStereoWidening,
-                                              (OMX_PTR)&sStereoWidening,
-                                              sStereoWidening.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-        }
-
-        /* Verify the value range endpoints for nStereoWidening can be sent.
-         * The actual value may not change as expected. Spec says it can be rounded
-         * to nearest supported value. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying the value range endpoints for nStereoWidening can be sent\n");
-        sStereoWidening.nStereoWidening = 0;
-        eError = OMX_SetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        sStereoWidening.nStereoWidening = 100;
-        eError = OMX_SetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "End of StdAudioProcessorTest_StereoWideningHeadphones\n");
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Loudspeakers Stereo Widening test implementation */
-    OMX_ERRORTYPE StdAudioProcessorTest_StereoWideningLoudspeakers(
-        TEST_CTXTYPE *pCtx)
-    {
-        OMX_U32 PcmSamplingRate[6] = { 16000, 22050, 24000, 32000, 44100, 48000 };
-        OMX_BOOL TrueFalse[2] = { OMX_TRUE, OMX_FALSE };
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE sStereoWidening;
-        OMX_U32 i;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Setting role audio_processor.pcm.stereo_widening_loudspeakers\n");
-        eError = StdComponentTest_SetRole(pCtx, "audio_processor.pcm.stereo_widening_loudspeakers");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(sStereoWidening, OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE);
-
-        eError = StdAudioProcessorTest_Common(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudioProcessor_PcmPortParameters(pCtx,
-                 6, PcmSamplingRate);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigAudioStereoWidening */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigAudioStereoWidening\n");
-        sStereoWidening.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 1;
-        /* set values to such that will fail the default test */
-        sStereoWidening.bEnable = OMX_TRUE;
-        sStereoWidening.eWideningType = OMX_AUDIO_StereoWideningHeadphones;
-        eError = OMX_GetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        /* verify defaults */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying defaults values for OMX_IndexConfigAudioStereoWidening\n");
-        if ((sStereoWidening.bEnable != OMX_FALSE) ||
-                (sStereoWidening.eWideningType != OMX_AUDIO_StereoWideningLoudspeakers))
-            eError = OMX_ErrorBadParameter;/*Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify true and false can be set for bEnabled. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying true and false can be set for bEnabled\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx,
-                                              OMX_IndexConfigAudioStereoWidening,
-                                              (OMX_PTR)&sStereoWidening,
-                                              sStereoWidening.bEnable,
-                                              TrueFalse[i], !(TrueFalse[i]), eError);
-        }
-
-        /* Verify the value range endpoints for nStereoWidening can be sent.
-         * The actual value may not change as expected. Spec says it can be rounded
-         * to nearest supported value. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying the value range endpoints for nStereoWidening can be sent\n");
-        sStereoWidening.nStereoWidening = 0;
-        eError = OMX_SetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        sStereoWidening.nStereoWidening = 100;
-        eError = OMX_SetConfig(pCtx->hWrappedComp,
-                               OMX_IndexConfigAudioStereoWidening, (OMX_PTR) & sStereoWidening);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "End of StdAudioProcessorTest_StereoWideningLoudspeakers\n");
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Test a component for compliance with the Standard Audio Processor
-     * Equalizer. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorEqualizerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_processor.pcm.equalizer");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioProcessorTest_Equalizer);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Test a component for compliance with the Standard Audio Processor
-     * Reverberation. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorReverberationTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_processor.pcm.reverberation");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioProcessorTest_Reverberation);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Test a component for compliance with the Standard Audio Processor
-     * Chorus. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorChorusTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_processor.pcm.chorus");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioProcessorTest_Chorus);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Test a component for compliance with the Standard Audio Processor
-     * StereoWideningHeadphones. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorStereoWideningHeadphonesTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_processor.pcm.stereo_widening_headphones");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioProcessorTest_StereoWideningHeadphones);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* Test a component for compliance with the Standard Audio Processor
-     * StereoWideningLoudspeakers. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorStereoWideningLoudspeakersTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_processor.pcm.stereo_widening_loudspeakers");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioProcessorTest_StereoWideningLoudspeakers);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /* This runs through and tests all standard components of the audio processor
-     * class exposed and supported by the component. */
-    OMX_ERRORTYPE OMX_CONF_StdAudioProcessorTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_processor.pcm.chorus") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorChorusTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor.pcm.equalizer") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorEqualizerTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor.pcm.equalizer") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorEqualizerTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor.pcm.reverberation") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorReverberationTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor.pcm.stereo_widening_headphones") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorStereoWideningHeadphonesTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor.pcm.stereo_widening_loudspeakers") != NULL)
-            {
-                eError = OMX_CONF_StdAudioProcessorStereoWideningLoudspeakersTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudioprocessortest.h
deleted file mode 100644 (file)
index 4b1e205..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2006 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioProcessorTest.h
- *  OpenMax IL conformance test - Standard Audio Processor Component Test
- *  header
- */
-
-#ifndef OMX_CONF_STDAUDIOPROCESSORTEST_H_
-#define OMX_CONF_STDAUDIOPROCESSORTEST_H_
-
-#include "OMX_CONF_StdCompCommon.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-    /* Common port test for standard audio processors. Verifies port count,
-     * domain and directions. */
-    OMX_ERRORTYPE StdAudioProcessorTest_Common(TEST_CTXTYPE *pCtx);
-
-    /* StdCompAudioProcessorEndianness gives the native endianness of the
-     * platform under which the tests are run */
-    OMX_ENDIANTYPE StdCompAudioProcessorEndianness(void);
-
-    /* PCM port parameter test checks the common parameters for pcm ports of the
-     * standard audio processor components.
-     * @param pCtx test context pointer
-     * @param nPcmSamplingRateArrayLength length of the sampling rate array
-     * @param pPcmSamplingRate the sampling rate array to be tested
-     */
-    OMX_ERRORTYPE StdCompCommonAudioProcessor_PcmPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPcmSamplingRateArrayLength, OMX_U32 *pPcmSamplingRate);
-
-    /* Equalizer test */
-    OMX_ERRORTYPE StdAudioProcessorTest_Equalizer(TEST_CTXTYPE *pCtx);
-
-    /* Chorus test */
-    OMX_ERRORTYPE StdAudioProcessorTest_Chorus(TEST_CTXTYPE *pCtx);
-
-    /* Reverberation test */
-    OMX_ERRORTYPE StdAudioProcessorTest_Reverberation(TEST_CTXTYPE *pCtx);
-
-    /* Headphone Stereo Widening test */
-    OMX_ERRORTYPE StdAudioProcessorTest_StereoWideningHeadphones(
-        TEST_CTXTYPE *pCtx);
-
-    /* Loudspeaker Stereo Widening test */
-    OMX_ERRORTYPE StdAudioProcessorTest_StereoWideningLoudspeakers(
-        TEST_CTXTYPE *pCtx);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /*OMX_CONF_STDAUDIOPROCESSORTEST_H_*/
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiorenderertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdaudiorenderertest.c
deleted file mode 100644 (file)
index f163695..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdAudioRendererTest.c
- *  OpenMax IL conformance test - Standard Audio Renderer Class Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdAudioRendererTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdAudioRendererTest_PcmRenderer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_renderer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard PCM Renderer component, there must be at least one port each of
-           audio domain and other domain. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Input port, PCM format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM Input port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* TO DO: Verify additional support for some additional configs. */
-        /* OMX_IndexConfigAudioVolume, OMX_IndexConfigAudioMute */
-        /* Also need to verify the default value for bInterleaved (OMX_IndexParamAudioPcm). */
-
-        /* Verify - Port Index = OPB + 0; input port, OTHER format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other (media time) input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard PCM Renderer. */
-
-    OMX_ERRORTYPE OMX_CONF_StdPcmRendererTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_renderer.pcm");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdAudioRendererTest_PcmRenderer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the audio renderer class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdAudioRendererTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_renderer.pcm") != NULL)
-            {
-                eError = OMX_CONF_StdPcmRendererTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryclocktest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryclocktest.c
deleted file mode 100644 (file)
index bff934a..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdBinaryClockTest.c
- *  OpenMax IL conformance test - Standard Binary Clock Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdBinaryClockTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdBinaryClockTest_BinaryClock(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex, i;
-
-        OMX_TIME_CONFIG_SCALETYPE sScale;   //OMX_IndexConfigTimeScale
-        OMX_TIME_CONFIG_CLOCKSTATETYPE sClockState; //OMX_IndexConfigTimeClockState
-        OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE sActiveRefClock; //OMX_IndexConfigTimeActiveRefClock
-        OMX_TIME_CONFIG_TIMESTAMPTYPE sTimeStamp;   // OMX_IndexConfigTimeCurrentMediaTime,
-        // OMX_IndexConfigTimeCurrentWallTime
-        // OMX_IndexConfigTimeCurrentAudioReference
-        // OMX_IndexConfigTimeCurrentVideoReference
-        // OMX_IndexConfigTimeClientStartTime
-        OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE sMediaTimeRequest; //OMX_IndexConfigTimeMediaTimeRequest
-
-        OMX_CONF_INIT_STRUCT(sScale, OMX_TIME_CONFIG_SCALETYPE);
-        OMX_CONF_INIT_STRUCT(sClockState, OMX_TIME_CONFIG_CLOCKSTATETYPE);
-        OMX_CONF_INIT_STRUCT(sActiveRefClock, OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE);
-        OMX_CONF_INIT_STRUCT(sTimeStamp, OMX_TIME_CONFIG_TIMESTAMPTYPE);
-        OMX_CONF_INIT_STRUCT(sMediaTimeRequest, OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE);
-
-        eError = StdComponentTest_SetRole(pCtx, "clock.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary clock component, there must be at least one
-           OTHER domain ports. There is no limit on the maximum number of ports.*/
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + i; output port, other format */
-        for (i = 0; i < pCtx->sPortParamOther.nPorts; i++)
-        {
-            nPortIndex = pCtx->sPortParamOther.nStartPortNumber + i;
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Other output port %d \n", nPortIndex);
-            if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            /* Verify R/W accesses. There are no default values in the specification. */
-            OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigTimeScale,
-                                           (OMX_PTR)&sScale,
-                                           eError);    // R/W
-
-            OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigTimeClockState,
-                                           (OMX_PTR)&sClockState,
-                                           eError);    // R/W
-
-            OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigTimeActiveRefClock,
-                                           (OMX_PTR)&sActiveRefClock,
-                                           eError);    // R/W
-
-            eError = OMX_GetConfig(pCtx, OMX_IndexConfigTimeCurrentMediaTime,
-                                   (OMX_PTR) & sTimeStamp); //Read Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_GetConfig(pCtx, OMX_IndexConfigTimeCurrentWallTime,
-                                   (OMX_PTR) & sTimeStamp); //Read Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_SetConfig(pCtx, OMX_IndexConfigTimeCurrentAudioReference,
-                                   (OMX_PTR) & sTimeStamp); //Write Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_SetConfig(pCtx, OMX_IndexConfigTimeCurrentVideoReference,
-                                   (OMX_PTR) & sTimeStamp); //Write Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_SetConfig(pCtx, OMX_IndexConfigTimeCurrentVideoReference,
-                                   (OMX_PTR) & sTimeStamp); //Write Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_SetConfig(pCtx, OMX_IndexConfigTimeMediaTimeRequest,
-                                   (OMX_PTR) & sMediaTimeRequest); //Write Access.
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-        }
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Binary Clock. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryClockTest_BinaryClockTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "clock.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdBinaryClockTest_BinaryClock);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the binary clock
-       class exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdClockTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "clock.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryClockTest_BinaryClockTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryreadertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinaryreadertest.c
deleted file mode 100644 (file)
index 9518759..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdBinaryReaderTest.c
- *  OpenMax IL conformance test - Standard Binary Reader Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdBinaryReaderTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdReaderTest_BinaryAudioReader(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary audio reader component, there must be at least one audio domain port. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying APB +0 is output port\n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdReaderTest_BinaryVideoReader(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary video reader component, there must be at least one video domain port. */
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying VPB+0 is output port\n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdReaderTest_BinaryImageReader(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "image_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary image reader component, there must be at least one image domain port. */
-        if (pCtx->sPortParamImage.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying IPB+0 is output port\n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Audio Reader Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryAudioReaderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdReaderTest_BinaryAudioReader);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Video Reader Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryVideoReaderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdReaderTest_BinaryVideoReader);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Image Reader Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryImageReaderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "image_reader.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdReaderTest_BinaryImageReader);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the binary reader class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdReaderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_reader.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryAudioReaderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_reader.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryVideoReaderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_reader.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryImageReaderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinarywritertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdbinarywritertest.c
deleted file mode 100644 (file)
index 7fa203b..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdBinaryWriterTest.c
- *  OpenMax IL conformance test - Standard Binary Writer Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdBinaryWriterTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdWriterTest_BinaryAudioWriter(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "audio_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary audio writer component, there must be at least one audio domain port. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying OMX_AUDIOPORTBASE + 0 is input port \n\n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdWriterTest_BinaryVideoWriter(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary video writer component, there must be at least one video domain port. */
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying OMX_VIDEOPORTBASE + 0 is input port \n\n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdWriterTest_BinaryImageWriter(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "image_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard binary image writer component, there must be at least one image domain port. */
-        if (pCtx->sPortParamImage.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 0; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying OMX_IMAGEPORTBASE + 0 is input port \n\n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-    }
-
-    /*****************************************************************************/
-    /* Test a component for compliance with the Standard Audio Writer Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryAudioWriterTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "audio_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdWriterTest_BinaryAudioWriter);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Video Writer Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryVideoWriterTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdWriterTest_BinaryVideoWriter);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Image Writer Component. */
-
-    OMX_ERRORTYPE OMX_CONF_StdBinaryImageWriterTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "image_writer.binary");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdWriterTest_BinaryImageWriter);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the binary writer class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdWriterTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "audio_writer.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryAudioWriterTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_writer.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryVideoWriterTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_writer.binary") != NULL)
-            {
-                eError = OMX_CONF_StdBinaryImageWriterTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcameratest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcameratest.c
deleted file mode 100644 (file)
index e724739..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCameraTest.c
- *  OpenMax IL conformance test - Standard camera Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdCameraTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCameraTest_YuvCamera(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-
-        eError = StdComponentTest_SetRole(pCtx, "camera.yuv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard camera component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard camera component, there must be at least one other domain port. */
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; output port, video */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Camera video output port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_YuvCameraPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default values specific to VPB+0 */
-        sPortDefinition.nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingUnused) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatYUV420Planar) ||
-                (sPortDefinition.format.video.nFrameWidth != 320) ||
-                (sPortDefinition.format.video.nFrameHeight != 240) ||
-                (sPortDefinition.format.video.nStride != 640) ||
-                (sPortDefinition.format.video.nSliceHeight != 16))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, video  */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Camera video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_YuvCameraPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default values specific to VPB+1 */
-        sPortDefinition.nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingUnused) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatYUV420Planar) ||
-                (sPortDefinition.format.video.nFrameWidth != 640) ||
-                (sPortDefinition.format.video.nFrameHeight != 480) ||
-                (sPortDefinition.format.video.nStride != 1280) ||
-                (sPortDefinition.format.video.nSliceHeight != 16))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + 0; input port, other format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Other input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Camera. */
-
-    OMX_ERRORTYPE OMX_CONF_StdYuvCameraTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "camera.yuv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdCameraTest_YuvCamera);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the camera class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdCameraTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "camera.yuv") != NULL)
-            {
-                eError = OMX_CONF_StdYuvCameraTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.c
deleted file mode 100644 (file)
index f657ffa..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommon.c
- *  OpenMax IL conformance test - Standard Component Test
- *  Contains common code that can be reused by various standard component tests.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-
-#include <string.h>
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-    /* Utility function: This function queries the number of the roles of a
-       component and allocates memory for those many strings, 128 bytes each.
-       The second call to OMX_GetRolesOfComponent populates the roles strings.
-    */
-
-    OMX_ERRORTYPE StdComponentTest_PopulateRolesArray(OMX_STRING cComponentName, OMX_U32 *nNumRoles, OMX_STRING *sRolesArray)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 i = 0;
-
-        eError = OMX_Init();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_GetRolesOfComponent(cComponentName, nNumRoles, NULL);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        for (i = 0; i < *nNumRoles; i++)
-        {
-            sRolesArray[i] = (OMX_STRING)(OMX_OSAL_Malloc(MAX_COMPONENT_NAMELENGTH));
-            if (sRolesArray[i] == NULL)
-                eError = OMX_ErrorInsufficientResources;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-        eError = OMX_GetRolesOfComponent(cComponentName, nNumRoles, (OMX_U8**) sRolesArray);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_Deinit();
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return eError;
-    }
-
-    /*****************************************************************************/
-    /* Utility function: Release memory used by the roles string array. */
-
-    void StdComponentTest_FreeRolesArray(OMX_U32 nRolesFound, OMX_STRING *sRolesArray)
-    {
-        OMX_U32 i = 0;
-
-        for (i = 0; i < nRolesFound; i++)
-        {
-            if (sRolesArray[i] != NULL)
-            {
-                OMX_OSAL_Free(sRolesArray[i]);
-                sRolesArray[i] = NULL;
-            }
-        }
-    }
-
-    /*****************************************************************************/
-    /* Test if component supports a role. */
-
-    OMX_ERRORTYPE StdComponentTest_IsRoleSupported(OMX_STRING cComponentName, OMX_STRING cRole)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles = 0;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES];
-        OMX_BOOL bRoleSupported = OMX_FALSE;
-        OMX_U32 i;
-
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], cRole) != NULL)
-            {
-                bRoleSupported = OMX_TRUE;
-                break;
-            }
-        }
-        if (bRoleSupported == OMX_TRUE)
-            eError = OMX_ErrorNone;
-        else
-            eError = OMX_ErrorComponentNotFound;
-
-OMX_CONF_TEST_BAIL:
-
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return eError;
-    }
-
-    /*****************************************************************************/
-    /* Set a role for a component */
-
-    OMX_ERRORTYPE StdComponentTest_SetRole(TEST_CTXTYPE *pCtx, OMX_STRING cRole)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_COMPONENTROLETYPE sRole;
-
-        OMX_CONF_INIT_STRUCT(sRole, OMX_PARAM_COMPONENTROLETYPE);
-        strcpy((OMX_STRING) sRole.cRole, cRole);
-
-        eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamStandardComponentRole, (OMX_PTR) & sRole);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return (eError);
-
-    }
-
-    /*****************************************************************************/
-    /* Verify that the index OMX_IndexParamCompBufferSupplier is supported and
-       the preferences could be set to any valid value. */
-
-    OMX_ERRORTYPE StdComponentTest_BufferSupplier(TEST_CTXTYPE *pCtx, OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_BUFFERSUPPLIERTYPE sBufferSupplier;
-
-        OMX_CONF_INIT_STRUCT(sBufferSupplier, OMX_PARAM_BUFFERSUPPLIERTYPE);
-        sBufferSupplier.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                  (OMX_PTR) & sBufferSupplier);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sBufferSupplier.eBufferSupplier = OMX_BufferSupplyInput;
-        eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                  (OMX_PTR) & sBufferSupplier);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sBufferSupplier.eBufferSupplier = OMX_BufferSupplyOutput;
-        eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamCompBufferSupplier,
-                                  (OMX_PTR) & sBufferSupplier);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    /* Inspect componet ports.
-       This also verifies that the component supports OMX_IndexParam*****Init.
-    */
-
-    OMX_ERRORTYPE StdComponentTest_InspectPorts(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        /* Check support for OMX_IndexParam*****Init. */
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParamAudio, OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioInit,
-                                  (OMX_PTR) & pCtx->sPortParamAudio);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParamVideo, OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoInit,
-                                  (OMX_PTR) & pCtx->sPortParamVideo);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParamImage, OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamImageInit,
-                                  (OMX_PTR) & pCtx->sPortParamImage);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_CONF_INIT_STRUCT(pCtx->sPortParamOther, OMX_PORT_PARAM_TYPE);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamOtherInit,
-                                  (OMX_PTR) & pCtx->sPortParamOther);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_BOOL StdComponentTest_IsInputPort(TEST_CTXTYPE *pCtx, OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                  (OMX_PTR) & sPortDefinition);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        if (sPortDefinition.eDir == OMX_DirInput)
-            return OMX_TRUE;
-
-OMX_CONF_TEST_BAIL:
-        return OMX_FALSE;
-    }
-
-    /*****************************************************************************/
-
-    OMX_BOOL StdComponentTest_IsOutputPort(TEST_CTXTYPE *pCtx, OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition,
-                                  (OMX_PTR) & sPortDefinition);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        if (sPortDefinition.eDir == OMX_DirOutput)
-            return OMX_TRUE;
-
-OMX_CONF_TEST_BAIL:
-        return OMX_FALSE;
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdComponentTest_StdPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_PARAM_BUFFERSUPPLIERTYPE sBufferSupplier;
-
-        /* Check support for OMX_IndexParamPortDefinition. */
-        sPortDefinition.nPortIndex = nPortIndex;
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamPortDefinition,
-                                      (OMX_PTR)&sPortDefinition, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Check support for OMX_IndexParamCompBufferSupplier. */
-        OMX_CONF_INIT_STRUCT(sBufferSupplier, OMX_PARAM_BUFFERSUPPLIERTYPE);
-        sBufferSupplier.nPortIndex = nPortIndex;
-
-        sBufferSupplier.eBufferSupplier = OMX_BufferSupplyInput;
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamCompBufferSupplier,
-                                      (OMX_PTR)&sBufferSupplier, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        sBufferSupplier.eBufferSupplier = OMX_BufferSupplyOutput;
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamCompBufferSupplier,
-                                      (OMX_PTR)&sBufferSupplier, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-    /* This is the common code reuseable by all standard component tests.
-       This routine creates the component and sets up the required entities for
-       the test. Then it runs the actual component test passed on by pCompTest.
-    */
-    OMX_ERRORTYPE StdComponentTest_StdComp(
-        OMX_IN OMX_STRING cComponentName,
-        TEST_CTXTYPE *pCtx,
-        STDCOMPTEST_COMPONENT pCompTest)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_ERRORTYPE eCleanupError = OMX_ErrorNone;
-        OMX_HANDLETYPE hComp  = 0x0;
-        OMX_HANDLETYPE hWrappedComp = 0x0;
-        OMX_CALLBACKTYPE *pWrappedCallbacks;
-        OMX_PTR pWrappedAppData;
-        OMX_CALLBACKTYPE sCallbacks;
-
-        /* create callback tracer */
-        sCallbacks.EventHandler    = StubbedEventHandler;
-        sCallbacks.EmptyBufferDone = StubbedEmptyBufferDone;
-        sCallbacks.FillBufferDone  = StubbedFillBufferDone;
-
-        eError = OMX_CONF_CallbackTracerCreate(&sCallbacks, (OMX_PTR)pCtx, cComponentName,
-                                               &pWrappedCallbacks, &pWrappedAppData);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Initialize OpenMax */
-        eError = OMX_Init();
-        if (eError != OMX_ErrorNone)
-        {
-            goto OMX_CONF_TEST_BAIL;
-        }
-
-        /* Acquire handle */
-        eError = OMX_GetHandle(&hComp, cComponentName, pWrappedAppData, pWrappedCallbacks);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_CONF_ComponentTracerCreate(hComp, cComponentName, &hWrappedComp);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        pCtx->hWrappedComp = hWrappedComp;
-
-        /* Inspect what ports the cmponent has.
-           This also checks for the support for the following OMX_IndexParam*****Init.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Inspecting component ports\n");
-        eError = StdComponentTest_InspectPorts(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* All set up done, run the actual component test now.
-        */
-        eError = pCompTest(pCtx);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        if (hWrappedComp)
-        {
-            OMX_CONF_ComponentTracerDestroy(hWrappedComp);
-        }
-
-        if (hComp)
-        {
-            if (OMX_ErrorNone == eCleanupError)
-            {
-                eCleanupError = OMX_FreeHandle(hComp);
-
-            }
-            else
-            {
-                OMX_FreeHandle(hComp);
-            }
-        }
-
-        if (OMX_ErrorNone != eCleanupError)
-        {
-            OMX_Deinit();
-
-        }
-        else
-        {
-            eCleanupError = OMX_Deinit();
-        }
-
-        if (OMX_ErrorNone == eError)
-        {
-            /* if there were no failures during the test, report any errors found
-               during cleanup */
-            eError = eCleanupError;
-        }
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.h b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommon.h
deleted file mode 100644 (file)
index 90b70e6..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommon.h
- *  Common header file for testing of the Standard Components classes defined by
- *  OpenMAX_IL_v11_Section8f_StdComponents.doc.
- */
-
-#ifndef OMX_CONF_StdCompCommon_h
-#define OMX_CONF_StdCompCommon_h
-
-#include <OMX_Types.h>
-#include <OMX_Core.h>
-
-#include <OMX_OSAL_Interfaces.h>
-#include <OMX_CONF_TestHarness.h>
-#include <OMX_CONF_StubbedCallbacks.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#define MAX_COMPONENT_ROLES 16
-#define MAX_COMPONENT_NAMELENGTH 128*sizeof(OMX_U8)
-
-    /**********************************************************************
-     * COMMON MACROS
-     **********************************************************************/
-
-    /* Utility macro.
-       Initialize the given structure with OpenMAX version and size.
-       Hardcoded to 1.0 value. May need to be changed to 1.1 in future.
-    */
-#define OMX_CONF_INIT_STRUCT(_s_, _name_)\
-    memset(&(_s_), 0x0, sizeof(_name_));\
-    (_s_).nSize = sizeof(_name_);\
-    (_s_).nVersion.s.nVersionMajor = 0x1;\
-    (_s_).nVersion.s.nVersionMinor = 0x0;\
-    (_s_).nVersion.s.nRevision = 0x0;\
-    (_s_).nVersion.s.nStep = 0x0                               /* Macro End */
-
-    /* Utility macro.
-       Bail out if there is an error.
-    */
-#define OMX_CONF_BAIL_ON_ERROR(_e_) \
-    if (OMX_ErrorNone != (_e_))\
-    {\
-        goto OMX_CONF_TEST_BAIL;\
-    }                                                          /* Macro End */
-
-    /* Utility macro.
-       Sets the error return value to the given value and then bails out.
-       An appropriate error message based on the error value is output.
-    */
-#define OMX_CONF_SET_ERROR_BAIL(_e_, _c_, _s_)\
-    _e_ = _c_;\
-    OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, _s_);\
-    goto OMX_CONF_TEST_BAIL                                    /* Macro End */
-
-    /*  Utility macro.
-        Bail out with an error OMX_ErrorUndfined if the expression _a_
-        does not evalute to be as expected. Outputs the user supplies message
-        passed on by _r_.
-    */
-#define OMX_CONF_ASSERT(_e_, _a_, _r_) \
-    if (!(_a_))\
-    {\
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_ERROR, "%s\n", (_r_));\
-        (_e_) = OMX_ErrorUndefined;\
-        goto OMX_CONF_TEST_BAIL;\
-    }                                                          /* Macro End */
-
-    /* Verify that a component supports the GetParamater and SetParameter
-       for a given parameter. Can be used to verify the mandatory support of
-       parameters (e.g. OMX_IndexParamPortDefinition, etc). Bails out with
-       an error if the mandatory support is not available.
-    */
-#define OMX_CONF_PARAM_REQUIREDGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Test that a component properly handles a GetParameter/SetParameter
-       call with an unsupported parameter value.
-    */
-#define OMX_CONF_PARAM_OPTIONALGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Verify that a component supports the GetConfig and SetConfig
-       for a given parameter. Can be used to verify the mandatory support of
-       parameters (e.g. OMX_IndexParamPortDefinition, etc).
-    */
-#define OMX_CONF_CONFIG_REQUIREDGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Test that a component properly handles a GetParameter/SetParameter
-       call with an unsupported parameter value.
-     */
-#define OMX_CONF_CONFIG_OPTIONALGETSET(_p_, _i_, _s_, _e_)\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    if (OMX_ErrorUnsupportedIndex == _e_) _e_ = OMX_ErrorNone;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Implements a mechanism to verify that a component is able to accept
-       a new value for a parameter and is able to set it correctly.
-    */
-#define OMX_CONF_PARAM_READ_WRITE_VERIFY(_p_, _i_, _s_, _m_, _v_, _e_)\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _m_ = _v_;\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_m_ != _v_) _e_ = OMX_ErrorBadParameter;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Implements a mechanism to verify that a component is able to accept
-       a new value for a parameter and is able to set it correctly.
-    */
-#define OMX_CONF_PARAM_WRITE_VERIFY(_p_, _i_, _s_, _m_, _v_, _e_)\
-    _m_ = _v_;\
-    _e_ = OMX_SetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_GetParameter((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_m_ != _v_) _e_ = OMX_ErrorBadParameter;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Implements a mechanism to verify that a component is able to accept
-       a new value for a config and is able to set it correctly.
-       Bogusvalue is used to make sure the component really does change the value
-    */
-#define OMX_CONF_CONFIG_READ_WRITE_VERIFY(_p_, _i_, _s_, _m_, _v_, _bogusvalue_, _e_)\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _m_ = _v_;\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _m_ = _bogusvalue_;\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_m_ != _v_) _e_ = OMX_ErrorBadParameter;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /* Implements a mechanism to verify that a component is able to accept
-       a new value for a parameter and is able to set it correctly.
-    */
-#define OMX_CONF_CONFIG_WRITE_VERIFY(_p_, _i_, _s_, _m_, _v_, _e_)\
-    _m_ = _v_;\
-    _e_ = OMX_SetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    _e_ = OMX_GetConfig((_p_)->hWrappedComp, _i_, _s_);\
-    OMX_CONF_BAIL_ON_ERROR(_e_);\
-    if (_m_ != _v_) _e_ = OMX_ErrorBadParameter;\
-    OMX_CONF_BAIL_ON_ERROR(_e_)                                /* Macro End */
-
-
-    /**********************************************************************/
-
-    typedef struct _TEST_CTXTYPE
-    {
-        OMX_HANDLETYPE hComp;
-        OMX_HANDLETYPE hWrappedComp;
-        OMX_STATETYPE eState;
-        OMX_U32 nNumPorts;
-        OMX_PORT_PARAM_TYPE sPortParamAudio;
-        OMX_PORT_PARAM_TYPE sPortParamVideo;
-        OMX_PORT_PARAM_TYPE sPortParamImage;
-        OMX_PORT_PARAM_TYPE sPortParamOther;
-        OMX_HANDLETYPE hStateChangeEvent;
-    } TEST_CTXTYPE;
-
-
-    typedef OMX_ERRORTYPE(*STDCOMPTEST_COMPONENT)(TEST_CTXTYPE *pCtx);
-
-    /************************ Function declarations **************************/
-
-    /* Utility function: Allocate memory for the roles string array. */
-    OMX_ERRORTYPE StdComponentTest_PopulateRolesArray(OMX_STRING, OMX_U32 *, OMX_STRING*);
-
-    /* Utility function: Release memory used by the roles string array. */
-    void StdComponentTest_FreeRolesArray(OMX_U32, OMX_STRING*);
-
-    /* Test if component supports a role. */
-    OMX_ERRORTYPE StdComponentTest_IsRoleSupported(OMX_STRING cComponentName, OMX_STRING cRole);
-
-    /* Set a role for a component */
-    OMX_ERRORTYPE StdComponentTest_SetRole(TEST_CTXTYPE *pCtx, OMX_STRING cRole);
-
-    /* Verify support for OMX_IndexParamCompBufferSupplier. */
-    OMX_ERRORTYPE StdComponentTest_BufferSupplier(TEST_CTXTYPE *, OMX_U32);
-
-    /* Determine how many ports of each domain are present. */
-    OMX_ERRORTYPE StdComponentTest_InspectPorts(TEST_CTXTYPE *);
-
-    /* Check if the given port is an input port. */
-    OMX_BOOL StdComponentTest_IsInputPort(TEST_CTXTYPE *, OMX_U32);
-
-    /* Check if the given port is an output port. */
-    OMX_BOOL StdComponentTest_IsOutputPort(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters. */
-    OMX_ERRORTYPE StdComponentTest_StdPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Common setup and test function standard component tests. */
-    OMX_ERRORTYPE StdComponentTest_StdComp(OMX_IN OMX_STRING,
-                                           TEST_CTXTYPE *,
-                                           STDCOMPTEST_COMPONENT);
-
-    /* Verify support for standard component parameters for an MP3 port. */
-    OMX_ERRORTYPE StdCompCommonAudio_Mp3PortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an PCM port. */
-    OMX_ERRORTYPE StdCompCommonAudio_PcmPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an AAC port. */
-    OMX_ERRORTYPE StdCompCommonAudio_AacPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an Real Audio port. */
-    OMX_ERRORTYPE StdCompCommonAudio_RealAudioPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an WMA port. */
-    OMX_ERRORTYPE StdCompCommonAudio_WmaPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an H263 port. */
-    OMX_ERRORTYPE StdCompCommonVideo_H263PortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an Real Video port. */
-    OMX_ERRORTYPE StdCompCommonVideo_RvPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an WMV port. */
-    OMX_ERRORTYPE StdCompCommonVideo_WmvPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an MPEG4 port. */
-    OMX_ERRORTYPE StdCompCommonVideo_Mpeg4PortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an AVC(H264) port. */
-    OMX_ERRORTYPE StdCompCommonVideo_AvcPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an Raw Video port. */
-    OMX_ERRORTYPE StdCompCommonVideo_RawPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an raw QCIF+ port. */
-    OMX_ERRORTYPE StdCompCommonVideo_QcifPlusPortParameters(TEST_CTXTYPE *, OMX_U32, OMX_COLOR_FORMATTYPE);
-
-    /* Verify support for standard component parameters for an OTHER domain port. */
-    OMX_ERRORTYPE StdCompCommonOther_OtherPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for a Container Demuxer port. */
-    OMX_ERRORTYPE StdCompCommonOther_ContainerDemuxerPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for a Container Muxer port. */
-    OMX_ERRORTYPE StdCompCommonOther_ContainerMuxerPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for a Camera port. */
-    OMX_ERRORTYPE StdCompCommonOther_YuvCameraPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an JPEG port. */
-    OMX_ERRORTYPE StdCompCommonImage_JpegPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an Raw Image port. */
-    OMX_ERRORTYPE StdCompCommonImage_RawPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an image/video renderer port. */
-    OMX_ERRORTYPE StdCompCommonImage_IVRendererPortParameters(TEST_CTXTYPE *, OMX_U32);
-
-    /* Verify support for standard component parameters for an raw QCIF+ port. */
-    OMX_ERRORTYPE StdCompCommonImage_QcifPlusPortParameters(TEST_CTXTYPE *, OMX_U32, OMX_COLOR_FORMATTYPE);
-
-    /**********************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonaudio.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonaudio.c
deleted file mode 100644 (file)
index b28c8f0..0000000
+++ /dev/null
@@ -1,510 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommonAudio.c
- *  OpenMax IL conformance test - Standard Component Test
- *  Contains common code that can be reused by various standard audio component tests.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-
-#include <string.h>
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonAudio_Mp3PortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        const OMX_U32 Mp3SampleRate[9] =
-            {8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000};
-
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_AUDIO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_AUDIO_PARAM_MP3TYPE sFormatMP3;
-        //This structure is not a part of new headrer file
-        //OMX_AUDIO_PARAM_MP3STREAMFORMATTYPE sMp3StreamFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatMP3, OMX_AUDIO_PARAM_MP3TYPE);
-        //This structure is not a part of new headrer file
-        //OMX_CONF_INIT_STRUCT(sMp3StreamFormat, OMX_AUDIO_PARAM_MP3STREAMFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MP3 port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MP3 port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainAudio) ||
-                (sPortDefinition.format.audio.eEncoding != OMX_AUDIO_CodingMP3))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingMP3\n");
-
-        /* Verify support for OMX_IndexParamAudioPortFormat and verify
-           that the port format is as expected.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying component supports OMX_IndexParamAudioPortFormat\n");
-        sPortFormat.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPortFormat, (OMX_PTR) & sPortFormat);
-        if (sPortFormat.eEncoding != OMX_AUDIO_CodingMP3)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingMP3\n");
-
-        /* Verify default settings for MP3 */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default values for MP3\n");
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioMp3, (OMX_PTR) & sFormatMP3);
-        if ((sFormatMP3.nChannels != 2) ||
-                (sFormatMP3.nSampleRate != 44100) ||
-                (sFormatMP3.eChannelMode != OMX_AUDIO_ChannelModeStereo))
-            eError = OMX_ErrorBadParameter;  /* Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nChannels = %d, nSampleRate = %d,"
-                       "eChannelMode = %d\n", sFormatMP3.nChannels,
-                       sFormatMP3.nSampleRate, sFormatMP3.eChannelMode);
-
-        /* Verify all possible settings for OMX_IndexParamAudioMp3 now. */
-
-        /* Verify all allowed channels could be specified. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying number of audio channels supported\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                             (OMX_PTR)&sFormatMP3,
-                                             sFormatMP3.nChannels,
-                                             i + 1, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d \n", sFormatMP3.nChannels);
-        }
-
-        /* Verify all allowed sample rates can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for sample rates =\n");
-        for (i = 0; i < 9; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d ", Mp3SampleRate[i]);
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                             (OMX_PTR)&sFormatMP3,
-                                             sFormatMP3.nSampleRate,
-                                             Mp3SampleRate[i], eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\n ");
-
-        /* Verify all allowed AudioBandWidth values can be set. */
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                             (OMX_PTR)&sFormatMP3,
-                                             sFormatMP3.nAudioBandWidth,
-                                             i, eError);
-        }
-
-        /* Verify all allowed eChannelMode values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for eChannelMode values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeStereo\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                         (OMX_PTR)&sFormatMP3,
-                                         sFormatMP3.eChannelMode,
-                                         OMX_AUDIO_ChannelModeStereo, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeJointStereo\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                         (OMX_PTR)&sFormatMP3,
-                                         sFormatMP3.eChannelMode,
-                                         OMX_AUDIO_ChannelModeJointStereo, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeDual\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                         (OMX_PTR)&sFormatMP3,
-                                         sFormatMP3.eChannelMode,
-                                         OMX_AUDIO_ChannelModeDual, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeMono\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioMp3,
-                                         (OMX_PTR)&sFormatMP3,
-                                         sFormatMP3.eChannelMode,
-                                         OMX_AUDIO_ChannelModeMono, eError);
-//This structure is not a part of new headrer file
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonAudio_AacPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        const OMX_U32 AacSampleRate[9] =
-            {8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000};
-
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_AUDIO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_AUDIO_PARAM_AACPROFILETYPE sFormatAAC;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatAAC, OMX_AUDIO_PARAM_AACPROFILETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AAC Port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AAC port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainAudio) ||
-                (sPortDefinition.format.audio.eEncoding != OMX_AUDIO_CodingAAC))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingAAC\n");
-
-        /* Verify support for OMX_IndexParamAudioPortFormat and verify
-           that the port format is as expected.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying component supports OMX_IndexParamAudioPortFormat\n");
-        sPortFormat.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPortFormat, (OMX_PTR) & sPortFormat);
-        if (sPortFormat.eEncoding != OMX_AUDIO_CodingAAC)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingAAC\n");
-
-        /* Verify default settings for AAC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default values for AAC Profile\n");
-        OMX_CONF_INIT_STRUCT(sFormatAAC, OMX_AUDIO_PARAM_AACPROFILETYPE);
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioAac, (OMX_PTR) & sFormatAAC);
-        if ((sFormatAAC.nChannels != 2) ||
-                (sFormatAAC.nSampleRate != 44100) ||
-                (sFormatAAC.eAACProfile != OMX_AUDIO_AACObjectLC) ||
-                (sFormatAAC.eAACStreamFormat != OMX_AUDIO_AACStreamFormatMP2ADTS) ||
-                (sFormatAAC.eChannelMode != OMX_AUDIO_ChannelModeStereo))
-            eError = OMX_ErrorBadParameter;  /* Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nChannels = %d, nSampleRate = %d, "
-                       "eAACProfile = %d, eChannelMode = %d, eAACStreamFormat = %d\n",
-                       sFormatAAC.nChannels, sFormatAAC.nSampleRate,
-                       sFormatAAC.eAACProfile, sFormatAAC.eAACStreamFormat,
-                       sFormatAAC.eChannelMode);
-
-        /* Verify all possible settings for OMX_IndexParamAudioAac now. */
-
-        /* Verify all allowed channels could be specified. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying number of audio channels supported\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                             (OMX_PTR)&sFormatAAC,
-                                             sFormatAAC.nChannels,
-                                             i + 1, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d \n", sFormatAAC.nChannels);
-        }
-
-        /* Verify all allowed sample rates can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for sample rates =\n");
-        for (i = 0; i < 10; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d ", AacSampleRate[i]);
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                             (OMX_PTR)&sFormatAAC,
-                                             sFormatAAC.nSampleRate,
-                                             AacSampleRate[i], eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\n ");
-
-        /* Verify all allowed AudioBandWidth values can be set. */
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                             (OMX_PTR)&sFormatAAC,
-                                             sFormatAAC.nAudioBandWidth,
-                                             i, eError);
-        }
-
-        /* Verify all allowed eAACProfile values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for eAACProfile values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACObjectLC\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACProfile,
-                                         OMX_AUDIO_AACObjectLC, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACObjectHE\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACProfile,
-                                         OMX_AUDIO_AACObjectHE, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACObjectHE_PS\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACProfile,
-                                         OMX_AUDIO_AACObjectHE_PS, eError);
-
-        /* Verify all allowed eAACStreamFormat values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for eAACStreamFormat values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACStreamFormatMP2ADTS\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACStreamFormat,
-                                         OMX_AUDIO_AACStreamFormatMP2ADTS, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACStreamFormatMP4ADTS\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACStreamFormat,
-                                         OMX_AUDIO_AACStreamFormatMP4ADTS, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACStreamFormatADIF\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACStreamFormat,
-                                         OMX_AUDIO_AACStreamFormatADIF, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_AACStreamFormatRAW\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eAACStreamFormat,
-                                         OMX_AUDIO_AACStreamFormatRAW, eError);
-
-        /* Verify all allowed eChannelMode values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for eChannelMode values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeStereo\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eChannelMode,
-                                         OMX_AUDIO_ChannelModeStereo, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_ChannelModeMono\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioAac,
-                                         (OMX_PTR)&sFormatAAC,
-                                         sFormatAAC.eChannelMode,
-                                         OMX_AUDIO_ChannelModeMono, eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonAudio_RealAudioPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        UNUSED_PARAMETER(pCtx);
-        UNUSED_PARAMETER(nPortIndex);
-
-        // Placeholder for actual real audio code.
-
-        //OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonAudio_WmaPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        UNUSED_PARAMETER(pCtx);
-        UNUSED_PARAMETER(nPortIndex);
-
-        // Placeholder for actual real audio code.
-
-        //OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonAudio_PcmPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        const OMX_U32 PcmSamplingRate[9] =
-            {8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000};
-
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_AUDIO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_AUDIO_PARAM_PCMMODETYPE sFormatPCM;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_AUDIO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM Port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainAudio) ||
-                (sPortDefinition.format.audio.eEncoding != OMX_AUDIO_CodingPCM))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingPCM\n");
-
-        /* Verify support for OMX_IndexParamAudioPortFormat and verify
-           that the port format is as expected.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying component supports OMX_IndexParamAudioPortFormat\n");
-        sPortFormat.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPortFormat, (OMX_PTR) & sPortFormat);
-        if (sPortFormat.eEncoding != OMX_AUDIO_CodingPCM)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eEncoding = OMX_AUDIO_CodingPCM\n");
-
-        /* Verify default settings for PCM */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default values for PCM Param\n");
-        OMX_CONF_INIT_STRUCT(sFormatPCM, OMX_AUDIO_PARAM_PCMMODETYPE);
-        sFormatPCM.nPortIndex = nPortIndex; // Make sure asking for the right port!
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamAudioPcm, (OMX_PTR) & sFormatPCM);
-        if ((sFormatPCM.nChannels != 2) ||
-                (sFormatPCM.eNumData != OMX_NumericalDataSigned) ||
-                (sFormatPCM.bInterleaved != OMX_TRUE) ||
-                (sFormatPCM.nBitPerSample != 16) ||
-                (sFormatPCM.nSamplingRate != 44100) ||
-                (sFormatPCM.ePCMMode != OMX_AUDIO_PCMModeLinear) ||
-                (sFormatPCM.eChannelMapping[0] != OMX_AUDIO_ChannelLF) ||
-                (sFormatPCM.eChannelMapping[1] != OMX_AUDIO_ChannelRF))
-            eError = OMX_ErrorBadParameter;  /* Need a more informative error value. */
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nChannels = %d, eNumData = %d, "
-                       "bInterleaved = %d, nBitPerSample = %d, "
-                       "nSamplingRate = %d, ePCMMode = %d\n",
-                       sFormatPCM.nChannels, sFormatPCM.eNumData,
-                       sFormatPCM.bInterleaved, sFormatPCM.nBitPerSample,
-                       sFormatPCM.nSamplingRate, sFormatPCM.ePCMMode);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eChannelMapping[0] = %d, eChannelMapping[1] = %d\n",
-                       sFormatPCM.eChannelMapping[0], sFormatPCM.eChannelMapping[1]);
-
-        /* Verify all possible settings for OMX_IndexParamAudioPcm now. */
-        /* Verify all allowed channels could be specified. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying number of audio channels supported\n");
-        for (i = 0; i < 2; i++)
-        {
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                             (OMX_PTR)&sFormatPCM,
-                                             sFormatPCM.nChannels,
-                                             i + 1, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d \n", sFormatPCM.nChannels);
-        }
-
-        /* Verify all allowed sample rates can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for sample rates\n");
-        for (i = 0; i < 9; i++)
-        {
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d ", PcmSamplingRate[i]);
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                             (OMX_PTR)&sFormatPCM,
-                                             sFormatPCM.nSamplingRate,
-                                             PcmSamplingRate[i], eError);
-        }
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\n ");
-
-        /* Verify all allowed eNumData values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for eNumData values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_NumericalDataSigned\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                         (OMX_PTR)&sFormatPCM,
-                                         sFormatPCM.eNumData,
-                                         OMX_NumericalDataSigned, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_NumericalDataUnsigned\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                         (OMX_PTR)&sFormatPCM,
-                                         sFormatPCM.eNumData,
-                                         OMX_NumericalDataUnsigned, eError);
-
-        /* Verify all allowed ePCMMode values can be set. */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for ePCMMode values\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_PCMModeLinear\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                         (OMX_PTR)&sFormatPCM,
-                                         sFormatPCM.ePCMMode,
-                                         OMX_AUDIO_PCMModeLinear, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_PCMModeALaw\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                         (OMX_PTR)&sFormatPCM,
-                                         sFormatPCM.ePCMMode,
-                                         OMX_AUDIO_PCMModeALaw, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_AUDIO_PCMModeMULaw\n");
-        OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamAudioPcm,
-                                         (OMX_PTR)&sFormatPCM,
-                                         sFormatPCM.ePCMMode,
-                                         OMX_AUDIO_PCMModeMULaw, eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonimage.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonimage.c
deleted file mode 100644 (file)
index d1f1192..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommonImage.c
- *  OpenMax IL conformance test - Standard Component Test
- *  Contains common code that can be reused by various standard image component tests.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-    /**************************** G L O B A L S **********************************/
-
-    static OMX_ERRORTYPE StdCompCommonImage_PortFormatSupported(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_IMAGE_CODINGTYPE eCompressionFormat,
-        OMX_COLOR_FORMATTYPE eColorFormat)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_IMAGE_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_IMAGE_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying port format support\n");
-
-        sPortFormat.nPortIndex = nPortIndex;
-
-        for (sPortFormat.nIndex = 0; ; sPortFormat.nIndex++)
-        {
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamImagePortFormat, (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore == eError)
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            if ((sPortFormat.eCompressionFormat == eCompressionFormat) &&
-                    (sPortFormat.eColorFormat == eColorFormat))
-                break;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonImage_JpegPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_IMAGE_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE sQuantTable;
-        OMX_IMAGE_PARAM_HUFFMANTTABLETYPE sHuffTable;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_IMAGE_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sQuantTable, OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE);
-        OMX_CONF_INIT_STRUCT(sHuffTable, OMX_IMAGE_PARAM_HUFFMANTTABLETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying JPEG port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default port definition settings */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying JPEG port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainImage) ||
-                (sPortDefinition.format.image.nFrameWidth != 640) ||
-                (sPortDefinition.format.image.nFrameHeight != 480) ||
-                (sPortDefinition.format.image.eCompressionFormat != OMX_IMAGE_CodingJPEG) ||
-                (sPortDefinition.format.image.eColorFormat != OMX_COLOR_FormatUnused))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "eDomain = %d, nFrameWidth = %d, nFrameHeight = %d, "
-                       "eCompressionFormat= %d, eColorFormat = %d\n", sPortDefinition.eDomain,
-                       sPortDefinition.format.image.nFrameWidth, sPortDefinition.format.image.nFrameHeight,
-                       sPortDefinition.format.image.eCompressionFormat, sPortDefinition.format.image.eColorFormat);
-
-        /* Verify default settings for OMX_IndexParamImagePortFormat */
-        eError = StdCompCommonImage_PortFormatSupported(pCtx, nPortIndex, OMX_IMAGE_CodingJPEG, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_IMAGE_CodingJPEG\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings for OMX_IndexParamQuantizationTable */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default settings for OMX_IndexParamQuantizationTable\n");
-        sQuantTable.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamQuantizationTable, (OMX_PTR) & sQuantTable);
-        if (sQuantTable.eQuantizationTable != OMX_IMAGE_QuantizationTableLuma)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_IMAGE_QuantizationTableLuma\n");
-
-        /* Verify setting alternate values for OMX_IndexParamQuantization */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other settings for OMX_IndexParamQuantizationTable\n");
-        OMX_CONF_PARAM_WRITE_VERIFY(pCtx, OMX_IndexParamQuantizationTable,
-                                    (OMX_PTR)&sQuantTable, sQuantTable.eQuantizationTable, OMX_IMAGE_QuantizationTableChroma, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_IMAGE_QuantizationTableChroma\n");
-
-        /* Parameter verification for decoders*/
-        if (sPortDefinition.eDir == OMX_DirInput)
-        {
-            /* Verify default settings for OMX_IndexParamHuffmanTable */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default settings for OMX_IndexParamHuffmanTable\n");
-            sHuffTable.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamHuffmanTable, (OMX_PTR) & sHuffTable);
-            if (sHuffTable.eHuffmanTable != OMX_IMAGE_HuffmanTableAC)
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_IMAGE_HuffmanTableAC\n");
-
-            /* Verify setting alternate values for OMX_IndexParamHuffman*/
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other settings for OMX_IndexParamHuffmanTable\n");
-            OMX_CONF_PARAM_WRITE_VERIFY(pCtx, OMX_IndexParamHuffmanTable,
-                                        (OMX_PTR)&sHuffTable, sHuffTable.eHuffmanTable, OMX_IMAGE_HuffmanTableDC, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_IMAGE_HuffmanTableDC\n");
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonImage_RawPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_IMAGE_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_IMAGE_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw Image port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default port definition settings */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainImage) ||
-                (sPortDefinition.format.image.nFrameWidth != 640) ||
-                (sPortDefinition.format.image.nFrameHeight != 480) ||
-                (sPortDefinition.format.image.eCompressionFormat != OMX_IMAGE_CodingUnused) ||
-                (sPortDefinition.format.image.eColorFormat != OMX_COLOR_FormatYUV420Planar))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "eDomain = %d, nFrameWidth = %d, nFrameHeight = %d, "
-                       "eCompressionFormat= %d, eColorFormat = %d\n", sPortDefinition.eDomain,
-                       sPortDefinition.format.image.nFrameWidth, sPortDefinition.format.image.nFrameHeight,
-                       sPortDefinition.format.image.eCompressionFormat, sPortDefinition.format.image.eColorFormat);
-
-        /* Verify default settings for OMX_IndexParamImagePortFormat */
-        eError = StdCompCommonImage_PortFormatSupported(pCtx, nPortIndex, OMX_IMAGE_CodingUnused, OMX_COLOR_FormatYUV420Planar);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_IMAGE_CodingUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatYUV420Planar\n");
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonImage_IVRendererPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_CONFIG_ROTATIONTYPE sRotation;
-        OMX_CONFIG_MIRRORTYPE sMirror;
-        OMX_CONFIG_SCALEFACTORTYPE sScale;
-        OMX_CONFIG_RECTTYPE sRect;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        OMX_CONF_INIT_STRUCT(sRotation, OMX_CONFIG_ROTATIONTYPE);
-        OMX_CONF_INIT_STRUCT(sMirror, OMX_CONFIG_MIRRORTYPE);
-        OMX_CONF_INIT_STRUCT(sScale, OMX_CONFIG_SCALEFACTORTYPE);
-        OMX_CONF_INIT_STRUCT(sRect, OMX_CONFIG_RECTTYPE);
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying common image renderer input port parameters\n");
-
-        /* Verify support for OMX_IndexConfigCommonRotate */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default setting for OMX_IndexConfigCommonRotate\n");
-        sRotation.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonRotate, (OMX_PTR) & sRotation);
-        if (sRotation.nRotation != 0)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "nRotation = %d\n", sRotation.nRotation);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for other values of OMX_IndexConfigCommonRotate\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 90, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d\n", sRotation.nRotation);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 180, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d\n", sRotation.nRotation);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 270, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d\n", sRotation.nRotation);
-
-        /* Verify support for OMX_IndexConfigCommonMirror */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default setting for OMX_IndexConfigCommonMirror\n");
-        sMirror.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonMirror, (OMX_PTR) & sMirror);
-        if (sMirror.eMirror != OMX_MirrorNone)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorNone)\n", sMirror.eMirror);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for other values of OMX_IndexConfigCommonMirror\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorVertical, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorVertical)\n", sMirror.eMirror);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorHorizontal, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorHorizontal)\n", sMirror.eMirror);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorBoth, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorBoth)\n", sMirror.eMirror);
-
-        /* Verify support for OMX_IndexConfigCommonScale */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying settings for OMX_IndexConfigCommonScale\n");
-        sScale.nPortIndex = nPortIndex;
-
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonScale,
-                                          (OMX_PTR)&sScale, sScale.xWidth, (1 << 15), 0, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xWidth = ox%x (1 << 15)\n", sScale.xWidth);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonScale,
-                                     (OMX_PTR)&sScale, sScale.xHeight, (1 << 15), eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xHeight = ox%x (1 << 15)\n", sScale.xHeight);
-
-        /* Get frame width and height */
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-
-        /* Verify support for OMX_IndexConfigCommonInputCrop */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default settings for OMX_IndexConfigCommonInputCrop\n");
-        sRect.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonInputCrop, (OMX_PTR) & sRect);
-        if ((sRect.nLeft != 0) ||
-                (sRect.nTop != 0) ||
-                (sRect.nWidth != sPortDefinition.format.image.nFrameWidth) ||
-                (sRect.nHeight != sPortDefinition.format.image.nFrameHeight))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other settings for OMX_IndexConfigCommonInputCrop\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nLeft, 1, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nLeft = %d\n", sRect.nLeft);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nTop, 1, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nTop = %d\n", sRect.nTop);
-
-        i = sRect.nWidth >> 1;
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nWidth, i, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nWidth/2 = %d\n", sRect.nWidth);
-
-        i = sRect.nHeight >> 1;
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nHeight, i, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nHeight/2 = %d\n", sRect.nHeight);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonImage_QcifPlusPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_COLOR_FORMATTYPE eColorFormat)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_IMAGE_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_IMAGE_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying QCIF+ image port %i default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default port definition settings */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for QcifPlus port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainImage) ||
-                (sPortDefinition.format.image.nFrameWidth != 176) ||
-                (sPortDefinition.format.image.nFrameHeight != 220) ||
-                (sPortDefinition.format.image.nStride != 352) ||
-                (sPortDefinition.format.image.nSliceHeight != 16) ||
-                (sPortDefinition.format.image.eCompressionFormat != OMX_IMAGE_CodingUnused) ||
-                (sPortDefinition.format.image.eColorFormat != eColorFormat))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = %d (OMX_PortDomainImage)\n", sPortDefinition.eDomain);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = %d, nFrameHeight = %d\n",
-                       sPortDefinition.format.image.nFrameWidth, sPortDefinition.format.image.nFrameHeight);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nStride = %d, nSliceHeight = %d\n",
-                       sPortDefinition.format.image.nStride, sPortDefinition.format.image.nSliceHeight);
-
-        /* Verify default settings for OMX_IndexParamImagePortFormat */
-        eError = StdCompCommonImage_PortFormatSupported(pCtx, nPortIndex, OMX_IMAGE_CodingUnused, eColorFormat);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingUnused\n");
-        if (OMX_COLOR_FormatYUV420Planar == eColorFormat)
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatYUV420Planar\n");
-        else if (OMX_COLOR_Format16bitRGB565 == eColorFormat)
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_Format16bitRGB565\n");
-
-        eError = StdCompCommonImage_IVRendererPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonother.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonother.c
deleted file mode 100644 (file)
index 9e445af..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommonOther.c
- *  OpenMax IL conformance test - Standard Component Test
- *  Contains common code that can be reused by various standard component tests
- *  requiring ports of the OTHER domain.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-
-#include <string.h>
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonOther_OtherPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_OTHER_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_OTHER_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying OTHER port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainOther) ||
-                (sPortDefinition.format.other.eFormat != OMX_OTHER_FormatTime))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = %d (OMX_PortDomainOther)\n",
-                       sPortDefinition.eDomain);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eFormat = %d (OMX_OTHER_FormatTime)\n",
-                       sPortDefinition.format.other.eFormat);
-
-        /* Verify support for OMX_IndexParamOtherPortFormat and verify
-           that the port format is as expected.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for OMX_IndexParamOtherPortFormat\n");
-        sPortFormat.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamOtherPortFormat, (OMX_PTR) & sPortFormat);
-        if (sPortFormat.eFormat != OMX_OTHER_FormatTime)
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eFormat = %d (OMX_OTHER_FormatTime)\n",
-                       sPortFormat.eFormat);
-
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonOther_ContainerDemuxerPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_TIME_CONFIG_TIMESTAMPTYPE sTimePosition;
-        OMX_TIME_CONFIG_SEEKMODETYPE sTimeSeekMode;
-
-        OMX_CONF_INIT_STRUCT(sTimePosition, OMX_TIME_CONFIG_TIMESTAMPTYPE);
-        OMX_CONF_INIT_STRUCT(sTimeSeekMode, OMX_TIME_CONFIG_SEEKMODETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Container Demuxer port %i common parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* There are no default values mentioned in the specification.
-           Just verify the access at present.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigTimePosition\n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigTimePosition,
-                                       (OMX_PTR)&sTimePosition,
-                                       eError);                      // R/W
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigTimeSeekMode \n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigTimeSeekMode,
-                                       (OMX_PTR)&sTimeSeekMode,
-                                       eError);                      // R/W
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonOther_ContainerMuxerPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Container Muxer port %i common parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonOther_YuvCameraPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_PARAM_SENSORMODETYPE sSensorMode;            //OMX_IndexParamCommonSensorMode
-        OMX_CONFIG_WHITEBALCONTROLTYPE sWhiteBalance;    //OMX_IndexConfigCommonWhiteBalance
-        OMX_CONFIG_SCALEFACTORTYPE sScaleFactor;                //OMX_IndexConfigCommonDigitalZoom
-        // OMX_CONFIG_EVCOMPENSATIONTYPE sEvComp;           //OMX_IndexConfigCommonEVCompensation
-        OMX_CONFIG_BOOLEANTYPE sConfigCapturing;         // OMX_IndexConfigCapturing
-        OMX_CONFIG_BOOLEANTYPE sAutoPauseCapture;             //OMX_IndexConfigAutoPauseAfterCapture
-
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-
-        OMX_CONF_INIT_STRUCT(sSensorMode, OMX_PARAM_SENSORMODETYPE);
-        OMX_CONF_INIT_STRUCT(sWhiteBalance, OMX_CONFIG_WHITEBALCONTROLTYPE);
-        OMX_CONF_INIT_STRUCT(sScaleFactor, OMX_CONFIG_SCALEFACTORTYPE);
-        //OMX_CONF_INIT_STRUCT(sEvComp, OMX_CONFIG_EVCOMPENSATIONTYPE);
-        OMX_CONF_INIT_STRUCT(sConfigCapturing, OMX_CONFIG_BOOLEANTYPE);
-        OMX_CONF_INIT_STRUCT(sAutoPauseCapture, OMX_CONFIG_BOOLEANTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Camera port %i Default parameters\n", nPortIndex);
-
-        /* There are no default values specified for most of the above.
-           Just verify access for now.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexParamCommonSensorMode\n");
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamCommonSensorMode, (OMX_PTR)&sSensorMode, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigCommonWhiteBalance\n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigCommonWhiteBalance, (OMX_PTR)&sWhiteBalance, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigCommonDigitalZoom\n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigCommonDigitalZoom, (OMX_PTR)&sScaleFactor, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexConfigCapturing\n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexConfigCapturing, (OMX_PTR)&sConfigCapturing, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for OMX_IndexAutoPauseAfterCapture\n");
-        OMX_CONF_CONFIG_REQUIREDGETSET(pCtx, OMX_IndexAutoPauseAfterCapture, (OMX_PTR)&sAutoPauseCapture, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify
-           that the port format is as expected.
-        */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoPortFormat\n");
-        sPortFormat.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoPortFormat, (OMX_PTR) & sPortFormat);
-        if ((sPortFormat.eCompressionFormat != OMX_VIDEO_CodingUnused) ||
-                (sPortFormat.eColorFormat != OMX_COLOR_FormatYUV420Planar))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = %d (OMX_VIDEO_CodingUnused)\n",
-                       sPortFormat.eCompressionFormat);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = %d (OMX_COLOR_FormatYUV420Planar)\n",
-                       sPortFormat.eColorFormat);
-
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonvideo.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcompcommonvideo.c
deleted file mode 100644 (file)
index 01439b4..0000000
+++ /dev/null
@@ -1,888 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdCompCommonVideo.c
- *  OpenMax IL conformance test - Standard Component Test
- *  Contains common code that can be reused by various standard video component tests.
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    static OMX_ERRORTYPE StdCompCommonVideo_PortFormatSupported(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_VIDEO_CODINGTYPE eCompressionFormat,
-        OMX_COLOR_FORMATTYPE eColorFormat)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying port format support\n");
-
-        sPortFormat.nPortIndex = nPortIndex;
-
-        for (sPortFormat.nIndex = 0; ; sPortFormat.nIndex++)
-        {
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoPortFormat, (OMX_PTR) & sPortFormat);
-            if (OMX_ErrorNoMore == eError)
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            if ((sPortFormat.eCompressionFormat == eCompressionFormat) &&
-                    (sPortFormat.eColorFormat == eColorFormat))
-                break;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    static OMX_ERRORTYPE StdCompCommonVideo_CommonPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_DIRTYPE eDir)
-    {
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelRead;
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelWrite;
-        OMX_VIDEO_PARAM_BITRATETYPE sBitRate;
-        OMX_CONFIG_FRAMERATETYPE sFrameRate;
-        OMX_VIDEO_CONFIG_BITRATETYPE sConfigBitRate;
-
-        OMX_CONF_INIT_STRUCT(sProfileLevelRead, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sProfileLevelWrite, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sBitRate, OMX_VIDEO_PARAM_BITRATETYPE);
-        OMX_CONF_INIT_STRUCT(sFrameRate, OMX_CONFIG_FRAMERATETYPE);
-        OMX_CONF_INIT_STRUCT(sConfigBitRate, OMX_VIDEO_CONFIG_BITRATETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying port %i common default parameters\n", nPortIndex);
-
-        /* Verify default settings and support for OMX_IndexParamVideoProfileLevelQuerySupported and OMX_IndexParamVideoProfileLevelCurrent */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default setting for OMX_IndexParamVideoProfileLevelQuerySupported and OMX_IndexParamVideoProfileLevelCurrent\n");
-        sProfileLevelRead.nPortIndex = nPortIndex;
-        sProfileLevelWrite.nPortIndex = nPortIndex;
-
-        for (i = 0; ; i++)
-        {
-            sProfileLevelWrite.nProfileIndex = i;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoProfileLevelQuerySupported, (OMX_PTR) & sProfileLevelWrite);
-            if (eError == OMX_ErrorNoMore)
-            {
-                eError = OMX_ErrorNone;
-                break;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoProfileLevelCurrent, (OMX_PTR) & sProfileLevelWrite);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoProfileLevelCurrent, (OMX_PTR) & sProfileLevelRead);
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-            if ((sProfileLevelRead.eProfile != sProfileLevelWrite.eProfile) ||
-                    (sProfileLevelRead.eLevel != sProfileLevelWrite.eLevel))
-            {
-                eError = OMX_ErrorBadParameter;
-                OMX_CONF_BAIL_ON_ERROR(eError);
-            }
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eProfile = %d, eLevel = %d\n",
-                           sProfileLevelRead.eProfile, sProfileLevelRead.eLevel);
-        }
-
-        /* Parameter verification for encoders */
-        if (eDir == OMX_DirOutput)
-        {
-            /* Verify default settings and support for OMX_IndexParamVideoBitrate */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for OMX_IndexParamVideoBitrate\n");
-            sBitRate.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoBitrate, (OMX_PTR) & sBitRate);
-            if ((sBitRate.eControlRate != OMX_Video_ControlRateConstant) ||
-                    (sBitRate.nTargetBitrate != 64000))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eControlRate = OMX_Video_ControlRateConstant\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nTargetBitrate = 64000\n");
-
-            /* Verify default setting for OMX_IndexConfigVideoFramerate */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for OMX_IndexConfigVideoFramerate\n");
-            sFrameRate.nPortIndex = nPortIndex;
-            eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigVideoFramerate, (OMX_PTR) & sFrameRate);
-            if (sFrameRate.xEncodeFramerate != (15 << 16))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xEncodeFramerate = %d (15 << 16)\n", sFrameRate.xEncodeFramerate);
-
-            /* Verify default setting for OMX_IndexConfigVideoBitrate */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for OMX_IndexConfigVideoBitrate\n");
-            sConfigBitRate.nPortIndex = nPortIndex;
-            eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigVideoBitrate, (OMX_PTR) & sConfigBitRate);
-            if (sConfigBitRate.nEncodeBitrate != 64000)
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xEncodeBitrate = 64000\n");
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_H263PortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_VIDEO_PARAM_H263TYPE sFormatH263;
-        OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE sErrorCorrection;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatH263, OMX_VIDEO_PARAM_H263TYPE);
-        OMX_CONF_INIT_STRUCT(sErrorCorrection, OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying H.263 port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingH263) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatUnused) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingH263\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingH263, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingH263\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings for H263 */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoH263\n");
-        sFormatH263.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoH263, (OMX_PTR) & sFormatH263);
-        if ((sFormatH263.eProfile != OMX_VIDEO_H263ProfileBaseline) ||
-                (sFormatH263.eLevel != OMX_VIDEO_H263Level10) ||
-                (sFormatH263.bPLUSPTYPEAllowed != OMX_FALSE) ||
-                (sFormatH263.bForceRoundingTypeToZero != OMX_TRUE))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eProfile = OMX_VIDEO_H263ProfileBaseLine\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eLevel = OMX_VIDEO_H263Level10\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bPLUSPTYPEAllowed = OMX_FALSE\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bForceRoundingTypeToZero = OMX_TRUE\n");
-
-        /* Parameter verification for encoders */
-        if (sPortDefinition.eDir == OMX_DirOutput)
-        {
-            /* Verify settings for OMX_IndexParamVideoH263 */
-            if ((sFormatH263.nGOBHeaderInterval < 1) ||
-                    (sFormatH263.nGOBHeaderInterval > 9))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " 1 < nGOBHeaderInterval < 9\n");
-
-            /* Verify default setting for OMX_IndexParamVideoErrorCorrection */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoErrorCorrection \n");
-            sErrorCorrection.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoErrorCorrection, (OMX_PTR) & sErrorCorrection);
-            if ((sErrorCorrection.bEnableHEC != OMX_TRUE) ||
-                    (sErrorCorrection.bEnableResync != OMX_TRUE))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnableHEC = OMX_TRUE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnableResync = OMX_TRUE\n");
-        }
-
-        /* Verify default settings for common parameters */
-        eError = StdCompCommonVideo_CommonPortParameters(pCtx, nPortIndex, sPortDefinition.eDir);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_AvcPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_VIDEO_PARAM_AVCTYPE sFormatAvc;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatAvc, OMX_VIDEO_PARAM_AVCTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AVC port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingAVC) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatUnused) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingAVC\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingAVC, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingAVC\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings for AVC */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoAVC\n");
-        sFormatAvc.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoAvc, (OMX_PTR) & sFormatAvc);
-        if ((sFormatAvc.eProfile != OMX_VIDEO_AVCProfileBaseline) ||
-                (sFormatAvc.eLevel != OMX_VIDEO_AVCLevel1))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eProfile = OMX_VIDEO_AVCProfileBaseLine\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eLevel = OMX_VIDEO_AVCLevel1\n");
-
-        /* Parameter verification for encoders */
-        if (sPortDefinition.eDir == OMX_DirOutput)
-        {
-            /* Verify settings for OMX_IndexParamVideoAvc */
-            if ((sFormatAvc.bUseHadamard != OMX_TRUE) ||
-                    (sFormatAvc.nRefFrames != 1) ||
-                    (sFormatAvc.bEnableFMO != OMX_FALSE) ||
-                    (sFormatAvc.bEnableASO != OMX_FALSE) ||
-                    (sFormatAvc.bWeightedPPrediction != OMX_FALSE) ||
-                    (sFormatAvc.bconstIpred != OMX_FALSE))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bUseHadamard = OMX_TRUE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nRefFrames = 1\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnableFMO = OMX_FALSE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnableASO = OMX_FALSE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bWeightedPPrediction = OMX_FALSE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bconstIpred = OMX_FALSE\n");
-        }
-
-        /* Verify default settings for common parameters */
-        eError = StdCompCommonVideo_CommonPortParameters(pCtx, nPortIndex, sPortDefinition.eDir);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_Mpeg4PortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_VIDEO_PARAM_MPEG4TYPE sFormatMpeg4;
-        OMX_VIDEO_PARAM_BITRATETYPE sVideoBitRate;     // for encoder
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatMpeg4, OMX_VIDEO_PARAM_MPEG4TYPE);
-        OMX_CONF_INIT_STRUCT(sVideoBitRate, OMX_VIDEO_PARAM_BITRATETYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MPEG4 port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingMPEG4) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatUnused) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingMPEG4\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingMPEG4, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingMPEG4\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings and support for OMX_IndexParamVideoMpeg4 */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoMpeg4\n");
-        sFormatMpeg4.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoMpeg4, (OMX_PTR) & sFormatMpeg4);
-        if ((sFormatMpeg4.eProfile != OMX_VIDEO_MPEG4ProfileSimple) ||
-                (sFormatMpeg4.eLevel != OMX_VIDEO_MPEG4Level1))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eProfile = OMX_VIDEO_MPEG4ProfileSimple\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eLevel = OMX_VIDEO_MPEG4Level1\n");
-
-        /* Parameter verification for encoders */
-        if (sPortDefinition.eDir == OMX_DirOutput)
-        {
-            /* Verify settings for OMX_IndexParamVideoMpeg4*/
-            if ((sFormatMpeg4.bSVH != OMX_FALSE) ||
-                    (sFormatMpeg4.nIDCVLCThreshold != 0) ||
-                    (sFormatMpeg4.bACPred != OMX_TRUE) ||
-                    (sFormatMpeg4.bReversibleVLC != OMX_FALSE) ||
-                    (sFormatMpeg4.nHeaderExtension < 0) ||
-                    (sFormatMpeg4.nHeaderExtension > 99))
-                eError = OMX_ErrorBadParameter;
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bSVH = OMX_FALSE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nIDCVLCThreshold = 0\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bACPred = OMX_TRUE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bReversibleVLC = OMX_FALSE\n");
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nHeaderExtension = %d\n");
-
-            /* Verify support for OMX_IndexParamVideoBitrate and verify the default value. */
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoBitrate\n");
-            sVideoBitRate.nPortIndex = nPortIndex;
-            eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoBitrate, (OMX_PTR) & sVideoBitRate);
-            if (sVideoBitRate.eControlRate != OMX_Video_ControlRateConstant)
-                eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-            OMX_CONF_BAIL_ON_ERROR(eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_Video_ControlRateConstant (Default)\n");
-
-            /* Verify this value can be changed.*/
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamVideoBitrate,
-                                             (OMX_PTR)&sVideoBitRate,
-                                             sVideoBitRate.eControlRate,
-                                             OMX_Video_ControlRateDisable, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_Video_ControlRateDisable\n");
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamVideoBitrate,
-                                             (OMX_PTR)&sVideoBitRate,
-                                             sVideoBitRate.eControlRate,
-                                             OMX_Video_ControlRateVariable, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_Video_ControlRateVariable\n");
-            OMX_CONF_PARAM_READ_WRITE_VERIFY(pCtx, OMX_IndexParamVideoBitrate,
-                                             (OMX_PTR)&sVideoBitRate,
-                                             sVideoBitRate.eControlRate,
-                                             OMX_Video_ControlRateConstant, eError);
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_Video_ControlRateConstant\n");
-        }
-
-        /* Verify default settings for common parameters */
-        eError = StdCompCommonVideo_CommonPortParameters(pCtx, nPortIndex, sPortDefinition.eDir);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_RvPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_VIDEO_PARAM_BITRATETYPE sBitRate;
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelRead;
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelWrite;
-        OMX_VIDEO_PARAM_RVTYPE sFormatRv;
-        OMX_VIDEO_RVFORMATTYPE eFormat;
-        OMX_BOOL bEnablePostFilter;
-        OMX_BOOL bEnableLatencyMode;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sBitRate, OMX_VIDEO_PARAM_BITRATETYPE);
-        OMX_CONF_INIT_STRUCT(sProfileLevelRead, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sProfileLevelWrite, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatRv, OMX_VIDEO_PARAM_RVTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Real Video port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingRV) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatUnused) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingRV\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingRV, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingRV\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings and support for OMX_IndexParamVideoRv*/
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoRv\n");
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoRv, (OMX_PTR) & sFormatRv);
-        if ((sFormatRv.eFormat != OMX_VIDEO_RVFormat9) ||
-                (sFormatRv.bEnablePostFilter != OMX_FALSE) ||
-                (sFormatRv.bEnableLatencyMode != OMX_FALSE))
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "eFormat = OMX_VIDEO_RVFormat9\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnablePostFilter = OMX_FALSE\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " bEnableLatencyMode = OMX_FALSE\n");
-
-        /* Verify combination of settings */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying all combinations of eFormat,"
-                       " bEnablePostFilter, bEnableLatencyMode\n");
-        for (eFormat = OMX_VIDEO_RVFormat8; ; eFormat = OMX_VIDEO_RVFormat9)
-        {
-            for (bEnablePostFilter = OMX_FALSE; ; bEnablePostFilter = OMX_TRUE)
-            {
-                for (bEnableLatencyMode = OMX_FALSE; ; bEnableLatencyMode = OMX_TRUE)
-                {
-                    sFormatRv.eFormat = eFormat;
-                    sFormatRv.bEnablePostFilter = bEnablePostFilter;
-                    sFormatRv.bEnableLatencyMode = bEnableLatencyMode;
-                    eError = OMX_SetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoRv, (OMX_PTR) & sFormatRv);
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-
-                    eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoRv, (OMX_PTR) & sFormatRv);
-                    if ((eFormat != sFormatRv.eFormat) ||
-                            (bEnablePostFilter != sFormatRv.bEnablePostFilter) ||
-                            (bEnableLatencyMode != sFormatRv.bEnableLatencyMode))
-                        eError = OMX_ErrorBadParameter;
-                    OMX_CONF_BAIL_ON_ERROR(eError);
-
-                    if (OMX_TRUE == bEnableLatencyMode) break;
-                }
-
-                if (OMX_TRUE == bEnablePostFilter) break;
-            }
-
-            if (OMX_VIDEO_RVFormat9 == eFormat) break;
-        }
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_WmvPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-        OMX_VIDEO_PARAM_BITRATETYPE sBitRate;
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelRead;
-        OMX_VIDEO_PARAM_PROFILELEVELTYPE sProfileLevelWrite;
-        OMX_VIDEO_PARAM_WMVTYPE sFormatWmv;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-        OMX_CONF_INIT_STRUCT(sBitRate, OMX_VIDEO_PARAM_BITRATETYPE);
-        OMX_CONF_INIT_STRUCT(sProfileLevelRead, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sProfileLevelWrite, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
-        OMX_CONF_INIT_STRUCT(sFormatWmv, OMX_VIDEO_PARAM_WMVTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying WMV Video port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingWMV) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatUnused) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingWMV\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingWMV, OMX_COLOR_FormatUnused);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingWMV\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatUnused\n");
-
-        /* Verify default settings and support for OMX_IndexParamVideoWmv*/
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamVideoWmv\n");
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamVideoWmv, (OMX_PTR) & sFormatWmv);
-        if (sFormatWmv.eFormat != OMX_VIDEO_WMVFormat9)
-            eError = OMX_ErrorBadParameter;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_VIDEO_WMVFormat9 (Default)\n");
-
-        OMX_CONF_PARAM_WRITE_VERIFY(pCtx, OMX_IndexParamVideoWmv,
-                                    (OMX_PTR)&sFormatWmv, sFormatWmv.eFormat, OMX_VIDEO_WMVFormat7, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_VIDEO_WMVFormat7 (Default)\n");
-
-        OMX_CONF_PARAM_WRITE_VERIFY(pCtx, OMX_IndexParamVideoWmv,
-                                    (OMX_PTR)&sFormatWmv, sFormatWmv.eFormat, OMX_VIDEO_WMVFormat8, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " OMX_VIDEO_WMVFormat8 (Default)\n");
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_RawPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw Video port %i Default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters. */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify Port Definition */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and defaults for OMX_IndexParamPortDefinition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingUnused) ||
-                (sPortDefinition.format.video.eColorFormat != OMX_COLOR_FormatYUV420Planar) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 144) ||
-                (sPortDefinition.format.video.nBitrate != 64000) ||
-                (sPortDefinition.format.video.xFramerate != (15 << 16)))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = OMX_PortDomainVideo\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompression = OMX_VIDEO_CodingUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatYUV420Planar\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = 176\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameHeight = 144  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nBitrate = 64000  \n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " xFramerate = %d (15 << 16))\n", sPortDefinition.format.video.xFramerate);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingUnused, OMX_COLOR_FormatYUV420Planar);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingUnused\n");
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatYUV420Planar\n");
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_IVRendererPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex)
-    {
-        OMX_U32 i;
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_CONFIG_ROTATIONTYPE sRotation;
-        OMX_CONFIG_MIRRORTYPE sMirror;
-        OMX_CONFIG_SCALEFACTORTYPE sScale;
-        OMX_CONFIG_RECTTYPE sRect;
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-
-        OMX_CONF_INIT_STRUCT(sRotation, OMX_CONFIG_ROTATIONTYPE);
-        OMX_CONF_INIT_STRUCT(sMirror, OMX_CONFIG_MIRRORTYPE);
-        OMX_CONF_INIT_STRUCT(sScale, OMX_CONFIG_SCALEFACTORTYPE);
-        OMX_CONF_INIT_STRUCT(sRect, OMX_CONFIG_RECTTYPE);
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying common video renderer input port parameters\n");
-
-        /* Verify support for OMX_IndexConfigCommonRotate */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default setting for OMX_IndexConfigCommonRotate\n");
-        sRotation.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonRotate, (OMX_PTR) & sRotation);
-        if (sRotation.nRotation != 0)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "nRotation = %d\n", sRotation.nRotation);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for other values of OMX_IndexConfigCommonRotate\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 90, eError);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 180, eError);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonRotate,
-                                     (OMX_PTR)&sRotation, sRotation.nRotation, 270, eError);
-
-        /* Verify support for OMX_IndexConfigCommonMirror */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default setting for OMX_IndexConfigCommonMirror\n");
-        sMirror.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonMirror, (OMX_PTR) & sMirror);
-        if (sMirror.eMirror != OMX_MirrorNone)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorNone)\n", sMirror.eMirror);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support for other values of OMX_IndexConfigCommonMirror\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorVertical, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorVertical)\n", sMirror.eMirror);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorHorizontal, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorHorizontal)\n", sMirror.eMirror);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonMirror,
-                                     (OMX_PTR)&sMirror, sMirror.eMirror, OMX_MirrorBoth, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " %d (OMX_MirrorBoth)\n", sMirror.eMirror);
-
-        /* Verify support for OMX_IndexConfigCommonScale */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying settings for OMX_IndexConfigCommonScale\n");
-        sScale.nPortIndex = nPortIndex;
-
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonScale,
-                                          (OMX_PTR)&sScale, sScale.xWidth, (1 << 15), 0, eError);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonScale,
-                                     (OMX_PTR)&sScale, sScale.xHeight, (1 << 15), eError);
-
-        /* Get frame width and height */
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-
-        /* Verify support for OMX_IndexConfigCommonInputCrop */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying default settings for OMX_IndexConfigCommonInputCrop\n");
-        sRect.nPortIndex = nPortIndex;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigCommonInputCrop, (OMX_PTR) & sRect);
-        if ((sRect.nLeft != 0) ||
-                (sRect.nTop != 0) ||
-                (sRect.nWidth != sPortDefinition.format.video.nFrameWidth) ||
-                (sRect.nHeight != sPortDefinition.format.video.nFrameHeight))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other settings for OMX_IndexConfigCommonInputCrop\n");
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nLeft, 1, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nLeft = %d\n", sRect.nLeft);
-
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nTop, 1, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nTop = %d\n", sRect.nTop);
-
-        i = sRect.nWidth >> 1;
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nWidth, i, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nWidth/2 = %d\n", sRect.nWidth);
-
-        i = sRect.nHeight >> 1;
-        OMX_CONF_CONFIG_WRITE_VERIFY(pCtx, OMX_IndexConfigCommonInputCrop,
-                                     (OMX_PTR)&sRect, sRect.nHeight, i, eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nHeight/2 = %d\n", sRect.nHeight);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdCompCommonVideo_QcifPlusPortParameters(
-        TEST_CTXTYPE *pCtx,
-        OMX_U32 nPortIndex,
-        OMX_COLOR_FORMATTYPE eColorFormat)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_PARAM_PORTDEFINITIONTYPE sPortDefinition;
-        OMX_VIDEO_PARAM_PORTFORMATTYPE sPortFormat;
-
-        OMX_CONF_INIT_STRUCT(sPortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
-        OMX_CONF_INIT_STRUCT(sPortFormat, OMX_VIDEO_PARAM_PORTFORMATTYPE);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying QCIF+ video port %i default parameters\n", nPortIndex);
-
-        /* Verify support for the common standard component port parameters */
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify default port definition settings */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying support and default settings for QcifPlus port definition\n");
-        sPortDefinition.nPortIndex = nPortIndex;
-        eError = OMX_GetParameter(pCtx->hWrappedComp, OMX_IndexParamPortDefinition, (OMX_PTR) & sPortDefinition);
-        if ((sPortDefinition.eDomain != OMX_PortDomainVideo) ||
-                (sPortDefinition.format.video.nFrameWidth != 176) ||
-                (sPortDefinition.format.video.nFrameHeight != 220) ||
-                (sPortDefinition.format.video.nStride != ((OMX_COLOR_FormatYUV420Planar == eColorFormat) ? 176 : 352)) ||
-                (sPortDefinition.format.video.nSliceHeight != 16) ||
-                (sPortDefinition.format.video.eCompressionFormat != OMX_VIDEO_CodingUnused) ||
-                (sPortDefinition.format.video.eColorFormat != eColorFormat))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eDomain = %d (OMX_PortDomainVideo)\n", sPortDefinition.eDomain);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nFrameWidth = %d, nFrameHeight = %d\n",
-                       sPortDefinition.format.video.nFrameWidth, sPortDefinition.format.video.nFrameHeight);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " nStride = %d, nSliceHeight = %d\n",
-                       sPortDefinition.format.video.nStride, sPortDefinition.format.video.nSliceHeight);
-
-        /* Verify support for OMX_IndexParamVideoPortFormat and verify that the port format is as expected */
-        eError = StdCompCommonVideo_PortFormatSupported(pCtx, nPortIndex, OMX_VIDEO_CodingUnused, eColorFormat);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eCompressionFormat = OMX_VIDEO_CodingUnused\n");
-        if (OMX_COLOR_FormatYUV420Planar == eColorFormat)
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_FormatYUV420Planar\n");
-        else if (OMX_COLOR_Format16bitRGB565 == eColorFormat)
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, " eColorFormat = OMX_COLOR_Format16bitRGB565\n");
-
-        eError = StdCompCommonVideo_IVRendererPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-        return(eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcomponentroletest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcomponentroletest.c
deleted file mode 100644 (file)
index 37fd1d3..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdComponentRoleTest.c
- *  OpenMax IL conformance test - Standard Component Roles Query and Verification Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdComponentRoleTest"
-
-    extern OMX_ERRORTYPE OMX_CONF_StdAudioCapturerTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdAudioDecoderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdAudioProcessorTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryAudioReaderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryVideoReaderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryImageReaderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryAudioWriterTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryVideoWriterTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdBinaryImageWriterTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdImageDecoderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdImageEncoderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdIVRendererTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdVideoDecoderTest(OMX_IN OMX_STRING);
-    extern OMX_ERRORTYPE OMX_CONF_StdVideoEncoderTest(OMX_IN OMX_STRING);
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-    /*  Get all roles of the given standard component and test each of those roles
-        for the 'standardness'.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdComponentRoleTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Roles supported by %s : \n", cComponentName);
-        for (i = 0; i < nNumRoles; i++)
-            OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "\tIndex %d : %s\n", i, sRoles[i]);
-
-        /*
-        For each role, find out the class of the standard component.
-        Then invoke the standard component test for that class.
-        */
-        for (i = 0; i < nNumRoles; i++)
-        {
-
-            if (strstr(sRoles[i], "audio_capturer") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdAudioCapturerTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_decoder") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdAudioDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_processor") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdAudioProcessorTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_reader") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryAudioReaderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_reader") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryVideoReaderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_reader") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryImageReaderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "audio_writer") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryAudioWriterTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_writer") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryVideoWriterTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_writer") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdBinaryImageWriterTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_decoder") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdImageDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "image_encoder") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdImageEncoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "iv_renderer") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdIVRendererTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_decoder") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdVideoDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_encoder") != NULL)
-            {
-                OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Testing Role %s of %s\n",
-                               sRoles[i], cComponentName);
-                eError = OMX_CONF_StdVideoEncoderTest(cComponentName);
-            }
-
-            /* Add here more classes when tests are available. */
-
-            else
-            {
-                eError = OMX_ErrorUndefined;   // How about OMX_ErrorNotStandardComponent.
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainerdemuxertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainerdemuxertest.c
deleted file mode 100644 (file)
index 0c71b47..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdContainerDemuxerTest.c
- *  OpenMax IL conformance test - Standard Container Demuxer Class Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdContainerDemuxerTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdContainerDemuxerTest_3GpDemuxer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-        OMX_PARAM_U32TYPE sTestParam;
-
-        OMX_CONF_INIT_STRUCT(sTestParam, OMX_PARAM_U32TYPE);
-
-        eError = StdComponentTest_SetRole(pCtx, "container_demuxer.3gp");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard 3GP Container Demuxer component, there must be at least
-           one port each of the audio, video and other domains. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Output port, format? */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM output port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_ContainerDemuxerPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify addition APB+0 settings
-           No defaults mentioned in the specification. Verify access.
-        */
-        sTestParam.nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamActiveStream,
-                                      (OMX_PTR)&sTestParam, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_GetParameter(pCtx, OMX_IndexParamNumAvailableStreams,
-                                  (OMX_PTR) & sTestParam);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; output port, format? */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_ContainerDemuxerPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify addition VPB+0 settings
-           No defaults mentioned in the specification. Verify access.
-        */
-        sTestParam.nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        OMX_CONF_PARAM_REQUIREDGETSET(pCtx, OMX_IndexParamActiveStream,
-                                      (OMX_PTR)&sTestParam, eError);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = OMX_GetParameter(pCtx, OMX_IndexParamNumAvailableStreams,
-                                  (OMX_PTR) & sTestParam);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + 0; input port, OTHER format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other (media time) input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        eError = StdCompCommonOther_ContainerDemuxerPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdContainerDemuxerTest_AsfDemuxer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "container_demuxer.asf");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard ASF Container Demuxer component, there must be at least
-           one port each of the audio, video and other domains. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Output port, PCM format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM output port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* TO DO: Verify additional support for some additional configs. */
-        /* OMX_IndexConfigAudioVolume, OMX_IndexConfigAudioMute */
-        /* Also need to verify the default value for bInterleaved (OMX_IndexParamAudioPcm). */
-
-        /* Verify - Port Index = VPB + 0; output port, raw format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + 0; input port, OTHER format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other (media time) input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdContainerDemuxerTest_RealDemuxer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "container_demuxer.real");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard Real Container Demuxer component, there must be at least
-           one port each of the audio, video and other domains. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Output port, PCM format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying PCM output port 0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonAudio_PcmPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* TO DO: Verify additional support for some additional configs. */
-        /* OMX_IndexConfigAudioVolume, OMX_IndexConfigAudioMute */
-        /* Also need to verify the default value for bInterleaved (OMX_IndexParamAudioPcm). */
-
-        /* Verify - Port Index = VPB + 0; output port, raw format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + 0; input port, OTHER format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying other (media time) input port 0 \n");
-        nPortIndex = pCtx->sPortParamOther.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard 3GP Container Demuxer. */
-
-    OMX_ERRORTYPE OMX_CONF_Std3GpContainerDemuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "container_demuxer.3gp");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdContainerDemuxerTest_3GpDemuxer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard ASF Container Demuxer. */
-
-    OMX_ERRORTYPE OMX_CONF_StdAsfContainerDemuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "container_demuxer.asf");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdContainerDemuxerTest_AsfDemuxer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Real Container Demuxer. */
-
-    OMX_ERRORTYPE OMX_CONF_StdRealContainerDemuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "container_demuxer.real");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdContainerDemuxerTest_RealDemuxer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the Container Demuxer class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdContainerDemuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "container_demuxer.3gp") != NULL)
-            {
-                eError = OMX_CONF_Std3GpContainerDemuxerTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "container_demuxer.asf") != NULL)
-            {
-                eError = OMX_CONF_StdAsfContainerDemuxerTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "container_demuxer.real") != NULL)
-            {
-                eError = OMX_CONF_StdRealContainerDemuxerTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainermuxertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdcontainermuxertest.c
deleted file mode 100644 (file)
index e686205..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdContainerMuxerTest.c
- *  OpenMax IL conformance test - Standard Container Muxer Class Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdContainerMuxerTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdContainerMuxerTest_3GpMuxer(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "container_demuxer.3gp");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard 3GP Container Muxer component, there must be at least
-           one port each of the audio and video domains. */
-        if (pCtx->sPortParamAudio.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = APB + 0; Input port, format? */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying input port APB+0 \n");
-        nPortIndex = pCtx->sPortParamAudio.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_ContainerMuxerPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; Input port, format? */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying input port VPB+0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_ContainerMuxerPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard 3GP Container Muxer. */
-
-    OMX_ERRORTYPE OMX_CONF_Std3GpContainerMuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "container_muxer.3gp");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdContainerMuxerTest_3GpMuxer);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the Container Muxer class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdContainerMuxerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "container_muxer.3gp") != NULL)
-            {
-                eError = OMX_CONF_Std3GpContainerMuxerTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimagedecodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimagedecodertest.c
deleted file mode 100644 (file)
index 83e70a8..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdImageDecoderTest.c
- *  OpenMax IL conformance test - Standard Image Decoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdImageDecoderTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdImageDecoderTest_JpegDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "image_decoder.jpeg");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard JPEG decoder component, there must be at least two image domain ports. */
-        if (pCtx->sPortParamImage.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 0; input port, JPEG format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying JPEG input port 0 \n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 0;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonImage_JpegPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 1; output port, raw image format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw image output port 1 \n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonImage_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard JPEG Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdJpegDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "image_decoder.jpeg");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdImageDecoderTest_JpegDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the image decoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdImageDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "image_decoder.jpeg") != NULL)
-            {
-                eError = OMX_CONF_StdJpegDecoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimageencodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdimageencodertest.c
deleted file mode 100644 (file)
index 64ab242..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdImageEncoderTest.c
- *  OpenMax IL conformance test - Standard Image Encoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdImageEncoderTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdImageEncoderTest_JpegEncoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "image_encoder.jpeg");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard JPEG encoder component, there must be at least two image domain ports. */
-        if (pCtx->sPortParamImage.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 0; output port, raw image format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw image output port 0 \n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonImage_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = IPB + 1; input port, JPEG format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying JPEG input port 1 \n");
-        nPortIndex = pCtx->sPortParamImage.nStartPortNumber + 1;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonImage_JpegPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard JPEG Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdJpegEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "image_encoder.jpeg");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdImageEncoderTest_JpegEncoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the image encoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdImageEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "image_encoder.jpeg") != NULL)
-            {
-                eError = OMX_CONF_StdJpegEncoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdivrenderertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdivrenderertest.c
deleted file mode 100644 (file)
index f4fe1e4..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdIVRendererTest.c
- *  OpenMax IL conformance test - Standard IV Renderer Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdIVRendererTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdIVRendererTest_YuvOverlay(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "iv_renderer.yuv.overlay");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard YUV overlay image/video renderer component, there must be at least one video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, yuv format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying YUV input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_QcifPlusPortParameters(pCtx, nPortIndex, OMX_COLOR_FormatYUV420Planar);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdIVRendererTest_RgbOverlay(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "iv_renderer.rgb.overlay");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard RGB overlay image/video renderer component, there must be at least one video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, rgb format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying RGB input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_QcifPlusPortParameters(pCtx, nPortIndex, OMX_COLOR_Format16bitRGB565);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the image/video renderer yuv overlay component */
-
-    OMX_ERRORTYPE OMX_CONF_StdYuvOverlayTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "iv_renderer.yuv.overlay");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdIVRendererTest_YuvOverlay);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the image/video renderer rgb overlay component */
-
-    OMX_ERRORTYPE OMX_CONF_StdRgbOverlayTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "iv_renderer.rgb.overlay");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdIVRendererTest_RgbOverlay);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the IV
-     * renderer class exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdIVRendererTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES];
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "iv_renderer.yuv.overlay") != NULL)
-            {
-                eError = OMX_CONF_StdYuvOverlayTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "iv_renderer.rgb.overlay") != NULL)
-            {
-                eError = OMX_CONF_StdRgbOverlayTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
-
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideodecodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideodecodertest.c
deleted file mode 100644 (file)
index dc18817..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdVideoDecoderTest.c
- *  OpenMax IL conformance test - Standard Video Decoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdVideoDecoderTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoDecoderTest_WmvDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_decoder.wmv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MPEG-4 decoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, MPEG-4 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MPEG-4 input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_WmvPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoDecoderTest_RvDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_decoder.rv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MPEG-4 decoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, real video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Real Video input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RvPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoDecoderTest_Mpeg4Decoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_decoder.mpeg4");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MPEG-4 decoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, MPEG-4 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MPEG-4 input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_Mpeg4PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoDecoderTest_H263Decoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_decoder.h263");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard H263 decoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, H263 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying H.263 input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_H263PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoDecoderTest_AvcDecoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_decoder.avc");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard AVC decoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, AVC format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AVC input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_AvcPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard AVC Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdAvcDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_decoder.avc");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoDecoderTest_AvcDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard H263 Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdH263DecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_decoder.h263");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoDecoderTest_H263Decoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard MPEG-4 Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdMpeg4DecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_decoder.mpeg4");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoDecoderTest_Mpeg4Decoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Real Video Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdRvDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_decoder.rv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoDecoderTest_RvDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard WMV Decoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdWmvDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_decoder.wmv");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoDecoderTest_WmvDecoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the video decoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdVideoDecoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "video_decoder.h263") != NULL)
-            {
-                eError = OMX_CONF_StdH263DecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_decoder.avc") != NULL)
-            {
-                eError = OMX_CONF_StdAvcDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_decoder.mpeg4") != NULL)
-            {
-                eError = OMX_CONF_StdMpeg4DecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_decoder.rv") != NULL)
-            {
-                eError = OMX_CONF_StdRvDecoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_decoder.wmv") != NULL)
-            {
-                eError = OMX_CONF_StdWmvDecoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoencodertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoencodertest.c
deleted file mode 100644 (file)
index 85d8527..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdVideoEncoderTest.c
- *  OpenMax IL conformance test - Standard Video Encoder Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdVideoEncoderTest"
-
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoEncoderTest_H263Encoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_encoder.h263");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard H.263 encoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, H.263 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying H.263 output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_H263PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoEncoderTest_AvcEncoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_encoder.avc");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard AVC encoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, AVC format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying AVC output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_AvcPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoEncoderTest_Mpeg4Encoder(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        OMX_CONFIG_FRAMERATETYPE sVideoFrameRate;
-        OMX_VIDEO_CONFIG_BITRATETYPE sVideoBitRate;
-
-        OMX_CONF_INIT_STRUCT(sVideoFrameRate, OMX_CONFIG_FRAMERATETYPE);
-        OMX_CONF_INIT_STRUCT(sVideoBitRate, OMX_VIDEO_CONFIG_BITRATETYPE);
-
-        eError = StdComponentTest_SetRole(pCtx, "video_encoder.mpeg4");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard MPEG4 encoder component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 0; input port, raw video format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_RawPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port, MPEG4 format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying MPEG4 output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonVideo_Mpeg4PortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify support for OMX_IndexConfigVideoFramerate and verify the default value. */
-        sVideoFrameRate.nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigVideoFramerate, (OMX_PTR) & sVideoFrameRate);
-        if (sVideoFrameRate.xEncodeFramerate != (15 << 16))
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify this value can be changed.*/
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigVideoFramerate,
-                                          (OMX_PTR)&sVideoFrameRate,
-                                          sVideoFrameRate.xEncodeFramerate,
-                                          (5 << 16), (10 << 16), eError);
-
-        /* Verify support for OMX_IndexConfigVideoBitrate and verify the default value. */
-        sVideoBitRate.nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        eError = OMX_GetConfig(pCtx->hWrappedComp, OMX_IndexConfigVideoBitrate, (OMX_PTR) & sVideoBitRate);
-        if (sVideoBitRate.nEncodeBitrate != 64000)
-            eError = OMX_ErrorBadParameter;  // OMX_ErrorBadPortFormatEncoding
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify this value can be changed.*/
-        OMX_CONF_CONFIG_READ_WRITE_VERIFY(pCtx, OMX_IndexConfigVideoBitrate,
-                                          (OMX_PTR)&sVideoBitRate,
-                                          sVideoBitRate.nEncodeBitrate,
-                                          32000, 11111, eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard H.263 Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdH263EncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_encoder.h263");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoEncoderTest_H263Encoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard AVC Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdAvcEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_encoder.avc");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoEncoderTest_AvcEncoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard MPEG4 Encoder. */
-
-    OMX_ERRORTYPE OMX_CONF_StdMpeg4EncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_encoder.mpeg4");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoEncoderTest_Mpeg4Encoder);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the video encoder class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdVideoEncoderTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "video_encoder.h263") != NULL)
-            {
-                eError = OMX_CONF_StdH263EncoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_encoder.avc") != NULL)
-            {
-                eError = OMX_CONF_StdAvcEncoderTest(cComponentName);
-            }
-            else if (strstr(sRoles[i], "video_encoder.mpeg4") != NULL)
-            {
-                eError = OMX_CONF_StdMpeg4EncoderTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoschedulertest.c b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/omx_conf_stdvideoschedulertest.c
deleted file mode 100644 (file)
index d953457..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- * -------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2005 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject
- * to the following conditions:
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- */
-
-/** OMX_CONF_StdVideoSchedulerTest.c
- *  OpenMax IL conformance test - Standard Video Scheduler Component Test
- */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-#include "OMX_CONF_StdCompCommon.h"
-#include <string.h>
-
-#define TEST_NAME_STRING "StdVideoSchedulerTest"
-
-    /**************************** G L O B A L S **********************************/
-
-    /*****************************************************************************/
-
-    OMX_ERRORTYPE StdVideoSchedulerTest_VideoScheduler(TEST_CTXTYPE *pCtx)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nPortIndex;
-
-        eError = StdComponentTest_SetRole(pCtx, "video_scheduler");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard Video Schdeuler component, there must be at least two video domain ports. */
-        if (pCtx->sPortParamVideo.nPorts < 2) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* For the standard Video Schdeuler component, there must be at least one other domain ports. */
-        if (pCtx->sPortParamOther.nPorts < 1) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* The specification does not say anything about the format of the video ports.
-           Checking only the common standard port parameters.
-        */
-        /* Verify - Port Index = VPB + 0; input port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying raw input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = VPB + 1; output port */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Raw video output port 1 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 1;
-        if (StdComponentTest_IsOutputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdComponentTest_StdPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        /* Verify - Port Index = OPB + 0; input port, raw format */
-        OMX_OSAL_Trace(OMX_OSAL_TRACE_INFO, "Verifying Other input port 0 \n");
-        nPortIndex = pCtx->sPortParamVideo.nStartPortNumber + 0;
-        if (StdComponentTest_IsInputPort(pCtx, nPortIndex) == OMX_FALSE) eError = OMX_ErrorUndefined;
-        OMX_CONF_BAIL_ON_ERROR(eError);
-        eError = StdCompCommonOther_OtherPortParameters(pCtx, nPortIndex);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* Test a component for compliance with the Standard Video Scheduler. */
-
-    OMX_ERRORTYPE OMX_CONF_StdXyzVideoSchdulerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        TEST_CTXTYPE ctx;
-
-        eError = StdComponentTest_IsRoleSupported(cComponentName, "video_scheduler");
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        memset(&ctx, 0x0, sizeof(TEST_CTXTYPE));
-
-        eError = StdComponentTest_StdComp(cComponentName, &ctx,
-                                          (STDCOMPTEST_COMPONENT)StdVideoSchedulerTest_VideoScheduler);
-
-OMX_CONF_TEST_BAIL:
-
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-    /* This runs through and tests all standard components of the video scheduler class
-       exposed and supported by the component.
-    */
-    OMX_ERRORTYPE OMX_CONF_StdVideoSchedulerTest(
-        OMX_IN OMX_STRING cComponentName)
-    {
-        OMX_ERRORTYPE eError = OMX_ErrorNone;
-        OMX_U32 nNumRoles;
-        OMX_STRING sRoles[MAX_COMPONENT_ROLES] = {NULL};
-        OMX_U32 i;
-
-        /* The following utility function calls OMX_GetRolesOfComponent,
-           allocates memory, and populates strings.
-        */
-        eError = StdComponentTest_PopulateRolesArray(cComponentName, &nNumRoles, sRoles);
-        OMX_CONF_BAIL_ON_ERROR(eError);
-
-        eError = OMX_ErrorComponentNotFound;
-        for (i = 0; i < nNumRoles; i++)
-        {
-            if (strstr(sRoles[i], "video_scheduler") != NULL)
-            {
-                eError = OMX_CONF_StdXyzVideoSchdulerTest(cComponentName);
-            }
-            else
-            {
-                continue;
-            }
-            OMX_CONF_BAIL_ON_ERROR(eError);
-        }
-
-OMX_CONF_TEST_BAIL:
-        StdComponentTest_FreeRolesArray(nNumRoles, sRoles);
-        return (eError);
-    }
-
-    /*****************************************************************************/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/* File EOF */
diff --git a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/stdcomptest_architecture.doc b/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/stdcomptest_architecture.doc
deleted file mode 100644 (file)
index 1c72b51..0000000
Binary files a/codecs_v2/omx/omx_testapp_enc/omx_conformance_v1.1/conformance/standardcomponenttests/stdcomptest_architecture.doc and /dev/null differ
diff --git a/doc/omx_decoder_test_app_guide.pdf b/doc/omx_decoder_test_app_guide.pdf
new file mode 100644 (file)
index 0000000..87cc384
Binary files /dev/null and b/doc/omx_decoder_test_app_guide.pdf differ
diff --git a/doc/omx_encoder_test_app_guide.pdf b/doc/omx_encoder_test_app_guide.pdf
new file mode 100644 (file)
index 0000000..5f7997c
Binary files /dev/null and b/doc/omx_encoder_test_app_guide.pdf differ