当前位置: 首页>>代码示例>>C++>>正文


C++ FunctionIn函数代码示例

本文整理汇总了C++中FunctionIn函数的典型用法代码示例。如果您正苦于以下问题:C++ FunctionIn函数的具体用法?C++ FunctionIn怎么用?C++ FunctionIn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了FunctionIn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SEC_OMX_ComponentUnload

OMX_ERRORTYPE SEC_OMX_ComponentUnload(SEC_OMX_COMPONENT *sec_component)
{
    OMX_ERRORTYPE ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE *pOMXComponent = NULL;

    FunctionIn();

    if (!sec_component) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }

    pOMXComponent = sec_component->pOMXComponent;
    if (pOMXComponent != NULL) {
        pOMXComponent->ComponentDeInit(pOMXComponent);
        SEC_OSAL_Free(pOMXComponent);
        sec_component->pOMXComponent = NULL;
    }

    if (sec_component->libHandle != NULL) {
        SEC_OSAL_dlclose(sec_component->libHandle);
        sec_component->libHandle = NULL;
    }

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:Frontier314,项目名称:android_hardware_samsung_slsi,代码行数:29,代码来源:SEC_OMX_Component_Register.c

示例2: GAS_OnInitReq

RT_STATUS
GAS_OnInitReq(
	IN	PADAPTER		pAdapter,
	IN	PRT_RFD			pRfd,
	IN	POCTET_STRING	posMpdu
	)
{
	RT_STATUS	RtStatus = RT_STATUS_SUCCESS;
	pu1Byte		pOUI = NULL;
	
	FunctionIn(COMP_MLME);

	PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu);
	
	pOUI = Frame_GAS_QueryReq_OUI(*posMpdu);
	RT_PRINT_DATA(COMP_MLME, DBG_LOUD, ("GAS Initial request: "), pOUI, 3);
	if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 )
	{
		pOUI = Frame_GAS_QueryReq_Type(*posMpdu);

		if(0x09 == *pOUI)
			P2P_OnSDReq(pAdapter, pRfd, posMpdu);
	}
	else
	{
		RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched OUI: %2x:%2x:%2x\n", pOUI[0], pOUI[1], pOUI[2]));
	}

	FunctionOut(COMP_MLME);
	return RtStatus;
}
开发者ID:0xhack,项目名称:Windows-driver-samples,代码行数:31,代码来源:Hotspot20.c

示例3: Exynos_OMX_Init

OMX_API OMX_ERRORTYPE OMX_APIENTRY Exynos_OMX_Init(void)
{
    OMX_ERRORTYPE ret = OMX_ErrorNone;

    FunctionIn();

    if (gInitialized == 0) {
        if (Exynos_OMX_Component_Register(&gComponentList, &gComponentNum)) {
            ret = OMX_ErrorInsufficientResources;
            Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Exynos_OMX_Init : %s", "OMX_ErrorInsufficientResources");
            goto EXIT;
        }

        ret = Exynos_OMX_ResourceManager_Init();
        if (OMX_ErrorNone != ret) {
            Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Exynos_OMX_Init : Exynos_OMX_ResourceManager_Init failed");
            goto EXIT;
        }

        ret = Exynos_OSAL_MutexCreate(&ghLoadComponentListMutex);
        if (OMX_ErrorNone != ret) {
            Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Exynos_OMX_Init : Exynos_OSAL_MutexCreate(&ghLoadComponentListMutex) failed");
            goto EXIT;
        }

        gInitialized = 1;
        Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "Exynos_OMX_Init : %s", "OMX_ErrorNone");
    }

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_hardware_samsung_slsi_exynos5,代码行数:34,代码来源:Exynos_OMX_Core.c

示例4: SEC_OMX_GetState

