summaryrefslogtreecommitdiff
path: root/omx
diff options
context:
space:
mode:
authorPriyesh Bisla <bisla@ti.com>2009-10-28 16:48:21 -0500
committerJames Dong <jdong@google.com>2009-11-05 17:41:28 -0800
commit300f5d1faaea6cefa5f5cd3cec785cb82fbe4551 (patch)
treea8c97d55df46ee3b6dd9a8b508f6a531a996f78b /omx
parent417c5b3dadc5686c70851d59183c829272257cc5 (diff)
downloadomap3-300f5d1faaea6cefa5f5cd3cec785cb82fbe4551.tar.gz
Send event for omx idle state transition failures
Return an error event in the case when the encoder components are unable to transition to the idle state. Originally from: https://partner.source.android.com/g/#change,1403
Diffstat (limited to 'omx')
-rw-r--r--omx/audio/src/openmax_il/aac_enc/src/OMX_AacEnc_Utils.c9
-rw-r--r--omx/audio/src/openmax_il/nbamr_enc/src/OMX_AmrEnc_Utils.c9
-rw-r--r--omx/audio/src/openmax_il/wbamr_enc/src/OMX_WbAmrEnc_Utils.c12
-rw-r--r--omx/video/src/openmax_il/video_encode/src/OMX_VideoEnc_Utils.c4
4 files changed, 30 insertions, 4 deletions
diff --git a/omx/audio/src/openmax_il/aac_enc/src/OMX_AacEnc_Utils.c b/omx/audio/src/openmax_il/aac_enc/src/OMX_AacEnc_Utils.c
index fdb89ad..c309e58 100644
--- a/omx/audio/src/openmax_il/aac_enc/src/OMX_AacEnc_Utils.c
+++ b/omx/audio/src/openmax_il/aac_enc/src/OMX_AacEnc_Utils.c
@@ -888,6 +888,15 @@ OMX_U32 AACENCHandleCommand(AACENC_COMPONENT_PRIVATE *pComponentPrivate)
if(eError != OMX_ErrorNone)
{
OMX_ERROR4(pComponentPrivate->dbg, "%d :: Error returned from LCML_Init()\n",__LINE__);
+ /* send an event to client */
+ /* client should unload the component if the codec is not able to load */
+ eError = OMX_ErrorInvalidState;
+ pComponentPrivate->cbInfo.EventHandler (pHandle,
+ pHandle->pApplicationPrivate,
+ OMX_EventError,
+ eError,
+ OMX_TI_ErrorSevere,
+ NULL);
goto EXIT;
}
diff --git a/omx/audio/src/openmax_il/nbamr_enc/src/OMX_AmrEnc_Utils.c b/omx/audio/src/openmax_il/nbamr_enc/src/OMX_AmrEnc_Utils.c
index 74f4522..b2c96c5 100644
--- a/omx/audio/src/openmax_il/nbamr_enc/src/OMX_AmrEnc_Utils.c
+++ b/omx/audio/src/openmax_il/nbamr_enc/src/OMX_AmrEnc_Utils.c
@@ -876,6 +876,15 @@ OMX_U32 NBAMRENC_HandleCommand (AMRENC_COMPONENT_PRIVATE *pComponentPrivate)
if(eError != OMX_ErrorNone) {
OMX_ERROR4(pComponentPrivate->dbg, "%d :: Error returned from LCML_Init()\n",__LINE__);
+ /* send an event to client */
+ /* client should unload the component if the codec is not able to load */
+ eError = OMX_ErrorInvalidState;
+ pComponentPrivate->cbInfo.EventHandler (pHandle,
+ pHandle->pApplicationPrivate,
+ OMX_EventError,
+ eError,
+ OMX_TI_ErrorSevere,
+ NULL);
goto EXIT;
}
diff --git a/omx/audio/src/openmax_il/wbamr_enc/src/OMX_WbAmrEnc_Utils.c b/omx/audio/src/openmax_il/wbamr_enc/src/OMX_WbAmrEnc_Utils.c
index 9faaca8..d8a984d 100644
--- a/omx/audio/src/openmax_il/wbamr_enc/src/OMX_WbAmrEnc_Utils.c
+++ b/omx/audio/src/openmax_il/wbamr_enc/src/OMX_WbAmrEnc_Utils.c
@@ -894,8 +894,16 @@ OMX_U32 WBAMRENC_HandleCommand (WBAMRENC_COMPONENT_PRIVATE *pComponentPrivate,
#endif
if(eError != OMX_ErrorNone) {
- OMX_ERROR4(pComponentPrivate->dbg,
- "Error returned from LCML_InitMMCodecEx\n");
+ OMX_ERROR4(pComponentPrivate->dbg ,"Error returned from LCML_InitMMCodecEx\n");
+ /* send an event to client */
+ /* client should unload the component if the codec is not able to load */
+ eError = OMX_ErrorInvalidState;
+ pComponentPrivate->cbInfo.EventHandler (pHandle,
+ pHandle->pApplicationPrivate,
+ OMX_EventError,
+ eError,
+ OMX_TI_ErrorSevere,
+ NULL);
goto EXIT;
}
#ifdef RESOURCE_MANAGER_ENABLED
diff --git a/omx/video/src/openmax_il/video_encode/src/OMX_VideoEnc_Utils.c b/omx/video/src/openmax_il/video_encode/src/OMX_VideoEnc_Utils.c
index b13d8ad..343453a 100644
--- a/omx/video/src/openmax_il/video_encode/src/OMX_VideoEnc_Utils.c
+++ b/omx/video/src/openmax_il/video_encode/src/OMX_VideoEnc_Utils.c
@@ -3332,7 +3332,7 @@ OMX_ERRORTYPE OMX_VIDENC_InitDSP_H264Enc(VIDENC_COMPONENT_PRIVATE* pComponentPri
OMX_PRDSP4(pComponentPrivate->dbg, "LCML_InitMMCodec Failed!...\n");
/*TODO: Validate eError from LCML_InitMMCodec for ResourceExhaustionTest */
pComponentPrivate->bErrorLcmlHandle = OMX_TRUE;
- OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorInsufficientResources);
+ OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorInvalidState);
}
pComponentPrivate->bCodecLoaded = OMX_TRUE;
VIDENC_FREE(pCreatePhaseArgs, pMemoryListHead,
@@ -3680,7 +3680,7 @@ OMX_ERRORTYPE OMX_VIDENC_InitDSP_Mpeg4Enc(VIDENC_COMPONENT_PRIVATE* pComponentPr
OMX_PRDSP4(pComponentPrivate->dbg, "LCML_InitMMCodec Failed!...\n");
/*TODO: Validate eError from LCML_InitMMCodec for ResourceExhaustionTest */
pComponentPrivate->bErrorLcmlHandle = OMX_TRUE;
- OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorInsufficientResources);
+ OMX_CONF_SET_ERROR_BAIL(eError, OMX_ErrorInvalidState);
}
pComponentPrivate->bCodecLoaded = OMX_TRUE;
VIDENC_FREE(pCreatePhaseArgs, pMemoryListHead,