OMX_ERRORTYPE SEC_OMX_GetState (
    OMX_IN OMX_HANDLETYPE  hComponent,
    OMX_OUT OMX_STATETYPE *pState)
{
    OMX_ERRORTYPE          ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE     *pOMXComponent = NULL;
    SEC_OMX_BASECOMPONENT *pSECComponent = NULL;

    FunctionIn();

    if (hComponent == NULL || pState == NULL) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }
    pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
    ret = SEC_OMX_Check_SizeVersion(pOMXComponent, sizeof(OMX_COMPONENTTYPE));
    if (ret != OMX_ErrorNone) {
        goto EXIT;
    }

    if (pOMXComponent->pComponentPrivate == NULL) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }
    pSECComponent = (SEC_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;

    *pState = pSECComponent->currentState;
    ret = OMX_ErrorNone;

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:Asure,项目名称:android_device_samsung_dropad,代码行数:34,代码来源:SEC_OMX_Basecomponent.c

示例5: Exynos_OMX_DisablePort

OMX_ERRORTYPE Exynos_OMX_DisablePort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 portIndex)
{
    OMX_ERRORTYPE          ret = OMX_ErrorNone;
    EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;
    OMX_U32                i = 0, elemNum = 0;
    EXYNOS_OMX_MESSAGE       *message;

    FunctionIn();

    pExynosPort = &pExynosComponent->pExynosPort[portIndex];

    if (!CHECK_PORT_ENABLED(pExynosPort)) {
        ret = OMX_ErrorNone;
        goto EXIT;
    }

    if (pExynosComponent->currentState != OMX_StateLoaded) {
        if (CHECK_PORT_BUFFER_SUPPLIER(pExynosPort)) {
            while (Exynos_OSAL_GetElemNum(&pExynosPort->bufferQ) > 0) {
                message = (EXYNOS_OMX_MESSAGE*)Exynos_OSAL_Dequeue(&pExynosPort->bufferQ);
                Exynos_OSAL_Free(message);
            }
        }
        pExynosPort->portDefinition.bPopulated = OMX_FALSE;
        Exynos_OSAL_SemaphoreWait(pExynosPort->unloadedResource);
    }
    pExynosPort->portDefinition.bEnabled = OMX_FALSE;
    ret = OMX_ErrorNone;

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:SonsOfAndroid,项目名称:android_hardware,代码行数:35,代码来源:Exynos_OMX_Baseport.c

示例6: Exynos_OMX_EnablePort

OMX_ERRORTYPE Exynos_OMX_EnablePort(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 portIndex)
{
    OMX_ERRORTYPE          ret = OMX_ErrorNone;
    EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;
    OMX_U32                i = 0, cnt = 0;

    FunctionIn();

    pExynosPort = &pExynosComponent->pExynosPort[portIndex];

    if ((pExynosComponent->currentState != OMX_StateLoaded) && (pExynosComponent->currentState != OMX_StateWaitForResources)) {
        Exynos_OSAL_SemaphoreWait(pExynosPort->loadedResource);
        pExynosPort->portDefinition.bPopulated = OMX_TRUE;
    }
    pExynosPort->exceptionFlag = GENERAL_STATE;
    pExynosPort->portDefinition.bEnabled = OMX_TRUE;

    ret = OMX_ErrorNone;

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:SonsOfAndroid,项目名称:android_hardware,代码行数:25,代码来源:Exynos_OMX_Baseport.c

示例7: Exynos_OMX_Out_WaitForResource

OMX_ERRORTYPE Exynos_OMX_Out_WaitForResource(OMX_COMPONENTTYPE *pOMXComponent)
{
    OMX_ERRORTYPE                    ret                    = OMX_ErrorNone;
    EXYNOS_OMX_BASECOMPONENT        *pExynosComponent       = NULL;
    EXYNOS_OMX_RM_COMPONENT_LIST    *pRMComponentWaitList   = NULL;

    FunctionIn();

    Exynos_OSAL_MutexLock(ghVideoRMComponentListMutex);

    pExynosComponent        = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    pRMComponentWaitList    = getRMList(pExynosComponent, gpRMWaitList, NULL);

    ret = removeElementList(&pRMComponentWaitList, pOMXComponent);
    if (ret != OMX_ErrorNone)
        goto EXIT;

    ret = setRMList(pExynosComponent, gpRMWaitList, pRMComponentWaitList);

EXIT:
    Exynos_OSAL_MutexUnlock(ghVideoRMComponentListMutex);

    FunctionOut();

    return ret;
}
开发者ID:Exynos-CyanogenMod,项目名称:android_hardware_samsung_slsi_openmax,代码行数:26,代码来源:Exynos_OMX_Resourcemanager.c

示例8: SEC_OMX_BufferProcessThread

static OMX_ERRORTYPE SEC_OMX_BufferProcessThread(OMX_PTR threadData)
{
    OMX_ERRORTYPE          ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE     *pOMXComponent = NULL;
    SEC_OMX_BASECOMPONENT *pSECComponent = NULL;
    SEC_OMX_MESSAGE       *message = NULL;

    FunctionIn();

    if (threadData == NULL) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }
    pOMXComponent = (OMX_COMPONENTTYPE *)threadData;
    ret = SEC_OMX_Check_SizeVersion(pOMXComponent, sizeof(OMX_COMPONENTTYPE));
    if (ret != OMX_ErrorNone) {
        goto EXIT;
    }
    pSECComponent = (SEC_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    pSECComponent->sec_BufferProcess(pOMXComponent);

    SEC_OSAL_TheadExit(NULL);

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:Asure,项目名称:android_device_samsung_dropad,代码行数:28,代码来源:SEC_OMX_Basecomponent.c

示例9: Exynos_OMX_ComponentUnload

OMX_ERRORTYPE Exynos_OMX_ComponentUnload(EXYNOS_OMX_COMPONENT *exynos_component)
{
    OMX_ERRORTYPE ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE *pOMXComponent = NULL;

    FunctionIn();

    if (!exynos_component) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }

    pOMXComponent = exynos_component->pOMXComponent;
    if (pOMXComponent != NULL) {
        pOMXComponent->ComponentDeInit(pOMXComponent);
        Exynos_OSAL_Free(pOMXComponent);
        exynos_component->pOMXComponent = NULL;
    }

    if (exynos_component->libHandle != NULL) {
        Exynos_OSAL_dlclose(exynos_component->libHandle);
        exynos_component->libHandle = NULL;
    }

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:Exynos-CyanogenMod,项目名称:android_hardware_samsung_slsi_openmax,代码行数:29,代码来源:Exynos_OMX_Component_Register.c

示例10: SEC_MFC_Mpeg4Enc_Init

/* MFC Init */
OMX_ERRORTYPE SEC_MFC_Mpeg4Enc_Init(OMX_COMPONENTTYPE *pOMXComponent)
{
    OMX_ERRORTYPE              ret = OMX_ErrorNone;
    SEC_OMX_BASECOMPONENT     *pSECComponent = (SEC_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    SEC_OMX_BASEPORT          *pSECPort = NULL;
    SEC_MPEG4ENC_HANDLE       *pMpeg4Enc = NULL;
    OMX_HANDLETYPE             hMFCHandle = NULL;
    OMX_S32                    returnCodec = 0;

    FunctionIn();

    pMpeg4Enc = (SEC_MPEG4ENC_HANDLE *)pSECComponent->hCodecHandle;
    pMpeg4Enc->hMFCMpeg4Handle.bConfiguredMFC = OMX_FALSE;
    pSECComponent->bUseFlagEOF = OMX_FALSE;
    pSECComponent->bSaveFlagEOS = OMX_FALSE;

    /* MFC(Multi Format Codec) encoder and CMM(Codec Memory Management) driver open */
    hMFCHandle = SsbSipMfcEncOpen();
    if (hMFCHandle == NULL) {
        ret = OMX_ErrorInsufficientResources;
        goto EXIT;
    }
    pMpeg4Enc->hMFCMpeg4Handle.hMFCHandle = hMFCHandle;

    /* set MFC ENC VIDEO PARAM and initialize MFC encoder instance */
    if (pMpeg4Enc->hMFCMpeg4Handle.codecType == CODEC_TYPE_MPEG4) {
        Set_Mpeg4Enc_Param(&(pMpeg4Enc->hMFCMpeg4Handle.mpeg4MFCParam), pSECComponent);
        returnCodec = SsbSipMfcEncInit(hMFCHandle, &(pMpeg4Enc->hMFCMpeg4Handle.mpeg4MFCParam));
    } else {
        Set_H263Enc_Param(&(pMpeg4Enc->hMFCMpeg4Handle.h263MFCParam), pSECComponent);
        returnCodec = SsbSipMfcEncInit(hMFCHandle, &(pMpeg4Enc->hMFCMpeg4Handle.h263MFCParam));
    }
    if (returnCodec != MFC_RET_OK) {
        ret = OMX_ErrorInsufficientResources;
        goto EXIT;
    }

    /* allocate encoder's input buffer */
    returnCodec = SsbSipMfcEncGetInBuf(hMFCHandle, &(pMpeg4Enc->hMFCMpeg4Handle.inputInfo));
    if (returnCodec != MFC_RET_OK) {
        ret = OMX_ErrorInsufficientResources;
        goto EXIT;
    }

    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.YPhyAddr = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.YPhyAddr;
    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.CPhyAddr = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.CPhyAddr;
    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.YVirAddr = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.YVirAddr;
    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.CVirAddr = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.CVirAddr;
    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.YSize = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.YSize;
    pSECComponent->processData[INPUT_PORT_INDEX].specificBufferHeader.CSize = pMpeg4Enc->hMFCMpeg4Handle.inputInfo.CSize;

    SEC_OSAL_Memset(pSECComponent->timeStamp, -19771003, sizeof(OMX_TICKS) * MAX_TIMESTAMP);
    SEC_OSAL_Memset(pSECComponent->nFlags, 0, sizeof(OMX_U32) * MAX_FLAGS);
    pMpeg4Enc->hMFCMpeg4Handle.indexTimestamp = 0;

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:ABD3Fs,项目名称:android_device_samsung_apollo,代码行数:61,代码来源:SEC_OMX_Mpeg4enc.c

示例11: GAS_OnComebackRsp

RT_STATUS
GAS_OnComebackRsp(
	IN	PADAPTER		pAdapter,
	IN	PRT_RFD			pRfd,
	IN	POCTET_STRING	posMpdu
	)
{
	RT_STATUS	RtStatus = RT_STATUS_SUCCESS;
	pu1Byte		pOUI = NULL;
	
	FunctionIn(COMP_MLME);

	PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu);
	
	pOUI = Frame_GAS_ComebackRsp_OUI(*posMpdu);
	if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 )
	{
		pOUI = Frame_GAS_ComebackRsp_Type(*posMpdu);
		
		if(0x09 == *pOUI)
			P2P_OnSDComebackRsp(pAdapter, pRfd, posMpdu);
	}
	else
	{
		RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched OUI: %2x:%2x:%2x\n", pOUI[0], pOUI[1], pOUI[2]));
	}
	
	FunctionOut(COMP_MLME);
	return RtStatus;
}
开发者ID:0xhack,项目名称:Windows-driver-samples,代码行数:30,代码来源:Hotspot20.c

示例12: Exynos_OMX_Release_Resource

OMX_ERRORTYPE Exynos_OMX_Release_Resource(OMX_COMPONENTTYPE *pOMXComponent)
{
    OMX_ERRORTYPE                 ret                   = OMX_ErrorNone;
    EXYNOS_OMX_BASECOMPONENT     *pExynosComponent      = NULL;
    EXYNOS_OMX_RM_COMPONENT_LIST *pRMComponentList      = NULL;
    EXYNOS_OMX_RM_COMPONENT_LIST *pRMComponentWaitList  = NULL;
    EXYNOS_OMX_RM_COMPONENT_LIST *pComponentTemp        = NULL;
    OMX_COMPONENTTYPE            *pOMXWaitComponent     = NULL;
    int numElem = 0;

    FunctionIn();

    Exynos_OSAL_MutexLock(ghVideoRMComponentListMutex);

    pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
    pRMComponentList = getRMList(pExynosComponent, gpRMList, NULL);
    if (pRMComponentList == NULL) {
        ret = OMX_ErrorUndefined;
        goto EXIT;
    }

    ret = removeElementList(&pRMComponentList, pOMXComponent);
    if (ret != OMX_ErrorNone)
        goto EXIT;

    ret = setRMList(pExynosComponent, gpRMList, pRMComponentList);
    if (ret != OMX_ErrorNone)
        goto EXIT;

    pRMComponentWaitList    = getRMList(pExynosComponent, gpRMWaitList, NULL);
    pComponentTemp          = pRMComponentWaitList;

    while (pComponentTemp) {
        numElem++;
        pComponentTemp = pComponentTemp->pNext;
    }

    if (numElem > 0) {
        pOMXWaitComponent = pRMComponentWaitList->pOMXStandComp;
        ret = removeElementList(&pRMComponentWaitList, pOMXWaitComponent);
        if (ret != OMX_ErrorNone)
            goto EXIT;

        ret = setRMList(pExynosComponent, gpRMWaitList, pRMComponentWaitList);
        if (ret != OMX_ErrorNone)
            goto EXIT;

        ret = OMX_SendCommand(pOMXWaitComponent, OMX_CommandStateSet, OMX_StateIdle, NULL);
        if (ret != OMX_ErrorNone)
            goto EXIT;
    }

EXIT:
    Exynos_OSAL_MutexUnlock(ghVideoRMComponentListMutex);

    FunctionOut();

    return ret;
}
开发者ID:Exynos-CyanogenMod,项目名称:android_hardware_samsung_slsi_openmax,代码行数:59,代码来源:Exynos_OMX_Resourcemanager.c

示例13: Exynos_OMX_Port_Destructor

OMX_ERRORTYPE Exynos_OMX_Port_Destructor(OMX_HANDLETYPE hComponent)
{
    OMX_ERRORTYPE             ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE        *pOMXComponent = NULL;
    EXYNOS_OMX_BASECOMPONENT *pExynosComponent = NULL;
    EXYNOS_OMX_BASEPORT      *pExynosPort = NULL;

    OMX_S32 countValue = 0;
    int i = 0;

    FunctionIn();

    if (hComponent == NULL) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }
    pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
    ret = Exynos_OMX_Check_SizeVersion(pOMXComponent, sizeof(OMX_COMPONENTTYPE));
    if (ret != OMX_ErrorNone) {
        goto EXIT;
    }
    if (pOMXComponent->pComponentPrivate == NULL) {
        ret = OMX_ErrorBadParameter;
        goto EXIT;
    }
    pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;

    if (pExynosComponent->transientState == EXYNOS_OMX_TransStateLoadedToIdle) {
        pExynosComponent->abendState = OMX_TRUE;
        for (i = 0; i < ALL_PORT_NUM; i++) {
            pExynosPort = &pExynosComponent->pExynosPort[i];
            Exynos_OSAL_SemaphorePost(pExynosPort->loadedResource);
        }
        Exynos_OSAL_SignalWait(pExynosComponent->abendStateEvent, DEF_MAX_WAIT_TIME);
        Exynos_OSAL_SignalReset(pExynosComponent->abendStateEvent);
    }

    for (i = 0; i < ALL_PORT_NUM; i++) {
        pExynosPort = &pExynosComponent->pExynosPort[i];

        Exynos_OSAL_SemaphoreTerminate(pExynosPort->loadedResource);
        pExynosPort->loadedResource = NULL;
        Exynos_OSAL_SemaphoreTerminate(pExynosPort->unloadedResource);
        pExynosPort->unloadedResource = NULL;
        Exynos_OSAL_Free(pExynosPort->bufferStateAllocate);
        pExynosPort->bufferStateAllocate = NULL;
        Exynos_OSAL_Free(pExynosPort->extendBufferHeader);
        pExynosPort->extendBufferHeader = NULL;

        Exynos_OSAL_QueueTerminate(&pExynosPort->bufferQ);
    }
    Exynos_OSAL_Free(pExynosComponent->pExynosPort);
    pExynosComponent->pExynosPort = NULL;
    ret = OMX_ErrorNone;
EXIT:
    FunctionOut();

    return ret;
}
开发者ID:SonsOfAndroid,项目名称:android_hardware,代码行数:59,代码来源:Exynos_OMX_Baseport.c

示例14: SEC_OMX_BaseComponent_Constructor

OMX_ERRORTYPE SEC_OMX_BaseComponent_Constructor(
    OMX_IN OMX_HANDLETYPE hComponent)
{
    OMX_ERRORTYPE          ret = OMX_ErrorNone;
    OMX_COMPONENTTYPE     *pOMXComponent;
    SEC_OMX_BASECOMPONENT *pSECComponent = NULL;

    FunctionIn();

    if (hComponent == NULL) {
        ret = OMX_ErrorBadParameter;
        SEC_OSAL_Log(SEC_LOG_ERROR, "OMX_ErrorBadParameter, Line:%d", __LINE__);
        goto EXIT;
    }
    pOMXComponent = (OMX_COMPONENTTYPE *)hComponent;
    pSECComponent = SEC_OSAL_Malloc(sizeof(SEC_OMX_BASECOMPONENT));
    if (pSECComponent == NULL) {
        ret = OMX_ErrorInsufficientResources;
        SEC_OSAL_Log(SEC_LOG_ERROR, "OMX_ErrorInsufficientResources, Line:%d", __LINE__);
        goto EXIT;
    }
    SEC_OSAL_Memset(pSECComponent, 0, sizeof(SEC_OMX_BASECOMPONENT));
    pOMXComponent->pComponentPrivate = (OMX_PTR)pSECComponent;

    ret = SEC_OSAL_SemaphoreCreate(&pSECComponent->msgSemaphoreHandle);
    if (ret != OMX_ErrorNone) {
        ret = OMX_ErrorInsufficientResources;
        SEC_OSAL_Log(SEC_LOG_ERROR, "OMX_ErrorInsufficientResources, Line:%d", __LINE__);
        goto EXIT;
    }
    ret = SEC_OSAL_MutexCreate(&pSECComponent->compMutex);
    if (ret != OMX_ErrorNone) {
        ret = OMX_ErrorInsufficientResources;
        SEC_OSAL_Log(SEC_LOG_ERROR, "OMX_ErrorInsufficientResources, Line:%d", __LINE__);
        goto EXIT;
    }

    pSECComponent->bExitMessageHandlerThread = OMX_FALSE;
    SEC_OSAL_QueueCreate(&pSECComponent->messageQ);
    ret = SEC_OSAL_ThreadCreate(&pSECComponent->hMessageHandler, SEC_OMX_MessageHandlerThread, pOMXComponent);
    if (ret != OMX_ErrorNone) {
        ret = OMX_ErrorInsufficientResources;
        SEC_OSAL_Log(SEC_LOG_ERROR, "OMX_ErrorInsufficientResources, Line:%d", __LINE__);
        goto EXIT;
    }

    pOMXComponent->GetComponentVersion = &SEC_OMX_GetComponentVersion;
    pOMXComponent->SendCommand         = &SEC_OMX_SendCommand;
    pOMXComponent->GetConfig           = &SEC_OMX_GetConfig;
    pOMXComponent->GetExtensionIndex   = &SEC_OMX_GetExtensionIndex;
    pOMXComponent->GetState            = &SEC_OMX_GetState;
    pOMXComponent->SetCallbacks        = &SEC_OMX_SetCallbacks;
    pOMXComponent->UseEGLImage         = &SEC_OMX_UseEGLImage;

EXIT:
    FunctionOut();

    return ret;
}
开发者ID:Asure,项目名称:android_device_samsung_dropad,代码行数:59,代码来源:SEC_OMX_Basecomponent.c

示例15: Exynos_OMX_ResourceManager_Deinit

OMX_ERRORTYPE Exynos_OMX_ResourceManager_Deinit()
{
    OMX_ERRORTYPE ret = OMX_ErrorNone;
    EXYNOS_OMX_RM_COMPONENT_LIST *pCurrComponent;
    EXYNOS_OMX_RM_COMPONENT_LIST *pNextComponent;

    FunctionIn();

    Exynos_OSAL_MutexLock(ghVideoRMComponentListMutex);

    if (gpVideoDecRMComponentList) {
        pCurrComponent = gpVideoDecRMComponentList;
        while (pCurrComponent != NULL) {
            pNextComponent = pCurrComponent->pNext;
            Exynos_OSAL_Free(pCurrComponent);
            pCurrComponent = pNextComponent;
        }
        gpVideoDecRMComponentList = NULL;
    }
    if (gpVideoDecRMWaitingList) {
        pCurrComponent = gpVideoDecRMWaitingList;
        while (pCurrComponent != NULL) {
            pNextComponent = pCurrComponent->pNext;
            Exynos_OSAL_Free(pCurrComponent);
            pCurrComponent = pNextComponent;
        }
        gpVideoDecRMWaitingList = NULL;
    }

    if (gpVideoEncRMComponentList) {
        pCurrComponent = gpVideoEncRMComponentList;
        while (pCurrComponent != NULL) {
            pNextComponent = pCurrComponent->pNext;
            Exynos_OSAL_Free(pCurrComponent);
            pCurrComponent = pNextComponent;
        }
        gpVideoEncRMComponentList = NULL;
    }
    if (gpVideoEncRMWaitingList) {
        pCurrComponent = gpVideoEncRMWaitingList;
        while (pCurrComponent != NULL) {
            pNextComponent = pCurrComponent->pNext;
            Exynos_OSAL_Free(pCurrComponent);
            pCurrComponent = pNextComponent;
        }
        gpVideoEncRMWaitingList = NULL;
    }

    Exynos_OSAL_MutexUnlock(ghVideoRMComponentListMutex);

    Exynos_OSAL_MutexTerminate(ghVideoRMComponentListMutex);
    ghVideoRMComponentListMutex = NULL;

    ret = OMX_ErrorNone;
EXIT:
    FunctionOut();

    return ret;
}
开发者ID:voodik,项目名称:android_hardware_samsung_slsi_openmax,代码行数:59,代码来源:Exynos_OMX_Resourcemanager.c


注:本文中的FunctionIn函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。